Commit d7dfacb4 authored by Edwise's avatar Edwise 🍷

123

parents b81ee20a 6d6bce2f
......@@ -108,16 +108,16 @@ export class Main {
// })
//获取数据,,必成功
// showWaiting();
sendTbNet(TbNetName.getAppData, {}, (s, res) => {
console.log('getAppData success,res',s,res)
})
sendTbNet(TbNetName.getActivityBaseInfoById, {}, (s, res) => {
console.log('getActivityBaseInfoById success,res',s,res)
})
// sendTbNet(TbNetName.getAppData, {}, (s, res) => {
// console.log('getAppData success,res',s,res)
// })
// sendTbNet(TbNetName.getActivityBaseInfoById, {}, (s, res) => {
// console.log('getActivityBaseInfoById success,res',s,res)
// })
// console.log('准备打开弹窗')
// setTimeout(() => {
// sendTbNet(TbNetName.showModal, {name:'ruleModal'}, (s, res) => {
// console.log('showModal ruleModal, success,res',s,res)
// sendTbNet(TbNetName.showModal, {name:'messageModal',data:{catName:'喵喵'}}, (s, res) => {
// console.log('showModal messageModal, success,res',s,res)
// })
// }, 3000);
// console.log('准备切换到兑换页面')
......
......@@ -8,7 +8,8 @@ cloud.init({
App({
requestType: 'cloud', // yapi,cloud: 云函数
requestType: 'yapi', // yapi,cloud: 云函数
cloudName: 'floor', // 主云函数项目名 base clientTemplate2C
cloudName: 'tmallCat', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud,
tbcc,
onLaunch(options) {
......
{
"pages": [
"pages/pagecanvas/pagecanvas",
"pages/pageshop/pageshop",
"pages/index/index",
"pages/pageshop/pageshop",
"pages/myprize/myprize"
],
"window": {
......
......@@ -2,7 +2,7 @@
<view class="message__shade modal-animate-fade-in" />
<view class="message ">
<image class="message_bg " src={{resList['0c446868-16d2-47f1-a0d6-27dadff681f2'].url}} />
<label class="message_txt ">猫咪名字 留</label>
<label class="message_txt ">{{mydata.catName}}</label>
<image class="message_btn " onTap="onModalClose" src={{resList['3ad6a924-dda8-49f4-b8fc-0e796347e802'].url}} />
<image class="message_closebtn " onTap="onModalClose" src={{resList['5488b126-f520-496f-ace6-010a89eb108f'].url}} />
</view>
......
......@@ -2,7 +2,9 @@
import resList from '../../resconfig/resList';
Component({
props: {},
props: {
mydata:null
},
data: {
resList: resList
},
......
......@@ -6,4 +6,4 @@
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<levelup-modal a:if="{{levelupModalVisible}}" onModalClose="closeLevelupModal"></levelup-modal>
<message-modal a:if="{{messageModalVisible}}" onModalClose="closeMessageModal"></message-modal>
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
......@@ -25,7 +25,8 @@ const checkSystem = async () => {
Page({
data: {
messageModalVisible: true,
messageModalVisible: false,
messageModalData: {},
ruleModalVisible: false,
levelupModalVisible: false
},
......@@ -47,7 +48,38 @@ Page({
onReady() {
console.log('on ready')
//授权和登录先搞
// this.getAuth();
// this.getAuth();
setTimeout(() => {
// this.onMessage({
// data: {
// netName: 'mine.showModal',
// parameter: {
// name: 'levelupModal'
// }
// }
// });
// this.onMessage({
// data: {
// netName: 'mine.showModal',
// parameter: {
// name: 'messageModal',
// data: { catName: '喵喵1122' }
// }
// }
// });
// this.onMessage({
// data: {
// netName: 'mine.navigateToPage',
// parameter: {
// name: 'pageshop'
// }
// }
// });
}, 1000);
},
init() {
......@@ -97,7 +129,7 @@ Page({
},
postMessage(netName, data) {
this.main.dispatchGlobalEvent({
this.main && this.main.dispatchGlobalEvent({
type: netName
}, data); //以防复用事件event串了,就用这种方式
},
......@@ -143,8 +175,10 @@ Page({
data: {}
};
const key = `${parameter.name}Visible`;
const datakey = `${parameter.name}Data`;
const toSetData = {};
toSetData[key] = true;
toSetData[datakey] = parameter.data;
this.setData(toSetData);
break;
case 'test':
......
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