地址信息完善

This commit is contained in:
@fawn-nine
2023-11-23 13:59:49 +08:00
parent d097e6da6d
commit d8bebc4bc4
4 changed files with 8176 additions and 7929 deletions

View File

@@ -78,7 +78,8 @@
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 21, "minSdkVersion" : 21,
"targetSdkVersion" : 30 "targetSdkVersion" : 30,
"schemes" : ""
}, },
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {}, "ad" : {},
@@ -114,7 +115,8 @@
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ] "com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
} }
}, },
"idfa" : false "idfa" : false,
"urltypes" : ""
}, },
"icons" : { "icons" : {
"android" : { "android" : {

View File

@@ -57,6 +57,9 @@
<script> <script>
import musicPlay from '@/components/music.vue' import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js'; import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default { export default {
data() { data() {
return { return {
@@ -69,18 +72,45 @@
curTwoCateIndex:0 , // 当前选中的二级分类 curTwoCateIndex:0 , // 当前选中的二级分类
searchList:[], // 搜索结果数组 searchList:[], // 搜索结果数组
showSearchList: false, showSearchList: false,
userMes:{}, // 用户信息
} }
}, },
onLoad() { onLoad() {
this.getUserInfo()
this.getCateList() this.getCateList()
}, },
onHide() { onHide() {
this.showSearchList = false this.showSearchList = false
this.searchList = [] this.searchList = []
}, },
computed: {
...mapState(['userInfo']),
},
methods: { methods: {
// 显示无权限弹窗
showNoRights(){
uni.showModal({
content:"购买‘手模’或者‘脚模’后方可使用此功能",
confirmText:'好的',
showCancel:false,
})
},
// 获取用户详情
getUserInfo(){
// 用户详情
if (this.userInfo.id != undefined) {
this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
console.log(this.userMes,'呼呼')
});
}
},
// 穴位详情 // 穴位详情
gotoDetail(item){ gotoDetail(item){
this.showNoRights()
uni.navigateTo({ uni.navigateTo({
url:"./acupointDetail?id=" + item.id url:"./acupointDetail?id=" + item.id
}) })
@@ -232,6 +262,7 @@
// title: 'focus事件输出值为' + e.value, // title: 'focus事件输出值为' + e.value,
// icon: 'none' // icon: 'none'
// }) // })
this.showNoRights()
this.showSearchList = true this.showSearchList = true
}, },
// cancel(res) { // cancel(res) {

View File

@@ -291,12 +291,9 @@
this.shangIDNum = e.list this.shangIDNum = e.list
} }
// this.getYunFei() // this.getYunFei()
if (this.typeId == 1) {
this.getCartList()
} else if (this.typeId == 0) { this.getData()
this.getShangList(this.shangIDNum); this.getOS()
}
}, },
onShow() { onShow() {
// if (this.typeId == 1) { // if (this.typeId == 1) {
@@ -305,9 +302,13 @@
// } else if (this.typeId == 0) { // } else if (this.typeId == 0) {
// this.getShangList(this.shangIDNum); // this.getShangList(this.shangIDNum);
// } // }
this.getData() if (this.typeId == 1) {
this.getOS() this.getCartList()
this.getUserAddress()
} else if (this.typeId == 0) {
this.getShangList(this.shangIDNum);
}
// this.getUserAddress()
}, },
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
@@ -361,11 +362,15 @@
// console.log(this.addressList,'地址列表') // console.log(this.addressList,'地址列表')
this.adressMoRen = this.addressList[this.adressMoRIndex] this.adressMoRen = this.addressList[this.adressMoRIndex]
console.log(this.adressMoRen, '默认') console.log(this.adressMoRen, '默认')
if(this.adressMoRen != {}){ if(this.adressMoRen != {} && this.adressMoRen.id){
// console.log('运费之前') // console.log('运费之前')
this.getYunFei() this.getYunFei()
}else{ }else{
this.getUserAddress() // this.getUserAddress()
uni.showToast({
title:'获取用户地址失败',
icon: 'none'
})
} }
} }
} }
@@ -459,7 +464,7 @@
key.push({productId: item.productId, quantity:item.productAmount}) key.push({productId: item.productId, quantity:item.productAmount})
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&") // dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
}) })
console.log(key,'this.adressMoRen.areaidpath') // console.log(key,'this.adressMoRen.areaidpath')
$http.request({ $http.request({
// url: "book/buyOrder/calculateTransportPrice/", // url: "book/buyOrder/calculateTransportPrice/",

File diff suppressed because it is too large Load Diff