diff --git a/config/baseUrl.js b/config/baseUrl.js
index d9eeb44..a670303 100644
--- a/config/baseUrl.js
+++ b/config/baseUrl.js
@@ -4,7 +4,7 @@ if (process.env.NODE_ENV === 'development') {
//开发环境
// baseUrl = "https://testapi.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') {
//生产环境
baseUrl = "https://api.nuttyreading.com/";
diff --git a/main.js b/main.js
index 1535ac2..c22dc9a 100644
--- a/main.js
+++ b/main.js
@@ -96,6 +96,9 @@ Vue.component('common-goods-nav', commonGoodsNav);
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
Vue.component('common-advertisement', commonAdvertisement);
+import CommonRefundDestination from 'edu-core/components/order/refund-destination.vue'
+Vue.component('common-refund-destination', CommonRefundDestination);
+
App.mpType = 'app'
const app = new Vue({
diff --git a/manifest.json b/manifest.json
index 6b0b10b..3ec64bd 100644
--- a/manifest.json
+++ b/manifest.json
@@ -13,8 +13,8 @@
}
],
"sassImplementationName" : "node-sass",
- "versionName" : "1.2.88",
- "versionCode" : 1288,
+ "versionName" : "1.2.89",
+ "versionCode" : 1289,
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
diff --git a/nuttyreading-html2.zip b/nuttyreading-html2.zip
new file mode 100644
index 0000000..e582aa4
Binary files /dev/null and b/nuttyreading-html2.zip differ
diff --git a/package-lock.json b/package-lock.json
index 48cf563..1e69e36 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,7 +11,7 @@
"dependencies": {
"animate.css": "^4.1.1",
"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",
"jquery": "^2.2.4",
"qs": "^6.11.0",
@@ -138,8 +138,8 @@
"link": true
},
"node_modules/edu-core": {
- "version": "1.0.12",
- "resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
+ "version": "1.0.13",
+ "resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f",
"license": "ISC"
},
"node_modules/epubjs": {
@@ -730,7 +730,7 @@
"requires": {
"animate.css": "^4.1.1",
"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",
"jquery": "^2.2.4",
"qs": "^6.11.0",
@@ -823,8 +823,8 @@
}
},
"edu-core": {
- "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
- "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12"
+ "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.13"
},
"epubjs": {
"version": "0.3.93",
@@ -1236,8 +1236,8 @@
}
},
"edu-core": {
- "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577",
- "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12"
+ "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.13"
},
"epubjs": {
"version": "0.3.93",
diff --git a/package.json b/package.json
index 22e5708..a0d650b 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"dependencies": {
"animate.css": "^4.1.1",
"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",
"jquery": "^2.2.4",
"qs": "^6.11.0",
diff --git a/pages.json b/pages.json
index 9b5b9c1..9da58de 100644
--- a/pages.json
+++ b/pages.json
@@ -264,6 +264,13 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/bookShop/refundDestination",
+ "style": {
+ "navigationBarTitleText": "钱款去向",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/bookShop/commoditySearch",
"style": {
diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue
index 72d941c..b06bcd2 100644
--- a/pages/bookShop/orderLCont.vue
+++ b/pages/bookShop/orderLCont.vue
@@ -31,6 +31,8 @@
待收到
已完成
已超时
+ 已退款
+ 退款中
查看物流
确认收到
- 取消订单
+
+
去支付
联系客服
@@ -629,6 +632,10 @@
this.titleStat = '待收到'
} else if (this.orderContet.orderStatus == 3) {
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){
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) {
console.log(payItem,'订单数据')
+ if(!this.checkPayTimeout(payItem)) return
if(payItem.paymentMethod == 2){
console.log('阿里支付')
setPay({
@@ -776,6 +801,8 @@
.orderState2{background-color: #f56c6c;}
.orderState3{background-color: #67c23a;}
.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;}
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
diff --git a/pages/bookShop/orderList.vue b/pages/bookShop/orderList.vue
index 10516bb..f2f7c39 100644
--- a/pages/bookShop/orderList.vue
+++ b/pages/bookShop/orderList.vue
@@ -1,115 +1,116 @@
-
+
-
- 1
-
+
-
-
-
-
-
- 未付款
- 待发出
- 待收到
- 交易成功
- 交易失败
- 过期
-
-
+
+
+
+
+ 未付款
+ 待发出
+ 待收到
+ 交易成功
+ 交易失败
+ 过期
+ 已退款
+ 退款中
+
+
-
-
-
- {{item1.product.productName}}
-
- ¥{{item1.product.price}}
-
+ VIP优惠
+ -->
+
+
+
+ {{item1.product && item1.product.productName}}
+
+ ¥{{item1.product && item1.product.price}}
+
+
+
+
+
+
+
+ ×{{item1.quantity}}
+
+
+
+
+
+
+
+
+
+
+
+ 充值订单
+
+
+
+
+
+
+
+
+
+ VIP开通
+
+
+
+
+
+
+ 实付款
+ {{' ¥' + item.realMoney}}
+
+
+
+ 订单详情
+
+
+ 付款
+
+ 查看物流
+ 确认收到
+ 钱款去向
+ 申请退款
+
+
+
+
+
+
+
+
-
-
-
-
-
- ×{{item1.quantity}}
-
-
-
-
-
-
-
-
-
-
-
- 充值订单
-
-
-
-
-
-
-
-
-
- VIP开通
-
-
-
-
-
-
- 实付款
- {{' ¥' + item.realMoney}}
-
-
-
- 订单详情
-
- 取消订单
- 付款
-
- 查看物流
- 确认收到
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
努力加载中
-
+
@@ -201,21 +202,35 @@ import { data } from 'jquery';
bfaid:null,
ordersTabs: [{
name: '全部',
- value: null
+ value: -1,
+ badge: {}
}, {
name: '待付款',
- value: 0
+ value: 0,
+ badge: {}
}, {
name: '待发出',
- value: 1
+ value: 1,
+ badge: {}
}, {
name: '待收到',
- value: 2
+ value: 2,
+ badge: {}
}, {
name: '已完成',
- value: 3
+ value: 3,
+ badge: {}
+ }, {
+ name: '已退款',
+ value: 6,
+ badge: {}
+ }, {
+ name: '退款中',
+ value: 7,
+ badge: {}
}],
ordersListTab: 1,
+ currentTabIndex: 0,
newestpage: 1,
// hotestpage: 1,
// booksetpage: 1,
@@ -266,8 +281,10 @@ import { data } from 'jquery';
methods: {
...mapMutations(['setLoadingShow']),
// 切换tab状态
- ordersTabCLi(e) {
- this.ordersListTab = e
+ ordersTabCLi(tabItem) {
+ const isObject = tabItem && typeof tabItem === 'object';
+ this.currentTabIndex = isObject ? (tabItem.index || 0) : 0;
+ this.ordersListTab = isObject ? tabItem.value : tabItem;
this.newestpage = 1
// this.hotestpage = 1
// this.booksetpage = 1
@@ -276,6 +293,16 @@ import { data } from 'jquery';
// this.bookList = []
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){
console.log(val,'val')
@@ -293,6 +320,47 @@ import { data } from 'jquery';
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){
// 根据tab不同,获取最新书评、最热书评、书集列表
uni.showLoading({
@@ -311,13 +379,14 @@ import { data } from 'jquery';
},
}).then(res => {
this.map = res.map
+ this.updateOrdersTabBadge()
}).catch(e => {
console.log(e)
})
var params = {
"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,
"page": this.newestpage
}
@@ -348,9 +417,27 @@ import { data } from 'jquery';
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) {
console.log(payItem,'订单数据')
+ if(!this.checkPayTimeout(payItem)) return
if(payItem.paymentMethod == 2){
console.log('阿里支付')
setPay({
@@ -688,42 +775,14 @@ import { data } from 'jquery';
diff --git a/pages/detail/orderLCont.vue b/pages/detail/orderLCont.vue
index d32efc6..2caf690 100644
--- a/pages/detail/orderLCont.vue
+++ b/pages/detail/orderLCont.vue
@@ -69,6 +69,12 @@
已超时
+ 已退款
+ 退款中
= 2 &&
@@ -810,6 +821,12 @@ view,uni-view {
.orderState5 {
background-color: #787878;
}
+.orderState6 {
+ background-color: #f56c6c;
+}
+.orderState7 {
+ background-color: #f56c6c;
+}
.guoqi {
font-size: 28rpx;
align-items: center;
diff --git a/pages/user/persCount.vue b/pages/user/persCount.vue
index 16b8980..e7fdcca 100644
--- a/pages/user/persCount.vue
+++ b/pages/user/persCount.vue
@@ -35,7 +35,7 @@
充值消费记录
- {{item.orderType}}
+ {{ item.productName || item.orderType}}
+
{{item.changeAmount}}
diff --git a/unpackage/debug/iOS_debug.ipa b/unpackage/debug/iOS_debug.ipa
index 50de381..7f696e0 100644
Binary files a/unpackage/debug/iOS_debug.ipa and b/unpackage/debug/iOS_debug.ipa differ