优化问题

This commit is contained in:
duan
2024-05-30 09:12:02 +08:00
parent 66e15baaee
commit cb7d853707
8 changed files with 296 additions and 146 deletions

View File

@@ -1,21 +1,21 @@
<template>
<view class="container">
<view class="header">
<text class="t">{{shopUser.nickName}}</text>
<text class="t"></text>
</view>
<view class="code-wrap">
<view class="num-wrap">
<text class="t">账户余额</text>
<text class="num">{{shopUser.amount}}</text>
<text class="num">{{shopInfo.amount}}</text>
</view>
<view class="line-code">
<tki-barcode ref="tkiBarcode" show :opations="tkiOptions"></tki-barcode>
<tki-barcode ref="tkiBarcode" show :opations="tkiOptions"></tki-barcode>
</view>
<view class="ewm-wrap">
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="createcardNo"></uqrcode>
</view>
<view class="name">
<text>使用门店{{shopUser.name}}</text>
<text>使用门店{{shopInfo.shopName}}</text>
</view>
<view class="line"></view>
</view>
@@ -35,20 +35,22 @@
fontSize: 28,
textMargin: 14
},
shopUser: {},
createcardNo: ''
createcardNo: '',
shopInfo: null
};
},
onLoad() {
this.shopUser = uni.cache.get('shopUser')
onLoad(e) {
this.shopInfo = JSON.parse(e.shopInfo)
this.logincreateCardNo();
},
methods: {
async logincreateCardNo() {
let res = await this.api.logincreateCardNo()
let res = await this.api.logincreateCardNo({
"shopId": this.shopInfo.shopId
})
if (res.code == 0) {
this.createcardNo = res.data
this.$refs.tkiBarcode.setval(this.createcardNo)//操作属性
this.$refs.tkiBarcode.setval(this.createcardNo) //操作属性
}
}
}