|
@@ -48,13 +48,13 @@
|
|
|
<uni-grid :column="4" :highlight="true" :show-border="false" :square="false" @change="e=>openDataList(e)">
|
|
|
<uni-grid-item v-if="hasBalaceAuth" :index="0" :key="0">
|
|
|
<view class="grid-item-box">
|
|
|
- <text class="value">{{Number(storeAccount.rechargeBalance).toFixed(2)}}</text>
|
|
|
+ <text class="value">{{storeAccount?Number(storeAccount.rechargeBalance).toFixed(2):'0.00'}}</text>
|
|
|
<text class="text">充值余额</text>
|
|
|
</view>
|
|
|
</uni-grid-item>
|
|
|
<uni-grid-item v-if="hasBalaceAuth" :index="1" :key="1">
|
|
|
<view class="grid-item-box">
|
|
|
- <text class="value">{{Number(storeAccount.giveBalance).toFixed(2)}}</text>
|
|
|
+ <text class="value">{{storeAccount?Number(storeAccount.giveBalance).toFixed(2):'0.00'}}</text>
|
|
|
<text class="text">抵扣余额</text>
|
|
|
</view>
|
|
|
</uni-grid-item>
|
|
@@ -120,7 +120,7 @@
|
|
|
import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
|
|
|
import { queryQplsConfig,getProductfindByScanCode } from '@/api/shelf.js'
|
|
|
import { findUserReward } from '@/api/rewardRule.js'
|
|
|
- import { ticketQueryCount, storeAccount } from '@/api/user.js'
|
|
|
+ import { ticketQueryCount } from '@/api/user.js'
|
|
|
import { clickTab, toLogin } from "@/utils/index.js"
|
|
|
export default {
|
|
|
components: {
|
|
@@ -372,21 +372,12 @@
|
|
|
if(!this.hasLogin){
|
|
|
this.hidePromoTab()
|
|
|
}
|
|
|
- // 抵扣余额,充值余额
|
|
|
- this.getStoreAccount()
|
|
|
},
|
|
|
// 页面卸载
|
|
|
onUnload() {
|
|
|
uni.$off('refashProm')
|
|
|
},
|
|
|
methods: {
|
|
|
- // 抵扣余额
|
|
|
- getStoreAccount(){
|
|
|
- const data = this.$store.state.vuex_storeShelf
|
|
|
- storeAccount({storeSn:data.storeSn}).then(res => {
|
|
|
- this.$store.state.vuex_storeAccount = res.data
|
|
|
- })
|
|
|
- },
|
|
|
// 获取优惠券数量
|
|
|
getCouponCount(){
|
|
|
if(this.userInfo.sysUserFlag == '1'){
|