Commit 77a68413 authored by spc's avatar spc

1

parent 001773ea
......@@ -11,6 +11,12 @@ App({
cloudName: 'floor', // 主云函数项目名 base clientTemplate2C
cloud,
tbcc,
// 全局可用数据
globalData: {
},
onLaunch(options) {
this.handleQuery(options.query || {});
},
......
.prizes-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
}
.prizes-modal__shade {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.75);
}
.jiang_pin_dan_chuang {
width: 500rpx;
height: 672rpx;
opacity: 1;
left: 125rpx;
top: calc(50% - 336rrpx);
position: absolute;
}
.dan_chuang_bei_jing01 {
width: 100%;
height: 100%;
opacity: 1;
top: 0;
left: 0;
position: absolute;
}
.tai_zi_kao_bei3 {
width: 318rpx;
height: 131rpx;
opacity: 1;
left: 91rpx;
top: 436rpx;
position: absolute;
}
.hao_yun_lai_lin {
width: 100%;
height: 60rpx;
line-height: 60rpx;
left: 0;
top: 96rpx;
position: absolute;
display: inline-block;
font-size: 50rpx;
text-align: center;
color: transparent;
background: linear-gradient(to top, #b65443, #ec8268);
-webkit-background-clip: text;
font-weight: 700;
}
.cha_kan_jiang_pin {
width: 299rpx;
height: 88rpx;
opacity: 1;
left: 102rpx;
top: 581rpx;
position: absolute;
}
.shang_pin {
width: 91rpx;
height: 236rpx;
opacity: 1;
left: 206rpx;
top: 256rpx;
position: absolute;
}
.an_niu_guan_bi_dan_chuang_kao_bei24 {
width: 50rpx;
height: 50rpx;
opacity: 0.5019607843137255;
left: 514rpx;
position: absolute;
}
<view class="prizes-modal">
<view class="prizes-modal__shade modal-animate-fade-in">
<view class="jiang_pin_dan_chuang">
<image class="dan_chuang_bei_jing01" src="{{resList['c34046a2-1b15-47e8-95f3-376deb238e43'].url}}" />
<image class="tai_zi_kao_bei3" src="{{resList['d3e951d6-4d66-4f5b-b0f0-47e28ff04614'].url}}" />
<text class="hao_yun_lai_lin">好运来临</text>
<image class="cha_kan_jiang_pin" src="{{resList['715120cb-b41f-425f-b8fa-bce3f4a6680a'].url}}" />
<image class="shang_pin" src="{{resList['bf24cd04-e4f7-4859-beb6-212aa712f48e'].url}}" />
<image onTap="onModalClose"
class="an_niu_guan_bi_dan_chuang_kao_bei24"
src="{{resList['4abc8bb6-5779-49ad-84b4-b4ade4f51fcb'].url}}"
/>
</view>
</view>
</view>
\ No newline at end of file
import resList from '../../resconfig/resList'
Component({
data: {
resList: resList
},
methods: {
data: {
resList: resList
},
onModalClose() {
const { onModalClose } = this.props;
onModalClose && onModalClose();
......
{
"component": true
}
\ No newline at end of file
......@@ -16,90 +16,86 @@
background-color: rgba(0, 0, 0, 0.75);
}
.ju_xing791 {
width: 752px;
height: 1626px;
opacity: 0.7019607843137254;
left: -1px;
top: -1px;
position: absolute;
transform-origin: 0px 0px 0px;
background-color: rgba(0, 0, 0, 1);
}
.jiang_li_dan_chuang {
width: 564px;
height: 545px;
width: 500rpx;
height: 523rpx;
opacity: 1;
left: 125px;
top: 442px;
left: 125rpx;
top: calc(50% - 261rpx);
position: absolute;
transform-origin: 0px 0px 0px;
}
.dan_chuang_bei_jing2 {
width: 500px;
height: 523px;
width: 100%;
height: 100%;
opacity: 1;
top: 22px;
top: 0;
left: 0;
position: absolute;
transform-origin: 0px 0px 0px;
}
.qu_chou_jiang {
width: 209px;
height: 88px;
width: 209rpx;
height: 88rpx;
opacity: 1;
left: 31px;
top: 423px;
left: 31rpx;
bottom: 36rpx;
position: absolute;
transform-origin: 0px 0px 0px;
}
.ji_xu_guan_kan {
width: 209px;
height: 88px;
width: 209rpx;
height: 88rpx;
opacity: 1;
left: 262px;
top: 423px;
left: 262rpx;
bottom: 36rpx;
position: absolute;
transform-origin: 0px 0px 0px;
}
.kan_shi_pin_jiang_li {
width: 258px;
height: 49px;
width: 100%;
height: 56rpx;
line-height: 56rpx;
opacity: 1;
left: 121px;
top: 102px;
left: 0;
top: 100rpx;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 51.33333px;
color: rgba(244, 231, 229, 1);
display: inline-block;
font-size: 50rpx;
text-align: center;
color: transparent;
background: linear-gradient(to top, #b65443, #ec8268);
-webkit-background-clip: text;
font-weight: 700;
}
.huo_de_ya_dun_bi {
width: 146px;
height: 28px;
width: 100%;
height: 32rpx;
line-height: 32rpx;
opacity: 1;
left: 177px;
top: 230px;
left: 0;
top: 230rpx;
text-align: center;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 29.33333px;
font-size: 32rpx;
color: rgba(200, 82, 73, 1);
font-weight: 500;
}
.tu_ceng40 {
width: 94px;
height: 43px;
width: 100%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
opacity: 1;
left: 204px;
top: 291px;
left: 0;
top: 288rpx;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 55px;
font-size: 55rpx;
color: rgba(200, 82, 73, 1);
font-weight: 500;
}
.an_niu_guan_bi_dan_chuang_kao_bei23 {
width: 50px;
height: 50px;
opacity: 0.5019607843137255;
left: 514px;
width: 50rpx;
height: 50rpx;
opacity: 0.5;
right: -50rpx;
top: -50rpx;
position: absolute;
transform-origin: 0px 0px 0px;
}
......@@ -6,7 +6,7 @@
<image className="dan_chuang_bei_jing2" src="{{resList['7203516e-8791-4974-955e-c8a044e16c80'].url}}"/>
<image className="qu_chou_jiang" src="{{resList['b71e74b5-16ad-4260-a382-8cf200e9e5a7'].url}}" />
<image className="ji_xu_guan_kan" src="{{resList['8da146cc-69cd-41fa-bed3-e7194ce037aa'].url}}" />
<view className="kan_shi_pin_jiang_li">看视频奖励</view>
<text className="kan_shi_pin_jiang_li">看视频奖励</text>
<view className="huo_de_ya_dun_bi">获得雅顿币</view>
<view className="tu_ceng40">+40</view>
<image
......
import resList from '../../resconfig/resList'
Component({
data: {
resList: resList
},
methods: {
onModalClose() {
const { onModalClose } = this.props;
onModalClose && onModalClose();
}
}
});
\ No newline at end of file
'use strict';
import React, { Component } from 'react';
import resList from '../../resconfig/resList';
import './comjiang_pin_dan_chuangwrapper.less';
class Comjiang_pin_dan_chuangwrapper extends Component {
constructor(props) {
super(props);
this.state = this.state || { resList: resList };
}
render() {
return (
<div className="jiang_pin_dan_chuangwrapper">
<div className="ju801" />
<div className="jiang_pin_dan_chuang">
<img className="dan_chuang_bei_jing01" src={this.state.resList['c34046a2-1b15-47e8-95f3-376deb238e43'].url} />
<img className="tai_zi_kao_bei3" src={this.state.resList['d3e951d6-4d66-4f5b-b0f0-47e28ff04614'].url} />
<span className="hao_yun_lai_lin">好运来临</span>
<img className="cha_kan_jiang_pin" src={this.state.resList['715120cb-b41f-425f-b8fa-bce3f4a6680a'].url} />
<img className="shang_pin" src={this.state.resList['bf24cd04-e4f7-4859-beb6-212aa712f48e'].url} />
<img
className="an_niu_guan_bi_dan_chuang_kao_bei24"
src={this.state.resList['4abc8bb6-5779-49ad-84b4-b4ade4f51fcb'].url}
/>
</div>
</div>
);
}
}
export default Comjiang_pin_dan_chuangwrapper;
.jiang_pin_dan_chuangwrapper {
top: 0px;
left: 0px;
width: 750px;
height: 1624px;
display: block;
position: absolute;
.ju801 {
width: 752px;
height: 1626px;
opacity: 0.7019607843137254;
left: -1px;
top: -1px;
position: absolute;
transform-origin: 0px 0px 0px;
background-color: rgba(0, 0, 0, 1);
}
.jiang_pin_dan_chuang {
width: 564px;
height: 694px;
opacity: 1;
left: 125px;
top: 442px;
position: absolute;
transform-origin: 0px 0px 0px;
.dan_chuang_bei_jing01 {
width: 500px;
height: 672px;
opacity: 1;
top: 22px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.tai_zi_kao_bei3 {
width: 318px;
height: 131px;
opacity: 1;
left: 91px;
top: 436px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.hao_yun_lai_lin {
width: 205px;
height: 49px;
opacity: 1;
left: 147px;
top: 102px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 51.33333px;
color: rgba(244, 231, 229, 1);
}
.cha_kan_jiang_pin {
width: 299px;
height: 88px;
opacity: 1;
left: 102px;
top: 581px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.shang_pin {
width: 91px;
height: 236px;
opacity: 1;
left: 206px;
top: 256px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.an_niu_guan_bi_dan_chuang_kao_bei24 {
width: 50px;
height: 50px;
opacity: 0.5019607843137255;
left: 514px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
}
......@@ -6,7 +6,6 @@
"dependencies": {
"@tbmp/mp-cloud-sdk": "*",
"fyge-tbmini": "^1.3.7",
"svga-parser": "^1.1.0",
"tans_lottie": "^1.0.4"
}
}
......@@ -8,8 +8,8 @@
<!-- 头部 规则-奖品 按钮 -->
<view class="head">
<image class="head_ruler" onTap="showRewardsModal" src="{{resList['ee8882be-4b1d-43eb-bad7-8d96318c5022'].url}}" />
<!-- <image class="head_ruler" onTap="showRulerModal" src="{{resList['ee8882be-4b1d-43eb-bad7-8d96318c5022'].url}}" /> -->
<image class="head_rewards" src="{{resList['74a63fd3-6776-44a2-990e-fadac00fb757'].url}}" />
<!-- <image class="head_ruler" onTap="" src="{{resList['ee8882be-4b1d-43eb-bad7-8d96318c5022'].url}}" /> -->
<image class="head_rewards" onTap="showPrizesModal" src="{{resList['74a63fd3-6776-44a2-990e-fadac00fb757'].url}}" />
</view>
......@@ -78,4 +78,5 @@
</view>
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closerewardsModal"></rewards-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
<prizes-modal a:if="{{prizesModalVisible}}" onModalClose="closePrizesModal"></prizes-modal>
......@@ -26,7 +26,8 @@ Page({
commonModalConfirm: null,
commonModalVisible: false,
ruleModalVisible: false,
rewardsModalVisible: false
rewardsModalVisible: false,
prizesModalVisible: false
},
onLoad(query) {
// 页面加载
......@@ -49,33 +50,21 @@ Page({
onVideoTurnSmall () {
this.setData({ videoBottom: true })
},
openShowChooseGame () {
if (!this.data.showChooseGame) {
this.setData({ showChooseGame: true })
}
doStart() {
this.showCommonModal({
content: '活动还未开始\n请稍后',
btnText: '我知道了',
commonModalVisible: true,
confirmCallback: () => {
this.closeCommonModal();
}
});
},
closeShowChooseGame () {
console.log('1')
this.setData({ showChooseGame: false })
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
/**
* 获取用户授权信息
*/
// 获取用户授权信息
async getAuth() {
const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err);
......@@ -88,9 +77,8 @@ Page({
this.login();
}
},
/**
* 获取主接口
*/
// 获取主接口
async getIndex() {
const { success, data } = await API.getIndex().catch(res => {
commonToast(res && res.message);
......@@ -101,9 +89,8 @@ Page({
this.setData({ title, content, rule });
}
},
/**
* 登录接口
*/
// 登录接口
async login() {
const { nickName, avatar } = app;
const { success } = await API.login({ userNick: nickName, avatar }).catch(res => {
......@@ -114,33 +101,14 @@ Page({
this.init();
}
},
showRuleModal() { this.setData({ ruleModalVisible: true }) },
showRewardsModal() { this.setData({ rewardsModalVisible: true }) },
/**
* 通用弹出确认按钮回调
*/
confirmCommonModal() {
const { commonModalConfirm } = this.data;
commonModalConfirm && commonModalConfirm();
},
/**
* 执行开始
*/
doStart() {
this.showCommonModal({
content: '活动还未开始\n请稍后',
btnText: '我知道了',
commonModalVisible: true,
confirmCallback: () => {
this.closeCommonModal();
}
});
// 分享
onShareAppMessage() {
// 返回自定义分享信息
return SHARE_CONFIG;
},
/**
* 显示通用弹层
* @param {object} options content: 通用弹层内容 btnText:按钮文案 confirmCallback: 按钮确认回调
*/
// 显示通用弹层
showCommonModal({ content, btnText, confirmCallback }) {
this.setData({
commonModalConfirm: confirmCallback || null,
......@@ -148,26 +116,50 @@ Page({
commonModalData: { content, btnText }
});
},
/**
* 跳转到天猫页面
*/
goTmallPage() {
navigateToOutside(REDIRECT_URL['tmall']);
// 跳转到天猫页面
goTmallPage() { navigateToOutside(REDIRECT_URL['tmall']); },
// 选择游戏 小窗
openShowChooseGame () { if (!this.data.showChooseGame) { this.setData({ showChooseGame: true }) } },
closeShowChooseGame () { this.setData({ showChooseGame: false }) },
// 弹窗控制 - 开启
showRuleModal() { this.setData({ ruleModalVisible: true }) },
showRewardsModal() { this.setData({ rewardsModalVisible: true }) },
showPrizesModal() { this.setData({ prizesModalVisible: true }) },
// 弹窗控制 - 关闭
closeRuleModal() { this.setData({ ruleModalVisible: false }) },
closeRewardsModal () { this.setData({ rewardsModalVisible: false}) },
closePrizesModal () { this.setData({ prizesModalVisible: false}) },
// 通用弹层 - 开启
confirmCommonModal() {
const { commonModalConfirm } = this.data;
commonModalConfirm && commonModalConfirm();
},
/**
* 关闭通用弹层
*/
// 通用弹层 - 关闭
closeCommonModal() {
this.setData({
commonModalVisible: false
});
},
closeRuleModal() { this.setData({ ruleModalVisible: false }) },
closeRewardsModal () { this.setData({ rewardsModalVisible: false}) },
onShareAppMessage() {
// 返回自定义分享信息
return SHARE_CONFIG;
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
});
{
"usingComponents": {
"rule-modal": "/components/ruleModal/ruleModal",
"rewards-modal": "/components/rewardsModal/rewardsModal",
"rewards-modal": "/components/comRewardsModal/comRewardsModal",
"prizes-modal": "/components/comPrizesModal/comPrizesModal",
"common-modal": "/components/commonModal/commonModal",
"end-modal": "/components/endModal/endModal"
}
......
import * as FYGE from "fyge-tbmini";
import * as SvgaParser from "svga-parser";
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment