From 761c9ba002c85fae3b63cb9c23fbe1ce75e72549 Mon Sep 17 00:00:00 2001 From: Tuzki <1720599558@qq.com> Date: Thu, 26 Dec 2024 15:51:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(index):=20=E6=B7=BB=E5=8A=A0=E8=BD=AE?= =?UTF-8?q?=E6=92=AD=E5=9B=BE=E5=B9=B6=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在首页添加第二个轮播图 - 实现轮播图点击跳转不同页面的功能 - 优化 Ai 页面的用户信息获取和 WebSocket 连接逻辑 - 新增 action 页面 --- pages/index/index.vue | 24 ++++++++++++++++++------ subPageC/Ai/index.vue | 25 +++++++++++++++++++++++-- subPageC/action/index.vue | 19 +++++++++++++++++++ 3 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 subPageC/action/index.vue diff --git a/pages/index/index.vue b/pages/index/index.vue index a47e7db..f23b64b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -124,8 +124,8 @@ - + @@ -311,7 +311,11 @@ images: [], guanggaoList: [{ url: 'https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/guanggao.png' - }], + }, + { + url: 'https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/guanggao1.png' + } + ], cla: "swp_1_img dhua", cla2: "swp_1_img dhua2", clas: ["swp_1_img dhua", "swp_1_img dhua2"], @@ -399,9 +403,17 @@ // }); }, clickSwiper(e) { - uni.navigateTo({ - url: "/subPageB/Homestay/homestaylist/homestaylist", - }); + console.log(e) + if(e == 0){ + uni.navigateTo({ + url: "/subPageB/Homestay/homestaylist/homestaylist", + }); + }else{ + uni.navigateTo({ + url: "/subPageC/action/index", + }); + } + // uni.showToast({ // title: "功能正在开发中~", // icon: "none", diff --git a/subPageC/Ai/index.vue b/subPageC/Ai/index.vue index 5f7798b..fa0f2e5 100644 --- a/subPageC/Ai/index.vue +++ b/subPageC/Ai/index.vue @@ -106,6 +106,16 @@ //是否长按事件 islongPress: false, timer: null, //长按计时器 + + param: { + pageSize: 10, + pageNo: 1, + noData: false, + loading: false, + finished: false, + openid: undefined, + appid: undefined, + }, } }, onUnload() { @@ -116,8 +126,19 @@ this.outWs() }, onShow() { - this.getUserInfo() - this.connectWs() + const userInfo = uni.getStorageSync("userInfo"); + const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {}; + let appId = extConfig.app_id + + this.param.openid = userInfo.openid + this.param.appid = appId + + this.$Request.get(this.$config.getHomestayOrderList, this.param, null, null, false, true).then((res) => { + this.getUserInfo() + this.connectWs() + }).catch(err=>{ + console.log(err) + }); }, created: function() { const res = uni.getSystemInfoSync(); diff --git a/subPageC/action/index.vue b/subPageC/action/index.vue new file mode 100644 index 0000000..8c3b35f --- /dev/null +++ b/subPageC/action/index.vue @@ -0,0 +1,19 @@ + + + + +