From 39ec8fdb3491aabf423763c090af1ed53788bfa5 Mon Sep 17 00:00:00 2001
From: "@fawn-nine" <1271023382@qq.com>
Date: Wed, 18 Oct 2023 17:03:48 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=B5=81+=E4=B8=8B=E5=8D=95+=E5=9C=B0?=
=?UTF-8?q?=E5=9D=80=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/baseUrl.js | 4 +--
manifest.json | 17 ++++++---
pages/bookShop/deliverDetail.vue | 2 +-
pages/bookShop/orderLCont.vue | 18 +++++-----
pages/bookShop/orderList.vue | 4 +--
pages/bookShop/settlement.vue | 59 ++++++++++++++++++-------------
pages/bookShop/settlementBook.vue | 4 +--
pages/clock/clock.vue | 17 ++++++---
pages/peanut/mine.vue | 19 ++++++++--
pages/peanut/opeVip.vue | 2 +-
pages/peanut/reCharge.vue | 2 +-
pages/peanut/reCharge1.vue | 2 +-
pages/user/addAddress.vue | 56 +++++++++++++++++++++--------
pages/user/address.vue | 12 ++++---
14 files changed, 142 insertions(+), 76 deletions(-)
diff --git a/config/baseUrl.js b/config/baseUrl.js
index 170cd81..85c9219 100644
--- a/config/baseUrl.js
+++ b/config/baseUrl.js
@@ -7,9 +7,9 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
- baseUrl = "https://api.nuttyreading.com/"; // 线上正式
+ // baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
- // baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
+ baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
// socketUrl = "ws://8.129.186.35:6001/";
} else if (process.env.NODE_ENV === 'production') {
// 生产环境11
diff --git a/manifest.json b/manifest.json
index d79c156..044681c 100644
--- a/manifest.json
+++ b/manifest.json
@@ -37,7 +37,8 @@
},
"distribute" : {
"apple" : {
- "devices" : "universal"
+ "devices" : "universal",
+ "UIBackgroundModes" : [ "audio" ]
},
"android" : {
"permissionPhoneState" : {
@@ -85,7 +86,7 @@
"share" : {
"weixin" : {
"appid" : "wx47134a8f15083734",
- "UniversalLinks" : ""
+ "UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
}
},
"payment" : {
@@ -96,7 +97,7 @@
"weixin" : {
"__platform__" : [ "android" ],
"appid" : "wx47134a8f15083734",
- "UniversalLinks" : ""
+ "UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
}
}
},
@@ -107,7 +108,12 @@
},
"ios" : {
"dSYMs" : false,
- "UIBackgroundModes" : [ "audio" ] // 背景播放音乐
+ "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
+ "capabilities" : {
+ "entitlements" : {
+ "com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
+ }
+ }
},
"icons" : {
"android" : {
@@ -178,7 +184,8 @@
"enable" : true
}
}
- }
+ },
+ "_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274"
}
// 小程序特有相关
diff --git a/pages/bookShop/deliverDetail.vue b/pages/bookShop/deliverDetail.vue
index 46d22eb..68716f3 100644
--- a/pages/bookShop/deliverDetail.vue
+++ b/pages/bookShop/deliverDetail.vue
@@ -86,7 +86,7 @@
this.deliverList = []
uni.showLoading()
this.$http
- .post(`/book/buyorder/queryFMS?orderId=${this.orderId}`)
+ .post(`/book/buyOrder/queryFMS?orderId=${this.orderId}`)
.then(res => {
console.log(res, '物流信息')
if (res && res.code === 0) {
diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue
index 35d861d..f11c688 100644
--- a/pages/bookShop/orderLCont.vue
+++ b/pages/bookShop/orderLCont.vue
@@ -500,7 +500,7 @@
if (res.confirm) {
uni.showLoading()
$http.request({
- url: "book/buyorder/update",
+ url: "book/buyOrder/update",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
@@ -529,16 +529,16 @@
getOrderList() {
console.log('this.orderType',this.orderType)
this.$http
- .post(`book/buyorder/appGetOrderInfo/${this.orderType}?orderId=${this.orderID}`)
+ .get(`book/buyOrder/getOrderInfo?orderId=${this.orderID}`)
.then(res => {
- console.log('res+++',res)
- var seconds = res.buyOrder.timestamp + 30 * 60 + 2 // 过期时间
+ console.log('订单详情',res)
+ var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
var nowSeconds = Math.floor(new Date().getTime() / 1000);
- res.buyOrder.overTime = seconds - nowSeconds
+ res.result.overTime = seconds - nowSeconds
- this.orderContet = res.buyOrder
+ this.orderContet = res.result
this.userRecordid = res.userRecordid
- this.productIDs = res.buyOrder.products.map(item => {
+ this.productIDs = res.result.products.map(item => {
return item.productId
})
// console.log(this.orderContet,'this.orderContet')
@@ -558,7 +558,7 @@
// 获取物流
getdeliverDetails() {
this.$http
- .post(`/book/buyorder/queryFMS?orderId=${this.orderID}`)
+ .post(`/book/buyOrder/queryFMS?orderId=${this.orderID}`)
.then(res => {
if (res && res.code === 0) {
console.log(res, '物流信息')
@@ -587,7 +587,7 @@
success: res => {
if (res.confirm) {
this.$http
- .post('book/buyorder/appDelete?orderId=' + this.orderContet.orderId)
+ .post('book/buyOrder/appDelete?orderId=' + this.orderContet.orderId)
.then(res => {
uni.showToast({
icon: 'none',
diff --git a/pages/bookShop/orderList.vue b/pages/bookShop/orderList.vue
index e2d33c5..41093b3 100644
--- a/pages/bookShop/orderList.vue
+++ b/pages/bookShop/orderList.vue
@@ -189,7 +189,7 @@ import {
// 获取订单列表
getOrderList() {
this.$http
- .post(`book/buyorder/appUserGetlist?userId=${this.userInfo.id}&orderStatus=${this.orderListTab}`)
+ .post(`book/buyOrder/getMyOrderList?userId=${this.userInfo.id}&orderStatus=${this.orderListTab}`)
.then(res => {
res.page.list.forEach((item,index) => {
var seconds = item.timestamp + 30 * 60 + 2 // 过期时间 30分钟+2
@@ -231,7 +231,7 @@ import {
success: res => {
if (res.confirm) {
this.$http
- .post(`book/buyorder/appDelete?orderId=${e.orderId}`)
+ .post(`book/buyOrder/appDelete?orderId=${e.orderId}`)
.then(res => {
uni.showToast({
icon: 'none',
diff --git a/pages/bookShop/settlement.vue b/pages/bookShop/settlement.vue
index 2771bcf..1826461 100644
--- a/pages/bookShop/settlement.vue
+++ b/pages/bookShop/settlement.vue
@@ -3,25 +3,25 @@
-
+
请添加收货地址
-
+
- {{adressMoRen.username}}
+ {{adressMoRen.consigneeName}}
- {{adressMoRen.userphone}}
+ {{adressMoRen.consigneePhone}}
-
+
默认
- {{adressMoRen.areaidpathtext}} {{adressMoRen.useraddress}}
+ {{adressMoRen.province}} {{adressMoRen.city}} {{adressMoRen.county}} {{adressMoRen.useraddress}}
@@ -137,12 +137,12 @@
- {{item.username}}
+ {{item.consigneeName}}
- {{item.userphone}}
+ {{item.consigneePhone}}
-
+
默认
- {{item.areaidpathtext}} {{item.useraddress}}
+ {{item.province}} {{item.city}} {{item.county}}
+ {{item.useraddress}}
@@ -303,6 +304,7 @@
// }
this.getData()
this.getOS()
+ this.getUserAddress()
},
computed: {
...mapState(['userInfo']),
@@ -347,7 +349,8 @@
// 获取地址列表
getUserAddress() {
this.$http
- .post(`book/useraddress/getUserAddress?userId=${this.userInfo.id}`)
+ // .post(`book/useraddress/getUserAddress?userId=${this.userInfo.id}`)
+ .post(`book/userAddress/getUserAddress?userId=${this.userInfo.id}`)
.then(res => {
if (res.code == 0) {
if (res.list.length != 0) {
@@ -450,14 +453,18 @@
let dataToString = ''
// console.log(this.adressMoRen, '默认地址')
this.cartList.forEach((item, index) => {
- key.push({productsid: item.productId, productAmount:item.productAmount})
- dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
+ key.push({productId: item.productId, quantity:item.productAmount})
+ // dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
})
- console.log(this.adressMoRen.areaidpath,dataToString,'this.adressMoRen.areaidpath')
+ console.log(key,'this.adressMoRen.areaidpath')
+
$http.request({
- url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
+ url: "book/buyOrder/calculateTransportPrice/",
+ // url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data:{
+ 'regionCode':this.adressMoRen.regionCode,
+ 'products':key,
loadAnimate:'none', // 请求加载动画
} ,
header: { //默认 无 说明:请求头
@@ -465,11 +472,11 @@
},
}).then(res => {
if (res.code == 0) {
- this.farePrice = res.price
+ this.farePrice = res.result
}else{
this.farePrice = 0
}
- console.log('需要的运费',res.price)
+ console.log('需要的运费',res.result)
this.allPrice()
})
},
@@ -589,12 +596,14 @@
let data = {
buyType: this.typeId, //0- 商品页直接下单 1- 购物车结算
userId: this.userInfo.id, //下单人ID
- 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], //区
- address: this.adressMoRen.useraddress, //地址
+ shippingUser: this.adressMoRen.consigneeName, //收货人姓名
+ userPhone: this.adressMoRen.consigneePhone, //收货人手机号
+
+ // province: this.adressMoRen.areaidpathtext.split(' ')[0], //省
+ // city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
+ // district: this.adressMoRen.areaidpathtext.split(' ')[2], //区
+ //address: this.adressMoRen.useraddress, //地址
+
paymentMethod: this.payType, //支付方式 2支付宝,1微信,3ios内购 4,天医币购买
orderMoney: this.totalPrice, //订单金额
realMoney: this.realPrice, //实收金额
@@ -606,11 +615,11 @@
orderStatus: 0, //订单状态
products: xiaBiao, //订单列表
orderType: "order", //订单类型
- addressId:this.adressMoRen.addressid // 地址ID
+ addressId:this.adressMoRen.id // 地址ID
}
$http.request({
// url: "book/buyorder/save",
- url: "book/buyorder/buySave",
+ url: "book/buyOrder/buySave",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
diff --git a/pages/bookShop/settlementBook.vue b/pages/bookShop/settlementBook.vue
index d97a488..291e32b 100644
--- a/pages/bookShop/settlementBook.vue
+++ b/pages/bookShop/settlementBook.vue
@@ -473,7 +473,7 @@
})
console.log(this.adressMoRen.areaidpath,dataToString,'this.adressMoRen.areaidpath')
$http.request({
- url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
+ url: "book/buyOrder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data:{
loadAnimate:'none', // 请求加载动画
@@ -627,7 +627,7 @@
}
$http.request({
// url: "book/buyorder/save",
- url: "book/buyorder/buysave",
+ url: "book/buyOrder/buysave",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
diff --git a/pages/clock/clock.vue b/pages/clock/clock.vue
index 9431764..a293b52 100644
--- a/pages/clock/clock.vue
+++ b/pages/clock/clock.vue
@@ -727,11 +727,20 @@
// 说点什么
goToSign() {
// images数据处理
- var imgs = []
- imgs = this.formData.images.map(item => {
- return item.url
+ if(this.formData.images.length > 0){
+ var imgs = []
+ imgs = this.formData.images.map(item => {
+ return item.url
- })
+ })
+ }
+ if(this.formData.content == ''){
+ uni.showToast({
+ title: '请输入内容',
+ icon: 'none'
+ })
+ return false
+ }
let data = {
// 'bookId': this.bookid,
"userId": this.userInfo.id,
diff --git a/pages/peanut/mine.vue b/pages/peanut/mine.vue
index 5f715a3..3abcd4a 100644
--- a/pages/peanut/mine.vue
+++ b/pages/peanut/mine.vue
@@ -9,7 +9,7 @@
{{userMes.nickname}}
未设置
-
+
({{userMes.tel}})
-
+
分享App
@@ -131,13 +131,15 @@
userMes: {},
signShow: false,
signContent: '是否要退出登录?',
- playData:{}
+ playData:{},
+ isAndorid:true,
};
},
//第一次加载
onLoad(e) {
// 隐藏原生的tabbar
uni.hideTabBar();
+ this.getOS()
},
computed: {
...mapState(['userInfo'])
@@ -153,6 +155,17 @@
},
//方法
methods: {
+ // 获得操作系统
+ getOS(){
+ let oprateOs = ''
+ oprateOs = uni.getSystemInfoSync().platform
+ // console.log(oprateOs)
+ if(oprateOs == 'android'){
+ this.isAndorid = true
+ }else{
+ this.isAndorid = false
+ }
+ },
haveSelected(data){
console.log(data,' 选择的是')
if(data.index == 0){
diff --git a/pages/peanut/opeVip.vue b/pages/peanut/opeVip.vue
index 4c2d930..e358fbd 100644
--- a/pages/peanut/opeVip.vue
+++ b/pages/peanut/opeVip.vue
@@ -288,7 +288,7 @@
orderType: "vip", //订单类型
}
$http.request({
- url: "book/buyorder/rechargeSave",
+ url: "book/buyOrder/rechargeSave",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
diff --git a/pages/peanut/reCharge.vue b/pages/peanut/reCharge.vue
index b810518..5c55e82 100644
--- a/pages/peanut/reCharge.vue
+++ b/pages/peanut/reCharge.vue
@@ -401,7 +401,7 @@
productId: that.stepsCj.priceTypeId // 充值的类型id
}
$http.request({
- url: "book/buyorder/rechargeSave",
+ url: "book/buyOrder/rechargeSave",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头1
diff --git a/pages/peanut/reCharge1.vue b/pages/peanut/reCharge1.vue
index ef363e9..46817e8 100644
--- a/pages/peanut/reCharge1.vue
+++ b/pages/peanut/reCharge1.vue
@@ -359,7 +359,7 @@
orderType: "point", //订单类型
}
$http.request({
- url: "book/buyorder/rechargeSave",
+ url: "book/buyOrder/rechargeSave",
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
data,
header: { //默认 无 说明:请求头1
diff --git a/pages/user/addAddress.vue b/pages/user/addAddress.vue
index 52ee5d1..2261920 100644
--- a/pages/user/addAddress.vue
+++ b/pages/user/addAddress.vue
@@ -270,7 +270,7 @@
this.addressForm.areaidpathtext = e.value[0].UName + ' ' + e.value[1].UName + ' ' + e.value[2].UName
this.provId = e.value[0].provId
this.cityId = e.value[1].cityId
- this.countyId = e.value[2].countyId
+ this.countyId = e.value[2].regionCode
},
addcancel() { //点击取消按钮
@@ -284,9 +284,9 @@
.then(res => {
let link_add = ''
if (!this.isShowDel) {
- link_add = 'book/useraddress/save'
+ link_add = 'book/userAddress/save'
} else {
- link_add = 'book/useraddress/update'
+ link_add = 'book/userAddress/update'
// this.addconfirm(e)
}
if (this.addressForm.areaidpath == '') {
@@ -296,15 +296,30 @@
});
return
}
- this.addressForm.userid = this.userInfo.id
- if(this.addressChanged){ // 如果修改过地址区域,就重新赋值,否则保持不变
- this.addressForm.areaidpath = `${this.provId}_${this.cityId}_${this.countyId}`
- this.addressChanged = false
- }
- this.addressForm.areaid = this.countyId
- this.addressForm.isdefault = this.addressForm.isDafault ? 1 : 0
+ // this.addressForm.userId = this.userInfo.id
+ // this.addressForm.consigneePhone = this.addressForm.userphone
+ // this.addressForm.consigneeName = this.addressForm.username
+ // this.addressForm.regionCode = ''
+
+ // // this.addressForm.userid = this.userInfo.id
+ // if(this.addressChanged){ // 如果修改过地址区域,就重新赋值,否则保持不变
+ // this.addressForm.areaidpath = `${this.provId}_${this.cityId}_${this.countyId}`
+ // this.addressChanged = false
+ // }
+ // this.addressForm.areaid = this.countyId
+ // this.addressForm.isDefault = this.addressForm.isDafault ? 1 : 0
- let data = this.addressForm
+ // let data = this.addressForm
+ let data = {
+ 'id':this.addressForm.addressid,
+ 'detailAddress' : this.addressForm.useraddress,
+ 'regionCode':this.countyId,
+ 'userId':this.userInfo.id,
+ 'consigneePhone':this.addressForm.userphone,
+ 'consigneeName': this.addressForm.username,
+ 'isDefault':this.addressForm.isDafault ? 1 : 0
+ }
+ console.log(data,'保存参数')
$http.request({
url: link_add,
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
@@ -315,7 +330,7 @@
}).then(res => {
if (res.code == 0) {
uni.showToast({
- title: '地址添加成功',
+ title: '操作成功',
duration: 1000,
});
setTimeout(function() {
@@ -334,17 +349,28 @@
},
changeSwitch(e) {
+ e ? this.addressForm.isdefault = 1 : this.addressForm.isdefault = 0
this.addressForm.isDafault = e
- console.log(this.addressForm)
+ console.log(this.addressForm, e)
},
// 编辑地址获取信息
getAddress() {
this.$http
- .post(`book/useraddress/getUserAddress?userId=${this.userInfo.id}`)
+ .post(`book/userAddress/getUserAddress?userId=${this.userInfo.id}`)
.then(res => {
if (res.code == 0) {
- this.addressForm = res.list[this.editIndex]
+ this.addressForm = {
+ 'useraddress':res.list[this.editIndex].detailAddress,
+ 'userphone':res.list[this.editIndex].consigneePhone,
+ 'username':res.list[this.editIndex].consigneeName,
+ 'isdefault':res.list[this.editIndex].isDefault,
+ 'isDafault':res.list[this.editIndex].isDefault == 1 ? true : false,
+ 'areaidpathtext':res.list[this.editIndex].province + res.list[this.editIndex].city + res.list[this.editIndex].county
+ ,'addressid':res.list[this.editIndex].id
+ }
+ this.countyId = res.list[this.editIndex].regionCode
+ // this.addressForm = res.list[this.editIndex]
if (this.addressForm.isdefault == 1) {
this.addressForm.isDafault = true
}
diff --git a/pages/user/address.vue b/pages/user/address.vue
index 45320f9..ca8a335 100644
--- a/pages/user/address.vue
+++ b/pages/user/address.vue
@@ -10,18 +10,19 @@
- {{item.username}}
+ {{item.consigneeName}}
- {{item.userphone}}
+ {{item.consigneePhone}}
-
+
默认
- {{item.areaidpathtext}} {{item.useraddress}}
+ {{item.province}} {{item.city}} {{item.county}}
+ {{item.detailAddress}}
@@ -63,7 +64,8 @@
methods: {
getUserAddress() {
this.$http
- .post(`book/useraddress/getUserAddress?userId=${this.userInfo.id}`)
+ .post(`book/userAddress/getUserAddress?userId=${this.userInfo.id}`)
+ // .post(`book/useraddress/getUserAddress?userId=${this.userInfo.id}`)
.then(res => {
if (res.code == 0) {
this.addressList = res.list