zhaojs
2023-06-26 8a55298d7e388113c05bd70a549f17a6e7aacee8
返利页添加轮播图
已修改12个文件
243 ■■■■ 文件已修改
uniapp/App.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/colGoods.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/colGoodsImg.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/indexPage.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/active/dysearch.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/active/jdSearch.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/active/pddsearch.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/active/tmsearch.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/active/vipsearch.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/index/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/rankinglist/common_act.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/utils/utils.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/App.vue
@@ -175,7 +175,6 @@
                var route = routes[routes.length - 1].route
            }
            // #ifdef APP-PLUS
            console.log(this.globalData.canlisten)
            if (this.globalData.canlisten && route != 'pages/mine/tools/turnChain') {
                getClipboard()
            }
@@ -210,7 +209,6 @@
                var that = this;
                that.globalData.hasinit=true;
                this.$u.api.comminInt({}).then(e => {
                    console.log(e)
                    if (e.code != 0) 
                    {
                        that.globalData.hasinit=false;
uniapp/components/colGoods.vue
@@ -55,6 +55,8 @@
        props: {
            items: Object
        },
        created(){
        },
        data() {
            return {
uniapp/components/colGoodsImg.vue
@@ -1,16 +1,18 @@
<template>
    <view class="items-container borderBox colCen">
        <swiper class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular>
            <swiper-item v-for="(items,index) in popBannerSList" :key='index'>
                <view class="swiper-item defIcon" @click="goUrl(items)">
                    <image :src="items.image" mode="aspectFit"></image>
                </view>
            </swiper-item>
        </swiper>
    </view>
    <swiper style="height: 100%;" class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular>
        <swiper-item v-for="(items,index) in popBannerSList" :key='index'>
            <view class="swiper-item defIcon" style="width: 100%;height: 100%;" @click="goUrl(items)">
                <image :src="items.image" mode="aspectFit"></image>
            </view>
        </swiper-item>
    </swiper>
    <!-- <view class="swiper-container swiper-box swiper-item">
    </view> -->
</template>
<script>
    import utils from '@/utils/utils.js'
    export default {
        props: {
            popBannerSList: Array
@@ -23,14 +25,20 @@
        created()
        {
            console.log(this.popBannerSList);
        },
        methods:
        {
            goUrl(info)
            {
                console.log(info);
                utils.goUrl(info, this)
            }
        }
}
</script>
<style>
    .items-container {
        width: 346rpx;
        height: 100%;
        .swiper-box {
            width: 100%;
            height: 100%;
@@ -40,5 +48,5 @@
                height: 100%;
            }
        }
    }
</style>
uniapp/components/indexPage.vue
@@ -626,7 +626,6 @@
                this.$u.api.getBanner({
                    type: '1,3,4,5,11,12,13,14'
                }).then(e => {
                    console.log(e)
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    if(res.topBannerList&&res.topBannerList.length>0)
@@ -700,7 +699,6 @@
                    pageSize: 10,
                    type: type
                }).then(e => {
                    console.log(e)
                    if (e.code != 0) return that.$alert(e.msg)
                    var res = e.data.list;
                    if (res.length < 10) {
uniapp/pages/active/dysearch.vue
@@ -65,7 +65,8 @@
            <view class="goodsList-container colCen borderBox">
                <view class="goods-content rowStaBet">
                    <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                        <colGoods :items="items"></colGoods>
                          <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg>
                        <colGoods v-else :items="items"></colGoods>
                    </view>
                    <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
                </view>
@@ -76,12 +77,15 @@
<script>
    import colGoods from '../../components/colGoods.vue'
    import colGoodsImg from '../../components/colGoodsImg.vue'
    export default {
        components:{
            colGoods
            colGoods,
            colGoodsImg
        },
        data() {
            return {
                popBannerSList:[],
                pageTop: 0,
                nowCurrent: 0,
                scrollTop: 0,
@@ -96,7 +100,8 @@
            }
        },
        onLoad() {
            this.getNav()
            this.getNav();
            this.getPageImg();
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop
@@ -117,6 +122,24 @@
            }).exec();
        },
        methods: {
            getPageImg()
            {
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,18'
                }).then(e => {
                    console.log(e)
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    this.popBannerSList=res.dyImg;
                    if(res.dyImg&&res.dyImg.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                    }
                }).catch(function(err) {
                    console.log(err)
                })
            },
            getNav() {
                var that = this;
                this.$u.api.getHdkCategoryList({type:4}).then(e => {
@@ -193,9 +216,12 @@
            },
            goDetail(info) {
                uni.navigateTo({
                    url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                })
                if(info&&info!=undefined)
                {
                    uni.navigateTo({
                        url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                    })
                }
            },
            goback() {
uniapp/pages/active/jdSearch.vue
@@ -65,7 +65,8 @@
            <view class="goodsList-container colCen borderBox">
                <view class="goods-content rowStaBet">
                    <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                        <colGoods :items="items"></colGoods>
                         <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg>
                        <colGoods v-else :items="items"></colGoods>
                    </view>
                    <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
                </view>
@@ -77,12 +78,15 @@
<script>
    import colGoods from '../../components/colGoods.vue'
    import colGoodsImg from '../../components/colGoodsImg.vue'
    export default {
        components:{
            colGoods
            colGoods,
            colGoodsImg
        },
        data() {
            return {
                popBannerSList:[],
                pageTop: 0,
                nowCurrent: 0,
                scrollTop: 0,
@@ -97,7 +101,8 @@
            }
        },
        onLoad() {
            this.getNav()
            this.getNav();
            this.getPageImg();
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop
@@ -118,6 +123,24 @@
            }).exec();
        },
        methods: {
            getPageImg()
            {
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,17'
                }).then(e => {
                    console.log(e);
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    this.popBannerSList=res.jdImg;
                    if(res.jdImg&&res.jdImg.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                    }
                }).catch(function(err) {
                    console.log(err)
                })
            },
            getNav() {
                var that = this;
                this.$u.api.getTopCalss({ctype:3}).then(e => {
@@ -164,9 +187,12 @@
            },
            goDetail(info) {
                uni.navigateTo({
                    url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                })
                if(info&&info!=undefined)
                {
                    uni.navigateTo({
                        url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                    })
                }
            },
            goback() {
uniapp/pages/active/pddsearch.vue
@@ -65,7 +65,8 @@
            <view class="goodsList-container colCen borderBox">
                <view class="goods-content rowStaBet">
                    <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                        <colGoods :items="items"></colGoods>
                          <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg>
                        <colGoods v-else :items="items"></colGoods>
                    </view>
                    <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
                </view>
@@ -76,17 +77,19 @@
<script>
    import colGoods from '../../components/colGoods.vue'
    import colGoodsImg from '../../components/colGoodsImg.vue'
    export default {
        components:{
            colGoods
            colGoods,
            colGoodsImg
        },
        data() {
            return {
                popBannerSList:[],
                pageTop: 0,
                nowCurrent: 0,
                scrollTop:0,
                navList: [],
                fiexdHeight:'',
                fiexdtop:'',
                goodsList: [],
@@ -96,7 +99,8 @@
            }
        },
        onLoad() {
            this.getNav()
            this.getNav();
            this.getPageImg();
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop
@@ -117,6 +121,23 @@
            }).exec();
        },
        methods: {
            getPageImg()
            {
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,19'
                }).then(e => {
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    this.popBannerSList=res.pddImg;
                    if(res.pddImg&&res.pddImg.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                    }
                }).catch(function(err) {
                    console.log(err)
                })
            },
            getNav() {
                var that = this;
                this.$u.api.getTopCalss({ctype:2}).then(e => {
@@ -180,10 +201,12 @@
            },
            
            goDetail(info) {
                console.log(info);
                uni.navigateTo({
                    url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                })
                if(info&&info!=undefined)
                {
                    uni.navigateTo({
                        url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                    })
                }
            },
            
            goback() {
uniapp/pages/active/tmsearch.vue
@@ -76,12 +76,12 @@
                    </block>
                </scroll-view>
            </view>
            <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg>
            <view class="goodsList-container colCen borderBox">
                <view class="goods-content rowStaBet">
                    <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                    <view class="goods-items borderBox" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                        <!-- <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> -->
                          <colGoodsImg v-if="index==0" :popBannerSList="popBannerSList"></colGoodsImg>
                          <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg>
                            <colGoods v-else :items="items"></colGoods>
                    </view>
                    <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
@@ -161,11 +161,9 @@
        },
        mounted() {
            uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => {
                console.log(data.top);
                this.fiexdHeight = data.height
            }).exec();
            uni.createSelectorQuery().in(this).select('.rangeList-container').boundingClientRect(data => {
                console.log(data.top);
                this.fiexdtop = data.top - this.fiexdHeight
            }).exec();
        },
@@ -173,7 +171,6 @@
            getNav() {
                var that = this;
                this.$u.api.getTopCalss({ctype:1,parentId:0}).then(e => {
                    console.log(e);
                    if(e.code != 0)return that.$alert(e.msg)
                    e.data.list.unshift({cid:"-1",cname:"天猫超市",ctype:"1"});
                    e.data.list.unshift({cid:"0",cname:"全部",ctype:"1"});
@@ -195,7 +192,6 @@
                    tchaoshi:tchaoshi,
                    secrend_search:this.nowsec
                }).then(e => {
                    console.log(e);
                    if (e.code != 0) return that.$alert(e.msg)
                    var res = e.data;
                    uni.stopPullDownRefresh();
@@ -210,25 +206,27 @@
                        that.loadstatus = 'loading'
                        that.pageCurrent ++
                    }
                    if(!that.isinsert&&res&&res.length>0)
                    /* if(!that.isinsert&&res&&res.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                        that.isinsert=true;
                    }
                    } */
                    that.goodsList = that.goodsList.concat(res)
                    console.log(that.goodsList);
                }).catch(function(err) {})
            },
            getPageImg()
            {
                var that=this;
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,12'
                    type: '11,16'
                }).then(e => {
                    console.log(e)
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    this.popBannerSList=res.popBannerSList;
                    this.popBannerSList=res.tmImg;
                    if(res.tmImg&&res.tmImg.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                    }
                }).catch(function(err) {
                    console.log(err)
                })
@@ -251,9 +249,13 @@
            },
            goDetail(info) {
                uni.navigateTo({
                    url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                })
                if(info&&info!=undefined)
                {
                    uni.navigateTo({
                        url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                    })
                }
            },
            goback() {
uniapp/pages/active/vipsearch.vue
@@ -29,7 +29,6 @@
                        </view>
                    </view>
                </view>
                <view class="searchContent rowCenBet" @tap="gosearch()">
                    <view class="leftcontent rowCen">
                        <view class="search-icon iconfont">
@@ -46,7 +45,6 @@
            </view>
            <view class="emptybar" :style="'width:100%;height:'+(scrollTop>fiexdtop?'90':'0')+'rpx;'">
            </view>
            <view class="rangeList-container rowCen" :class="scrollTop>fiexdtop?'tofixed':''" :style="'top:'+(scrollTop>fiexdtop?fiexdHeight:'0')+'px;'">
                <scroll-view class="scrollview-content" scroll-x scroll-with-animation="true">
                    <block v-for="(items,index) in navList" :key="index">
@@ -61,11 +59,12 @@
                    </block>
                </scroll-view>
            </view>
            <view class="goodsList-container colCen borderBox">
                <view class="goods-content rowStaBet">
                    <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)">
                        <colGoods :items="items"></colGoods>
                         <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg>
                        <colGoods v-else :items="items"></colGoods>
                    </view>
                    <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
                </view>
@@ -76,12 +75,15 @@
<script>
    import colGoods from '../../components/colGoods.vue'
    import colGoodsImg from '../../components/colGoodsImg.vue'
    export default {
        components:{
            colGoods
            colGoods,
            colGoodsImg
        },
        data() {
            return {
                popBannerSList:[],
                pageTop: 0,
                nowCurrent: 0,
                scrollTop:0,
@@ -96,7 +98,8 @@
            }
        },
        onLoad() {
            this.getNav()
            this.getNav();
            this.getPageImg();
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop
@@ -115,6 +118,24 @@
            }).exec();
        },
        methods: {
            getPageImg()
            {
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,20'
                }).then(e => {
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    that.popBannerSList=res.wphImg;
                    console.log(that.popBannerSList);
                    if(res.wphImg&&res.wphImg.length>0)
                    {
                        that.goodsList.unshift(res[0]);
                    }
                }).catch(function(err) {
                    console.log(err)
                })
            },
            getNav() {
                var that = this;
                this.$u.api.getTopCalss({ctype:9}).then(e => {
@@ -127,12 +148,12 @@
            },
            getData() {
                var that = this;
                console.log(this.nowCurrent)
                this.$u.api.wphGoodsList({
                    cate: this.nowCurrent,
                    pageSize: 10,
                    page: this.pageCurrent,
                }).then(e => {
                    console.log(e);
                    if(e.code != 0)return that.$alert(e.msg)
                    var res = e.data;
                    if(res.list==null)
@@ -152,7 +173,9 @@
                        that.pageCurrent ++
                    }
                    that.goodsList = that.goodsList.concat(res.list)
                    console.log(that.goodsList)
                }).catch(function (err) {
                    console.log(err)
                })
            },
            
@@ -166,9 +189,12 @@
            },
            
            goDetail(info) {
                uni.navigateTo({
                    url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                })
                if(info&&info!=undefined)
                {
                    uni.navigateTo({
                        url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
                    })
                }
            },
            
            goback() {
@@ -366,6 +392,8 @@
                    flex-wrap: wrap;
                    
                    .goods-items{
                        width: 350rpx;
                        height: 546rpx;
                        margin-bottom: 20rpx;
                    }
                }
uniapp/pages/index/index.vue
@@ -175,7 +175,6 @@
                }).then(e => {
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    console.log(res)
                    if(res.length > 0){
                        this.showBulletFrame = true;
                        this.BulletFrameData = res[0]
@@ -311,7 +310,6 @@
            getTopheight() {
                // 获取顶部高度
                uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => {
                    console.log("得到布局位置信息" + JSON.stringify(data));
                    this.Topheight = data.height
                }).exec();
            },
uniapp/pages/rankinglist/common_act.vue
@@ -1,7 +1,6 @@
<template>
    <view>
        <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view>
    </view>
    
</template>
uniapp/utils/utils.js
@@ -56,7 +56,6 @@
                url: '/pages/webView/webView?url=' + info.parameter_json.url
            })
        } else if (info.url_type == 1) {
            console.log("进来了1·11111111111")
            let url = info.parameter_json.url == undefined ? '' : info.parameter_json.url;
            console.log(url)
            if(url == '') return false;