Authored by huangyi

跳转支付页面

@@ -45,8 +45,8 @@ App({ @@ -45,8 +45,8 @@ App({
45 return true; 45 return true;
46 }, 46 },
47 getUid: function() { 47 getUid: function() {
48 - let uid = this.globalData.userInfo.uid;  
49 - // let uid = '500031152'; 48 + //let uid = this.globalData.userInfo.uid;
  49 + let uid = '500031152';
50 // let uid = '9728165';//线上 50 // let uid = '9728165';//线上
51 51
52 // if (!uid || uid === 0) { 52 // if (!uid || uid === 0) {
@@ -45,14 +45,14 @@ @@ -45,14 +45,14 @@
45 <view class="stepper"> 45 <view class="stepper">
46 <view bindtap="bindMinus" class='reduceNumberBtn'> 46 <view bindtap="bindMinus" class='reduceNumberBtn'>
47 <image class='reduceImage' 47 <image class='reduceImage'
48 - src='{{pickerData.view.minusButtonEnable ? "../shopCart/images/jian_h@2x.png" : "../shopCart/images/jian_disable@2x.png"}}'/> 48 + src='{{pickerData.view.minusButtonEnable ? "../../images/jian_h@2x.png" : "../../images/jian_disable@2x.png"}}'/>
49 </view> 49 </view>
50 <view class='buyNumberText'> 50 <view class='buyNumberText'>
51 {{pickerData.view.buyNumber}} 51 {{pickerData.view.buyNumber}}
52 </view> 52 </view>
53 <view bindtap="bindPlus" class='addNumberBtn'> 53 <view bindtap="bindPlus" class='addNumberBtn'>
54 <image class='addImage' 54 <image class='addImage'
55 - src='{{pickerData.view.plusButtonEnable ? "../shopCart/images/and_normal@2x.png" : "../shopCart/images/and_h@2x.png"}}'/> 55 + src='{{pickerData.view.plusButtonEnable ? "../../images/and_normal@2x.png" : "../../images/and_h@2x.png"}}'/>
56 </view> 56 </view>
57 </view> 57 </view>
58 <view tt:if="{{pickerData.view.isSoldOutSoon}}" class='soldSoonOut'> 58 <view tt:if="{{pickerData.view.isSoldOutSoon}}" class='soldSoonOut'>
@@ -42,7 +42,7 @@ Page({ @@ -42,7 +42,7 @@ Page({
42 }, 42 },
43 sourceType: 'gift', 43 sourceType: 'gift',
44 }, 44 },
45 - 45 + promotion_id:''
46 46
47 }, 47 },
48 48
@@ -117,7 +117,8 @@ Page({ @@ -117,7 +117,8 @@ Page({
117 onPressProduct: function (event) { 117 onPressProduct: function (event) {
118 let data = event.currentTarget.dataset; 118 let data = event.currentTarget.dataset;
119 let product_skn = data.productSkn; 119 let product_skn = data.productSkn;
120 - this.setData({ current_skn: product_skn }); 120 + let promotion_id = data.promotion_id;
  121 + this.setData({ current_skn: product_skn,promotion_id });
121 let param = { 122 let param = {
122 method: 'app.product.gift', 123 method: 'app.product.gift',
123 uid: app.getUid(), 124 uid: app.getUid(),
@@ -131,7 +132,7 @@ Page({ @@ -131,7 +132,7 @@ Page({
131 // console.log(data); 132 // console.log(data);
132 if (!data || data.code != 200) 133 if (!data || data.code != 200)
133 return; 134 return;
134 - 135 +
135 let colorSelected = false; 136 let colorSelected = false;
136 let color_length = 0; 137 let color_length = 0;
137 if (data.data.goods_list) { 138 if (data.data.goods_list) {
@@ -225,13 +226,13 @@ Page({ @@ -225,13 +226,13 @@ Page({
225 226
226 // 添加加价购商品到购物车 227 // 添加加价购商品到购物车
227 addShopCart: function (event) { 228 addShopCart: function (event) {
228 - 229 + debugger
229 this.setData(event.detail); 230 this.setData(event.detail);
230 - 231 + let that = this;
231 let select_sku = that.data.selectedSKU; 232 let select_sku = that.data.selectedSKU;
232 let select_skn = that.data.current_skn; 233 let select_skn = that.data.current_skn;
233 let goods_type = that.data.is_gift ? 1 : 2; 234 let goods_type = that.data.is_gift ? 1 : 2;
234 - 235 + let promotion_id = that.data.promotion_id;
235 if (!select_sku) { 236 if (!select_sku) {
236 tt.showToast({ 237 tt.showToast({
237 title: '请选择颜色或尺码', 238 title: '请选择颜色或尺码',
@@ -247,7 +248,8 @@ Page({ @@ -247,7 +248,8 @@ Page({
247 that.resetPickerData(); 248 that.resetPickerData();
248 249
249 let param = {}; 250 let param = {};
250 - if (that.data.status == '10') { 251 + console.log(that.data.status);
  252 + if (that.data.status === '10') {
251 param = { 253 param = {
252 method: 'app.Shopping.add', 254 method: 'app.Shopping.add',
253 product_sku: select_sku, 255 product_sku: select_sku,
@@ -257,7 +259,7 @@ Page({ @@ -257,7 +259,7 @@ Page({
257 goods_type: goods_type, 259 goods_type: goods_type,
258 edit_product_sku: 0, 260 edit_product_sku: 0,
259 }; 261 };
260 - } else if (that.data.status == '30') { 262 + } else if (that.data.status === '30') {
261 param = { 263 param = {
262 method: 'app.Shopping.swapGift', 264 method: 'app.Shopping.swapGift',
263 new_product_skn: select_skn, 265 new_product_skn: select_skn,
@@ -267,12 +269,9 @@ Page({ @@ -267,12 +269,9 @@ Page({
267 buy_number: 1, 269 buy_number: 1,
268 } 270 }
269 } else { 271 } else {
270 - tt.navigateBack({  
271 -  
272 - }); 272 + tt.navigateBack();
273 return; 273 return;
274 } 274 }
275 - // console.log(param);  
276 api.get({data: param}) 275 api.get({data: param})
277 .then(json => { 276 .then(json => {
278 if (json && json.code) { 277 if (json && json.code) {
@@ -294,7 +293,7 @@ Page({ @@ -294,7 +293,7 @@ Page({
294 293
295 294
296 this.setData(event.detail); 295 this.setData(event.detail);
297 - 296 +
298 if (!this.data.selectedSKU) { 297 if (!this.data.selectedSKU) {
299 this.wetoast.toast({ 298 this.wetoast.toast({
300 title: '请选择颜色或尺码', 299 title: '请选择颜色或尺码',
  1 +{
  2 + "navigationBarTitleText": "换购商品",
  3 + "usingComponents": {
  4 + "shoppingCartFooterView": "../../components/shopCart/footerView/shoppingCartFooterView",
  5 + "shoppingCartProductCell": "../../components/shopCart/cells/shoppingCartProductCell",
  6 + "shoppingCartGiftOrPriceCell": "../../components/shopCart/cells/shoppingCartGiftOrPriceCell",
  7 + "shoppingCartInvalidProductCell": "../../components/shopCart/cells/shoppingCartInvalidProductCell",
  8 + "shoppingCartPromotionCell": "../../components/shopCart/cells/shoppingCartPromotionCell",
  9 + "shoppingCartOneProductCell": "../../components/shopCart/cells/shoppingCartOneProductCell",
  10 + "picker":"../../components/picker/picker"
  11 + }
  12 +}