retrieve file
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
<image src="../static/mine/28.png"></image>
|
||||
<view class="address-right">
|
||||
<view class="user-info">
|
||||
<view>胖胖</view>
|
||||
<view>18220171014</view>
|
||||
<view>{{ orderInfo.extend_order_common.reciver_name }}</view>
|
||||
<view>{{ orderInfo.extend_order_common.reciver_info.mob_phone }}</view>
|
||||
</view>
|
||||
<view class="address-text u-line-2">山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻山东省泰安市泰山区东岳大街与克山路交汇口银山店四楼橙天影视南邻</view>
|
||||
<view class="address-text u-line-2">{{ orderInfo.extend_order_common.reciver_info.address }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-goods">
|
||||
@@ -41,19 +41,19 @@
|
||||
<view class="goods-others">
|
||||
<view>
|
||||
<view class="title">运费(快递/骑手)</view>
|
||||
<view class="price">¥0.00</view>
|
||||
<view class="price">¥{{ orderInfo.shipping_fee }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">店铺优惠</view>
|
||||
<view class="price">¥0.00</view>
|
||||
<view class="price">¥{{ orderInfo.extend_order_common.voucher_price || '0.00' }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">订单总价</view>
|
||||
<view class="price">¥{{ orderInfo.order_amount }}</view>
|
||||
<view class="price">¥{{ orderInfo.goods_amount }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">实付费(含运费)</view>
|
||||
<view class="price">¥{{ orderInfo.goods_amount }}</view>
|
||||
<view class="price">¥{{ orderInfo.order_amount }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">支付方式</view>
|
||||
@@ -72,8 +72,8 @@
|
||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||
<view class="cancel" v-if="state == '6'">取消支付</view>
|
||||
<view class="payment" v-if="state == '6'">立即支付</view>
|
||||
<view class="service" v-if="current == 6">联系官方客服</view>
|
||||
<view class="submit" v-if="current == 6">提交官方审核</view>
|
||||
<view class="service" v-if="state == '7'">联系官方客服</view>
|
||||
<view class="submit" v-if="state == '7'">提交官方审核</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -81,7 +81,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付
|
||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
|
||||
s_object: {
|
||||
'1': {
|
||||
text: '待收货',
|
||||
@@ -107,6 +107,14 @@ export default {
|
||||
text: '待支付',
|
||||
image: '../static/mine/31.png',
|
||||
},
|
||||
'7': {
|
||||
text: '待退款',
|
||||
image: '../static/mine/34.png',
|
||||
},
|
||||
'8': {
|
||||
text: '已退款',
|
||||
image: '../static/mine/34.png',
|
||||
},
|
||||
},
|
||||
current: 0,
|
||||
orderInfo: {}
|
||||
@@ -114,7 +122,7 @@ export default {
|
||||
},
|
||||
onLoad(option) {
|
||||
this.setTitle();
|
||||
this.getOrderInfo(option.id);
|
||||
this.getOrderInfo(option.oid);
|
||||
},
|
||||
methods: {
|
||||
viewState(value) {
|
||||
@@ -139,6 +147,12 @@ export default {
|
||||
break;
|
||||
}
|
||||
if(this.orderInfo.refund_state) state = '5';
|
||||
// 申请退款
|
||||
const refund = this.orderInfo.refund_list[this.orderInfo.extend_order_common.order_id];
|
||||
if(this.orderInfo.refund_list) {
|
||||
if([1, 2].indexOf(refund.refund_state) >= 0) state = '7';
|
||||
if(refund.refund_state == 3) state = '8';
|
||||
}
|
||||
this.state = state;
|
||||
},
|
||||
getOrderInfo(id) {
|
||||
|
||||
@@ -53,7 +53,8 @@ export default {
|
||||
watch: {
|
||||
current(value) {
|
||||
this.page = 0;
|
||||
this.getOrderList({ reload: 'again' });
|
||||
// again 重新请求列表 不然往列表里添加
|
||||
value == 6 ? this.getAfterSaleList({ reload: 'again' }): this.getOrderList({ reload: 'again' });
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -82,9 +83,6 @@ export default {
|
||||
case 5:
|
||||
type = 'state_noeval'; // 待评价
|
||||
break;
|
||||
case 6:
|
||||
type = 40; // 售后
|
||||
break;
|
||||
default:
|
||||
type = -1;
|
||||
break;
|
||||
@@ -92,7 +90,17 @@ export default {
|
||||
const res = await this.$u.api.getOrderList({
|
||||
page: this.page,
|
||||
type: type,
|
||||
refund_state: this.current == 6 ? '1' : 0, // 判断是不是售后列表
|
||||
})
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
if(reload) this.orderList = res.data;
|
||||
else this.orderList.push(...res.data);
|
||||
}
|
||||
return res;
|
||||
},
|
||||
async getAfterSaleList({ reload = '' } = {}) {
|
||||
const res = await this.$u.api.getAfterSaleList({
|
||||
page: this.page,
|
||||
})
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
@@ -108,7 +116,10 @@ export default {
|
||||
this.timer = false;
|
||||
this.loadStatus.splice(this.current, 1, "loading");
|
||||
this.page++;
|
||||
this.getOrderList().then(res => {
|
||||
let promise;
|
||||
if(this.current == 6) promise = this.getAfterSaleList();
|
||||
else promise = this.getOrderList();
|
||||
promise.then(res => {
|
||||
this.loadStatus.splice(this.current, 1, "nomore");
|
||||
if(res.data.length == 0) this.page--;
|
||||
}).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user