Authored by huangyi

gift完成picker对接

... ... @@ -129,22 +129,7 @@ Component({
},
bindPlus() {
if (!this.data.colorSelected) {
if (this.data.pickerData.view.goodsList.length) {
this.data.pickerData.view.goodsList.map((value, index, array) => {
if (value.selected) {
this.setData({colorSelected: true})
}
})
} else {
this.triggerEvent('errorToast', {
title: '请选择颜色',
titleClassName: 'wetoast-title',
duration: 1000
})
return;
}
}
this.checkColor();
if (!this.data.selectedSKU) {
this.triggerEvent('errorToast', {
... ... @@ -184,13 +169,34 @@ Component({
this.setData({pickerData});
},
goPayment() {
this.checkColor();
this.triggerEvent('goPayment', this.data)
},
addShopCart() {
this.checkColor();
this.triggerEvent('addShopCart', this.data)
},
chooseSizeColorCompleted() {
this.triggerEvent('chooseSizeColorCompleted', this.data)
this.checkColor();
this.triggerEvent('chooseSizeColorCompleted', this.data)
},
checkColor() {
if (!this.data.colorSelected) {
if (this.data.pickerData.view.goodsList.length) {
this.data.pickerData.view.goodsList.map((value, index, array) => {
if (value.selected) {
this.setData({colorSelected: true})
}
})
} else {
this.triggerEvent('errorToast', {
title: '请选择颜色',
titleClassName: 'wetoast-title',
duration: 1000
})
return;
}
}
}
}
})
\ No newline at end of file
... ...
... ... @@ -220,7 +220,7 @@ Page(extend({}, Actionsheet, {
},
onShareAppMessage: function (res) {
var that = this
var that = this;
let param = {
FROM: res.from,
... ... @@ -353,7 +353,6 @@ Page(extend({}, Actionsheet, {
// 立即支付
goPayment: function (event) {
console.log(event.detail)
this.setData(event.detail);
// console.log('######')
if (this.data.isLimitBuy == true || this.data.is_deposit_advance == "Y" || this.data.is_secKill == "Y" || this.data.is_advance == "Y" || this.data.bundle_type == 2 || this.data.store_show_status === 3 || this.data.store_show_status === 4) {
... ... @@ -415,7 +414,6 @@ Page(extend({}, Actionsheet, {
},
goShoppingCart: function () {
debugger
tt.switchTab({
url: '/pages/shopCart/shopCart'
})
... ... @@ -435,7 +433,7 @@ Page(extend({}, Actionsheet, {
};
that2.showLoadingToast()
api.get({data: param}).then(function (data) {
api.get({data: param}).then((data)=> {
that2.hideLoadingToast()
this.setData({pickerShow: false})
... ...