Authored by hongyong.zhao

去除添加uid,选择地址添加 -- reviewed by 曼巴

@@ -38,7 +38,6 @@ Page({ @@ -38,7 +38,6 @@ Page({
38 title: '', 38 title: '',
39 }); 39 });
40 let params = { 40 let params = {
41 - uid: '500031182',  
42 skup: this.data.skup, 41 skup: this.data.skup,
43 debug: 'XYZ' 42 debug: 'XYZ'
44 } 43 }
@@ -63,7 +62,6 @@ Page({ @@ -63,7 +62,6 @@ Page({
63 }) 62 })
64 63
65 let params = { 64 let params = {
66 - uid: '500031182',  
67 debug: 'XYZ' 65 debug: 'XYZ'
68 } 66 }
69 67
@@ -107,14 +105,13 @@ Page({ @@ -107,14 +105,13 @@ Page({
107 let addressId = this.data.hasAddress && this.data.address && this.data.address.address_id 105 let addressId = this.data.hasAddress && this.data.address && this.data.address.address_id
108 let skup = this.data.skup 106 let skup = this.data.skup
109 let channelNo = '' 107 let channelNo = ''
110 - let uid = '500031182'  
111 108
112 let api = new orderService() 109 let api = new orderService()
113 wx.showLoading({ 110 wx.showLoading({
114 title: '', 111 title: '',
115 }) 112 })
116 113
117 - api.buyerSubmit(uid,skup,channelNo,addressId, () => wx.hideLoading()) 114 + api.buyerSubmit(skup,channelNo,addressId, () => wx.hideLoading())
118 .then(data => { 115 .then(data => {
119 if (data && data.orderCode) { 116 if (data && data.orderCode) {
120 this.prePay(data.orderCode) 117 this.prePay(data.orderCode)
@@ -134,13 +131,12 @@ Page({ @@ -134,13 +131,12 @@ Page({
134 // url: `./orderSuccess?product_id=${this.data.product_id}&orderCode=${this.data.orderCode}` 131 // url: `./orderSuccess?product_id=${this.data.product_id}&orderCode=${this.data.orderCode}`
135 // }) 132 // })
136 133
137 - let uid = '500031182'  
138 let api = new orderService() 134 let api = new orderService()
139 wx.showLoading({ 135 wx.showLoading({
140 title: '', 136 title: '',
141 }) 137 })
142 138
143 - api.prePay(uid,orderCode, () => wx.hideLoading()) 139 + api.prePay(orderCode, () => wx.hideLoading())
144 .then(data => { 140 .then(data => {
145 if (data && data.prePayData) { 141 if (data && data.prePayData) {
146 this.callWxPay(data.prePayData) 142 this.callWxPay(data.prePayData)
@@ -205,10 +201,13 @@ Page({ @@ -205,10 +201,13 @@ Page({
205 201
206 selectComplete: function(data) { 202 selectComplete: function(data) {
207 203
  204 + if (data) {
208 this.setData({ 205 this.setData({
209 address: data, 206 address: data,
210 hasAddress: true 207 hasAddress: true
211 }) 208 })
  209 + }
  210 +
212 }, 211 },
213 212
214 checkProtocol: function () { 213 checkProtocol: function () {
@@ -42,25 +42,22 @@ export default class orderService extends BaseService { @@ -42,25 +42,22 @@ export default class orderService extends BaseService {
42 }) 42 })
43 } 43 }
44 44
45 - async buyerSubmit(uid,skup,channelNo='2919',addressId, complete) { 45 + async buyerSubmit(skup,channelNo='2919',addressId, complete) {
46 46
47 return await this.GET({ 47 return await this.GET({
48 method: BUYER_SUBMIT, 48 method: BUYER_SUBMIT,
49 - uid,  
50 skup, 49 skup,
51 channelNo, 50 channelNo,
52 addressId, 51 addressId,
53 - debug: 'XYZ'  
54 },{ 52 },{
55 path: '/shopping', 53 path: '/shopping',
56 complete 54 complete
57 }) 55 })
58 } 56 }
59 57
60 - async prePay(uid, orderCode, complete) { 58 + async prePay( orderCode, complete) {
61 59
62 return await this.GET({ 60 return await this.GET({
63 - uid,  
64 orderCode, 61 orderCode,
65 payment: 1, 62 payment: 1,
66 method:BUYER_PREPAY, 63 method:BUYER_PREPAY,
@@ -71,13 +68,11 @@ export default class orderService extends BaseService { @@ -71,13 +68,11 @@ export default class orderService extends BaseService {
71 }) 68 })
72 } 69 }
73 70
74 - async getComputeCompensate(uid,orderCode, complete) { 71 + async getComputeCompensate(orderCode, complete) {
75 72
76 return await this.GET({ 73 return await this.GET({
77 - uid,  
78 orderCode, 74 orderCode,
79 method:COMPUTE_COMPENSATE, 75 method:COMPUTE_COMPENSATE,
80 - debug: 'XYZ'  
81 }, { 76 }, {
82 complete 77 complete
83 }) 78 })
@@ -88,7 +83,6 @@ export default class orderService extends BaseService { @@ -88,7 +83,6 @@ export default class orderService extends BaseService {
88 return await this.GET({ 83 return await this.GET({
89 product_id, 84 product_id,
90 method: PRODUCT_RECOMMEND, 85 method: PRODUCT_RECOMMEND,
91 - debug: 'XYZ'  
92 },{ 86 },{
93 complete 87 complete
94 }) 88 })
@@ -58,9 +58,8 @@ Page({ @@ -58,9 +58,8 @@ Page({
58 title: '', 58 title: '',
59 }) 59 })
60 60
61 - let uid = '500031182' ;  
62 let orderCode = this.data.orderCode; 61 let orderCode = this.data.orderCode;
63 - api.getComputeCompensate(uid,orderCode, () => wx.hideLoading()) 62 + api.getComputeCompensate(orderCode, () => wx.hideLoading())
64 .then(data => { 63 .then(data => {
65 this.setData({ 64 this.setData({
66 compensale: data 65 compensale: data