Commit 4c46f9d2 authored by Edwise's avatar Edwise 🍷

1234

parent 12ba612c
......@@ -11,6 +11,11 @@ const {
commonToast
} = tbcc.tb;
const nameArr = [
'Edwise',
'爱德',
'Mr.W'
];
Component({
props: {
......@@ -55,7 +60,8 @@ Component({
/**随机名字,需要根据运营数据可配置 */
randomName() {
console.log("随即名字")
let name = "Edwise"
let index = Math.floor(Math.random()*nameArr.length)
let name = nameArr[index];
this.setData({
catNameText: name
})
......
......@@ -5,5 +5,5 @@
<label class="catruleText" >{{rule}}</label>
</view>
<image class="catrulebtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
<image class="catrulebtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
\ No newline at end of file
......@@ -97,10 +97,10 @@
}
.levelup .levelup_prizeView {
width: 353rpx;
width: 350rpx;
height: 293rpx;
opacity: 1;
left: 201rpx;
left: 202rpx;
top: 380rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
......@@ -110,12 +110,12 @@
}
.levelup .levelup_prizeImg {
width: 360rpx;
width: 356rpx;
height: 299rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
left: -3rpx;
left: -1rpx;
top: -3rpx;
}
......
......@@ -300,7 +300,7 @@ Page({
if (this.main) {
this.main.run();
this.main.dispatchGlobalEvent("onShow");
my.__updateUserInfo__();
this.showPageLogin();
}
},
......@@ -376,6 +376,28 @@ Page({
this.initCanvas();
}
},
/**页面显示登录 */
async showPageLogin() {
const {
nickName,
avatar
} = app;
const {
success,
data,
} = await API.login({
userNick: nickName,
avatar
}).catch(res => {
commonToast(res && res.message);
}) || {};
if (success) {
app.openId = data.openId;
my.__updateUserInfo__();
}
},
/**刷新用户信息 */
updateUserInfo() {
console.log("通知canvas刷新用户信息")
......
This diff is collapsed.
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