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