Authored by hongyong.zhao

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

... ... @@ -38,7 +38,6 @@ Page({
title: '',
});
let params = {
uid: '500031182',
skup: this.data.skup,
debug: 'XYZ'
}
... ... @@ -63,7 +62,6 @@ Page({
})
let params = {
uid: '500031182',
debug: 'XYZ'
}
... ... @@ -107,14 +105,13 @@ Page({
let addressId = this.data.hasAddress && this.data.address && this.data.address.address_id
let skup = this.data.skup
let channelNo = ''
let uid = '500031182'
let api = new orderService()
wx.showLoading({
title: '',
})
api.buyerSubmit(uid,skup,channelNo,addressId, () => wx.hideLoading())
api.buyerSubmit(skup,channelNo,addressId, () => wx.hideLoading())
.then(data => {
if (data && data.orderCode) {
this.prePay(data.orderCode)
... ... @@ -134,13 +131,12 @@ Page({
// url: `./orderSuccess?product_id=${this.data.product_id}&orderCode=${this.data.orderCode}`
// })
let uid = '500031182'
let api = new orderService()
wx.showLoading({
title: '',
})
api.prePay(uid,orderCode, () => wx.hideLoading())
api.prePay(orderCode, () => wx.hideLoading())
.then(data => {
if (data && data.prePayData) {
this.callWxPay(data.prePayData)
... ... @@ -205,10 +201,13 @@ Page({
selectComplete: function(data) {
this.setData({
address: data,
hasAddress: true
})
if (data) {
this.setData({
address: data,
hasAddress: true
})
}
},
checkProtocol: function () {
... ...
... ... @@ -42,25 +42,22 @@ export default class orderService extends BaseService {
})
}
async buyerSubmit(uid,skup,channelNo='2919',addressId, complete) {
async buyerSubmit(skup,channelNo='2919',addressId, complete) {
return await this.GET({
method: BUYER_SUBMIT,
uid,
skup,
channelNo,
addressId,
debug: 'XYZ'
},{
path: '/shopping',
complete
})
}
async prePay(uid, orderCode, complete) {
async prePay( orderCode, complete) {
return await this.GET({
uid,
orderCode,
payment: 1,
method:BUYER_PREPAY,
... ... @@ -71,13 +68,11 @@ export default class orderService extends BaseService {
})
}
async getComputeCompensate(uid,orderCode, complete) {
async getComputeCompensate(orderCode, complete) {
return await this.GET({
uid,
orderCode,
method:COMPUTE_COMPENSATE,
debug: 'XYZ'
}, {
complete
})
... ... @@ -88,7 +83,6 @@ export default class orderService extends BaseService {
return await this.GET({
product_id,
method: PRODUCT_RECOMMEND,
debug: 'XYZ'
},{
complete
})
... ...
... ... @@ -58,9 +58,8 @@ Page({
title: '',
})
let uid = '500031182' ;
let orderCode = this.data.orderCode;
api.getComputeCompensate(uid,orderCode, () => wx.hideLoading())
api.getComputeCompensate(orderCode, () => wx.hideLoading())
.then(data => {
this.setData({
compensale: data
... ...