feat: 新增退款相关功能
This commit is contained in:
@@ -4,7 +4,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
//开发环境
|
//开发环境
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
||||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
// baseUrl = "http://192.168.110.131:9200/pb/"; // 后端本地
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
//生产环境
|
//生产环境
|
||||||
baseUrl = "https://api.nuttyreading.com/";
|
baseUrl = "https://api.nuttyreading.com/";
|
||||||
|
|||||||
3
main.js
3
main.js
@@ -96,6 +96,9 @@ Vue.component('common-goods-nav', commonGoodsNav);
|
|||||||
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
|
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
|
||||||
Vue.component('common-advertisement', commonAdvertisement);
|
Vue.component('common-advertisement', commonAdvertisement);
|
||||||
|
|
||||||
|
import CommonRefundDestination from 'edu-core/components/order/refund-destination.vue'
|
||||||
|
Vue.component('common-refund-destination', CommonRefundDestination);
|
||||||
|
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sassImplementationName" : "node-sass",
|
"sassImplementationName" : "node-sass",
|
||||||
"versionName" : "1.2.88",
|
"versionName" : "1.2.89",
|
||||||
"versionCode" : 1288,
|
"versionCode" : 1289,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
"ignoreVersion" : true
|
"ignoreVersion" : true
|
||||||
|
|||||||
BIN
nuttyreading-html2.zip
Normal file
BIN
nuttyreading-html2.zip
Normal file
Binary file not shown.
16
package-lock.json
generated
16
package-lock.json
generated
@@ -11,7 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"e-peanut": "file:",
|
"e-peanut": "file:",
|
||||||
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12",
|
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13",
|
||||||
"epubjs": "^0.3.93",
|
"epubjs": "^0.3.93",
|
||||||
"jquery": "^2.2.4",
|
"jquery": "^2.2.4",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
@@ -138,8 +138,8 @@
|
|||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/edu-core": {
|
"node_modules/edu-core": {
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
|
"resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/epubjs": {
|
"node_modules/epubjs": {
|
||||||
@@ -730,7 +730,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"e-peanut": "file:",
|
"e-peanut": "file:",
|
||||||
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12",
|
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13",
|
||||||
"epubjs": "^0.3.93",
|
"epubjs": "^0.3.93",
|
||||||
"jquery": "^2.2.4",
|
"jquery": "^2.2.4",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
@@ -823,8 +823,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"edu-core": {
|
"edu-core": {
|
||||||
"version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
|
"version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f",
|
||||||
"from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12"
|
"from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13"
|
||||||
},
|
},
|
||||||
"epubjs": {
|
"epubjs": {
|
||||||
"version": "0.3.93",
|
"version": "0.3.93",
|
||||||
@@ -1236,8 +1236,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"edu-core": {
|
"edu-core": {
|
||||||
"version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
|
"version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f",
|
||||||
"from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12"
|
"from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13"
|
||||||
},
|
},
|
||||||
"epubjs": {
|
"epubjs": {
|
||||||
"version": "0.3.93",
|
"version": "0.3.93",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"e-peanut": "file:",
|
"e-peanut": "file:",
|
||||||
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12",
|
"edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13",
|
||||||
"epubjs": "^0.3.93",
|
"epubjs": "^0.3.93",
|
||||||
"jquery": "^2.2.4",
|
"jquery": "^2.2.4",
|
||||||
"qs": "^6.11.0",
|
"qs": "^6.11.0",
|
||||||
|
|||||||
@@ -264,6 +264,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/bookShop/refundDestination",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "钱款去向",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/bookShop/commoditySearch",
|
"path": "pages/bookShop/commoditySearch",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
<text class="orderState orderState2" v-if="orderContet.orderStatus==2">待收到</text>
|
<text class="orderState orderState2" v-if="orderContet.orderStatus==2">待收到</text>
|
||||||
<text class="orderState orderState3" v-if="orderContet.orderStatus==3">已完成</text>
|
<text class="orderState orderState3" v-if="orderContet.orderStatus==3">已完成</text>
|
||||||
<text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text>
|
<text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text>
|
||||||
|
<text class="orderState orderState6" v-if="orderContet.orderStatus==6">已退款</text>
|
||||||
|
<text class="orderState orderState7" v-if="orderContet.orderStatus==7">退款中</text>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="orderContet.orderType == 'order' && orderContet.goodsList.length > 0">
|
<template v-if="orderContet.orderType == 'order' && orderContet.goodsList.length > 0">
|
||||||
<view style="position: relative;" class="orderContent" v-for="(item,index) in orderContet.goodsList" :key="index"
|
<view style="position: relative;" class="orderContent" v-for="(item,index) in orderContet.goodsList" :key="index"
|
||||||
@@ -140,7 +142,8 @@
|
|||||||
<view v-if="orderContet.orderStatus==2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
<view v-if="orderContet.orderStatus==2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
||||||
<view v-if="orderContet.orderStatus==2" class="opCan" @click="OverOrder" >确认收到</view>
|
<view v-if="orderContet.orderStatus==2" class="opCan" @click="OverOrder" >确认收到</view>
|
||||||
|
|
||||||
<view v-if="orderContet.orderStatus==0" class="opFix" @click="canceOrder">取消订单</view>
|
<!-- nuttyreading:注释取消订单入口 -->
|
||||||
|
<!-- <view v-if="orderContet.orderStatus==0" class="opFix" @click="canceOrder">取消订单</view> -->
|
||||||
<view v-if="orderContet.orderStatus==0" class="opCan" @click="goPay(orderContet)">去支付</view>
|
<view v-if="orderContet.orderStatus==0" class="opCan" @click="goPay(orderContet)">去支付</view>
|
||||||
|
|
||||||
<view class="opCan" @click="kefu">联系客服</view>
|
<view class="opCan" @click="kefu">联系客服</view>
|
||||||
@@ -629,6 +632,10 @@
|
|||||||
this.titleStat = '待收到'
|
this.titleStat = '待收到'
|
||||||
} else if (this.orderContet.orderStatus == 3) {
|
} else if (this.orderContet.orderStatus == 3) {
|
||||||
this.titleStat = '已完成'
|
this.titleStat = '已完成'
|
||||||
|
} else if (this.orderContet.orderStatus == 6) {
|
||||||
|
this.titleStat = '已退款'
|
||||||
|
} else if (this.orderContet.orderStatus == 7) {
|
||||||
|
this.titleStat = '退款中'
|
||||||
}
|
}
|
||||||
if(this.orderContet.orderStatus >= 2 && this.orderContet.orderType == 'order' && this.orderContet.expressOrders != null){
|
if(this.orderContet.orderStatus >= 2 && this.orderContet.orderType == 'order' && this.orderContet.expressOrders != null){
|
||||||
this.sheetList = this.orderContet.expressOrders
|
this.sheetList = this.orderContet.expressOrders
|
||||||
@@ -665,11 +672,29 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
checkPayTimeout(payItem) {
|
||||||
|
const createTime = payItem && payItem.createTime;
|
||||||
|
if (!createTime) return true;
|
||||||
|
const createdAt = new Date(String(createTime).replace(/-/g, "/")).getTime();
|
||||||
|
if (!createdAt) return true;
|
||||||
|
const expired = Date.now() - createdAt > 10 * 60 * 1000;
|
||||||
|
if (expired) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "订单已超时,不能继续支付,请重新下单",
|
||||||
|
confirmText: "知道了",
|
||||||
|
showCancel: false
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 支付
|
// 支付
|
||||||
goPay(payItem) {
|
goPay(payItem) {
|
||||||
console.log(payItem,'订单数据')
|
console.log(payItem,'订单数据')
|
||||||
|
if(!this.checkPayTimeout(payItem)) return
|
||||||
if(payItem.paymentMethod == 2){
|
if(payItem.paymentMethod == 2){
|
||||||
console.log('阿里支付')
|
console.log('阿里支付')
|
||||||
setPay({
|
setPay({
|
||||||
@@ -776,6 +801,8 @@
|
|||||||
.orderState2{background-color: #f56c6c;}
|
.orderState2{background-color: #f56c6c;}
|
||||||
.orderState3{background-color: #67c23a;}
|
.orderState3{background-color: #67c23a;}
|
||||||
.orderState5{background-color: #787878;}
|
.orderState5{background-color: #787878;}
|
||||||
|
.orderState6{background-color: #f56c6c;}
|
||||||
|
.orderState7{background-color: #f56c6c;}
|
||||||
.guoqi{ font-size: 28rpx; align-items: center; color: red; float: right; line-height: 40rpx;}
|
.guoqi{ font-size: 28rpx; align-items: center; color: red; float: right; line-height: 40rpx;}
|
||||||
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
||||||
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
||||||
|
|||||||
@@ -1,115 +1,116 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="">
|
||||||
<!-- 公共组件-每个页面必须引入 -->
|
<!-- 公共组件-每个页面必须引入 -->
|
||||||
<public-module></public-module>
|
<public-module></public-module>
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<z-nav-bar backState="2000" title="我的订单"></z-nav-bar>
|
<z-nav-bar backState="2000" title="我的订单"></z-nav-bar>
|
||||||
<view class="ordersTabs">
|
<view class="ordersTabs">
|
||||||
<view v-for="(item,index) in ordersTabs" @click="ordersTabCLi(item.value)" :key="index"
|
<u-tabs
|
||||||
:class="ordersListTab==item.value?'ordersdefine ordStyle':'ordersdefine'">
|
:list="ordersTabs"
|
||||||
{{item.name}}
|
:current="currentTabIndex"
|
||||||
<view class="ordersnum" v-if="item.value == 0 && map[item.value] > 0">{{map[item.value]}}</view>
|
lineColor="#3c7f56"
|
||||||
<view class="ordersnum" v-if="item.value == 1 && map[item.value] > 0">{{map[item.value]}}</view>
|
activeStyle="color: #3c7f56; font-weight: bold;"
|
||||||
<view class="ordersnum" v-if="item.value == 2 && map[item.value] > 0">{{map[item.value]}}</view>
|
inactiveStyle="color: #333;"
|
||||||
</view>
|
@click="ordersTabCLi"
|
||||||
</view>
|
></u-tabs>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 站位 -->
|
<!-- 站位 -->
|
||||||
<view class="ordersTabs" style="z-index:0;position:unset;">
|
<view class="ordersTabsPlaceholder"></view>
|
||||||
<view class="ordersdefine">1</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view v-if="ordersListTab == 1"> -->
|
<!-- <view v-if="ordersListTab == 1"> -->
|
||||||
<view>
|
<view v-if="newList.length > 0" class="container">
|
||||||
<view v-if="newList.length > 0">
|
<view class="orderInfo" v-for="(item,index) in newList" :key="index">
|
||||||
<view class="orderInfo" v-for="(item,index) in newList" :key="index">
|
<view class="mainContent">
|
||||||
<view class="mainContent">
|
<view class="item" @click.stop="toDetail(item)">
|
||||||
<view class="item" @click.stop="toDetail(item)">
|
<view class="orderstatus" v-show="item.orderStatus == 0">未付款</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 0">未付款</view>
|
<view class="orderstatus" v-show="item.orderStatus == 1">待发出</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 1">待发出</view>
|
<view class="orderstatus" v-show="item.orderStatus == 2">待收到</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 2">待收到</view>
|
<view class="orderstatus" v-show="item.orderStatus == 3">交易成功</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 3">交易成功</view>
|
<view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view>
|
<view class="orderstatus" v-show="item.orderStatus == 5">过期</view>
|
||||||
<view class="orderstatus" v-show="item.orderStatus == 5">过期</view>
|
<view class="orderstatus" v-show="item.orderStatus == 6">已退款</view>
|
||||||
<template v-if="item.orderType == 'order'">
|
<view class="orderstatus" v-show="item.orderStatus == 7">退款中</view>
|
||||||
<view style="position: relative;" v-for="(item1,index1) in item.productList" :key="index1" class="bookinfolist">
|
<template v-if="item.orderType == 'order'">
|
||||||
|
<view style="position: relative;" v-for="(item1,index1) in item.productList" :key="index1" class="bookinfolist">
|
||||||
<!--
|
<!--
|
||||||
<span v-if="item1.product.isVipPrice==1&&item1.product.vipPrice!=0&&item1.vipPrice!=null"
|
<span v-if="item1.product.isVipPrice==1&&item1.product.vipPrice!=0&&item1.vipPrice!=null"
|
||||||
style="position: absolute;z-index: 10;top: 4px;left: 0px;margin-right: 10px;text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 80rpx; padding:2px 4px;box-sizing: border-box;">VIP优惠</span>
|
style="position: absolute;z-index: 10;top: 4px;left: 0px;margin-right: 10px;text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 80rpx; padding:2px 4px;box-sizing: border-box;">VIP优惠</span>
|
||||||
-->
|
-->
|
||||||
<image class="feng" v-if="item1.product.productImages" :src="item1.product.productImages" mode="aspectFill"></image>
|
<image class="feng" v-if="item1.product && item1.product.productImages" :src="item1.product.productImages" mode="aspectFill"></image>
|
||||||
<!-- <view class="description" v-html="item.content">
|
<!-- <view class="description" v-html="item.content">
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="btns flexbox">
|
<view class="btns flexbox">
|
||||||
<span class="booknameleft">{{item1.product.productName}}</span>
|
<span class="booknameleft">{{item1.product && item1.product.productName}}</span>
|
||||||
<span class="right flexbox opbtns">
|
<span class="right flexbox opbtns">
|
||||||
¥{{item1.product.price}}
|
¥{{item1.product && item1.product.price}}
|
||||||
</span>
|
</span>
|
||||||
|
</view>
|
||||||
|
<view class="btns flexbox" style="margin-top:10rpx;padding-bottom: 72rpx;">
|
||||||
|
<view class="left" style="color: #C0C4CC;">
|
||||||
|
<view class="orderstatusbtn addcomment" v-if="item.orderStatus == 3 && item1.recordId == 0 &&
|
||||||
|
item.come == 0" @click.stop="pingji(item1.productId,item)">评价</view>
|
||||||
|
</view>
|
||||||
|
<span class="right flexbox opbtns" style="color: #C0C4CC;">
|
||||||
|
×{{item1.quantity}}
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.orderType == 'point'">
|
||||||
|
<view class="flexbox" style="align-items: center;">
|
||||||
|
|
||||||
|
<view class="" style="height: 150rpx;">
|
||||||
|
<image src="../../static/icon/oder_chong.png" style="height: 150rpx; width: 150rpx;"></image>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<text style="font-size: 28rpx;">充值订单</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.orderType == 'vip'">
|
||||||
|
<view class="flexbox" style="align-items: center;">
|
||||||
|
<view class="" style="height: 150rpx;">
|
||||||
|
<image :src="'../../static/icon/oder_vip.png'" style="height: 150rpx; width: 150rpx;"></image>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<text style="font-size: 28rpx;">VIP开通</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<view class="btns flexbox" style="margin-top:10rpx;">
|
||||||
|
<span class="left" style="color: #C0C4CC;"></span>
|
||||||
|
<span class="right flexbox opbtns">
|
||||||
|
<view style="color: #000;font-size:30rpx;font-weight:700;">实付款</view>
|
||||||
|
<view style="color: #000;font-size:30rpx;font-weight:700;">{{' ¥' + item.realMoney}}</view>
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<view class="btns flexbox" style="margin-top:10rpx;">
|
||||||
|
<span class="left" style="color: #C0C4CC;" @click.stop="toDetail(item)">订单详情</span>
|
||||||
|
<span class="right flexbox opbtns">
|
||||||
|
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="canceOrder(item)">取消订单</view> -->
|
||||||
|
<view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="goPay(item)">付款</view>
|
||||||
|
<!-- <view class="orderstatusbtn alertDeliver" v-if="item.orderStatus == 1">催发出</view> -->
|
||||||
|
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="seeExpressDetail(item)">查看物流</view>
|
||||||
|
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="OverOrder(item)">确认收到</view>
|
||||||
|
<view class="orderstatusbtn" v-if="item.orderStatus == 6 || item.orderStatus == 7" @click.stop="goRefundDestination(item)">钱款去向</view>
|
||||||
|
<view class="orderstatusbtn" v-if="item.refundableStatus === true" @click.stop="confirmApplyRefund(item)">申请退款</view>
|
||||||
|
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3">申请售后</view> -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- <view class="orderstatusbtn" v-if=" userRecordid == null && item.come == 0" @click.stop="pingji(item.id)">评价</view> -->
|
||||||
|
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3 && userRecordid != null" @click.stop="showZhuiping(item.productId)">追评</view> -->
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns flexbox" style="margin-top:10rpx;padding-bottom: 72rpx;">
|
</view>
|
||||||
<view class="left" style="color: #C0C4CC;">
|
</view>
|
||||||
<view class="orderstatusbtn addcomment" v-if="item.orderStatus == 3 && item1.recordId == 0 &&
|
<view v-if="status==0" class="container" style="text-align: center;">
|
||||||
item.come == 0" @click.stop="pingji(item1.productId,item)">评价</view>
|
|
||||||
</view>
|
|
||||||
<span class="right flexbox opbtns" style="color: #C0C4CC;">
|
|
||||||
×{{item1.quantity}}
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.orderType == 'point'">
|
|
||||||
<view class="flexbox" style="align-items: center;">
|
|
||||||
|
|
||||||
<view class="" style="height: 150rpx;">
|
|
||||||
<image src="../../static/icon/oder_chong.png" style="height: 150rpx; width: 150rpx;"></image>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<text style="font-size: 28rpx;">充值订单</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.orderType == 'vip'">
|
|
||||||
<view class="flexbox" style="align-items: center;">
|
|
||||||
<view class="" style="height: 150rpx;">
|
|
||||||
<image :src="'../../static/icon/oder_vip.png'" style="height: 150rpx; width: 150rpx;"></image>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<text style="font-size: 28rpx;">VIP开通</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<view class="btns flexbox" style="margin-top:10rpx;">
|
|
||||||
<span class="left" style="color: #C0C4CC;"></span>
|
|
||||||
<span class="right flexbox opbtns">
|
|
||||||
<view style="color: #000;font-size:30rpx;font-weight:700;">实付款</view>
|
|
||||||
<view style="color: #000;font-size:30rpx;font-weight:700;">{{' ¥' + item.realMoney}}</view>
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
<view class="btns flexbox" style="margin-top:10rpx;">
|
|
||||||
<span class="left" style="color: #C0C4CC;" @click.stop="toDetail(item)">订单详情</span>
|
|
||||||
<span class="right flexbox opbtns">
|
|
||||||
<view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="canceOrder(item)">取消订单</view>
|
|
||||||
<view class="orderstatusbtn" v-if="item.orderStatus == 0" @click.stop="goPay(item)">付款</view>
|
|
||||||
<!-- <view class="orderstatusbtn alertDeliver" v-if="item.orderStatus == 1">催发出</view> -->
|
|
||||||
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="seeExpressDetail(item)">查看物流</view>
|
|
||||||
<view class="orderstatusbtn" v-if="item.orderStatus == 2" @click.stop="OverOrder(item)">确认收到</view>
|
|
||||||
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3">申请售后</view> -->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <view class="orderstatusbtn" v-if=" userRecordid == null && item.come == 0" @click.stop="pingji(item.id)">评价</view> -->
|
|
||||||
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3 && userRecordid != null" @click.stop="showZhuiping(item.productId)">追评</view> -->
|
|
||||||
</span>
|
|
||||||
</view>
|
|
||||||
<view style="border-bottom:2rpx solid #e9e9e9;height:50rpx;" v-if="index<item.length-1"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="status==0" style="text-align: center;">
|
|
||||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="status==1" style="padding-bottom: 20rpx;">
|
<view v-if="status==1" class="container" style="padding-bottom: 20rpx;">
|
||||||
<u-divider v-if="newList.length > 0" text="全部加载完成"></u-divider>
|
<u-divider v-if="newList.length > 0" text="全部加载完成"></u-divider>
|
||||||
<u-divider v-else text="暂无订单"></u-divider>
|
<u-divider v-else text="暂无订单"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
@@ -201,21 +202,35 @@ import { data } from 'jquery';
|
|||||||
bfaid:null,
|
bfaid:null,
|
||||||
ordersTabs: [{
|
ordersTabs: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: null
|
value: -1,
|
||||||
|
badge: {}
|
||||||
}, {
|
}, {
|
||||||
name: '待付款',
|
name: '待付款',
|
||||||
value: 0
|
value: 0,
|
||||||
|
badge: {}
|
||||||
}, {
|
}, {
|
||||||
name: '待发出',
|
name: '待发出',
|
||||||
value: 1
|
value: 1,
|
||||||
|
badge: {}
|
||||||
}, {
|
}, {
|
||||||
name: '待收到',
|
name: '待收到',
|
||||||
value: 2
|
value: 2,
|
||||||
|
badge: {}
|
||||||
}, {
|
}, {
|
||||||
name: '已完成',
|
name: '已完成',
|
||||||
value: 3
|
value: 3,
|
||||||
|
badge: {}
|
||||||
|
}, {
|
||||||
|
name: '已退款',
|
||||||
|
value: 6,
|
||||||
|
badge: {}
|
||||||
|
}, {
|
||||||
|
name: '退款中',
|
||||||
|
value: 7,
|
||||||
|
badge: {}
|
||||||
}],
|
}],
|
||||||
ordersListTab: 1,
|
ordersListTab: 1,
|
||||||
|
currentTabIndex: 0,
|
||||||
newestpage: 1,
|
newestpage: 1,
|
||||||
// hotestpage: 1,
|
// hotestpage: 1,
|
||||||
// booksetpage: 1,
|
// booksetpage: 1,
|
||||||
@@ -266,8 +281,10 @@ import { data } from 'jquery';
|
|||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setLoadingShow']),
|
...mapMutations(['setLoadingShow']),
|
||||||
// 切换tab状态
|
// 切换tab状态
|
||||||
ordersTabCLi(e) {
|
ordersTabCLi(tabItem) {
|
||||||
this.ordersListTab = e
|
const isObject = tabItem && typeof tabItem === 'object';
|
||||||
|
this.currentTabIndex = isObject ? (tabItem.index || 0) : 0;
|
||||||
|
this.ordersListTab = isObject ? tabItem.value : tabItem;
|
||||||
this.newestpage = 1
|
this.newestpage = 1
|
||||||
// this.hotestpage = 1
|
// this.hotestpage = 1
|
||||||
// this.booksetpage = 1
|
// this.booksetpage = 1
|
||||||
@@ -276,6 +293,16 @@ import { data } from 'jquery';
|
|||||||
// this.bookList = []
|
// this.bookList = []
|
||||||
this.getBookList(this.ordersListTab, false)
|
this.getBookList(this.ordersListTab, false)
|
||||||
},
|
},
|
||||||
|
updateOrdersTabBadge() {
|
||||||
|
this.ordersTabs.forEach((tab) => {
|
||||||
|
if (tab.value === 0 || tab.value === 1 || tab.value === 2) {
|
||||||
|
const count = Number(this.map && this.map[tab.value]) || 0;
|
||||||
|
tab.badge = count > 0 ? { value: count } : {};
|
||||||
|
} else {
|
||||||
|
tab.badge = {};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 查看本书更多书评
|
// 查看本书更多书评
|
||||||
toMore(val){
|
toMore(val){
|
||||||
console.log(val,'val')
|
console.log(val,'val')
|
||||||
@@ -293,6 +320,47 @@ import { data } from 'jquery';
|
|||||||
url: './orderLCont?orderId=' + val.orderId + '&orderType=' + val.orderStatus + '&orderSn=' + val.orderSn
|
url: './orderLCont?orderId=' + val.orderId + '&orderType=' + val.orderStatus + '&orderSn=' + val.orderSn
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
goRefundDestination(row) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/bookShop/refundDestination?orderId=${row.orderId}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmApplyRefund(row) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '申请退款',
|
||||||
|
content: '请确认是否提交退款申请?',
|
||||||
|
confirmText: '确认提交',
|
||||||
|
cancelText: '取消',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.submitOrderRefund(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitOrderRefund(orderRow) {
|
||||||
|
this.$http.request({
|
||||||
|
url: "book/buyOrder/refundOrder",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
orderId: orderRow.orderId
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$commonJS.showToast('申请退款成功');
|
||||||
|
this.newestpage = 1;
|
||||||
|
this.newList = [];
|
||||||
|
this.getBookList(this.ordersListTab, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$commonJS.showToast(res.errMsg || '申请退款失败');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$commonJS.showToast('申请退款失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
getBookList(flag, refreshflag){
|
getBookList(flag, refreshflag){
|
||||||
// 根据tab不同,获取最新书评、最热书评、书集列表
|
// 根据tab不同,获取最新书评、最热书评、书集列表
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -311,13 +379,14 @@ import { data } from 'jquery';
|
|||||||
},
|
},
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.map = res.map
|
this.map = res.map
|
||||||
|
this.updateOrdersTabBadge()
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
"userId": this.userInfo.id,
|
"userId": this.userInfo.id,
|
||||||
"orderStatus":flag,//传null为全部,订单状态 0-未付款 1-待发出 2-待收到 3-交易成功 4-交易失败 5-过期
|
"orderStatus": flag == -1 ? null : flag,//传null为全部,订单状态 0-未付款 1-待发出 2-待收到 3-交易成功 4-交易失败 5-过期 6-已退款 7-退款中
|
||||||
"limit": 10,
|
"limit": 10,
|
||||||
"page": this.newestpage
|
"page": this.newestpage
|
||||||
}
|
}
|
||||||
@@ -348,9 +417,27 @@ import { data } from 'jquery';
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
checkPayTimeout(payItem) {
|
||||||
|
const createTime = payItem && payItem.createTime;
|
||||||
|
if (!createTime) return true;
|
||||||
|
const createdAt = new Date(String(createTime).replace(/-/g, "/")).getTime();
|
||||||
|
if (!createdAt) return true;
|
||||||
|
const expired = Date.now() - createdAt > 10 * 60 * 1000;
|
||||||
|
if (expired) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "订单已超时,不能继续支付,请重新下单",
|
||||||
|
confirmText: "知道了",
|
||||||
|
showCancel: false
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
// 支付
|
// 支付
|
||||||
goPay(payItem) {
|
goPay(payItem) {
|
||||||
console.log(payItem,'订单数据')
|
console.log(payItem,'订单数据')
|
||||||
|
if(!this.checkPayTimeout(payItem)) return
|
||||||
if(payItem.paymentMethod == 2){
|
if(payItem.paymentMethod == 2){
|
||||||
console.log('阿里支付')
|
console.log('阿里支付')
|
||||||
setPay({
|
setPay({
|
||||||
@@ -688,42 +775,14 @@ import { data } from 'jquery';
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// @import '@/style/mixin.scss';
|
// @import '@/style/mixin.scss';
|
||||||
.ordersTabs {
|
.ordersTabs {
|
||||||
// margin: 70rpx 0 0 0;
|
|
||||||
width: 730rpx;
|
|
||||||
// padding: 0 3% 3% 3%;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
// top: 80rpx;
|
|
||||||
background-color: #f7faf9;
|
background-color: #f7faf9;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
padding: 0 20rpx;
|
||||||
.ordersdefine {
|
}
|
||||||
display: inline-block;
|
.ordersTabsPlaceholder {
|
||||||
padding: 20rpx 0 20rpx 0;
|
width: 100%;
|
||||||
// margin: 40rpx 0 15rpx 0;
|
height: 88rpx;
|
||||||
width:140rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 30rpx;
|
|
||||||
position: relative;
|
|
||||||
.ordersnum{
|
|
||||||
position: absolute;
|
|
||||||
top: 8rpx;
|
|
||||||
right: 0rpx;
|
|
||||||
background-color: red;
|
|
||||||
// border:1rpx solid #a3a3a3;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
width: 28rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ordStyle {
|
|
||||||
// border-bottom: 4rpx solid #54a966;
|
|
||||||
// color: #54a966;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.orderstatusbtn{
|
.orderstatusbtn{
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|||||||
27
pages/bookShop/refundDestination.vue
Normal file
27
pages/bookShop/refundDestination.vue
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-wrap">
|
||||||
|
<public-module></public-module>
|
||||||
|
<common-refund-destination :order-id="orderId" :http="$http" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderId: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
if (options && options.orderId != null) {
|
||||||
|
this.orderId = options.orderId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page-wrap {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -69,6 +69,12 @@
|
|||||||
<text
|
<text
|
||||||
class="orderState orderState5"
|
class="orderState orderState5"
|
||||||
v-if="orderContet.orderStatus == 5">已超时</text>
|
v-if="orderContet.orderStatus == 5">已超时</text>
|
||||||
|
<text
|
||||||
|
class="orderState orderState6"
|
||||||
|
v-if="orderContet.orderStatus == 6">已退款</text>
|
||||||
|
<text
|
||||||
|
class="orderState orderState7"
|
||||||
|
v-if="orderContet.orderStatus == 7">退款中</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="orderContent"
|
class="orderContent"
|
||||||
@@ -615,14 +621,15 @@ export default {
|
|||||||
text: "继续付款",
|
text: "继续付款",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.orderContet.orderStatus == 0) {
|
// nuttyreading:注释取消订单按钮
|
||||||
this.customButton.push({
|
// if (this.orderContet.orderStatus == 0) {
|
||||||
width: "160rpx",
|
// this.customButton.push({
|
||||||
text: "取消订单",
|
// width: "160rpx",
|
||||||
color: "#333",
|
// text: "取消订单",
|
||||||
backgroundColor: "#f0f0f0",
|
// color: "#333",
|
||||||
});
|
// backgroundColor: "#f0f0f0",
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
if (this.orderContet.orderStatus == 0) {
|
if (this.orderContet.orderStatus == 0) {
|
||||||
this.titleStat = "待支付";
|
this.titleStat = "待支付";
|
||||||
} else if (this.orderContet.orderStatus == 1) {
|
} else if (this.orderContet.orderStatus == 1) {
|
||||||
@@ -631,6 +638,10 @@ export default {
|
|||||||
this.titleStat = "待收到";
|
this.titleStat = "待收到";
|
||||||
} else if (this.orderContet.orderStatus == 3) {
|
} else if (this.orderContet.orderStatus == 3) {
|
||||||
this.titleStat = "已完成";
|
this.titleStat = "已完成";
|
||||||
|
} else if (this.orderContet.orderStatus == 6) {
|
||||||
|
this.titleStat = "已退款";
|
||||||
|
} else if (this.orderContet.orderStatus == 7) {
|
||||||
|
this.titleStat = "退款中";
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.orderContet.orderStatus >= 2 &&
|
this.orderContet.orderStatus >= 2 &&
|
||||||
@@ -810,6 +821,12 @@ view,uni-view {
|
|||||||
.orderState5 {
|
.orderState5 {
|
||||||
background-color: #787878;
|
background-color: #787878;
|
||||||
}
|
}
|
||||||
|
.orderState6 {
|
||||||
|
background-color: #f56c6c;
|
||||||
|
}
|
||||||
|
.orderState7 {
|
||||||
|
background-color: #f56c6c;
|
||||||
|
}
|
||||||
.guoqi {
|
.guoqi {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<view class="AC_jilu PM_font">充值消费记录</view>
|
<view class="AC_jilu PM_font">充值消费记录</view>
|
||||||
<view v-for="(item,index) in MoneyRecord" class="AC_List" @click="goClick(item)">
|
<view v-for="(item,index) in MoneyRecord" class="AC_List" @click="goClick(item)">
|
||||||
<view class="AC_title">
|
<view class="AC_title">
|
||||||
{{item.orderType}}
|
{{ item.productName || item.orderType}}
|
||||||
<view>
|
<view>
|
||||||
<text v-if="item.changeAmount>0">+</text>
|
<text v-if="item.changeAmount>0">+</text>
|
||||||
<text>{{item.changeAmount}}</text>
|
<text>{{item.changeAmount}}</text>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user