更新
This commit is contained in:
@@ -164,6 +164,9 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -184,7 +187,9 @@
|
||||
decorateDetail: null,
|
||||
currentMenuIndex: 0,
|
||||
payData: null,
|
||||
isShow: true
|
||||
isShow: true,
|
||||
msgType:"success",
|
||||
messageText:"操作成功"
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -310,12 +315,9 @@
|
||||
if (this.decorateDetail.tab.type !== 12) {
|
||||
if (this.payData.price > this.decorateDetail.user_info.user_coin) {
|
||||
// 余额不足
|
||||
uni.showToast({
|
||||
title: '余额不足',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 500
|
||||
});
|
||||
this.messageText = "余额不足"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -323,12 +325,9 @@
|
||||
// 降身卡
|
||||
if (this.payData.allPrice > this.decorateDetail.user_info.user_coin) {
|
||||
// 余额不足
|
||||
uni.showToast({
|
||||
title: '余额不足',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 500
|
||||
});
|
||||
this.messageText = "余额不足"
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -346,21 +345,15 @@
|
||||
num: type !== 12 ? 0 : this.payData.number
|
||||
}).then(response => {
|
||||
if (response.code) {
|
||||
uni.showToast({
|
||||
title: '购买成功',
|
||||
icon: 'success',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
this.messageText = "购买成功"
|
||||
this.msgType = 'success'
|
||||
this.$refs.message.open()
|
||||
uni.hideLoading()
|
||||
this.closePopup()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: response.msg,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
duration: 1000
|
||||
});
|
||||
this.messageText = response.msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
|
||||
}).catch(error => {});
|
||||
|
||||
Reference in New Issue
Block a user