mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
e01272c71f
commit
18f781209d
@ -152,6 +152,7 @@ export function getStoreCart(dataObj) {
|
||||
* @param {Object} dataObj 下单报文
|
||||
*/
|
||||
export function goodsUnifieldOrder(dataObj) {
|
||||
|
||||
return new Promise(
|
||||
(resolve, reject) => {
|
||||
request({
|
||||
@ -164,7 +165,7 @@ export function goodsUnifieldOrder(dataObj) {
|
||||
resolve(res.data);
|
||||
return;
|
||||
}
|
||||
reject();
|
||||
reject(res);
|
||||
},
|
||||
fail: function(e) {
|
||||
reject();
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 配送方式 -->
|
||||
<view class="logistic item-list flex justify-between align-center" @tap="onSelExpressType(g)">
|
||||
<view class="logistic item-list flex justify-between align-center">
|
||||
<view class="x-f">
|
||||
<view class="item-title">配送方式</view>
|
||||
</view>
|
||||
@ -103,7 +103,7 @@
|
||||
} from '../../api/goods/goodsApi.js'
|
||||
|
||||
import {
|
||||
getCurOwner
|
||||
getCurOwner,getUserAddress
|
||||
} from '../../api/owner/ownerApi.js'
|
||||
|
||||
|
||||
@ -234,7 +234,7 @@
|
||||
personName: that.personName,
|
||||
userId:that.personId,
|
||||
tradeType: _tradeType,
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
let _data = null;
|
||||
if (res.code == '0') {
|
||||
return toPay(res);
|
||||
@ -244,9 +244,17 @@
|
||||
title:res.msg
|
||||
})
|
||||
return _data;
|
||||
},(err)=>{
|
||||
console.log('err',err);
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:err.data
|
||||
})
|
||||
|
||||
return null;
|
||||
})
|
||||
.then((res)=>{
|
||||
console.log('res',res);
|
||||
|
||||
if(res == null){
|
||||
return ;
|
||||
}
|
||||
@ -265,7 +273,16 @@
|
||||
},
|
||||
// 初始地址
|
||||
getDefaultAddress() {
|
||||
|
||||
let that = this;
|
||||
getUserAddress({
|
||||
userId:this.personId,
|
||||
isDefault:'T',
|
||||
page:1,
|
||||
row:1
|
||||
})
|
||||
.then((_data) =>{
|
||||
that.address = _data.data[0]
|
||||
})
|
||||
},
|
||||
getOwner: function() {
|
||||
let _that = this;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user