Authored by huangyi

跳转支付页面

... ... @@ -45,8 +45,8 @@ App({
return true;
},
getUid: function() {
let uid = this.globalData.userInfo.uid;
// let uid = '500031152';
//let uid = this.globalData.userInfo.uid;
let uid = '500031152';
// let uid = '9728165';//线上
// if (!uid || uid === 0) {
... ...
... ... @@ -45,14 +45,14 @@
<view class="stepper">
<view bindtap="bindMinus" class='reduceNumberBtn'>
<image class='reduceImage'
src='{{pickerData.view.minusButtonEnable ? "../shopCart/images/jian_h@2x.png" : "../shopCart/images/jian_disable@2x.png"}}'/>
src='{{pickerData.view.minusButtonEnable ? "../../images/jian_h@2x.png" : "../../images/jian_disable@2x.png"}}'/>
</view>
<view class='buyNumberText'>
{{pickerData.view.buyNumber}}
</view>
<view bindtap="bindPlus" class='addNumberBtn'>
<image class='addImage'
src='{{pickerData.view.plusButtonEnable ? "../shopCart/images/and_normal@2x.png" : "../shopCart/images/and_h@2x.png"}}'/>
src='{{pickerData.view.plusButtonEnable ? "../../images/and_normal@2x.png" : "../../images/and_h@2x.png"}}'/>
</view>
</view>
<view tt:if="{{pickerData.view.isSoldOutSoon}}" class='soldSoonOut'>
... ...
... ... @@ -42,7 +42,7 @@ Page({
},
sourceType: 'gift',
},
promotion_id:''
},
... ... @@ -117,7 +117,8 @@ Page({
onPressProduct: function (event) {
let data = event.currentTarget.dataset;
let product_skn = data.productSkn;
this.setData({ current_skn: product_skn });
let promotion_id = data.promotion_id;
this.setData({ current_skn: product_skn,promotion_id });
let param = {
method: 'app.product.gift',
uid: app.getUid(),
... ... @@ -131,7 +132,7 @@ Page({
// console.log(data);
if (!data || data.code != 200)
return;
let colorSelected = false;
let color_length = 0;
if (data.data.goods_list) {
... ... @@ -225,13 +226,13 @@ Page({
// 添加加价购商品到购物车
addShopCart: function (event) {
debugger
this.setData(event.detail);
let that = this;
let select_sku = that.data.selectedSKU;
let select_skn = that.data.current_skn;
let goods_type = that.data.is_gift ? 1 : 2;
let promotion_id = that.data.promotion_id;
if (!select_sku) {
tt.showToast({
title: '请选择颜色或尺码',
... ... @@ -247,7 +248,8 @@ Page({
that.resetPickerData();
let param = {};
if (that.data.status == '10') {
console.log(that.data.status);
if (that.data.status === '10') {
param = {
method: 'app.Shopping.add',
product_sku: select_sku,
... ... @@ -257,7 +259,7 @@ Page({
goods_type: goods_type,
edit_product_sku: 0,
};
} else if (that.data.status == '30') {
} else if (that.data.status === '30') {
param = {
method: 'app.Shopping.swapGift',
new_product_skn: select_skn,
... ... @@ -267,12 +269,9 @@ Page({
buy_number: 1,
}
} else {
tt.navigateBack({
});
tt.navigateBack();
return;
}
// console.log(param);
api.get({data: param})
.then(json => {
if (json && json.code) {
... ... @@ -294,7 +293,7 @@ Page({
this.setData(event.detail);
if (!this.data.selectedSKU) {
this.wetoast.toast({
title: '请选择颜色或尺码',
... ...
{
"navigationBarTitleText": "换购商品",
"usingComponents": {
"shoppingCartFooterView": "../../components/shopCart/footerView/shoppingCartFooterView",
"shoppingCartProductCell": "../../components/shopCart/cells/shoppingCartProductCell",
"shoppingCartGiftOrPriceCell": "../../components/shopCart/cells/shoppingCartGiftOrPriceCell",
"shoppingCartInvalidProductCell": "../../components/shopCart/cells/shoppingCartInvalidProductCell",
"shoppingCartPromotionCell": "../../components/shopCart/cells/shoppingCartPromotionCell",
"shoppingCartOneProductCell": "../../components/shopCart/cells/shoppingCartOneProductCell",
"picker":"../../components/picker/picker"
}
}
\ No newline at end of file
... ...