lin
2026-05-06 1af4b2e328aaf4d92bbbbf5780f6e69a8062cec9
UI: 齐享购新增跳转第三方链接banner图功能
3 files modified
1 files added
81 ■■■■■ changed files
manifest.json 4 ●●●● patch | view | raw | blame | history
pages.json 12 ●●●●● patch | view | raw | blame | history
pages/index/index.vue 17 ●●●● patch | view | raw | blame | history
pages/web/web-linkUrl.vue 48 ●●●●● patch | view | raw | blame | history
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" : {
pages.json
@@ -239,6 +239,18 @@
            "style": {
                "navigationBarTitleText": "协议"
            }
        },
        {
            "path": "pages/web/web-linkUrl",
            "style": {
              "navigationBarTitleText": "",
              "navigationBarBackgroundColor": "#FFFFFF",
              "app-plus": {
                "titleNView": {
                  "type": "default"
                }
              }
            }
        }
    ],
    "tabBar": {
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
pages/web/web-linkUrl.vue
New file
@@ -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>