Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fbea2d669 | |||
| 964017841e | |||
| 3bdb3c31a0 | |||
| 0299eab8d8 | |||
| 84484bf597 | |||
| 7c0308b991 | |||
| 211bbbb6c2 | |||
| e8b98a62cb | |||
| 6f21c57137 | |||
| 115c627eed | |||
| 2a9df2f1c6 | |||
| 5c9d7b89b2 | |||
| 24b63154af |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.DS_Store
|
||||
.hbuilderx/
|
||||
node_modules
|
||||
unpackage/dist
|
||||
unpackage/release
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" : {
|
||||
"launchtype" : "remote"
|
||||
},
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"h5" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"provider" : "aliyun",
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,12 +2,13 @@ let baseUrl = "";
|
||||
let socketUrl = "";
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
//开发环境
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.131:9200/pb/"; // 后端本地
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
//生产环境
|
||||
// baseUrl = "https://api.nuttyreading.com/";
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
baseUrl = "https://api.nuttyreading.com/";
|
||||
//baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
}
|
||||
const courtConfig = {
|
||||
//微信公众号APPID
|
||||
|
||||
3
main.js
3
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({
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.2.75",
|
||||
"versionCode" : 1275,
|
||||
"sassImplementationName" : "node-sass",
|
||||
"versionName" : "1.2.89",
|
||||
"versionCode" : 1289,
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true
|
||||
@@ -51,8 +52,6 @@
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
@@ -60,14 +59,12 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
|
||||
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
|
||||
BIN
nuttyreading-html2.zip
Normal file
BIN
nuttyreading-html2.zip
Normal file
Binary file not shown.
15
package-lock.json
generated
15
package-lock.json
generated
@@ -11,6 +11,7 @@
|
||||
"dependencies": {
|
||||
"animate.css": "^4.1.1",
|
||||
"e-peanut": "file:",
|
||||
"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",
|
||||
@@ -136,6 +137,11 @@
|
||||
"resolved": "",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/edu-core": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/epubjs": {
|
||||
"version": "0.3.93",
|
||||
"resolved": "https://registry.npmjs.org/epubjs/-/epubjs-0.3.93.tgz",
|
||||
@@ -724,6 +730,7 @@
|
||||
"requires": {
|
||||
"animate.css": "^4.1.1",
|
||||
"e-peanut": "file:",
|
||||
"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",
|
||||
@@ -815,6 +822,10 @@
|
||||
"object-keys": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"edu-core": {
|
||||
"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",
|
||||
"resolved": "https://registry.npmjs.org/epubjs/-/epubjs-0.3.93.tgz",
|
||||
@@ -1224,6 +1235,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"edu-core": {
|
||||
"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",
|
||||
"resolved": "https://registry.npmjs.org/epubjs/-/epubjs-0.3.93.tgz",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"dependencies": {
|
||||
"animate.css": "^4.1.1",
|
||||
"e-peanut": "file:",
|
||||
"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",
|
||||
|
||||
@@ -264,6 +264,13 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bookShop/refundDestination",
|
||||
"style": {
|
||||
"navigationBarTitleText": "钱款去向",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bookShop/commoditySearch",
|
||||
"style": {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
MonList: {
|
||||
title: '阴经',
|
||||
vlue: '属性',
|
||||
attribute: ['阴经', '属性', '肺经(金)', '脾经(士)', '心(火)', '肾经(水)', '心包经(冬至前相火,冬至后相水)', '肝经(木)'],
|
||||
attribute: ['阴经', '属性', '肺经(金)', '脾经(土)', '心(火)', '肾经(水)', '心包经(冬至前相火,冬至后相水)', '肝经(木)'],
|
||||
arry: [
|
||||
['井', '木', '少商', '隐白', '少冲(母穴)', '涌泉(子穴)', '中冲(冬至前母穴冬至后子穴)', '大敦(本穴)'],
|
||||
['荥', '火', '鱼际', '大都(母穴)', '少府(本穴)', '然谷(泄井当泄荥)', '劳宫(冬至前本穴)', '行间(子穴)'],
|
||||
@@ -66,12 +66,12 @@
|
||||
SunList: {
|
||||
title: '阳经',
|
||||
vlue: '属性',
|
||||
attribute: ['阳经', '属性', '大肠经(金)', '脾经(士)', '心(火)', '膀胱经(水)', '三焦经(冬至前相火,冬至后相水)', '胆经(木)'],
|
||||
attribute: ['阳经', '属性', '大肠经(金)', '胃经(土)', '小肠(火)', '膀胱经(水)', '三焦经(冬至前相火,冬至后相水)', '胆经(木)'],
|
||||
arry: [
|
||||
['井', '金', '商阳(本穴)', '厉兑(子穴)', '少泽', '至阴(母穴)', '关冲(冬至后母穴)', '窍阴'],
|
||||
['荥', '水', '二间(子穴)', '内庭(泄井当泄荥)', '前谷', '通谷(本穴)', '液门(冬至后本穴)', '侠溪(母穴)'],
|
||||
['俞', '木', '三间', '陷谷', '后匾(母穴)', '束骨(子穴)', '中渚(冬至前回穴,冬至后子穴)', '临泣(本穴)'],
|
||||
['经', '水', '阳溪', '解溪(母穴)', '阳谷(本穴)', '昆仑', '支沟(冬至前本穴)', '阳辅(子穴)'],
|
||||
['俞', '木', '三间', '陷谷', '后溪(母穴)', '束骨(子穴)', '中渚(冬至前回穴,冬至后子穴)', '临泣(本穴)'],
|
||||
['经', '火', '阳溪', '解溪(母穴)', '阳谷(本穴)', '昆仑', '支沟(冬至前本穴)', '阳辅(子穴)'],
|
||||
['合', '土', '曲池(母穴)', '足三里(本穴)', '小海(子穴)', '委中(补井当补合)', '天井(冬至前子穴)', '阳陵泉'],
|
||||
['原', '', '合谷', '冲阳', '腕骨', '京骨', '阳池', '丘墟'],
|
||||
['郄', '', '温溜', '梁丘', '养老', '金门', '会宗', '外丘'],
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<view>1.2 您通过我们的服务进行通讯的信息,例如曾通讯的账号。</view>
|
||||
<view>1.3 您通过我们的服务分享的内容所包含的信息(元数据),例如拍摄或上传的共享照片或录像的日期、时间或地点等。</view>
|
||||
<view class="dp_con2">2、位置信息,指您开启设备定位功能并使用我们基于位置提供的相关服务时,收集的有关您位置的信息,包括:</view>
|
||||
<view>2.1 您通过具有定位功能的移动设备使用我们的服务时,通过GPS或WiFi等方式收集的您的地理位置信息用于 健康超市收货 提供位置信息。</view>
|
||||
<view>2.1 您通过具有定位功能的移动设备使用我们的服务时,通过GPS或WiFi等方式收集的您的地理位置信息用于 健康超市收件 提供位置信息。</view>
|
||||
<view>
|
||||
2.2 您或其他用户提供的包含您所处地理位置的实时信息,例如您提供的账户信息中包含的您所在地区信息,您上传的显示您当前或曾经所处地理位置的共享信息,您或其他人共享的照片包含的地理标记信息。
|
||||
</view>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="sl_tit">
|
||||
<text class="bok_name">
|
||||
{{item.productName}}
|
||||
<span v-if="item.productStock==0" style="color: #aaa;font-size:26rpx;">(无货)</span>
|
||||
<span v-if="item.productStock==0" style="color: #aaa;font-size:26rpx;">(无库存)</span>
|
||||
</text>
|
||||
</view>
|
||||
<view class="sl_ric">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
<view class="commodityyName">
|
||||
{{productInfo.productName}}
|
||||
<span v-if="productInfo.productStock==0" style="color: #aaa;font-size:26rpx;">(无货)</span>
|
||||
<span v-if="productInfo.productStock==0" style="color: #aaa;font-size:26rpx;">(无库存)</span>
|
||||
<view><text class="SoldNumber">已售<span>{{productInfo.sumSales}}</span>件</text></view>
|
||||
</view>
|
||||
<view class="contentButton">
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<span
|
||||
v-if="productInfo.productStock == 0"
|
||||
style="color: #aaa; font-size: 28rpx"
|
||||
>(无货)</span
|
||||
>(无库存)</span
|
||||
>
|
||||
<view
|
||||
style="
|
||||
|
||||
@@ -104,9 +104,9 @@
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = '待支付'
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
this.titleStat = '待发货'
|
||||
this.titleStat = '待发出'
|
||||
} else if (this.orderContet.orderStatus == 2) {
|
||||
this.titleStat = '待收货'
|
||||
this.titleStat = '待收到'
|
||||
} else if (this.orderContet.orderStatus == 3) {
|
||||
this.titleStat = '已完成'
|
||||
}
|
||||
|
||||
@@ -27,10 +27,12 @@
|
||||
<view class="orderItem">
|
||||
<view class="" style="position: relative; height: 120rpx;">
|
||||
<text class="orderState orderState0" v-if="orderContet.orderStatus==0">待支付</text>
|
||||
<text class="orderState orderState1" v-if="orderContet.orderStatus==1">待发货</text>
|
||||
<text class="orderState orderState2" v-if="orderContet.orderStatus==2">待收货</text>
|
||||
<text class="orderState orderState1" v-if="orderContet.orderStatus==1">待发出</text>
|
||||
<text class="orderState orderState2" v-if="orderContet.orderStatus==2">待收到</text>
|
||||
<text class="orderState orderState3" v-if="orderContet.orderStatus==3">已完成</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>
|
||||
<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"
|
||||
@@ -128,7 +130,7 @@
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.paymentDate}}</text>
|
||||
</view>
|
||||
<!-- <view class="orderReal" v-if="orderContet.orderStatus >= 2 && orderContet.orderStatus != 5">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">发出时间 : </span>
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
||||
</view> -->
|
||||
<view class="orderOper">
|
||||
@@ -138,9 +140,10 @@
|
||||
|
||||
</u-button> -->
|
||||
<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 class="opCan" @click="kefu">联系客服</view>
|
||||
@@ -208,7 +211,7 @@
|
||||
<h4 style="margin-bottom: 10rpx;">包裹 {{index+1}}</h4>
|
||||
<view class="">运单号:{{item.expressOrderSn}}
|
||||
<u-tag @click="copyData(item.expressOrderSn)" size="mini" class="copyCode" text="复制单号" plain type="success" /></view>
|
||||
<view class="">发货时间:{{item.createTime}}</view>
|
||||
<view class="">发出时间:{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -565,10 +568,10 @@
|
||||
url: "./deliverDetail?objId=" + item
|
||||
})
|
||||
},
|
||||
OverOrder() { // 确认收货
|
||||
OverOrder() { // 确认收到
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认收货?',
|
||||
content: '确认收到?',
|
||||
success: res => {
|
||||
let data = {
|
||||
orderId: this.orderID,
|
||||
@@ -587,7 +590,7 @@
|
||||
if (res.code == 0) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '收货成功',
|
||||
title: '确认收到成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
@@ -624,11 +627,15 @@
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = '待支付'
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
this.titleStat = '待发货'
|
||||
this.titleStat = '待发出'
|
||||
} else if (this.orderContet.orderStatus == 2) {
|
||||
this.titleStat = '待收货'
|
||||
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; }
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<view class="orderList" v-if="orderList.length > 0">
|
||||
<view class="orderItem" v-for="(ifex,inten) in orderList" @click="goOrdiCont(ifex)" :key="inten">
|
||||
<text class="orderState orderState0" v-if="ifex.orderStatus==0">待支付</text>
|
||||
<text class="orderState orderState1" v-if="ifex.orderStatus==1">待发货</text>
|
||||
<text class="orderState orderState2" v-if="ifex.orderStatus==2">待收货</text>
|
||||
<text class="orderState orderState1" v-if="ifex.orderStatus==1">待发出</text>
|
||||
<text class="orderState orderState2" v-if="ifex.orderStatus==2">待收到</text>
|
||||
<text class="orderState orderState3" v-if="ifex.orderStatus==3">已完成</text>
|
||||
<text class="orderState orderState5" v-if="ifex.orderStatus==5">已超时</text>
|
||||
<view class="guoqi flexbox" v-if="ifex.orderStatus==0 && ifex.overTime > 0">
|
||||
@@ -122,10 +122,10 @@
|
||||
name: '待支付',
|
||||
value: 0
|
||||
}, {
|
||||
name: '待发货',
|
||||
name: '待发出',
|
||||
value: 1
|
||||
}, {
|
||||
name: '待收货',
|
||||
name: '待收到',
|
||||
value: 2
|
||||
}, {
|
||||
name: '已完成',
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<z-nav-bar backState="2000" title="我的订单"></z-nav-bar>
|
||||
<view class="ordersTabs">
|
||||
<view v-for="(item,index) in ordersTabs" @click="ordersTabCLi(item.value)" :key="index"
|
||||
:class="ordersListTab==item.value?'ordersdefine ordStyle':'ordersdefine'">
|
||||
{{item.name}}
|
||||
<view class="ordersnum" v-if="item.value == 0 && map[item.value] > 0">{{map[item.value]}}</view>
|
||||
<view class="ordersnum" v-if="item.value == 1 && map[item.value] > 0">{{map[item.value]}}</view>
|
||||
<view class="ordersnum" v-if="item.value == 2 && map[item.value] > 0">{{map[item.value]}}</view>
|
||||
</view>
|
||||
<u-tabs
|
||||
:list="ordersTabs"
|
||||
:current="currentTabIndex"
|
||||
lineColor="#3c7f56"
|
||||
activeStyle="color: #3c7f56; font-weight: bold;"
|
||||
inactiveStyle="color: #333;"
|
||||
@click="ordersTabCLi"
|
||||
></u-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 站位 -->
|
||||
<view class="ordersTabs" style="z-index:0;position:unset;">
|
||||
<view class="ordersdefine">1</view>
|
||||
</view>
|
||||
<view class="ordersTabsPlaceholder"></view>
|
||||
<!-- <view v-if="ordersListTab == 1"> -->
|
||||
<view>
|
||||
<view v-if="newList.length > 0">
|
||||
<view v-if="newList.length > 0" class="container">
|
||||
<view class="orderInfo" v-for="(item,index) in newList" :key="index">
|
||||
<view class="mainContent">
|
||||
<view class="item" @click.stop="toDetail(item)">
|
||||
<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 == 2">已发货</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 == 3">交易成功</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 == 6">已退款</view>
|
||||
<view class="orderstatus" v-show="item.orderStatus == 7">退款中</view>
|
||||
<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"
|
||||
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> -->
|
||||
<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">
|
||||
¥{{item1.product.price}}
|
||||
¥{{item1.product && item1.product.price}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="btns flexbox" style="margin-top:10rpx;padding-bottom: 72rpx;">
|
||||
@@ -88,11 +88,13 @@
|
||||
<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="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 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 == 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> -->
|
||||
@@ -104,12 +106,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<view v-if="status==0" class="container" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</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-else text="暂无订单"></u-divider>
|
||||
</view>
|
||||
@@ -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
|
||||
name: '待发出',
|
||||
value: 1,
|
||||
badge: {}
|
||||
}, {
|
||||
name: '待收货',
|
||||
value: 2
|
||||
name: '待收到',
|
||||
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({
|
||||
@@ -511,11 +598,11 @@ import { data } from 'jquery';
|
||||
})
|
||||
// }
|
||||
},
|
||||
// 确认收货
|
||||
// 确认收到
|
||||
OverOrder(item) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认收货?',
|
||||
content: '确认收到?',
|
||||
success: res => {
|
||||
let data = {
|
||||
orderId: item.orderId,
|
||||
@@ -534,7 +621,7 @@ import { data } from 'jquery';
|
||||
if (res.code == 0) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '收货成功',
|
||||
title: '确认收到成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
@@ -688,42 +775,14 @@ import { data } from 'jquery';
|
||||
<style lang="scss" scoped>
|
||||
// @import '@/style/mixin.scss';
|
||||
.ordersTabs {
|
||||
// margin: 70rpx 0 0 0;
|
||||
width: 730rpx;
|
||||
// padding: 0 3% 3% 3%;
|
||||
position: fixed;
|
||||
// top: 80rpx;
|
||||
background-color: #f7faf9;
|
||||
z-index: 100;
|
||||
|
||||
.ordersdefine {
|
||||
display: inline-block;
|
||||
padding: 20rpx 0 20rpx 0;
|
||||
// margin: 40rpx 0 15rpx 0;
|
||||
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;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.ordersTabsPlaceholder {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
}
|
||||
.orderstatusbtn{
|
||||
color: #000;
|
||||
|
||||
@@ -189,10 +189,10 @@ import { data } from 'jquery';
|
||||
name: '待付款',
|
||||
value: 2
|
||||
}, {
|
||||
name: '待发货',
|
||||
name: '待发出',
|
||||
value: 3
|
||||
}, {
|
||||
name: '待收货',
|
||||
name: '待收到',
|
||||
value: 4
|
||||
}, {
|
||||
name: '已完成',
|
||||
|
||||
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>
|
||||
@@ -13,7 +13,7 @@
|
||||
size="20"
|
||||
style="display: inline-block; margin-right: 10rpx"
|
||||
></u-icon>
|
||||
请添加收货地址
|
||||
请添加收件地址
|
||||
</view>
|
||||
|
||||
<view
|
||||
@@ -171,7 +171,7 @@
|
||||
size="12"
|
||||
style="display: inline-block; margin-right: 10rpx"
|
||||
></u-icon>
|
||||
注:如订单包含一种或多种预售书,预售书和现货书需分开发货(即需要收取多次快递首重费用);如多本书会按照实际重量,收取快递续重费用。
|
||||
注:如订单包含一种或多种预售书,预售书和现售书需分开发出(即需要收取多次快递首重费用);如多本书会按照实际重量,收取快递续重费用。
|
||||
</view>
|
||||
|
||||
<view class="yq_yunfei" v-if="districtAmount > 0" style="color: #202020">
|
||||
@@ -245,7 +245,7 @@
|
||||
<span style="color: #666; margin-right: 10rpx; font-size: 15px"
|
||||
>实付款:
|
||||
</span>
|
||||
{{ realPrice }}<span>天医币</span>
|
||||
{{ realPrice.toFixed(2) }}<span>天医币</span>
|
||||
</view>
|
||||
<view class="operate" @click="goBuyJie" v-if="payType != 4">
|
||||
<view class="goBuy"> 立即支付 </view>
|
||||
@@ -374,6 +374,18 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<u-modal
|
||||
:show="presaleRemarkModalShow"
|
||||
title="提示"
|
||||
:content="presaleRemarkModalContent"
|
||||
:showCancelButton="true"
|
||||
confirmText="继续购买"
|
||||
cancelText="取消"
|
||||
@confirm="handlePresaleRemarkConfirm"
|
||||
@cancel="handlePresaleRemarkCancel"
|
||||
@close="handlePresaleRemarkCancel"
|
||||
></u-modal>
|
||||
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
@@ -413,6 +425,9 @@ export default {
|
||||
realPrice: 0,
|
||||
payType: 1,
|
||||
nowClick: true,
|
||||
presaleRemarkModalShow: false,
|
||||
presaleRemarkModalContent: "",
|
||||
presaleRemarkModalResolve: null,
|
||||
paylist: [
|
||||
{
|
||||
title: "支付宝",
|
||||
@@ -556,6 +571,59 @@ export default {
|
||||
}
|
||||
},
|
||||
// 获取优惠券列表
|
||||
openPresaleRemarkModal(content) {
|
||||
this.presaleRemarkModalContent = content;
|
||||
this.presaleRemarkModalShow = true;
|
||||
return new Promise((resolve) => {
|
||||
this.presaleRemarkModalResolve = resolve;
|
||||
});
|
||||
},
|
||||
handlePresaleRemarkConfirm() {
|
||||
this.presaleRemarkModalShow = false;
|
||||
if (this.presaleRemarkModalResolve) {
|
||||
const resolve = this.presaleRemarkModalResolve;
|
||||
this.presaleRemarkModalResolve = null;
|
||||
resolve(true);
|
||||
}
|
||||
},
|
||||
handlePresaleRemarkCancel() {
|
||||
this.presaleRemarkModalShow = false;
|
||||
if (this.presaleRemarkModalResolve) {
|
||||
const resolve = this.presaleRemarkModalResolve;
|
||||
this.presaleRemarkModalResolve = null;
|
||||
resolve(false);
|
||||
}
|
||||
},
|
||||
async checkPresaleRemark() {
|
||||
const productIds = this.cartList
|
||||
.map((e) => e.productId)
|
||||
.filter((id) => id)
|
||||
.join(",");
|
||||
if (!productIds) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
const res = await $http.request({
|
||||
url: "book/buyOrder/presaleRemark",
|
||||
method: "POST",
|
||||
data: {
|
||||
productIds,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const remark =
|
||||
res && typeof res.remark == "string" ? res.remark.trim() : "";
|
||||
if (!remark) {
|
||||
return true;
|
||||
}
|
||||
return await this.openPresaleRemarkModal(remark);
|
||||
} catch (error) {
|
||||
console.log("presaleRemark error:", error);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
getCourpe() {
|
||||
let proId = "";
|
||||
for (let i = 0; i < this.cartList.length; i++) {
|
||||
@@ -809,8 +877,9 @@ export default {
|
||||
|
||||
// }
|
||||
// }
|
||||
price = (item.productAmount * item.price).toFixed(2);
|
||||
price = (item.productAmount * item.price);
|
||||
allprice += Number(price);
|
||||
allprice = parseFloat(allprice.toFixed(2));
|
||||
});
|
||||
this.totalPrice = allprice;
|
||||
// if (this.youhuiContent.id != undefined) {
|
||||
@@ -893,7 +962,7 @@ export default {
|
||||
this.youhuiShow = false;
|
||||
},
|
||||
// 提交结算
|
||||
goBuyJie() {
|
||||
async goBuyJie() {
|
||||
if (this.addressList.length == 0) {
|
||||
this.dizhiShow = true; // 如果没有地址信息
|
||||
return;
|
||||
@@ -922,11 +991,16 @@ export default {
|
||||
quantity: this.cartList[i].productAmount,
|
||||
});
|
||||
}
|
||||
const passPresaleRemark = await this.checkPresaleRemark();
|
||||
if (!passPresaleRemark) {
|
||||
this.nowClick = true;
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
buyType: this.typeId, //0- 商品页直接下单 1- 购物车结算
|
||||
userId: this.userInfo.id, //下单人ID
|
||||
shippingUser: this.adressMoRen.consigneeName, //收货人姓名
|
||||
userPhone: this.adressMoRen.consigneePhone, //收货人手机号
|
||||
shippingUser: this.adressMoRen.consigneeName, //收件人姓名
|
||||
userPhone: this.adressMoRen.consigneePhone, //收件人手机号
|
||||
|
||||
// province: this.adressMoRen.areaidpathtext.split(' ')[0], //省
|
||||
// city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
|
||||
@@ -937,7 +1011,7 @@ export default {
|
||||
orderMoney: this.totalPrice, //订单金额
|
||||
vipDiscountAmount: this.vipPrice, //折扣金额
|
||||
districtMoney: this.districtAmount, //折扣金额
|
||||
realMoney: this.realPrice, //实收金额
|
||||
realMoney: this.realPrice.toFixed(2), //实收金额
|
||||
shippingMoney: this.farePrice, //运费
|
||||
couponId: youPre.id, //优惠券Id
|
||||
isSend: this.isSend,
|
||||
@@ -1262,6 +1336,7 @@ export default {
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0%;
|
||||
z-index: 11;
|
||||
|
||||
.commodityPrice {
|
||||
font-size: 40rpx;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<z-nav-bar title="商品结算"></z-nav-bar>
|
||||
<view v-if="adressMoRen.username==undefined" class="addShouhuo" @click="toAddress()">
|
||||
<u-icon name="plus" size="20" style="display: inline-block;margin-right: 10rpx;"></u-icon>
|
||||
请添加收货地址
|
||||
请添加收件地址
|
||||
</view>
|
||||
<view class="adDefault" @click="dizhiShow = true" v-if="adressMoRen.username!=undefined">
|
||||
<view class="defalTop">
|
||||
@@ -606,8 +606,8 @@
|
||||
let data = {
|
||||
buyType: this.typeId, //0- 商品页直接下单 1- 购物车结算
|
||||
userId: this.userInfo.id, //下单人ID
|
||||
shippingUser: this.adressMoRen.username, //收货人姓名
|
||||
userPhone: this.adressMoRen.userphone, //收货人手机号
|
||||
shippingUser: this.adressMoRen.username, //收件人姓名
|
||||
userPhone: this.adressMoRen.userphone, //收件人手机号
|
||||
province: this.adressMoRen.areaidpathtext.split(' ')[0], //省
|
||||
city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
|
||||
district: this.adressMoRen.areaidpathtext.split(' ')[2], //区
|
||||
|
||||
@@ -59,16 +59,22 @@
|
||||
v-if="orderContet.orderStatus == 0">待支付</text>
|
||||
<text
|
||||
class="orderState orderState1"
|
||||
v-if="orderContet.orderStatus == 1">待发货</text>
|
||||
v-if="orderContet.orderStatus == 1">待发出</text>
|
||||
<text
|
||||
class="orderState orderState2"
|
||||
v-if="orderContet.orderStatus == 2">待收货</text>
|
||||
v-if="orderContet.orderStatus == 2">待收到</text>
|
||||
<text
|
||||
class="orderState orderState3"
|
||||
v-if="orderContet.orderStatus == 3">已完成</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
|
||||
class="orderContent"
|
||||
@@ -325,7 +331,7 @@
|
||||
plain
|
||||
type="success"
|
||||
/></view>
|
||||
<view class="">发货时间:{{ item.createTime }}</view>
|
||||
<view class="">发出时间:{{ item.createTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -421,7 +427,7 @@ export default {
|
||||
this.goPay(this.orderContet);
|
||||
} else if (data.text == "取消订单") {
|
||||
this.canceOrder();
|
||||
} else if (data.text == "确认收货") {
|
||||
} else if (data.text == "确认收到") {
|
||||
this.OverOrder();
|
||||
} else if (data.text == "查看物流") {
|
||||
this.seeExpressDetail(this.orderContet);
|
||||
@@ -531,10 +537,10 @@ export default {
|
||||
});
|
||||
},
|
||||
OverOrder() {
|
||||
// 确认收货
|
||||
// 确认收到
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确认收货?",
|
||||
content: "确认收到?",
|
||||
success: (res) => {
|
||||
let data = {
|
||||
orderId: this.orderID,
|
||||
@@ -554,7 +560,7 @@ export default {
|
||||
if (res.code == 0) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "收货成功",
|
||||
title: "确认收到成功",
|
||||
icon: "success",
|
||||
duration: 1000,
|
||||
});
|
||||
@@ -604,7 +610,7 @@ export default {
|
||||
if (this.orderContet.orderStatus == 2) {
|
||||
this.customButton.push({
|
||||
width: "160rpx",
|
||||
text: "确认收货",
|
||||
text: "确认收到",
|
||||
|
||||
color: "#fff",
|
||||
});
|
||||
@@ -615,22 +621,27 @@ export default {
|
||||
text: "继续付款",
|
||||
});
|
||||
}
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.customButton.push({
|
||||
width: "160rpx",
|
||||
text: "取消订单",
|
||||
color: "#333",
|
||||
backgroundColor: "#f0f0f0",
|
||||
});
|
||||
}
|
||||
// nuttyreading:注释取消订单按钮
|
||||
// if (this.orderContet.orderStatus == 0) {
|
||||
// this.customButton.push({
|
||||
// width: "160rpx",
|
||||
// text: "取消订单",
|
||||
// color: "#333",
|
||||
// backgroundColor: "#f0f0f0",
|
||||
// });
|
||||
// }
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
this.titleStat = "待支付";
|
||||
} else if (this.orderContet.orderStatus == 1) {
|
||||
this.titleStat = "待发货";
|
||||
this.titleStat = "待发出";
|
||||
} else if (this.orderContet.orderStatus == 2) {
|
||||
this.titleStat = "待收货";
|
||||
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 &&
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
|
||||
<view
|
||||
class="container commonPageBox"
|
||||
style="background-color: #fff !important"
|
||||
>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="吴门医述"></z-nav-bar>
|
||||
@@ -10,8 +14,13 @@
|
||||
<view class="contentBox">
|
||||
<!-- <scroll-view class="scroll-view_H oneCateList" scroll-x="true" scroll-left="0"> -->
|
||||
<view class="oneCateList flexbox">
|
||||
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
|
||||
v-for="(item, index) in oneCateList" :key="item.type">{{item.title}}</text>
|
||||
<text
|
||||
:class="[curOneCateIndex == index ? 'cur' : '']"
|
||||
@click="setOneCateIndex(item, index)"
|
||||
v-for="(item, index) in oneCateList"
|
||||
:key="item.type"
|
||||
>{{ item.title }}</text
|
||||
>
|
||||
</view>
|
||||
<!-- <view class="search_box" v-if="oneCateList.length > 0">
|
||||
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" v-model="searchValue"
|
||||
@@ -28,69 +37,144 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- </scroll-view> -->
|
||||
<view v-show="!showSearchList">
|
||||
<template v-if="!showSearchList">
|
||||
<view class="grid twoCateList" v-if="twoCateList.length > 0">
|
||||
<u-grid :col="3" border class="u-grid-list">
|
||||
<u-grid-item v-for="(item, index) in twoCateList" :key="item.dictType"
|
||||
@click="setTwoCateIndex(item, index)">
|
||||
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.dictValue}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<view
|
||||
class="custom-grid"
|
||||
:class="curOneCateIndex == 1 ? 'col-4' : 'col-3'"
|
||||
>
|
||||
<view
|
||||
v-for="(item, index) in twoCateList"
|
||||
:key="item.dictType"
|
||||
class="grid-item"
|
||||
@click="setTwoCateIndex(item, index)"
|
||||
>
|
||||
<view
|
||||
:class="['grid-text', curTwoCateIndex == index ? 'cur' : '']"
|
||||
>{{ item.dictValue }}
|
||||
</view>
|
||||
<!-- 吴门缘起-吴门之徽 -->
|
||||
<view class="titleList" v-if="curOneCateIndex == 2&&curTwoCateIndex == 2">
|
||||
<u-grid :col="3" v-if="titleList.length > 0">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="previewImage(item.url)"
|
||||
style="align-items: flex-start;">
|
||||
<!-- <view :class="['titleItem']">{{item.name}}</view> -->
|
||||
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-divider v-else text="暂无数据哦~"></u-divider>
|
||||
</view>
|
||||
<!-- 学术贡献-学术思想和学术平台 -->
|
||||
<view class="titleList" v-else-if="curOneCateIndex == 0&&(curTwoCateIndex == 0||curTwoCateIndex == 2)">
|
||||
<u-grid :col="1" v-if="titleList.length > 0">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{item.title}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-divider v-else text="暂无数据哦~"></u-divider>
|
||||
</view>
|
||||
<!-- 学术贡献-出版专著 -->
|
||||
<view class="titleList" v-else-if="curOneCateIndex == 0&&(curTwoCateIndex == 1)">
|
||||
<u-divider text="点击标签进入出版专著"></u-divider>
|
||||
</view>
|
||||
<!-- 其他 -->
|
||||
<view class="titleList" v-else>
|
||||
<u-grid :col="1" v-if="titleList.length > 0&&(curOneCateIndex==0||curOneCateIndex==2)">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{item.name}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<u-grid :col="1" v-if="titleList.length > 0&&curOneCateIndex==3">
|
||||
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{item.title}}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
<view :col="1" v-if="titleList.length > 0&&curOneCateIndex==1">
|
||||
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;display: flex;padding: 20rpx 0;">
|
||||
<view style="width: 280rpx;text-align: center;">
|
||||
<img src="" v-if="item.imageslist&&item.imageslist.length==0" class="chImage">
|
||||
<img :src="item.imageslist&&item.imageslist[0]" v-else class="chImage">
|
||||
</view>
|
||||
<view :class="['titleItem']">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-divider text="暂无数据哦~" v-if="titleList.length==0"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
:class="` titleList`"
|
||||
:style="`height:calc(100% - ${scrollViewHeight * 2}rpx;`"
|
||||
>
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
class="scroll-Y"
|
||||
v-if="titleList.length > 0"
|
||||
>
|
||||
<template v-if="curOneCateIndex == 2 && curTwoCateIndex == 2">
|
||||
<!-- 吴门缘起-吴门之徽 -->
|
||||
|
||||
<u-grid :col="3">
|
||||
<u-grid-item
|
||||
class="scroll-view-item"
|
||||
v-for="(item, index) in titleList"
|
||||
:key="item.id"
|
||||
@click="previewImage(item.url)"
|
||||
style="align-items: flex-start"
|
||||
>
|
||||
<img
|
||||
:src="item.url"
|
||||
alt=""
|
||||
class="wmzhimg"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
curOneCateIndex == 0 &&
|
||||
(curTwoCateIndex == 0 || curTwoCateIndex == 2)
|
||||
"
|
||||
>
|
||||
<common-list
|
||||
:dataList="titleList"
|
||||
@hancleClick="gotoDetail"
|
||||
label="title"
|
||||
>
|
||||
</common-list>
|
||||
<!-- 学术贡献-学术思想和学术平台 -->
|
||||
</template>
|
||||
<template v-else-if="curOneCateIndex == 0 && curTwoCateIndex == 1">
|
||||
<u-divider text="点击标签进入出版专著"></u-divider>
|
||||
</template>
|
||||
<template v-else-if="curOneCateIndex == 0 || curOneCateIndex == 2">
|
||||
<common-list
|
||||
:dataList="titleList"
|
||||
@hancleClick="gotoDetail"
|
||||
label="name"
|
||||
>
|
||||
</common-list>
|
||||
<!-- <u-grid :col="1">
|
||||
|
||||
<u-grid-item class="scroll-view-item " v-for="(item, index) in titleList" :key="item.id"
|
||||
@click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{ item.name }}</view>
|
||||
</u-grid-item>
|
||||
|
||||
</u-grid> -->
|
||||
</template>
|
||||
<template v-if="curOneCateIndex == 3">
|
||||
<common-list
|
||||
:dataList="titleList"
|
||||
@hancleClick="gotoDetail"
|
||||
label="title"
|
||||
>
|
||||
</common-list>
|
||||
|
||||
<!-- <u-grid :col="1">
|
||||
|
||||
|
||||
|
||||
<scroll-view class="scroll-Y" scroll-y="true">
|
||||
<u-grid-item class="scroll-view-item " v-for="(item, index) in titleList"
|
||||
:key="item.id" @click="gotoDetail(item)"
|
||||
style="align-items: flex-start;border-bottom: 2px solid #fff;">
|
||||
<view :class="['titleItem']">{{ item.title }}</view>
|
||||
</u-grid-item></scroll-view>
|
||||
</u-grid> -->
|
||||
</template>
|
||||
|
||||
<template v-if="curOneCateIndex == 1">
|
||||
<view
|
||||
class="scroll-view-item"
|
||||
v-for="(item, index) in titleList"
|
||||
:key="item.id"
|
||||
@click="gotoDetail(item)"
|
||||
style="
|
||||
align-items: flex-start;
|
||||
border-bottom: 2px solid #fff;
|
||||
display: flex;
|
||||
padding: 20rpx 0;
|
||||
"
|
||||
>
|
||||
<view style="width: 280rpx; text-align: center">
|
||||
<img
|
||||
src=""
|
||||
v-if="item.imageslist && item.imageslist.length == 0"
|
||||
class="chImage"
|
||||
/>
|
||||
<img
|
||||
:src="item.imageslist && item.imageslist[0]"
|
||||
v-else
|
||||
class="chImage"
|
||||
/>
|
||||
</view>
|
||||
<view :class="['titleItem']">{{ item.name }}</view>
|
||||
</view>
|
||||
</template>
|
||||
</scroll-view>
|
||||
|
||||
<u-divider v-else text="暂无数据哦~"></u-divider>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- <view class="search_box flexbox" @click="">
|
||||
<view class="search">
|
||||
@@ -114,33 +198,34 @@
|
||||
</view>
|
||||
</u-modal> -->
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
searchValue: '',
|
||||
oneCateList: [{
|
||||
searchValue: "",
|
||||
oneCateList: [
|
||||
{
|
||||
title: "学术贡献",
|
||||
type: 'medicaldesBookType'
|
||||
}, {
|
||||
type: "medicaldesBookType",
|
||||
},
|
||||
{
|
||||
title: "学术传承",
|
||||
type: 'inheritType'
|
||||
}, {
|
||||
type: "inheritType",
|
||||
},
|
||||
{
|
||||
title: "吴门缘起",
|
||||
type: 'lightType'
|
||||
type: "lightType",
|
||||
// }, {
|
||||
// title: "吴门纪实",
|
||||
// type: 'recordType'
|
||||
}], // 一级分类标题1
|
||||
},
|
||||
], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
titleList: [], // 方剂标题
|
||||
curOneCateIndex: 0, // 当前选中的一级分类
|
||||
@@ -150,26 +235,26 @@
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: '提示',
|
||||
limitContent: ''
|
||||
}
|
||||
limitTitle: "提示",
|
||||
limitContent: "",
|
||||
scrollViewHeight: 0,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserInfo()
|
||||
this.getUserInfo();
|
||||
// this.getCateList()
|
||||
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
// 检查是有权限使用搜索功能
|
||||
checkDisable() {
|
||||
console.log('点击了')
|
||||
console.log("点击了");
|
||||
},
|
||||
// 显示无权限弹窗
|
||||
// showNoRights() {
|
||||
@@ -190,167 +275,183 @@
|
||||
getUserInfo() {
|
||||
// 用户详情
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http
|
||||
.post('book/user/info/' + this.userInfo.id)
|
||||
.then(res => {
|
||||
this.userMes = res.user
|
||||
this.getCateList()
|
||||
console.log(this.userMes, '呼呼')
|
||||
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
|
||||
this.userMes = res.user;
|
||||
this.getCateList();
|
||||
console.log(this.userMes, "呼呼");
|
||||
});
|
||||
}
|
||||
},
|
||||
// 详情
|
||||
gotoDetail(item) {
|
||||
console.log('111', item)
|
||||
console.log('this.curOneCateIndex', this.curOneCateIndex)
|
||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
||||
console.log("111", item);
|
||||
console.log("this.curOneCateIndex", this.curOneCateIndex);
|
||||
console.log("this.curTwoCateIndex", this.curTwoCateIndex);
|
||||
if (this.curOneCateIndex == 0) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshugongxianDetail?id=' + item.id
|
||||
})
|
||||
return
|
||||
url: "./xueshugongxianDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.curOneCateIndex == 1) {
|
||||
uni.navigateTo({
|
||||
url: "./medicaldesDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
url: "./medicaldesDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.curOneCateIndex == 2) {
|
||||
console.log('111', item)
|
||||
console.log("111", item);
|
||||
uni.navigateTo({
|
||||
url: './video?title=' + item.name + '&src=' + item.url
|
||||
})
|
||||
return
|
||||
url: "./video?title=" + item.name + "&src=" + item.url,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.curOneCateIndex == 3) {
|
||||
console.log('111', item)
|
||||
console.log("111", item);
|
||||
uni.navigateTo({
|
||||
url: "./recordDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
url: "./recordDetail?id=" + item.id,
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
// 获取名称
|
||||
getTitles(dictType) {
|
||||
console.log('dictType', dictType)
|
||||
console.log("dictType", dictType);
|
||||
if (this.curOneCateIndex == 0) {
|
||||
if (dictType == 2) {
|
||||
uni.navigateTo({
|
||||
url: './zhuanzhuchuban'
|
||||
})
|
||||
return
|
||||
url: "./zhuanzhuchuban",
|
||||
});
|
||||
return;
|
||||
}
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/generalArticle/articleByPage",
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"type": dictType==1?'1':'2',
|
||||
"limit": 1000,
|
||||
"current": 1,
|
||||
type: dictType == 1 ? "1" : "2",
|
||||
limit: 1000,
|
||||
current: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result && res.result.records.length > 0) {
|
||||
this.titleList = res.result.records
|
||||
} else {
|
||||
this.titleList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result && res.result.records.length > 0) {
|
||||
this.titleList = res.result.records;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 1) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/inheritListByPage",
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
'dictType': dictType,
|
||||
"limit": 1000,
|
||||
"current": 1
|
||||
dictType: dictType,
|
||||
limit: 1000,
|
||||
current: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.records.length > 0) {
|
||||
this.titleList = res.result.records
|
||||
this.titleList = res.result.records;
|
||||
for (let i = 0; i < this.titleList.length; i++) {
|
||||
this.titleList[i].imageslist = [];
|
||||
this.titleList[i].imageslist = this.titleList[i].img.split(";");
|
||||
}
|
||||
} else {
|
||||
this.titleList = []
|
||||
this.titleList = [];
|
||||
}
|
||||
}).catch(e => {
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 2) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/lightListByType?type=" + dictType,
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 1000,
|
||||
"page": 1,
|
||||
limit: 1000,
|
||||
page: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.titleList = res.result
|
||||
} else {
|
||||
this.titleList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.titleList = res.result;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
if (this.curOneCateIndex == 3) {
|
||||
$http.request({
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/recordByType?type=" + dictType,
|
||||
method: "POST",
|
||||
data: {
|
||||
// loadAnimate: 'none', // 请求加载动画
|
||||
"limit": 1000,
|
||||
"page": 1,
|
||||
limit: 1000,
|
||||
page: 1,
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(res => {
|
||||
console.log(res, '内容获取成功')
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.titleList = res.result
|
||||
} else {
|
||||
this.titleList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "内容获取成功");
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.titleList = res.result;
|
||||
} else {
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
setTwoCateIndex(item, index) {
|
||||
let dictType = item.dictType
|
||||
this.curTwoCateIndex = index
|
||||
this.getTitles(dictType)
|
||||
let dictType = item.dictType;
|
||||
this.curTwoCateIndex = index;
|
||||
this.getTitles(dictType);
|
||||
},
|
||||
setOneCateIndex(item, index) {
|
||||
async setOneCateIndex(item, index) {
|
||||
console.log(index, 99999);
|
||||
var that = this;
|
||||
|
||||
// if(this.userMes.tgdzPower == 0){
|
||||
// let that = this
|
||||
// uni.showModal({
|
||||
@@ -371,86 +472,136 @@
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
let type = item.type
|
||||
this.curOneCateIndex = index
|
||||
this.curTwoCateIndex = 0
|
||||
this.searchValue = ''
|
||||
this.searchList = []
|
||||
this.showSearchList = false
|
||||
let type = item.type;
|
||||
this.curOneCateIndex = index;
|
||||
this.curTwoCateIndex = 0;
|
||||
this.searchValue = "";
|
||||
this.searchList = [];
|
||||
this.showSearchList = false;
|
||||
// if (index != 2) {
|
||||
this.getTowCateList(type)
|
||||
await this.getTowCateList(type);
|
||||
|
||||
// uni.createSelectorQuery().select('.oneCateList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
},
|
||||
getTowCateList(type) {
|
||||
$http.request({
|
||||
async getTowCateList(type) {
|
||||
var that = this;
|
||||
$http
|
||||
.request({
|
||||
url: "book/medicaldes/typeList?label=" + type,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
loadAnimate: 'none', // 请求加载动画
|
||||
loadAnimate: "none", // 请求加载动画
|
||||
// 'categoryId': id
|
||||
},
|
||||
// header: { //默认 无 说明:请求头
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
}).then(res => {
|
||||
console.log(res, '二级分类获取成功')
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res, "二级分类获取成功");
|
||||
if (res.code == 0 && res.result.length >= 0) {
|
||||
this.twoCateList = res.result
|
||||
this.twoCateList = res.result;
|
||||
if (this.curOneCateIndex == 0) {
|
||||
this.twoCateList = [{
|
||||
'dictType': "1",
|
||||
"dictValue": "学术思想"
|
||||
}, {
|
||||
'dictType': "2",
|
||||
"dictValue": "出版专著"
|
||||
}, {
|
||||
'dictType': "3",
|
||||
"dictValue": "学术平台"
|
||||
}]
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "学术思想",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "出版专著",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "学术平台",
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.curOneCateIndex == 2) {
|
||||
this.twoCateList = [{
|
||||
'dictType': "1",
|
||||
"dictValue": "吴门之歌"
|
||||
}, {
|
||||
'dictType': "2",
|
||||
"dictValue": "巴山夜语"
|
||||
}, {
|
||||
'dictType': "3",
|
||||
"dictValue": "吴门之徽"
|
||||
}]
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "吴门之歌",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "巴山夜语",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "吴门之徽",
|
||||
},
|
||||
];
|
||||
}
|
||||
if (this.curOneCateIndex == 3) {
|
||||
this.twoCateList = [{
|
||||
'dictType': "1",
|
||||
"dictValue": "学术贡献"
|
||||
}, {
|
||||
'dictType': "2",
|
||||
"dictValue": "抗疫纪实"
|
||||
}, {
|
||||
'dictType': "3",
|
||||
"dictValue": "吴门公益"
|
||||
}]
|
||||
this.twoCateList = [
|
||||
{
|
||||
dictType: "1",
|
||||
dictValue: "学术贡献",
|
||||
},
|
||||
{
|
||||
dictType: "2",
|
||||
dictValue: "抗疫纪实",
|
||||
},
|
||||
{
|
||||
dictType: "3",
|
||||
dictValue: "吴门公益",
|
||||
},
|
||||
];
|
||||
}
|
||||
this.getTitles(this.twoCateList[0].dictType)
|
||||
} else {
|
||||
this.twoCateList = []
|
||||
this.titleList = []
|
||||
this.getTitles(this.twoCateList[0].dictType);
|
||||
|
||||
this.$nextTick(async () => {
|
||||
// await uni.createSelectorQuery().select('.uni-tabbar').boundingClientRect(function (rect) {
|
||||
// console.log(rect.height, '3333')
|
||||
|
||||
// // var height = 42 + rect.height + 10;
|
||||
// // that.scrollViewHeight = height;
|
||||
// // console.log(that.scrollViewHeight, '111111')
|
||||
// // that.$forceUpdate()
|
||||
// // console.log('元素高度2:', height);
|
||||
// }).exec();
|
||||
await uni
|
||||
.createSelectorQuery()
|
||||
.in(this)
|
||||
.select(".twoCateList")
|
||||
.boundingClientRect(function (rect) {
|
||||
if (!rect || typeof rect.height !== "number") {
|
||||
return;
|
||||
}
|
||||
}).catch(e => {
|
||||
this.twoCateList = []
|
||||
this.titleList = []
|
||||
console.log(e)
|
||||
console.log(rect.height, "22222");
|
||||
|
||||
var height = 42 + rect.height + 20;
|
||||
that.scrollViewHeight = height;
|
||||
console.log(that.scrollViewHeight, "111111");
|
||||
that.$forceUpdate();
|
||||
console.log("元素高度2:", height);
|
||||
})
|
||||
.exec();
|
||||
});
|
||||
} else {
|
||||
this.twoCateList = [];
|
||||
this.titleList = [];
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
this.twoCateList = [];
|
||||
this.titleList = [];
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
transformData(inputData) {
|
||||
const result = {};
|
||||
inputData.forEach(item => {
|
||||
const {
|
||||
letter
|
||||
} = item;
|
||||
inputData.forEach((item) => {
|
||||
const { letter } = item;
|
||||
if (!result[letter]) {
|
||||
result[letter] = [];
|
||||
}
|
||||
@@ -486,9 +637,9 @@
|
||||
// })
|
||||
// },
|
||||
getCateList(id) {
|
||||
id ? '' : id = 0
|
||||
this.twoCateList = []
|
||||
this.curTwoCateIndex = 0
|
||||
id ? "" : (id = 0);
|
||||
this.twoCateList = [];
|
||||
this.curTwoCateIndex = 0;
|
||||
// 0为获取顶级分类,其他为搜索下级分类,目前的逻辑,顶级是写死的,所以可能只会涉及到搜索第二级
|
||||
// $http.request({
|
||||
// url: "book/prescript/prescriptCategoryList",
|
||||
@@ -504,7 +655,7 @@
|
||||
// console.log(res, '脉穴分类获取成功')
|
||||
// if (res.code == 0 && res.list.length > 0) {
|
||||
// this.oneCateList = res.list
|
||||
this.getTowCateList(this.oneCateList[0].type)
|
||||
this.getTowCateList(this.oneCateList[0].type);
|
||||
// } else {
|
||||
// this.oneCateList = []
|
||||
// }
|
||||
@@ -516,15 +667,15 @@
|
||||
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url)
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function (res) {
|
||||
// console.log(res,'+++++')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
// getSearch() {
|
||||
@@ -615,13 +766,60 @@
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
}
|
||||
components: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .u-grid-list {
|
||||
// height: 40rpx;
|
||||
// }
|
||||
|
||||
.custom-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
// border-top: 1px solid #dadbde;
|
||||
// border-bottom: 1px solid #dadbde;
|
||||
|
||||
&.col-3 {
|
||||
.grid-item {
|
||||
min-width: 33.33%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// .grid-item:nth-child(-n + 3) {
|
||||
// border-top: 0;
|
||||
// }
|
||||
// .grid-item:nth-child(3n + 1) {
|
||||
// border-left: 0;
|
||||
// }
|
||||
}
|
||||
|
||||
&.col-4 {
|
||||
.grid-item {
|
||||
min-width: 25%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// .grid-item:nth-child(-n + 4) {
|
||||
// border-top: 0;
|
||||
// }
|
||||
// .grid-item:nth-child(4n + 1) {
|
||||
// border-left: 0;
|
||||
// }
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
// border-left: 1px solid #dadbde;
|
||||
// border-top: 1px solid #dadbde;
|
||||
padding: 10rpx 0;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.searchList {
|
||||
.item {
|
||||
font-size: 28rpx;
|
||||
@@ -637,14 +835,18 @@
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
height: calc(100% - 50px);
|
||||
|
||||
.oneCateList {
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 32%;
|
||||
padding: 20rpx 0;
|
||||
padding: 16rpx 0;
|
||||
font-size: 34rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
@@ -652,15 +854,16 @@
|
||||
.cur {
|
||||
background-color: #55aa7f;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.twoCateList {
|
||||
font-size: 28rpx;
|
||||
font-size: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.grid-text {
|
||||
padding: 30rpx 20rpx;
|
||||
padding: 10rpx 0rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -678,10 +881,6 @@
|
||||
border-radius: 10rpx;
|
||||
background-color: #f8f9fa;
|
||||
|
||||
.titleItem {
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
|
||||
.JFtitleItem {
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx 10rpx;
|
||||
@@ -696,13 +895,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
padding: 10rpx;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.search_box {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
@@ -720,17 +912,16 @@
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #54a96633;
|
||||
box-shadow: 0 0px 10px 1px #3ab3ae33;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.icon_search {
|
||||
background-image: url('@/static/icon/map_ic_search.png');
|
||||
background-image: url("@/static/icon/map_ic_search.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
@@ -756,4 +947,37 @@
|
||||
.chImage {
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// .scroll-view-item {
|
||||
// height: 300rpx;
|
||||
// line-height: 300rpx;
|
||||
// text-align: center;
|
||||
// font-size: 36rpx;
|
||||
// }
|
||||
|
||||
.scroll-view-item_H {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
// height: 300rpx;
|
||||
// line-height: 300rpx;
|
||||
// text-align: center;
|
||||
// font-size: 36rpx;
|
||||
}
|
||||
|
||||
.titleList {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.titleList2 {
|
||||
height: calc(100% - 170rpx);
|
||||
}
|
||||
</style>
|
||||
@@ -227,9 +227,9 @@
|
||||
if (this.orderDetail.orderStatus == 0) {
|
||||
this.titleStat = '待支付'
|
||||
} else if (this.orderDetail.orderStatus == 1) {
|
||||
this.titleStat = '待发货'
|
||||
this.titleStat = '待发出'
|
||||
} else if (this.orderDetail.orderStatus == 2) {
|
||||
this.titleStat = '待收货'
|
||||
this.titleStat = '待收到'
|
||||
} else if (this.orderDetail.orderStatus == 3) {
|
||||
this.titleStat = '已完成'
|
||||
}
|
||||
|
||||
@@ -120,13 +120,13 @@
|
||||
|
||||
<scroll-view class="ProTabsBox">
|
||||
<view class="New_ProTabs flexbox">
|
||||
<text v-for="(item, index) in catTagList" :key="item.splId" :class="[tabsid == item.id ? 'cur' : '']"
|
||||
<text v-for="(item, index) in catTagList" :key="item.splId" :class="[catTagIndex == index ? 'cur' : '']"
|
||||
@click="tabsChange(item, index)">{{ item.title }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="children_cate_box" v-if="childrenCatList && childrenCatList.length > 0">
|
||||
<view class="children_cate flexbox">
|
||||
<view @click="childrenChange(item, index)" :class="['item', curChildrenId == item.id ? 'cur' : '']"
|
||||
<view @click="childrenChange(item, index)" :class="['item', curChildrenIndex == index ? 'cur' : '']"
|
||||
v-for="(item, index) in childrenCatList" :key="item.id">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
@@ -347,6 +347,8 @@
|
||||
yxCurIndex: 0, // 当前营销标签序号
|
||||
SystemInfoSync: {}, // 屏幕尺寸
|
||||
newsList: [], // 播报新闻列表
|
||||
catTagIndex: 0,
|
||||
curChildrenIndex: 0
|
||||
};
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -471,7 +473,7 @@
|
||||
},
|
||||
requestAll() {
|
||||
this.getUserInfo();
|
||||
this.tjProList = [];
|
||||
// this.tjProList = [];
|
||||
uni.hideTabBar();
|
||||
// this.getData();
|
||||
this.getTags();
|
||||
@@ -529,7 +531,8 @@
|
||||
// console.log(res, '营销标签列表')
|
||||
if (res.result.length > 0) {
|
||||
this.yingxiaoTags = res.result;
|
||||
this.getYXproducts();
|
||||
const item = this.yingxiaoTags.length > 0 && this.yingxiaoTags[this.yxCurIndex]
|
||||
this.getYXproducts(item);
|
||||
}
|
||||
|
||||
// console.log(res)
|
||||
@@ -583,9 +586,11 @@
|
||||
if (this.catTagList[0].isLast == 1) {
|
||||
this.getJtData(this.catTagList[0].id);
|
||||
} else {
|
||||
this.childrenCatList = this.catTagList[0].children;
|
||||
this.curChildrenId = this.childrenCatList[0].id;
|
||||
this.getJtData(this.childrenCatList[0].id);
|
||||
const currentCatTag = this.catTagList?.[this.catTagIndex];
|
||||
this.childrenCatList = currentCatTag.children.length > 0 ? currentCatTag.children : currentCatTag;
|
||||
this.curChildrenId = this.childrenCatList[this.curChildrenIndex]?.id || this.childrenCatList.id;
|
||||
//this.getJtData(this.childrenCatList[this.curChildrenIndex]?.id);
|
||||
this.getJtData(this.curChildrenId);
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -596,11 +601,13 @@
|
||||
// 二级分类点击
|
||||
childrenChange(item, index) {
|
||||
// console.log(item,this.curChildrenId,'点击')
|
||||
this.curChildrenIndex = index;
|
||||
this.curChildrenId = this.childrenCatList[index].id;
|
||||
this.getJtData(this.childrenCatList[index].id);
|
||||
},
|
||||
tabsChange(item, cindex) {
|
||||
// this.tjProList = []
|
||||
this.catTagIndex = cindex;
|
||||
this.tabsid = item.id;
|
||||
this.childrenCatList = [];
|
||||
if (this.catTagList[cindex].isLast == 1) {
|
||||
@@ -609,6 +616,7 @@
|
||||
this.childrenCatList = this.catTagList[cindex].children;
|
||||
this.curChildrenId = this.childrenCatList[0].id;
|
||||
this.getJtData(this.childrenCatList[0].id);
|
||||
this.curChildrenIndex = 0
|
||||
}
|
||||
// this.getJtData()
|
||||
// if (this.tabsid == 15) {
|
||||
@@ -1213,7 +1221,7 @@
|
||||
color: #0e583a;
|
||||
font-size: 34rpx;
|
||||
line-height: 42rpx;
|
||||
padding: 5px 10px;
|
||||
padding: 10rpx 0 14rpx 10rpx;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1222,6 +1230,7 @@
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
letter-spacing: 10rpx;
|
||||
width: 3.5em;
|
||||
}
|
||||
|
||||
text:last-child {
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
|
||||
let data = {
|
||||
userId: that.userInfo.id, //下单人ID
|
||||
userPhone: that.userInfo.tel, //收货人手机号
|
||||
userPhone: that.userInfo.tel, //收件人手机号
|
||||
paymentMethod: that.payType, //1支付宝,2微信,3ios内购
|
||||
orderMoney: that.stepsVc.money * 1, //订单金额
|
||||
districtMoney: 0, //优惠金额
|
||||
|
||||
@@ -566,7 +566,7 @@ export default {
|
||||
let that = this;
|
||||
let data = {
|
||||
userId: that.userInfo.id, //下单人ID
|
||||
userPhone: that.userInfo.tel, //收货人手机号
|
||||
userPhone: that.userInfo.tel, //收件人手机号
|
||||
paymentMethod: that.payType, //2支付宝,1微信,3ios内购
|
||||
orderMoney: that.stepsCj.money * 1, //订单金额
|
||||
districtMoney: 0, //优惠金额
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
let that = this
|
||||
let data = {
|
||||
userId: that.userInfo.id, //下单人ID
|
||||
userPhone: that.userInfo.tel, //收货人手机号
|
||||
userPhone: that.userInfo.tel, //收件人手机号
|
||||
paymentMethod: that.payType, //2支付宝,1微信,3ios内购
|
||||
orderMoney: that.stepsCj.money * 1, //订单金额
|
||||
districtMoney: 0, //优惠金额
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
this.cartList.forEach((item, index) => {
|
||||
let price = 0;
|
||||
if (item.checked) {
|
||||
if (item.isVipPrice == 1 && item.vipPrice != 0) {
|
||||
if (item.isVipPrice == 1 && item.vipPrice != 0 && item.vipPrice != null) {
|
||||
price = (item.productAmount * item.vipPrice).toFixed(2);
|
||||
} else {
|
||||
if (item.activityPrice && item.activityPrice > 0) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</view>
|
||||
<view class="addressFooter">
|
||||
<view class="addAddress" @click="toAddress(0,0)">
|
||||
+ 添加收货地址
|
||||
+ 添加收件地址
|
||||
</view>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<view class="AC_jilu PM_font">充值消费记录</view>
|
||||
<view v-for="(item,index) in MoneyRecord" class="AC_List" @click="goClick(item)">
|
||||
<view class="AC_title">
|
||||
{{item.orderType}}
|
||||
{{ item.productName || item.orderType}}
|
||||
<view>
|
||||
<text v-if="item.changeAmount>0">+</text>
|
||||
<text>{{item.changeAmount}}</text>
|
||||
|
||||
@@ -1,850 +1,93 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<view class="container commonPageBox">
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="个人资料"></z-nav-bar>
|
||||
<view class="tabulate">
|
||||
<view class="per_list">
|
||||
<text class="biaoti">手机号</text>
|
||||
<text class="neirong">{{userMsage.tel}}</text>
|
||||
<text class="marPer" v-if="!userMsage.tel" @click="phoneShow = true;OpenClear()"
|
||||
style="background-color: #ed901d;">点击绑定</text>
|
||||
</view>
|
||||
<view class="per_list">
|
||||
<text class="biaoti">邮箱</text>
|
||||
<text class="neirong">{{userMsage.email}}</text>
|
||||
<text class="marPer" v-if="!userMsage.email" @click="emailShow = true;OpenClear()"
|
||||
style="background-color: #ed901d;">点击绑定</text>
|
||||
</view>
|
||||
<view class="per_list per_list_arrow" @click="avatarShow = true">
|
||||
<text class="biaoti" style="margin-top: 40rpx;">头像</text>
|
||||
<text class="neirong" style="margin-top: 0;">
|
||||
<image :src="userMsage.avatar" class="per_mes_img"></image>
|
||||
</text>
|
||||
</view>
|
||||
<view class="per_list per_list_arrow" @click="nicknameShow = true">
|
||||
<text class="biaoti">昵称</text>
|
||||
<text class="neirong">{{userMsage.nickname}}</text>
|
||||
</view>
|
||||
<view class="per_list per_list_arrow" @click="passwordShow = true">
|
||||
<text class="biaoti">密码</text>
|
||||
<text v-if="userMsage.YNpass!=''" class="neirong">点击修改</text>
|
||||
<text class="marPer" v-if="userMsage.YNpass!=''"
|
||||
style="background-color: #92c78c;margin-right: 40rpx;">已设定</text>
|
||||
<text v-if="userMsage.YNpass==''" class="neirong">去设置</text>
|
||||
<text class="marPer" v-if="userMsage.YNpass==''"
|
||||
style="background-color: #9d9d9d;margin-right: 40rpx;">未设定</text>
|
||||
|
||||
</view>
|
||||
<view class="per_list per_list_arrow" @click="ageShow = true">
|
||||
<text class="biaoti">年龄</text>
|
||||
<text class="neirong">{{userMsage.age}}</text>
|
||||
</view>
|
||||
<view class="per_list per_list_arrow" @click="sexShow = true">
|
||||
<text class="biaoti">性别</text>
|
||||
<text class="neirong" v-if="userMsage.sex==1">男</text>
|
||||
<text class="neirong" v-if="userMsage.sex==0">女</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 手机 -->
|
||||
<u-popup :show="phoneShow" :round="10" @close="phoneShow=false;">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请输入手机号</view>
|
||||
<view style="display: flex;">
|
||||
<view class="quhao">
|
||||
<uni-data-select class="quhaoSel" placeholder="请选择区号" v-model="userMes.quCode"
|
||||
:localdata="quCodeList"></uni-data-select>
|
||||
</view> <u--input v-model="userMes.phone" placeholder="请输入手机号" border="surround" clearable>
|
||||
</u--input>
|
||||
|
||||
</view>
|
||||
<view style="display: flex;">
|
||||
<u--input v-model="userMes.phonecode" type="number" placeholder="请输入验证码" border="surround" clearable
|
||||
style="margin-top: 20rpx;">
|
||||
</u--input>
|
||||
<button class="emPHCode" @click="onSetCode('phone')">{{ PhoneEmailNote }}</button>
|
||||
</view>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="chosePhone()"
|
||||
style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="phoneShow=false" class="dp_canBtn">
|
||||
取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 邮箱 -->
|
||||
<u-popup :show="emailShow" :round="10" @close="emailShow=false;PhoneEmailNote = '获取验证码'">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请输入邮箱</view>
|
||||
<u--input v-model="userMes.email" placeholder="请输入邮箱" border="surround" clearable>
|
||||
</u--input>
|
||||
<view style="display: flex;">
|
||||
<u--input v-model="userMes.emailcode" type="number" placeholder="请输入验证码" border="surround" clearable
|
||||
style="margin-top: 20rpx;">
|
||||
</u--input>
|
||||
<button class="emPHCode" @click="onSetCode('email')">{{ PhoneEmailNote }}</button>
|
||||
</view>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="choseEmail()"
|
||||
style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="emailShow=false" class="dp_canBtn">
|
||||
取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 头像 -->
|
||||
<u-popup :show="avatarShow" :round="10" @close="avatarShow=false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请更换头像</view>
|
||||
<u-upload :fileList="fileAvatar" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1"
|
||||
width="150" height="150" :previewFullImage="true">
|
||||
</u-upload>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="choseAvatar()"
|
||||
style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="avatarShow=false" class="dp_canBtn">取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 昵称 -->
|
||||
<u-popup :show="nicknameShow" :round="10" @close="nicknameShow=false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请输入昵称</view>
|
||||
<u--input v-model="userMes.nickname" placeholder="请输入昵称" border="surround" clearable></u--input>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定"
|
||||
@click="choseNickname(userMes.nickname)" style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="nicknameShow=false" class="dp_canBtn">取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
<!-- 年龄 -->
|
||||
<u-popup :show="ageShow" :round="10" @close="ageShow=false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请输入年龄</view>
|
||||
<u--input v-model="userMes.age" type="number" placeholder="请输入年龄" border="surround" clearable>
|
||||
</u--input>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="choseAge()"
|
||||
style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="ageShow=false" class="dp_canBtn">
|
||||
取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 性别 -->
|
||||
<u-popup :show="sexShow" :round="10" @close="sexShow=false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请选择性别</view>
|
||||
<u-radio-group v-model="userMes.sex">
|
||||
<view style="width: 100%;">
|
||||
<view v-for="(item, index) in sexList" @click="choseSex(item.id)" class="dp_sex">
|
||||
{{item.title}}
|
||||
<u-radio :key="index" activeColor="#54a966" :name='item.id'
|
||||
style="float: right;margin-top: 5rpx;" @change="choseSex(item.id)"></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
<view @click="sexShow=false" class="dp_canBtn">取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 密码 -->
|
||||
<u-popup :show="passwordShow" :round="10" @close="cancelPass">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请修改密码</view>
|
||||
<u--input maxlength="8" v-model="userMiMa.password" placeholder="请输入新密码" :password="true"
|
||||
border="surround" clearable @input="inputMethod(userMiMa.password)">
|
||||
</u--input>
|
||||
<view class="" style="font-size: 28rpx; color: #999;">
|
||||
<p v-if="passNote != ''">{{passNote}}</p>
|
||||
<p v-html="passStr" style="margin-top: 10rpx;"></p>
|
||||
</view>
|
||||
<u--input maxlength="8" v-model="userMiMa.Repassword" placeholder="请再确认密码" :password="true"
|
||||
border="surround" clearable style="margin-top: 20rpx;"></u--input>
|
||||
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="chosePassword()"
|
||||
style="margin-top: 50rpx;"></u-button>
|
||||
<view @click="cancelPass" class="dp_canBtn">取消</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- <view class="btn_box">
|
||||
<button @click="chosePassword" class="active">登 录</button>
|
||||
</view> -->
|
||||
<music-play :playData="playData"></music-play>
|
||||
<UserInfo
|
||||
:userInfo="userInfo"
|
||||
:$http="$http"
|
||||
:dataList="dataList"
|
||||
@show-submit-info="onShowSubmitInfo"
|
||||
@close-submit-info="closeManager"
|
||||
></UserInfo>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
var clear;
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
// 密码验证的正则
|
||||
//1、密码为八位及以上并且字母数字特殊字符三项都包括
|
||||
var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
|
||||
//2、密码为八位及以上并且字母、数字、特殊字符三项中有两项,强度是中等
|
||||
var mediumRegex = new RegExp(
|
||||
"^(?=.{8,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[a-z])(?=.*\\W))|((?=.*[0-9])(?=.*\\W))|((?=.*[A-Z])(?=.*\\W))).*$",
|
||||
"g");
|
||||
var enoughRegex = new RegExp("(?=.{8,}).*", "g");
|
||||
import UserInfo from "edu-core/components/user-info/index.vue";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
userMes: {
|
||||
quCode: '',
|
||||
phone: '',
|
||||
email: '',
|
||||
id: '',
|
||||
age: '',
|
||||
sex: '',
|
||||
nickname: '',
|
||||
tel: '',
|
||||
oldName: '', // 老的用户名
|
||||
},
|
||||
userMsage: {
|
||||
quCode: '',
|
||||
phonecode: '',
|
||||
phone: '',
|
||||
emailcode: '',
|
||||
email: '',
|
||||
id: '',
|
||||
age: '',
|
||||
sex: '',
|
||||
nickname: '',
|
||||
tel: '',
|
||||
YNpass: '',
|
||||
oldName: '', // 老的用户名
|
||||
},
|
||||
userMiMa: {
|
||||
id: '',
|
||||
password: '',
|
||||
Repassword: '',
|
||||
},
|
||||
readonly: false,
|
||||
phoneShow: false,
|
||||
emailShow: false,
|
||||
avatarShow: false,
|
||||
nicknameShow: false,
|
||||
ageShow: false,
|
||||
sexShow: false,
|
||||
passwordShow: false,
|
||||
fileAvatar: [],
|
||||
quCodeList: [], // 国家区域码
|
||||
sexList: [{
|
||||
title: '男',
|
||||
id: 1,
|
||||
showSubmitInfoBlank: false,
|
||||
submitInfo: {},
|
||||
dataList: [
|
||||
{
|
||||
title: "昵称",
|
||||
indexValue: "nickname",
|
||||
type: "nickname",
|
||||
},
|
||||
{
|
||||
title: '女',
|
||||
id: 0,
|
||||
}
|
||||
title: "手机号",
|
||||
indexValue: "tel",
|
||||
type: "tel",
|
||||
},
|
||||
{
|
||||
title: "邮箱",
|
||||
indexValue: "email",
|
||||
type: "email",
|
||||
},
|
||||
{
|
||||
title: "密码",
|
||||
indexValue: "password",
|
||||
type: "password",
|
||||
},
|
||||
{
|
||||
title: "年龄",
|
||||
indexValue: "age",
|
||||
type: "age",
|
||||
},
|
||||
{
|
||||
title: "性别",
|
||||
indexValue: "sex",
|
||||
type: "sex",
|
||||
},
|
||||
{
|
||||
title: "身份",
|
||||
indexValue: "socialIdentity",
|
||||
type: "profile",
|
||||
},
|
||||
],
|
||||
PhoneEmailNote: '获取验证码',
|
||||
passNote: '',
|
||||
passStr: '',
|
||||
passwordOk: false, // 密码是否满足规则
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
// 隐藏原生的tabbar
|
||||
onLoad() {
|
||||
uni.hideTabBar();
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo'])
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.getData();
|
||||
this.getCountyCode()
|
||||
},
|
||||
components: {
|
||||
musicPlay
|
||||
UserInfo,
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
// 获取
|
||||
getCountyCode() {
|
||||
let that = this
|
||||
// 获取国家区域编码
|
||||
$http.request({
|
||||
url: "book/baseArea/getAllBaseArea",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
onShowSubmitInfo(info) {
|
||||
this.submitInfo = info;
|
||||
this.showSubmitInfoBlank = true;
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
// console.log(res,'区域码')
|
||||
if (res.code == 0 && res.baseAreas.length > 0) {
|
||||
that.quCodeList = res.baseAreas.map(item => {
|
||||
let obj = {
|
||||
'text': item.title + ' (+' + item.code + ')',
|
||||
'value': item.code,
|
||||
}
|
||||
return obj
|
||||
})
|
||||
} else {
|
||||
that.quCodeList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, 'e')
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
let that = this
|
||||
|
||||
// 获取个人信息
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http
|
||||
.post('book/user/info/' + that.userInfo.id)
|
||||
.then(res => {
|
||||
that.userMes.id = res.user.id
|
||||
that.userMes.age = res.user.age
|
||||
that.userMes.sex = res.user.sex
|
||||
that.userMes.nickname = res.user.nickname
|
||||
that.userMes.tel = res.user.tel
|
||||
that.userMes.avatar = res.user.avatar
|
||||
that.userMes.oldName = that.userMes.nickname
|
||||
that.userMes.id = res.user.id
|
||||
that.userMsage.age = res.user.age
|
||||
that.userMsage.email = res.user.email
|
||||
that.userMsage.sex = res.user.sex
|
||||
that.userMsage.nickname = res.user.nickname
|
||||
that.userMsage.tel = res.user.tel
|
||||
that.userMsage.avatar = res.user.avatar
|
||||
that.userMsage.YNpass = res.user.password
|
||||
that.userMiMa.id = res.user.id
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
cancelPass() {
|
||||
this.passwordShow = false
|
||||
this.userMiMa.password = ''
|
||||
this.userMiMa.Repassword = ''
|
||||
this.passNote = ''
|
||||
this.passStr = ''
|
||||
},
|
||||
// 密码验证
|
||||
inputMethod(value) {
|
||||
this.passwordOk = false
|
||||
// console.log('输入的值为:', value)
|
||||
if (strongRegex.test(value)) {
|
||||
//console.log('强密码-----',value)
|
||||
this.passStr = "<span style='color:#18bc37'>密码强度很不错哦!</span>"
|
||||
// this.passNote = '请至少使用大小写字母、数字、符号两种类型组合的密码,长度为8位。'
|
||||
this.passNote = ''
|
||||
this.passwordOk = true
|
||||
} else if (mediumRegex.test(value)) {
|
||||
//console.log('中等密码-----',value)
|
||||
this.passNote = '请至少使用大小写字母、数字、符号两种类型组合的密码,长度为8位。'
|
||||
this.passStr = "<span style='color:#2979ff'>密码强度中等!</span>"
|
||||
this.passwordOk = true
|
||||
} else if (enoughRegex.test(value)) {
|
||||
//console.log('弱密码-----',value)
|
||||
this.passStr = "<span style='color:#f3a73f'>密码强度太弱!</span>"
|
||||
this.passNote = '请至少使用大小写字母、数字、符号两种类型组合的密码,长度为8位。'
|
||||
} else {
|
||||
this.passwordOk = false
|
||||
this.passNote = '请至少使用大小写字母、数字、符号两种类型组合的密码,长度为8位。'
|
||||
this.passStr = ""
|
||||
//console.log('密码-----',value)
|
||||
}
|
||||
},
|
||||
|
||||
// 清除验证码
|
||||
OpenClear() {
|
||||
clearInterval(clear)
|
||||
this.PhoneEmailNote = '获取验证码';
|
||||
this.readonly = false;
|
||||
},
|
||||
|
||||
// 获取验证码
|
||||
emPHCode() {
|
||||
clear && clearInterval(clear);
|
||||
this.readonly = true
|
||||
this.PhoneEmailNote = '60S';
|
||||
var s = 60;
|
||||
clear = setInterval(() => {
|
||||
s--;
|
||||
this.PhoneEmailNote = s + 'S';
|
||||
if (s <= 0) {
|
||||
clearInterval(clear);
|
||||
this.PhoneEmailNote = '获取验证码';
|
||||
this.readonly = false;
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
|
||||
// 发送验证码
|
||||
onSetCode(e) {
|
||||
if (this.readonly) {
|
||||
return;
|
||||
}
|
||||
if (e == 'phone') {
|
||||
if (this.userMes.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userMes.quCode == '' || this.userMes.quCode == 86) {
|
||||
if (!this.$base.phoneRegular.test(this.userMes.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.$http
|
||||
.get('book/user/sms/sendcode', {
|
||||
phone: this.userMes.phone,
|
||||
areaCode: this.userMes.quCode,
|
||||
type: 2000
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: '验证码发送成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.emPHCode();
|
||||
});
|
||||
}
|
||||
if (e == 'email') {
|
||||
if (!this.userMes.email) {
|
||||
uni.showToast({
|
||||
title: '请输入邮箱',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.$base.mailRegular.test(this.userMes.email)) {
|
||||
uni.showToast({
|
||||
title: '邮箱格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$http
|
||||
.get('book/user/getMailCaptcha', {
|
||||
email: this.userMes.email
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: '验证码发送成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.emPHCode();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 手机
|
||||
chosePhone(e) {
|
||||
this.userMes.code = this.userMes.phonecode
|
||||
if (this.userMes.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userMes.code == '' || this.userMes.code == null) {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let that = this
|
||||
$http.request({
|
||||
url: "book/user/updateUserTel",
|
||||
method: "POST",
|
||||
data: this.userMes,
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(function(res) {
|
||||
if (res.code == 0) {
|
||||
that.getData();
|
||||
that.phoneShow = false
|
||||
uni.showToast({
|
||||
title: "绑定手机号成功"
|
||||
});
|
||||
}
|
||||
}).catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 邮箱
|
||||
choseEmail(e) {
|
||||
|
||||
this.userMes.code = this.userMes.emailcode
|
||||
if (this.userMes.email == '') {
|
||||
uni.showToast({
|
||||
title: '请输入邮箱',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userMes.code == '' || this.userMes.code == null) {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let that = this
|
||||
$http.request({
|
||||
url: "book/user/updateUserEmail",
|
||||
method: "POST",
|
||||
data: this.userMes,
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(function(res) {
|
||||
if (res.code == 0) {
|
||||
that.getData();
|
||||
that.emailShow = false
|
||||
uni.showToast({
|
||||
title: "绑定邮箱成功"
|
||||
});
|
||||
}
|
||||
}).catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
// 头像
|
||||
choseAvatar(e) {
|
||||
let that = this
|
||||
if (that.fileAvatar.length == 0) {
|
||||
uni.showToast({
|
||||
title: "请选择图片",
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
that.userMes.avatar = that.fileAvatar[0].url
|
||||
that.choseData()
|
||||
that.avatarShow = false
|
||||
that.fileAvatar.splice(0, 1)
|
||||
},
|
||||
// 年龄
|
||||
choseAge(e) {
|
||||
let that = this
|
||||
if (that.userMes.age <= 0) {
|
||||
uni.showToast({
|
||||
title: "年龄不能小于0",
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
that.choseData()
|
||||
that.ageShow = false
|
||||
},
|
||||
|
||||
// 昵称
|
||||
choseNickname(e) {
|
||||
let that = this
|
||||
if (e && e != '') {
|
||||
that.choseData()
|
||||
that.nicknameShow = false
|
||||
} else {
|
||||
that.userMes.nickname = that.userMes.oldName
|
||||
console.log(that.userMes.nickname)
|
||||
uni.showToast({
|
||||
title: '昵称不可为空',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 性别
|
||||
choseSex(e) {
|
||||
let that = this
|
||||
that.userMes.sex = e
|
||||
that.choseData()
|
||||
that.sexShow = false
|
||||
},
|
||||
|
||||
// 修改密码
|
||||
chosePassword() {
|
||||
if (!this.passwordOk) {
|
||||
console.log('不满足密码格式', this.passNote)
|
||||
uni.showToast({
|
||||
title: this.passNote,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let that = this
|
||||
|
||||
if (that.userMiMa.Repassword == '' || that.userMiMa.password == '') {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "请输入密码!"
|
||||
});
|
||||
return
|
||||
}
|
||||
if (that.userMiMa.Repassword != that.userMiMa.password) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "两次密码输入不一致!"
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
$http.request({
|
||||
url: "book/user/updateUserPassword",
|
||||
method: "POST",
|
||||
data: that.userMiMa,
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(function(res) {
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: "修改成功"
|
||||
});
|
||||
that.passwordShow = false
|
||||
}
|
||||
}).catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 修改个人资料
|
||||
choseData() {
|
||||
let that = this
|
||||
$http.request({
|
||||
url: "book/user/update",
|
||||
method: "POST",
|
||||
data: that.userMes,
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(function(res) {
|
||||
if (res.code == 0) {
|
||||
that.getData();
|
||||
// that.$forceUpdate()
|
||||
uni.showToast({
|
||||
title: "修改成功"
|
||||
});
|
||||
}
|
||||
}).catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 头像上传
|
||||
afterRead(e) {
|
||||
let that = this
|
||||
uni.uploadFile({
|
||||
url: this.$baseUrl + 'oss/fileoss',
|
||||
filePath: e.file[0].url,
|
||||
name: 'file',
|
||||
formData: {},
|
||||
success: (res) => {
|
||||
that.fileAvatar.push({
|
||||
url: JSON.parse(res.data).url
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 删除图片
|
||||
deletePic() {
|
||||
let that = this
|
||||
that.fileAvatar.splice(0, 1)
|
||||
closeManager() {
|
||||
this.submitInfo = {};
|
||||
this.showSubmitInfoBlank = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
.btn_box {
|
||||
margin-top: 40rpx;
|
||||
padding: 10px;
|
||||
|
||||
button {
|
||||
font-size: 32rpx;
|
||||
background-color: #e5e5e5;
|
||||
color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
|
||||
&.active {
|
||||
@include theme('btn_bg') color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabulate {
|
||||
.per_list {
|
||||
font-size: 30rpx;
|
||||
background-color: #fff;
|
||||
padding: 0;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
|
||||
|
||||
text.biaoti {
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
margin: 25rpx 0 25rpx 40rpx;
|
||||
}
|
||||
|
||||
text.neirong {
|
||||
color: #888;
|
||||
font-weight: normal;
|
||||
float: right;
|
||||
margin: 25rpx 80rpx 0 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
text.marPer {
|
||||
color: #fff;
|
||||
font-weight: normal;
|
||||
float: right;
|
||||
margin: 25rpx 0 0 0;
|
||||
display: block;
|
||||
border-radius: 10rpx;
|
||||
background-color: #eee;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.per_list_arrow {
|
||||
font-size: 30rpx;
|
||||
background-color: #fff;
|
||||
padding: 0;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
|
||||
|
||||
&:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 20upx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
background-image: url('../../static/icon/icon_right.png');
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.per_mes_img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 120rpx;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 60rpx 50rpx 80rpx 50rpx;
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dp_sex {
|
||||
font-size: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-bottom: 1px solid #ededed;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
display: inline-block;
|
||||
margin-right: 20rpx;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.dp_canBtn {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 25rpx;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.emPHCode {
|
||||
height: 80rpx;
|
||||
width: 200rpx;
|
||||
background-color: #f8f9fb;
|
||||
font-size: 28rpx;
|
||||
padding: 0 14rpx;
|
||||
color: #54a966;
|
||||
line-height: 80rpx;
|
||||
margin: 20rpx 0 0 20rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.quhao {
|
||||
height: 60rpx;
|
||||
width: 240rpx;
|
||||
margin: 1rpx 15rpx 0 0;
|
||||
|
||||
.quhaoSel {
|
||||
|
||||
/deep/.uni-select {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/deep/.uni-select__selector-item {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/deep/.uni-stat__select {
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.container{
|
||||
padding-top: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -176,7 +176,7 @@
|
||||
</view>
|
||||
<view class="commodityyName">
|
||||
{{productInfo.productName}}
|
||||
<span v-if="productInfo.productStock==0" style="color: #aaa;font-size:26rpx;">(无货)</span>
|
||||
<span v-if="productInfo.productStock==0" style="color: #aaa;font-size:26rpx;">(无库存)</span>
|
||||
<view><text class="SoldNumber">已售<span
|
||||
style="padding-left:10rpx;">{{productInfo.sumSales}}</span>件</text></view>
|
||||
</view>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user