Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
06172f5e1b
3 changed files with 9 additions and 3 deletions
  1. 7
      pages/home/qrcode-info/index.js
  2. 1
      pages/home/qrcode-info/index.json
  3. 4
      pages/home/qrcode-info/index.wxml

7
pages/home/qrcode-info/index.js

@ -15,7 +15,8 @@ Scene({
type: 0,
id: null,
userId: null,
form: null
form: null,
factoryName: null,
},
/**
* 生命周期函数--监听页面加载
@ -34,7 +35,7 @@ Scene({
let channel = this.getOpenerEventChannel()
let that = this
channel.once('onParam', function (data) {
that.setData({ form: data, type: that.data.type })
that.setData({ form: data, type: that.data.type, factoryName: app.userInfo.factoryName })
})
}
}
@ -54,7 +55,7 @@ Scene({
fetchCustomerInfo: function(){
wx.showLoading({ title: '正在获取', mask: true })
getCustomerInfo(this.data.id).then(result => {
this.setData({ form: result.data, type: this.data.type })
this.setData({ form: result.data, type: this.data.type, factoryName: app.userInfo.factoryName })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()

1
pages/home/qrcode-info/index.json

@ -3,6 +3,7 @@
"van-button": "/components/button/index",
"van-cell": "/components/cell/index",
"van-image": "/components/image/index",
"van-divider": "/components/divider/index",
"notification": "/pages/message/notification/index"
}
}

4
pages/home/qrcode-info/index.wxml

@ -19,4 +19,8 @@
</view>
</view>
<view style="margin-top:72rpx;padding: 0rpx 72rpx" wx:if="{{form}}">
<van-divider content-position="center" customStyle="font-size: 18px;">{{factoryName}}</van-divider>
</view>
<notification id="qn-notification" />
Loading…
Cancel
Save