From 1af4b2e328aaf4d92bbbbf5780f6e69a8062cec9 Mon Sep 17 00:00:00 2001
From: lin <1005713861@163.com>
Date: Wed, 06 May 2026 15:42:31 +0800
Subject: [PATCH] UI: 齐享购新增跳转第三方链接banner图功能
---
manifest.json | 4 +-
pages.json | 12 ++++++
pages/index/index.vue | 17 +++++++-
pages/web/web-linkUrl.vue | 48 ++++++++++++++++++++++++
4 files changed, 77 insertions(+), 4 deletions(-)
diff --git a/manifest.json b/manifest.json
index 4cb53e3..04ed8d5 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "齐享购",
"appid" : "__UNI__3333B1D",
"description" : "",
- "versionName" : "1.4.0",
- "versionCode" : 140,
+ "versionName" : "1.4.1",
+ "versionCode" : 141,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/pages.json b/pages.json
index 804a26d..2144bb3 100644
--- a/pages.json
+++ b/pages.json
@@ -239,6 +239,18 @@
"style": {
"navigationBarTitleText": "协议"
}
+ },
+ {
+ "path": "pages/web/web-linkUrl",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "app-plus": {
+ "titleNView": {
+ "type": "default"
+ }
+ }
+ }
}
],
"tabBar": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6270525..4aaef71 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -41,9 +41,13 @@
</view>
</view>
- <view class="banner">
+ <view class="banner" v-if="bannerData.length">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :indicator-color="indicatorColor" :autoplay="autoplay" :indicator-active-color="indicatorActiveColor" :interval="interval" :duration="duration">
- <swiper-item v-for="(item, index) in bannerData" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + item.goodsid)">
+ <!-- <swiper-item @tap="gotoUrl" v-if="bannerData.length>2">
+ <image lazy-load src="/static/imgs/sBanner.png" mode=""></image>
+ </swiper-item> -->
+ <!-- <swiper-item v-for="(item, index) in bannerData" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + item.goodsid)"> -->
+ <swiper-item v-for="(item, index) in bannerData" @tap="gotoUrl(item)">
<image lazy-load :src="item.icon" mode=""></image>
</swiper-item>
</swiper>
@@ -167,6 +171,15 @@
// #endif
},
methods: {
+ gotoUrl(data) {
+ if(data.sort === 100) { // data.sort === 100:跳转第三方,否则跳转产品详情
+ uni.navigateTo({
+ url: '/pages/web/web-linkUrl?src=' + 'https://equity.dm-cube.com/#/entrance/login?sourceCode=H5_gongzhonghao_null_kefu_null_3&platform=h5&account=h5&redirection=%252Fpage%253Fplatform%253Dh5%2526sourceCode%253DH5_gongzhonghao_null_kefu_null_3%2526account%253Dh5',
+ })
+ } else { // 跳转产品详情
+ this.$util.goPages('/pages/ginfo/ginfo?id=' + data.goodsid)
+ }
+ },
getData () {
this.$util.post('Goods/getIndexData').then(res => {
this.bannerData = res.data.bannerData
diff --git a/pages/web/web-linkUrl.vue b/pages/web/web-linkUrl.vue
new file mode 100644
index 0000000..76d8053
--- /dev/null
+++ b/pages/web/web-linkUrl.vue
@@ -0,0 +1,48 @@
+<template>
+ <view class="content">
+ <!-- #ifdef APP-PLUS -->
+ <web-view :src="src"></web-view>
+ <!-- #endif -->
+ <!-- #ifdef H5 -->
+ <iframe class="iframe" :src="src" frameborder="0"></iframe>
+ <!-- #endif -->
+ </view>
+</template>
+
+<script>
+export default {
+
+ data() {
+ return {
+ src: null,
+ title: null,
+ hideRightIcon: false,
+ };
+ },
+ onLoad(option) {
+ if (option && option.src) {
+ this.src = option.src;
+ }
+ },
+};
+</script>
+
+<style>
+/* #ifdef H5 */
+.iframe {
+ width: 100%;
+ overflow: hidden;
+ height: 100%;
+}
+.content {
+ height: calc(100vh - 44px);
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ background: rgb(217, 181, 152);
+}
+.iframe {
+ flex: 1;
+}
+/* #endif */
+</style>
--
Gitblit v1.9.3