From d1ff3494cea868009ce9e125547d4da807350737 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Sun, 29 Sep 2024 21:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B7=B3=E8=BD=AC=E9=A2=84?= =?UTF-8?q?=E7=BA=A6=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 21 ++++-- components/list/videoList.vue | 26 +++++++- components/tourGuide/locations.vue | 14 +++- config.js | 4 +- pages/index/center.vue | 11 +-- pages_order/auth/wxUserInfo.vue | 4 +- pages_order/components/product/cartAction.vue | 6 +- .../components/submit/StudyAndPathDetailSubmit.vue | 8 ++- pages_order/mine/cart.vue | 23 +++---- pages_order/mine/collect.vue | 78 ++++++++++++++++++---- pages_order/mine/volunteer.vue | 77 +++++++++++++++------ store/store.js | 16 ++--- 12 files changed, 213 insertions(+), 75 deletions(-) diff --git a/api/api.js b/api/api.js index 7794465..7104ac2 100644 --- a/api/api.js +++ b/api/api.js @@ -28,13 +28,21 @@ const config = { // 修改个人信息接口 updateInfo: { - url: '/info/updateInfo', + url: '/user/updateHanHaiMemberById', method: 'POST', auth: true, limit: 500, showLoading: true, }, + // 获取个人信息接口 + getInfo: { + url: '/user/queryHanHaiMemberById', + method: 'GET', + auth: true, + showLoading: true, + }, + //隐私政策 getPrivacyPolicy: { url: '/login/getPrivacyPolicy', @@ -236,26 +244,31 @@ const config = { // 添加购物车 addShopcar: { url: '/wares/addShopcar', - method: 'GET', + method: 'POST', showLoading: true, + auth: true, }, // 获取购物车列表 queryShopcarList: { url: '/wares/queryShopcarList', method: 'GET', showLoading: true, + auth: true, }, // 取消购物车 deleteShopcar: { url: '/wares/deleteShopcar', - method: 'GET', + method: 'DELETE', showLoading: true, + auth: true, }, // 修改购物车信息 updateShopcar: { url: '/wares/updateShopcar', - method: 'GET', + method: 'POST', showLoading: true, + debounce : 500, + auth: true, }, } diff --git a/components/list/videoList.vue b/components/list/videoList.vue index 681d3eb..e547285 100644 --- a/components/list/videoList.vue +++ b/components/list/videoList.vue @@ -5,7 +5,7 @@ @scrolltolower="loadMoreData"> + @click="showVideo(item, index)"> @@ -32,6 +32,7 @@ diff --git a/pages_order/mine/cart.vue b/pages_order/mine/cart.vue index 6b30447..196d687 100644 --- a/pages_order/mine/cart.vue +++ b/pages_order/mine/cart.vue @@ -18,7 +18,7 @@ - {{ item.waresTitle }} + {{ item.wares.waresTitle }} - @@ -45,7 +45,7 @@ --> - ¥{{ item.waresPrice }}元 + ¥{{ item.wares.waresPrice }} @@ -88,19 +88,18 @@ }, methods: { valChange(item, e){ - console.log(e.value); - // this.$api('updateShopcar', { - // id : item.id, - // shopcarNumber : e.value, - // }) + this.$api('updateShopcar', { + id : item.shopcar.id, + shopcarNumber : e.value, + }) }, // 删除购物车 delCart(item, index){ this.$api('deleteShopcar', { - shopcarId : item.id + shopcarId : item.shopcar.id }, res => { if(res.code == 200){ - this.getData() + this.$store.commit('getCartList') uni.showToast({ title: '删除成功', }); diff --git a/pages_order/mine/collect.vue b/pages_order/mine/collect.vue index 58db8c6..8f6d860 100644 --- a/pages_order/mine/collect.vue +++ b/pages_order/mine/collect.vue @@ -15,7 +15,7 @@ v-slot="{item,index}" > - + @@ -57,6 +57,8 @@ || item.waresPrice}}起 ¥线上预约 @@ -81,30 +83,43 @@ return { tabs: [ // { - // name: '文化遗产' + // name: '文化遗产', // }, { - name: '遗产讲述' + name: '遗产讲述', + toUrlType : 0, + toPayUrlType : 1, }, { - name: '达人同游' + name: '达人同游', + toUrlType : 1, + toPayUrlType : 2, }, { - name: '遗产路径' + name: '遗产路径', + toUrlType : 0, + toPayUrlType : 0, }, { - name: '我要跟拍' + name: '我要跟拍', + toUrlType : 2, + toPayUrlType : 3, }, { - name: '非遗体验' + name: '非遗体验', + toUrlType : 2, + toPayUrlType : 4, }, { - name: '我要研学' + name: '我要研学', + toUrlType : 1, + toPayUrlType : 5, }, { - name: '文创好物' + name: '文创好物', }, ], + type : [], mixinsListApi : 'queryCollectionList', options: [ { @@ -134,7 +149,28 @@ this.getData() }, toUrl(item){ - + let type = this.tabs[item.collectionType].toUrlType + if([0, 1, 3].includes(item.collectionType)){ + // 遗产讲述、达人同游、我要跟拍 + uni.navigateTo({ + url: `/pages_order/service/reservationDetail?type=${type}&id=` + item.id + }) + }else if([2, 5].includes(item.collectionType)){ + // 遗产路径、我要研学 + uni.navigateTo({ + url: `/pages_order/service/StudyAndPathDetail?type=${type}&id=` + item.id + }) + }else if([4].includes(item.collectionType)){ + // 非遗体验 + uni.navigateTo({ + url: `/pages_order/service/articleDetail?type=${type}&id=` + item.id + }) + }else if([6].includes(item.collectionType)){ + // 文创好物 + uni.navigateTo({ + url: `/pages_order/product/productDetail?&id=` + item.id + }) + } }, delModel(item){ let self = this @@ -145,7 +181,8 @@ return } self.$api('deleteCollection', { - collectionId : item.id + collectionId : item.id, + collectionType : item.collectionType }, res => { self.getData() }) @@ -153,14 +190,27 @@ }) }, getData(){ - this.$api(this.mixinsListApi, this.queryParams, + let queryParams = JSON.parse(JSON.stringify(this.queryParams)) + this.$api(this.mixinsListApi, queryParams, res => { uni.stopPullDownRefresh() if(res.code == 200){ + + res.result.forEach(n => { + n.collectionType = queryParams.collectionType + }) + this.list = res.result + } }) }, + toPayUrl(item){ + let type = this.tabs[item.collectionType].toPayUrlType + uni.navigateTo({ + url: `/pages_order/order/orderSubscribe?payType=${type}&id=` + item.id + }) + }, } } diff --git a/pages_order/mine/volunteer.vue b/pages_order/mine/volunteer.vue index edb6bc5..a20dce3 100644 --- a/pages_order/mine/volunteer.vue +++ b/pages_order/mine/volunteer.vue @@ -11,7 +11,7 @@ 姓名 - + @@ -19,38 +19,46 @@ 证件类型 - + 证件号码 - + 手机号码 - -