Browse Source

no message

feature/v2.2
xpz2018 4 years ago
parent
commit
8224711ae0
6 changed files with 22 additions and 19 deletions
  1. 6
      components/add-tips/index.js
  2. 4
      pages/home/customer-list/index.wxml
  3. 3
      pages/home/index/index.js
  4. 19
      pages/login/index.js
  5. 6
      pages/ztbvip/member/index.js
  6. 3
      pages/ztbvip/member/index.wxml

6
components/add-tips/index.js

@ -29,7 +29,9 @@ Component({
},
lifetimes: {
attached: function() {
if (wx.getStorageSync(STORAGE_KEY)) return;
if (wx.getStorageSync(STORAGE_KEY)) {
return
}
let rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null
let {screenWidth} = wx.getSystemInfoSync()
this.setData({
@ -41,7 +43,7 @@ Component({
this.setData({ SHOW_TOP: true })
}, 500)
this.duraTimer = setTimeout(() => {
this.hidden();
this.hidden()
}, (this.data.duration + this.data.delay) * 1000)
},
detached: function() {

4
pages/home/customer-list/index.wxml

@ -107,9 +107,7 @@
catchtouchstart="touchStart" catchtouchmove="touchMove" catchtouchend="touchEnd" catchtouchcancel="touchEnd">
<text wx:for="{{orderList}}" wx:key="index" class="list-text" style="height:{{itemHeight}}rpx;color:{{index == touchmoveIndex ? '#008AFF' : '#333333'}}">{{item.sign}}</text>
</view>
<view class="list-alert" wx:if="{{touchmove && orderList[touchmoveIndex].sign}}">
{{orderList[touchmoveIndex].sign}}
</view>
<view class="list-alert" wx:if="{{touchmove && orderList[touchmoveIndex].sign}}">{{orderList[touchmoveIndex].sign}}</view>
<!-- <van-popup show="{{ show }}" custom-style="background: transparent;" bind:close="onClickHide">
<view class="flex flex-center flex-column" catch:tap="noop">

3
pages/home/index/index.js

@ -60,6 +60,9 @@ Component({
nickname = app.userInfo.realName.substring(0, 14)
}
getFactoryLicence().then(result => {
if(!result.data.expirationTime){
return
}
app.userInfo.expirationTime = result.data.expirationTime.substring(0, 10)
app.userInfo.isExpiration = result.data.isExpiration
this.setData({

19
pages/login/index.js

@ -45,9 +45,6 @@ Page({
this.data.url += '?' + options.key + '=' + options.value
}
}
this.wxLogin()
},
onReady: function () {
app.globalData.token = app.globalData.token || storage.get('Authorization')
if(this.data.code){
this.fetchQrCode(this.data.code)
@ -55,6 +52,13 @@ Page({
this.setData({ loging: true})
this.fetchUserInfo(app.globalData.token)
}
wx.login({
success: res => {
wechatApplet({ authCode: res.code }).then(result => {
storage.put('tmpAuthToken', result.data.tmpAuthToken, 98)
})
}
})
},
/************************************** 获取用户信息,进行登录 ********************************************/
checkFactoryId: function(storageFactoryId){
@ -194,15 +198,6 @@ Page({
this.setData({ loging: false})
})
},
wxLogin: function(){
wx.login({
success: res => {
wechatApplet({ authCode: res.code }).then(result => {
storage.put('tmpAuthToken', result.data.tmpAuthToken, 98)
})
}
})
},
/************************************** 注册流程 ********************************************/
readAgreement: function () {
if(this.data.loging){

6
pages/ztbvip/member/index.js

@ -23,6 +23,9 @@ Scene({
wx.showLoading({ title: '加载中', mask: true })
if(util.isEmpty(app.userInfo.expirationTime)){
getFactoryLicence().then(result => {
if(!result.data.expirationTime){
return
}
app.userInfo.expirationTime = result.expirationTime.substring(0, 10)
app.userInfo.isExpiration = result.isExpiration
this.setData({ expirationTime:app.userInfo.expirationTime, isExpiration: result.isExpiration })
@ -46,6 +49,9 @@ Scene({
onEvent: function(message){
if (message.what == 300) {
getFactoryLicence().then(result => {
if(!result.data.expirationTime){
return
}
app.userInfo.expirationTime = result.data.expirationTime.substring(0, 10)
app.userInfo.isExpiration = result.data.isExpiration
this.setData({ expirationTime: app.userInfo.expirationTime, isExpiration: result.data.isExpiration })

3
pages/ztbvip/member/index.wxml

@ -13,8 +13,7 @@
<van-tag round type="warning" wx:if="{{isExpiration}}">已逾期</van-tag>
</view>
<view class="flex flex-center" style="font-size:28rpx;">
<!-- <text class="text-black">{{vipInfo.isVIP==1?'付费会员':'非会员'}}</text> -->
<text style="font-size:12px;color: #6f6f6f;">到期时间:{{expirationTime}}</text>
<text style="font-size:12px;color: #6f6f6f;">到期时间:{{expirationTime || '- -'}}</text>
</view>
</view>
<view class="cu-btn vip-btn" bindtap="vipForm">立即续费</view>

Loading…
Cancel
Save