@@ -21,6 +21,7 @@ App({ | |||||
nickName: "", //用户姓名 | nickName: "", //用户姓名 | ||||
templateId: [], //订阅消息模板id | templateId: [], //订阅消息模板id | ||||
ifshowtab: false, | ifshowtab: false, | ||||
version: "2.9.1" | |||||
}, | }, | ||||
onLaunch: function () { | onLaunch: function () { | ||||
let that = this | let that = this | ||||
@@ -11,6 +11,7 @@ const QR = require("../utils/memberqrcode.js"); | |||||
const util = require("../utils/util"); | const util = require("../utils/util"); | ||||
const bgColor = require("../utils/bgColor.js") | const bgColor = require("../utils/bgColor.js") | ||||
let app = getApp(); | let app = getApp(); | ||||
const updateManager = tt.getUpdateManager(); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
userAvatarUrl: '', | userAvatarUrl: '', | ||||
@@ -915,6 +916,27 @@ Page({ | |||||
that.getCouponChannelList(that.data.businessKey) | that.getCouponChannelList(that.data.businessKey) | ||||
}, 1000) | }, 1000) | ||||
setTimeout(() => { | |||||
console.log('onCheckForUpdate'); | |||||
updateManager.onCheckForUpdate(res => { | |||||
console.log(res, 'onCheckForUpdate'); | |||||
if (res.hasUpdate) { | |||||
updateManager.onUpdateReady((res) => { | |||||
tt.showModal({ | |||||
title: "更新提示", | |||||
content: "新版本已经准备就绪,是否重新进入小程序?", | |||||
success: (res) => { | |||||
if (res.confirm) { | |||||
// 新的版本已经下载好,应用新版本并重启 | |||||
updateManager.applyUpdate(); | |||||
} | |||||
}, | |||||
}); | |||||
}); | |||||
} | |||||
}); | |||||
}, 2500); | |||||
}, | }, | ||||
@@ -11,6 +11,7 @@ Page({ | |||||
avatarUrl: "", | avatarUrl: "", | ||||
nickName: "", | nickName: "", | ||||
mouldType: 1, | mouldType: 1, | ||||
version: "" | |||||
}, | }, | ||||
showPhoemBtn() { | showPhoemBtn() { | ||||
@@ -119,6 +120,13 @@ Page({ | |||||
// }); | // }); | ||||
}, | }, | ||||
onShow: function (options) { | onShow: function (options) { | ||||
const version = app.globalData.version | |||||
if (version) { | |||||
this.setData({ | |||||
version | |||||
}) | |||||
} | |||||
this.setData({ | this.setData({ | ||||
mouldType: app.globalData.mouldType | mouldType: app.globalData.mouldType | ||||
@@ -83,7 +83,7 @@ | |||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="version">Version 2.8.6</view> | |||||
<view class="version">Version {{ version }}</view> | |||||
<phoem showBox="{{showPhoem}}" bind:hiePhoen="setPhone" bind:heiBox="setBox"></phoem> | <phoem showBox="{{showPhoem}}" bind:hiePhoen="setPhone" bind:heiBox="setBox"></phoem> | ||||
</view> | </view> | ||||
@@ -1,4 +1,8 @@ | |||||
/* d:\fumaolianke\ttFmC\tt富茂C\pages\user\user.ttss */ | /* d:\fumaolianke\ttFmC\tt富茂C\pages\user\user.ttss */ | ||||
page { | |||||
padding-bottom: 0; | |||||
} | |||||
.BoxBg { | .BoxBg { | ||||
/* background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"); */ | /* background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin_ifomall/imgData/userBg.png"); */ | ||||
/* background-size: 100% auto; */ | /* background-size: 100% auto; */ | ||||
@@ -244,7 +248,7 @@ button { | |||||
.version { | .version { | ||||
position: absolute; | position: absolute; | ||||
bottom: 0; | |||||
bottom: 100rpx; | |||||
right: 5%; | right: 5%; | ||||
color: #ffffffb9; | color: #ffffffb9; | ||||
} | } |
@@ -43,7 +43,7 @@ page { | |||||
margin-bottom: 30rpx; | margin-bottom: 30rpx; | ||||
padding: 25rpx 25rpx 25rpx 25rpx; | padding: 25rpx 25rpx 25rpx 25rpx; | ||||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||||
background-color: #f3f3f3; | |||||
background-color: #fffffff8; | |||||
border: 1px solid #0000002d; | border: 1px solid #0000002d; | ||||
border-radius: 12rpx; | border-radius: 12rpx; | ||||
// box-shadow: #00000036 0px 1px 2px 2px; | // box-shadow: #00000036 0px 1px 2px 2px; | ||||
@@ -40,7 +40,7 @@ page .continer .selectShop .shopList .item { | |||||
margin-bottom: 30rpx; | margin-bottom: 30rpx; | ||||
padding: 25rpx 25rpx 25rpx 25rpx; | padding: 25rpx 25rpx 25rpx 25rpx; | ||||
box-sizing: border-box !important; | box-sizing: border-box !important; | ||||
background-color: #f3f3f3; | |||||
background-color: #fffffff8; | |||||
border: 1px solid #0000002d; | border: 1px solid #0000002d; | ||||
border-radius: 12rpx; | border-radius: 12rpx; | ||||
} | } | ||||