|
@@ -83,11 +83,13 @@
|
|
|
goodContent: null,
|
|
|
goldLimit: 0,
|
|
|
dragPic: '/static/cart.png', // 购物车图标
|
|
|
+ userData: null
|
|
|
};
|
|
|
},
|
|
|
onLoad(opts) {
|
|
|
console.log(opts)
|
|
|
this.id = opts.id
|
|
|
+ this.userData = this.$store.state.vuex_userData
|
|
|
this.getDetail()
|
|
|
},
|
|
|
methods: {
|
|
@@ -142,15 +144,22 @@
|
|
|
// 立即下单
|
|
|
toOrder(){
|
|
|
// console.log(this.goodContent,this.id,'pppppppp')
|
|
|
- if(this.goodContent.sellGold * this.nums >= this.goldLimit){
|
|
|
- this.$u.vuex("vuex_toOrderList",[{id:this.id,buyQty:this.nums,goodsNo:this.goodContent.goodsNo,goods:this.goodContent}])
|
|
|
- uni.redirectTo({
|
|
|
- url:"/pages/toOrder/index?orderForm=ORDER_NOW"
|
|
|
- })
|
|
|
+ if(this.userData.state == 1){
|
|
|
+ if(this.goodContent.sellGold * this.nums >= this.goldLimit){
|
|
|
+ this.$u.vuex("vuex_toOrderList",[{id:this.id,buyQty:this.nums,goodsNo:this.goodContent.goodsNo,goods:this.goodContent}])
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/toOrder/index?orderForm=ORDER_NOW"
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ icon:"none",
|
|
|
+ title:"此类商品需要满" +this.goldLimit+ "乐豆才可购买"
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
uni.showToast({
|
|
|
icon:"none",
|
|
|
- title:"此类商品需要满" +this.goldLimit+ "乐豆才可购买"
|
|
|
+ title:"账户已被禁用,无法使用乐豆"
|
|
|
})
|
|
|
}
|
|
|
}
|