1.0.1
This commit is contained in:
parent
0185f1eaf2
commit
96407c7a02
@ -4,8 +4,11 @@
|
||||
*/
|
||||
// 开发环境
|
||||
const dev = {
|
||||
// common: "https://common-api.pickmall.cn",
|
||||
// buyer: "https://buyer-api.pickmall.cn",
|
||||
// common: "http://192.168.1.211:8890",
|
||||
// buyer: "http://192.168.1.211:8888",
|
||||
// vlog: "http://192.168.1.211:8099",
|
||||
// web: "http://192.168.1.211:8099",
|
||||
// seller: "http://192.168.1.211:8889",
|
||||
common: "http://43.143.227.203:8890",
|
||||
buyer: "http://43.143.227.203:8888",
|
||||
vlog: "http://43.143.227.203:8099",
|
||||
|
@ -1,33 +1,80 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="navbar">
|
||||
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
||||
<view
|
||||
v-for="(item, index) in navList"
|
||||
:key="index"
|
||||
class="nav-item"
|
||||
:class="{ current: tabCurrentIndex === index }"
|
||||
@click="tabClick(index)"
|
||||
>{{ item.text }}</view
|
||||
>
|
||||
</view>
|
||||
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
||||
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)">
|
||||
<swiper
|
||||
:current="tabCurrentIndex"
|
||||
class="swiper-box"
|
||||
duration="300"
|
||||
@change="changeTab"
|
||||
>
|
||||
<swiper-item
|
||||
class="tab-content"
|
||||
v-for="(tabItem, tabIndex) in navList"
|
||||
:key="tabIndex"
|
||||
>
|
||||
<scroll-view
|
||||
class="list-scroll-content"
|
||||
scroll-y
|
||||
@scrolltolower="loadData(tabIndex)"
|
||||
>
|
||||
<!-- 空白页 -->
|
||||
<u-empty text="暂无订单" mode="list" v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
|
||||
<u-empty
|
||||
text="暂无订单"
|
||||
mode="list"
|
||||
v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
|
||||
></u-empty>
|
||||
<!-- 订单列表 -->
|
||||
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList">
|
||||
<view
|
||||
class="seller-view"
|
||||
:key="oderIndex"
|
||||
v-for="(order, oderIndex) in tabItem.orderList"
|
||||
>
|
||||
<!-- 店铺名称 -->
|
||||
<view class="seller-info u-flex u-row-between">
|
||||
<view class="seller-name" @click="navigateToStore(order)">
|
||||
<view class="name">{{ order.storeName }}</view>
|
||||
</view>
|
||||
<view class="order-sn">{{
|
||||
order.orderStatus | orderStatusList
|
||||
}}</view>
|
||||
<view class="order-sn">
|
||||
{{ order.orderStatus | orderStatusList }}</view
|
||||
>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<view class="goods-item-view" @click="navigateToOrderDetail(order.sn)">
|
||||
<view class="goods-img" v-for="(goods, goodsIndex) in order.orderItems" :key="goodsIndex">
|
||||
<u-image border-radius="6" width="100%" height="100%" :src="imgfun(goods.image)"></u-image>
|
||||
<view
|
||||
class="goods-item-view"
|
||||
@click="navigateToOrderDetail(order.sn)"
|
||||
>
|
||||
<view
|
||||
class="goods-img"
|
||||
v-for="(goods, goodsIndex) in order.orderItems"
|
||||
:key="goodsIndex"
|
||||
>
|
||||
<u-image
|
||||
border-radius="6"
|
||||
width="100%"
|
||||
height="100%"
|
||||
:src="imgfun(goods.image)"
|
||||
></u-image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view v-if="order.orderItems.length <= 1" class="goods-title u-line-2">{{ order.groupName }}</view>
|
||||
<view v-if="order.orderItems.length <= 1" class="goods-price">
|
||||
<view
|
||||
v-if="order.orderItems.length <= 1"
|
||||
class="goods-title u-line-2"
|
||||
>{{ order.groupName }}</view
|
||||
>
|
||||
<view
|
||||
v-if="order.orderItems.length <= 1"
|
||||
class="goods-price"
|
||||
>
|
||||
¥{{ order.flowPrice | unitPrice }}
|
||||
</view>
|
||||
</view>
|
||||
@ -45,23 +92,62 @@
|
||||
</view>
|
||||
<view>
|
||||
<!-- 全部 -->
|
||||
<u-button ripple class="pay-btn" shape="circle" size="mini" v-if="order.allowOperationVO.pay" @click="waitPay(order)">立即付款</u-button>
|
||||
<u-button
|
||||
ripple
|
||||
class="pay-btn"
|
||||
shape="circle"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.pay"
|
||||
@click="waitPay(order)"
|
||||
>立即付款</u-button
|
||||
>
|
||||
<!-- 取消订单 -->
|
||||
<u-button ripple class="cancel-btn" shape="circle" size="mini" v-if="order.allowOperationVO.cancel" @click="onCancel(order.sn)">
|
||||
<u-button
|
||||
ripple
|
||||
class="cancel-btn"
|
||||
shape="circle"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.cancel"
|
||||
@click="onCancel(order.sn)"
|
||||
>
|
||||
取消订单
|
||||
</u-button>
|
||||
<!-- 等待收货 -->
|
||||
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="order.allowOperationVO.showLogistics" @click="navigateToLogistics(order)">
|
||||
<u-button
|
||||
ripple
|
||||
shape="circle"
|
||||
class="rebuy-btn"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.showLogistics"
|
||||
@click="navigateToLogistics(order)"
|
||||
>
|
||||
查看物流
|
||||
</u-button>
|
||||
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)">
|
||||
<u-button
|
||||
ripple
|
||||
:customStyle="{ background: lightColor, color: '#fff' }"
|
||||
shape="circle"
|
||||
class="pay-btn"
|
||||
size="mini"
|
||||
v-if="order.allowOperationVO.rog"
|
||||
@click="onRog(order.sn)"
|
||||
>
|
||||
确认收货
|
||||
</u-button>
|
||||
<u-button ripple shape="circle" class="cancel-btn" size="mini"
|
||||
v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="showcancel=true">
|
||||
<u-button
|
||||
ripple
|
||||
shape="circle"
|
||||
class="cancel-btn"
|
||||
size="mini"
|
||||
v-if="!order.allowOperationVO.pay"
|
||||
@click="maging(order)"
|
||||
>
|
||||
退款/售后
|
||||
</u-button>
|
||||
<u-modal v-model="showcancel" :content="contenttitle"></u-modal>
|
||||
<u-modal
|
||||
v-model="showcancel"
|
||||
:content="contenttitle"
|
||||
></u-modal>
|
||||
<!-- <u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyService(order)">
|
||||
退款/售后
|
||||
</u-button> -->
|
||||
@ -80,26 +166,57 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-popup class="cancel-popup" v-model="cancelShow" mode="bottom" length="60%">
|
||||
<u-popup
|
||||
class="cancel-popup"
|
||||
v-model="cancelShow"
|
||||
mode="bottom"
|
||||
length="60%"
|
||||
>
|
||||
<view class="header">取消订单</view>
|
||||
<view class="body">
|
||||
<view class="title">取消订单后,本单享有的优惠可能会一并取消,是否继续?</view>
|
||||
<view class="title"
|
||||
>取消订单后,本单享有的优惠可能会一并取消,是否继续?</view
|
||||
>
|
||||
<view>
|
||||
<u-radio-group v-model="reason">
|
||||
<view class="value">
|
||||
<view class="radio-view" :key="index" v-for="(item, index) in cancelList">
|
||||
<u-radio :active-color="lightColor" label-size="25" shape="circle" :name="item.reason" @change="reasonChange">{{ item.reason }}</u-radio>
|
||||
<view
|
||||
class="radio-view"
|
||||
:key="index"
|
||||
v-for="(item, index) in cancelList"
|
||||
>
|
||||
<u-radio
|
||||
:active-color="lightColor"
|
||||
label-size="25"
|
||||
shape="circle"
|
||||
:name="item.reason"
|
||||
@change="reasonChange"
|
||||
>{{ item.reason }}</u-radio
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<u-button size="medium" ripple v-if="reason" shape="circle" @click="submitCancel">提交</u-button>
|
||||
<u-button
|
||||
size="medium"
|
||||
ripple
|
||||
v-if="reason"
|
||||
shape="circle"
|
||||
@click="submitCancel"
|
||||
>提交</u-button
|
||||
>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-toast ref="uToast" />
|
||||
<u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" @confirm="confirmRog"></u-modal>
|
||||
<u-modal
|
||||
:confirm-color="lightColor"
|
||||
v-model="rogShow"
|
||||
:show-cancel-button="true"
|
||||
:content="'是否确认收货?'"
|
||||
@confirm="confirmRog"
|
||||
></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -114,8 +231,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showcancel:false,
|
||||
contenttitle:"请联系客服:03156198200",
|
||||
showcancel: false,
|
||||
contenttitle: "请联系客服:03156198200",
|
||||
lightColor: this.$lightColor,
|
||||
tabCurrentIndex: 0, //导航栏索引
|
||||
navList: [
|
||||
@ -162,6 +279,13 @@ export default {
|
||||
orderList: [],
|
||||
pageNumber: 1,
|
||||
},
|
||||
{
|
||||
state: 6,
|
||||
text: "已退款",
|
||||
loadStatus: "more",
|
||||
orderList: [],
|
||||
pageNumber: 1,
|
||||
},
|
||||
],
|
||||
status: "", //接收导航栏状态
|
||||
params: {
|
||||
@ -178,7 +302,7 @@ export default {
|
||||
orderStatus: "WAIT_PAY", //代付款
|
||||
},
|
||||
{
|
||||
orderStatus: "WAIT_SHIP",//待发货
|
||||
orderStatus: "WAIT_SHIP", //待发货
|
||||
},
|
||||
{
|
||||
orderStatus: "WAIT_ROG", //待收货
|
||||
@ -186,9 +310,13 @@ export default {
|
||||
{
|
||||
orderStatus: "COMPLETE", //已完成
|
||||
},
|
||||
|
||||
{
|
||||
orderStatus: "CANCELLED", //已取消
|
||||
},
|
||||
{
|
||||
orderStatus: "REFUNDED", //已退款
|
||||
},
|
||||
],
|
||||
cancelShow: false, //是否显示取消
|
||||
orderSn: "", //ordersn
|
||||
@ -213,8 +341,6 @@ export default {
|
||||
this.loadData(this.status);
|
||||
},
|
||||
|
||||
|
||||
|
||||
onLoad(options) {
|
||||
/**
|
||||
* 修复app端点击除全部订单外的按钮进入时不加载数据的问题
|
||||
@ -226,7 +352,6 @@ export default {
|
||||
if (status == 0) {
|
||||
this.loadData(status);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -243,16 +368,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
maging(val) {
|
||||
this.contenttitle = "请先联系商家:" + val.mobile;
|
||||
this.showcancel = true;
|
||||
},
|
||||
|
||||
// 售后
|
||||
applyService(order){
|
||||
|
||||
|
||||
applyService(order) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`
|
||||
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`,
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 店铺详情
|
||||
@ -482,7 +607,6 @@ export default {
|
||||
* 重新购买
|
||||
*/
|
||||
reBuy(order) {
|
||||
console.log(order);
|
||||
return;
|
||||
uni.navigateTo({
|
||||
url:
|
||||
|
@ -8,7 +8,30 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 物流信息 -->
|
||||
<view class="info-view logi-view">
|
||||
<view
|
||||
class="info-view logi-view"
|
||||
:style="{ display: 'flex', flexDirection: 'column' }"
|
||||
v-if="orderDetail.ste == '1'"
|
||||
>
|
||||
<view :style="{ width: '100%' }">
|
||||
<view class="order-info-view">
|
||||
<view class="title">快递编号:</view>
|
||||
<view class="value">
|
||||
{{ order.logisticsNo }}
|
||||
<u-tag
|
||||
class="copy"
|
||||
text="复制"
|
||||
type="info"
|
||||
size="mini"
|
||||
@click="onCopy(order.logisticsNo)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-info-view">
|
||||
<view class="title">快递:</view>
|
||||
<view class="value">{{ order.logisticsName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="logi-List" v-if="logiList && logiList.traces.length != 0">
|
||||
<view class="logi-List-title">
|
||||
{{ logiList.traces[logiList.traces.length - 1].AcceptStation }}
|
||||
@ -22,12 +45,16 @@
|
||||
<view class="verificationCode" v-if="order.verificationCode">
|
||||
券码: {{ order.verificationCode }}
|
||||
</view>
|
||||
<view v-else class="logi-List-title">
|
||||
<!-- <view v-else class="logi-List-title">
|
||||
{{ "暂无物流信息" }}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-view" style="justify-content: center">
|
||||
<view
|
||||
class="info-view"
|
||||
style="justify-content: center"
|
||||
v-if="orderDetail.ste == '0'"
|
||||
>
|
||||
<img :src="code" alt="" />
|
||||
</view>
|
||||
<!-- 地址 -->
|
||||
@ -412,7 +439,15 @@ export default {
|
||||
orderSn: this.order.sn,
|
||||
num: this.order.goodsNum,
|
||||
};
|
||||
if (this.orderDetail.ste == 0) {
|
||||
|
||||
if (
|
||||
(this.orderDetail.ste == 0 &&
|
||||
this.orderDetail.orderStatusValue == "已付款") ||
|
||||
(this.orderDetail.ste == 0 &&
|
||||
this.orderDetail.orderStatusValue == "待发货") ||
|
||||
(this.orderDetail.ste == 0 &&
|
||||
this.orderDetail.orderStatusValue == "待收货")
|
||||
) {
|
||||
createWithVerificatio(params).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.code = res.data.result;
|
||||
|
@ -15,6 +15,10 @@
|
||||
.layout{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -192,11 +192,11 @@ export default {
|
||||
Promise.all([
|
||||
getCouponsNum(), //优惠券
|
||||
getFootprintNum(), //浏览数量
|
||||
getUserWallet(), //预存款
|
||||
// getUserWallet(), //预存款
|
||||
]).then((res) => {
|
||||
this.couponNum = res[0].data.result;
|
||||
this.footNum = res[1].data.result;
|
||||
this.walletNum = res[2].data.result.memberWallet;
|
||||
// this.walletNum = res[2].data.result.memberWallet;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -198,6 +198,7 @@ export function orderStatusList(val) {
|
||||
COMPLETED: "已完成",
|
||||
COMPLETE: "已完成",
|
||||
TAKE: "待核验",
|
||||
REFUNDED: "已退款",
|
||||
};
|
||||
return orderStatusList[val];
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ function cleanStorage() {
|
||||
storage.setHasLogin(false);
|
||||
storage.setAccessToken("");
|
||||
storage.setRefreshToken("");
|
||||
storage.setUuid("wzj666");
|
||||
storage.setUuid("");
|
||||
storage.setUserInfo({});
|
||||
// 清理vlog信息
|
||||
storage.setVlogToken("");
|
||||
@ -66,7 +66,6 @@ let http = new Request();
|
||||
http.setConfig((config) => {
|
||||
// 没有uuid创建
|
||||
if (!storage.getUuid()) {
|
||||
// storage.setUuid(uuid.v1());
|
||||
storage.setUuid("wzj666");
|
||||
}
|
||||
|
||||
@ -114,8 +113,7 @@ http.interceptors.request.use(
|
||||
}
|
||||
config.header = {
|
||||
...config.header,
|
||||
// uuid: storage.getUuid() || uuid.v1(),
|
||||
uuid: 'wzj666',
|
||||
uuid: "wzj666",
|
||||
};
|
||||
return config;
|
||||
},
|
||||
@ -131,7 +129,6 @@ let requests = [];
|
||||
// 必须使用异步函数,注意
|
||||
http.interceptors.response.use(
|
||||
async (response) => {
|
||||
// console.log(isRefreshing)
|
||||
console.log(response)
|
||||
/* 请求之后拦截器。可以使用async await 做异步操作 */
|
||||
// token存在并且token过期
|
||||
@ -149,12 +146,17 @@ http.interceptors.response.use(
|
||||
// }
|
||||
|
||||
let token = storage.getAccessToken();
|
||||
if(response.statusCode === 408){
|
||||
cleanStorage();
|
||||
}
|
||||
if (
|
||||
(token && response.statusCode === 403) ||
|
||||
(token && response.data.status === 403)
|
||||
) {
|
||||
console.log('去刷tk1')
|
||||
if (!isRefreshing) {
|
||||
isRefreshing = true;
|
||||
console.log('去刷tk2')
|
||||
//调用刷新token的接口
|
||||
return refreshTokenFn(storage.getRefreshToken())
|
||||
.then((res) => {
|
||||
@ -207,7 +209,8 @@ http.interceptors.response.use(
|
||||
) {
|
||||
if (response.data.message) {
|
||||
uni.showToast({
|
||||
title: response.data.message,
|
||||
// title: response.data.message,
|
||||
title: "请重试",
|
||||
icon: "none",
|
||||
duration: 1500,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user