From 04fa3f6c2df30f333b9efa447ffd923a9f9d6620 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Thu, 26 Sep 2024 17:02:09 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 32 ++++++++++++++-
components/base/contactActionSheet.vue | 47 ++++++++++++++++++++++
components/tourGuide/locations.vue | 20 +++++----
mixins/list.js | 16 ++++++--
pages/index/tourGuide.vue | 42 +++++++++++++------
pages_order/components/address/addressList.vue | 2 +-
.../components/submit/StudyAndPathDetailSubmit.vue | 9 ++++-
pages_order/mine/address.vue | 3 +-
pages_order/product/productDetail.vue | 19 ++++-----
pages_order/service/StudyAndPathDetail.vue | 8 ++++
pages_order/service/heritagePath.vue | 6 +--
pages_order/service/reservationDetail.vue | 46 ++++++++-------------
pages_order/service/situation.vue | 3 +-
store/store.js | 16 +++++---
14 files changed, 191 insertions(+), 78 deletions(-)
create mode 100644 components/base/contactActionSheet.vue
diff --git a/api/api.js b/api/api.js
index 7033eeb..04a98f0 100644
--- a/api/api.js
+++ b/api/api.js
@@ -70,6 +70,12 @@ const config = {
method: 'GET',
showLoading: true,
},
+ // 根据id获取景区详情
+ queryAreaListById: {
+ url: '/info/queryAreaListById',
+ method: 'GET',
+ showLoading: true,
+ },
// 根据id获取文章详情
queryArticleById: {
url: '/info/queryArticleById',
@@ -178,6 +184,30 @@ const config = {
method: 'GET',
showLoading: true,
},
+ // 添加收藏
+ addCollection: {
+ url: '/user/addCollection',
+ method: 'POST',
+ showLoading: true,
+ },
+ // 获取收藏列表
+ queryCollectionList: {
+ url: '/user/queryCollectionList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 添加购物车
+ addShopcar: {
+ url: '/user/addShopcar',
+ method: 'POST',
+ showLoading: true,
+ },
+ // 获取购物车列表
+ queryShopcarList: {
+ url: '/user/queryShopcarList',
+ method: 'GET',
+ showLoading: true,
+ },
@@ -279,6 +309,4 @@ export function api(key, data, callback, loadingTitle) {
loadingTitle || req.showLoading, loadingTitle || req.loadingTitle)
}
-
-
export default api
\ No newline at end of file
diff --git a/components/base/contactActionSheet.vue b/components/base/contactActionSheet.vue
new file mode 100644
index 0000000..045953c
--- /dev/null
+++ b/components/base/contactActionSheet.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
diff --git a/components/tourGuide/locations.vue b/components/tourGuide/locations.vue
index 8d2b389..d973191 100644
--- a/components/tourGuide/locations.vue
+++ b/components/tourGuide/locations.vue
@@ -25,25 +25,26 @@
-
-
+
+
+
- 陶阳里景区
+ {{ area.areaName }}
- 6个遗产点
+ {{ spotGuide.length }}个遗产点
+ @click="textToSpeech(area.areaBrief)">
语音讲解
@@ -118,7 +119,7 @@
// }
import { mapState, mapGetters } from 'vuex'
export default {
- props : ['spotGuide', 'spotGuideMarkers'],
+ props : ['spotGuide', 'spotGuideMarkers', 'area'],
data() {
return {
latitude: 23.106574, //纬度
@@ -126,7 +127,10 @@
scale: 12, //缩放级别
show : true,
context : uni.createInnerAudioContext(),
- tabs : ['文化遗产', '路径定制', '找厕所', '找美食', '找民宿'],
+ tabs : ['文化遗产',
+ // '路径定制',
+ '找厕所'
+ , '找美食', '找民宿'],
}
},
computed : {
diff --git a/mixins/list.js b/mixins/list.js
index 9df67ad..e2bb324 100644
--- a/mixins/list.js
+++ b/mixins/list.js
@@ -1,8 +1,18 @@
+
function query(self, queryParams){
- return (self.beforeGetData && self.beforeGetData()) ||
- queryParams || self.queryParams
+ // return (self.beforeGetData && self.beforeGetData()) ||
+ // queryParams || self.queryParams
+
+ // 深度合并对象
+ return self.$utils.deepMergeObject(
+
+ self.$utils.deepMergeObject(self.queryParams,
+
+ (self.beforeGetData && self.beforeGetData()) || {}),
+
+ queryParams)
}
@@ -31,7 +41,7 @@ export default {
uni.stopPullDownRefresh()
if(res.code == 200){
- this.getDataThen && this.getDataThen(res.result)
+ this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
success(res.result)
diff --git a/pages/index/tourGuide.vue b/pages/index/tourGuide.vue
index 4369b7c..b511766 100644
--- a/pages/index/tourGuide.vue
+++ b/pages/index/tourGuide.vue
@@ -15,6 +15,7 @@
@@ -36,26 +37,31 @@
// scale: 12, //缩放级别
// bottomData: false,
// mapCtx: null,
- markers:[
- // { //标记点A 的信息
- // iconPath: "/static/logo.png", //图标
- // id: 0,
- // width: 20, //图标icon 宽度
- // height: 28 ,//图标icon 高度
- // latitude: 26.1272,
- // longitude: 113.11659
- // }
- ],
-
+ // markers:[
+ // // { //标记点A 的信息
+ // // iconPath: "/static/logo.png", //图标
+ // // id: 0,
+ // // width: 20, //图标icon 宽度
+ // // height: 28 ,//图标icon 高度
+ // // latitude: 26.1272,
+ // // longitude: 113.11659
+ // // }
+ // ],
+ area : [],
}
},
- onLoad() {
- // this.$store.commit('')
+ onLoad(args) {
+ if(args.areaId){
+ this.$store.commit('setAreaId', args.areaId)
+ }else{
+ this.$store.commit('setAreaId', this.spotList[0].areaId)
+ }
},
onShow(){
},
computed: {
...mapGetters(['spotGuide', 'spotGuideMarkers']),
+ ...mapState(['areaId', 'spotList']),
},
onShow() {
// this.mapCtx = wx.createMapContext('map');
@@ -68,8 +74,18 @@
// console.log('fail', e);
// },
// });
+ this.queryAreaListById()
},
methods: {
+ queryAreaListById(){
+ this.$api('queryAreaListById', {
+ areaId : this.areaId
+ }, res => {
+ if(res.code == 200){
+ this.area = res.result
+ }
+ })
+ },
//地图点击事件
markertap(e) {
console.log("===你点击了标记点===", e)
diff --git a/pages_order/components/address/addressList.vue b/pages_order/components/address/addressList.vue
index 04ba2b9..ae27ad3 100644
--- a/pages_order/components/address/addressList.vue
+++ b/pages_order/components/address/addressList.vue
@@ -95,7 +95,7 @@
this.addressList = res.result.records || [];
this.total = res.result.total || 0;
this.addressList.forEach(n => { //筛选默认地址
- if (n.defaultId == '1') {
+ if (n.addressDefault == '1') {
this.selectAddress = n.id
}
})
diff --git a/pages_order/components/submit/StudyAndPathDetailSubmit.vue b/pages_order/components/submit/StudyAndPathDetailSubmit.vue
index 4c63d40..767ce6c 100644
--- a/pages_order/components/submit/StudyAndPathDetailSubmit.vue
+++ b/pages_order/components/submit/StudyAndPathDetailSubmit.vue
@@ -2,7 +2,7 @@
+
+
+