Commit d7dfacb4 authored by Edwise's avatar Edwise 🍷

123

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