zhaojs
2023-07-13 70f5b82bc3fceafac2faf470280876b0eca6fac8
no message
已修改10个文件
174 ■■■■ 文件已修改
uniapp/App.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/indexPage.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/components/pddremind.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/manifest.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/goods/goodsDetail.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/index/index.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/index/launchPage.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/login.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/wxlogin.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/utils/getClipboard.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/App.vue
@@ -13,10 +13,11 @@
        onLaunch: function() {
            // #ifdef APP-PLUS
            //推送开始
            var info = plus.push.getClientInfo()
            /* var info = plus.push.getClientInfo()
            console.log(info);
            // 获取当前设备的客户端id,传给后台,实现指定用户
            info && uni.setStorageSync('clientInfo', info)
            info && uni.setStorageSync('clientInfo', info) */
            this.getPushCid();
            // 使用5+App的方式进行监听消息推送
            //消息点击事件  
            //【APP在线】,收到透传消息通过,不会提醒至通知栏目,需要发送本地消息,再进行点击触发的点击事件。  
@@ -57,6 +58,7 @@
            //收到透传消息  
            //只有APP在线时,才会触发receive事件,透传消息不会触发系统消息,需要创建本地消息  
            plus.push.addEventListener("receive", function(msg) {
                console.log('receive', JSON.stringify(msg))
                //业务代码
                // IOS
                if (uni.getSystemInfoSync().platform == 'ios') {
@@ -154,7 +156,6 @@
                            content: '检测到网络权限可能设置为关闭,您可以在“设置”中检查无线数据及蜂窝移动网络'
                        })
                    }else{
                        console.log("是否请求过:"+that.globalData.hasinit)
                        if(!that.globalData.hasinit)
                        {
                            that.getAppInfo();
@@ -189,11 +190,9 @@
             bcInit:function()
            {
                var that = this;
                console.log(uni.getSystemInfoSync().platform);
                if (uni.getSystemInfoSync().platform == 'ios')
                {
                    const plug = uni.requireNativePlugin('xiguazhu-baichuan');
                    console.log(plug)
                    plug.init({}, result => {
                        //console.log('1111111111111111111');
                        console.log(result);    // code等于0就是初始化成功
@@ -206,6 +205,40 @@
                else{
                    that.globalData.hasbcinit=true;
                }
            },
            getPushCid:function()
            {
                // #ifdef APP-PLUS
                var info = plus.push.getClientInfo()
                if(info&&info.clientid!='null')
                {// 获取当前设备的客户端id,传给后台,实现指定用户
                    uni.setStorageSync('clientInfo', info);
                    this.updatePushCid();
                }
                else{
                    console.log('没有获取到');
                    setTimeout(() => {
                        this.getPushCid();
                    }, 1000)
                }
                // #endif
            },
            updatePushCid:function()
            {
                let clientInfo = uni.getStorageSync('clientInfo');
                if(clientInfo&&clientInfo!='null'&&clientInfo.clientid)
                {
                    console.log('开始更新');
                    this.$u.api.updateCid({
                        pushcid:clientInfo.clientid
                    }).then(e => {
                    }).catch(function (err) {
                    })
                }
                else{
                    this.getPushCid();
                }
            },
            getAppInfo: function() {
                var that = this;
@@ -238,7 +271,6 @@
                        if (plus.runtime.isApplicationExist({pname:'com.tencent.mm',
                                action: 'weixin://'
                            })) {
                                console.log("安卓端已安装微信")
                            that.globalData.ifwt = 1 //是否安装微信 1代表安装
                        } else {
                            console.log("安卓端未安装微信")
uniapp/components/indexPage.vue
@@ -392,6 +392,7 @@
                        v-if="bottomGoodsList.length>0">
                        <block v-for="(items,index) in bottomGoodsList" :key="index">
                            <view class="goods-items" @click="goDetails(items)">
                                 <!-- <colGoodsImg v-if="index==0&&itembannerList&&itembannerList.length>0" :popBannerSList="itembannerList"></colGoodsImg> -->
                                <colGoods :items="items"></colGoods>
                            </view>
                        </block>
@@ -411,6 +412,7 @@
    import slideTop from './slideTop.vue'
    import colGoods from './colGoods.vue'
    import empowerModel from './empowerModel.vue'
        import colGoodsImg from '@/components/colGoodsImg.vue'
    export default {
        props: {
            recomendType: {
@@ -432,10 +434,12 @@
        components: {
            slideTop,
            colGoods,
            empowerModel
            empowerModel,
            colGoodsImg
        },
        data() {
            return {
                popBannerSList:[],
                fallingList: [],
                pageHeight: '',
                headerColor: '',
@@ -491,9 +495,14 @@
                swpidx: 0,
                canrefresh: true,
                fastenter:[],
                popBannerSList:[],
                itembannerList:[],
                enterTop:[],
                enterDown:[]
                enterDown:[],
                tbbanner:[],
                jdbanner:[],
                dybanner:[],
                pddbanner:[],
                wphbanner:[],
            }
        },
        watch: {
@@ -529,6 +538,7 @@
            this.getbottomGoodsList(this.bottomType);
            this.getGOODSfalling();
            this.getRQList();
            //this.getPageImg();
        },
        mounted() {
            this.$emit('scrolltoTop')
@@ -595,7 +605,6 @@
            },
            onRestore() {
                this.swpidx = 0
                console.log('下拉被终止');
            },
            pagescroll(e) {
                this.$emit('scrollNum', e.detail.scrollTop)
@@ -688,7 +697,49 @@
                    that.dyList = e.data.dygoods;
                }).catch(function(err) {})
            },
            getPageImg()
            {
                 var that=this;
                this.$u.api.getBanner({
                    type: '11,16,17,18,19,20'
                }).then(e => {
                    if (e.code == 1) return that.$alert(e.msg);
                    var res = e.data.info;
                    that.tbbanner=res.tmImg;
                    that.jdbanner=res.jdImg;
                    that.dybanner=res.dyImg;
                    that.pddbanner=res.pddImg;
                    that.wphbanner=res.wphImg;
                    that.changeBanner(that.bottomCurrent);
                }).catch(function(err) {
                    console.log(err)
                })
            },
            changeBanner(type)
            {
                switch(type)
                {
                    case 2://京东
                      this.itembannerList=this.jdbanner;
                      break;
                    case 6://抖音
                      this.itembannerList=this.dybanner;
                      break;
                    case 3://拼多多
                       this.itembannerList=this.pddbanner;
                       break;
                    case 4://唯品会
                        this.itembannerList=this.wphbanner;
                        break;
                    default:
                    this.itembannerList=[];
                        break;
                }
                if(this.itembannerList&&this.itembannerList>0)
                {
                    that.bottomGoodsList.unshift(this.itembannerList[0]);
                }
            },
            getbottomGoodsList(type) {
                var that = this;
                this.$u.api.getGoodThing({
@@ -744,6 +795,7 @@
                if (this.bottomCurrent != idx) {
                    this.currentPage = 1;
                    this.bottomType = info.type;
                    this.changeBanner(info.type);
                    this.getbottomGoodsList(this.bottomType);
                    this.$nextTick(() => {
                        this.$emit('scrolltoview')
uniapp/components/pddremind.vue
@@ -8,7 +8,7 @@
        </view>
        <view class="tips-container colCen">
            <view class="grey-txt">
                该商品可能涉及比价,自购可能会无佣金
                该商品可能涉及比价,自购可能会无佣金,建议您先收藏该商品,2个小时候再进大返官app购买
            </view>
            <view class="pink-txt">
                比价定义:您在拼多多APP/网站访问了该商品的详情,再通过本APP进行转链自购的行为
@@ -40,10 +40,10 @@
<style lang="scss">
    .pddremind-container {
        width: 600rpx;
        height: 630rpx;
        height: 690rpx;
        background: #FFFFFF;
        border-radius: 10rpx;
        padding: 0 45rpx;
        padding: 0 25rpx;
        position: relative;
        .topbac {
@@ -87,6 +87,7 @@
            .pink-txt {
                color: #FD002F;
                margin-top: 20rpx;
            }
        }
uniapp/manifest.json
@@ -115,7 +115,18 @@
                    }
                },
                "push" : {
                    "unipush" : {}
                    "unipush" : {
                        "icons" : {
                            "small" : {
                                //  左上角小图标
                                "ldpi" : "unpackage/res/drawable-ldpi/push_small.png",
                                "mdpi" : "unpackage/res/drawable-mdpi/push_small.png",
                                "hdpi" : "unpackage/res/drawable-hdpi/push_small.png",
                                "xhdpi" : "unpackage/res/drawable-xhdpi/push_small.png",
                                "xxhdpi" : "unpackage/res/drawable-xxhdpi/push_small.png"
                            }
                        }
                    }
                },
                "geolocation" : {
                    "amap" : {
uniapp/pages/goods/goodsDetail.vue
@@ -699,6 +699,19 @@
      getJDsrc() {
        var that = this;
          console.log(this.frompage);
          console.log(that.optionsInfo.goodsId);
          if(this.frompage=='freebuy')
          {//0元购的记录商品id
              this.$u.api.updateFirstFreeBrowse({
                  goodsid:that.optionsInfo.goodsId,
                  new_goodsId:that.optionsInfo.goodsId,
                  plateform:'jd'
              }).then(e=>{
              });
          }
        this.$u.api.getPrivilegeLink({
          goodsId: this.optionsInfo.goodsId,
          type: 1
uniapp/pages/index/index.vue
@@ -128,13 +128,13 @@
                nowcurrentid:'',
                recomendType:1,
                isshowtype:false,
                hasshow:false,
                hasshow:false
            }
        },
        onLoad() {
            this.getCategoryList();
            this.getPopBannerInfo();
            this.updateCid();
        },
        onShow() {
            if(!this.hasshow)
@@ -150,26 +150,11 @@
            this.recomendType = open_like_recommend == "" ? 1 : open_like_recommend;
        },
        onReady() {
            console.log("获取高低")
            this.getTopheight()
            this.getTopheight();
        },
        watch: {},
        methods: {
            updateCid()
            {
                //从缓存获取cid
                let clientInfo = uni.getStorageSync('clientInfo');
                console.log(clientInfo);
                if(clientInfo&&clientInfo.clientid)
                {
                    this.$u.api.updateCid({
                        pushcid:clientInfo.clientid
                    }).then(e => {
                        console.log(e);
                    }).catch(function (err) {
                    })
                }
            },
            shShow()
            {
                var that=this;
@@ -188,9 +173,12 @@
                    if(istoLogin)
                    {
                        if(!that.hasLogin){
                            setTimeout(() => {
                            uni.reLaunch({
                                url:"/pages/login/wxlogin"
                            })
                            }, 1000)
                        }
                        /* var user= uni.getStorageSync('userInfo');
                        if(!user.invitation_code)
@@ -356,7 +344,6 @@
            getTopheight() {
                // 获取顶部高度
                uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => {
                    console.log(data.height+":----------------");
                    this.Topheight = data.height
                }).exec();
            },
uniapp/pages/index/launchPage.vue
@@ -29,8 +29,6 @@
                this.$u.api.getBanner({
                    type: '1,15'
                }).then(e => {
                    console.log(e)
                    if (e.code == 1) 
                    {//返回失败,直接跳首页
                        this.t_index();
@@ -42,7 +40,6 @@
                        that.list=res.launchpic;
                    }
                    else{
                        console.log("跳转")
                        this.t_index();
                    }
                }).catch(function(err) {
uniapp/pages/login/login.vue
@@ -221,6 +221,8 @@
                            url: './setPass'
                        })
                    } */else {
                        //更新pushcid
                        getApp().updatePushCid();
                        uni.switchTab({
                            url: '../index/index'
                        })
uniapp/pages/login/wxlogin.vue
@@ -215,6 +215,8 @@
                            url: './setPass'
                        })
                    } */ else {
                        //更新pushcid
                        getApp().updatePushCid();
                        uni.switchTab({
                            url: '../index/index'
                        })
uniapp/utils/getClipboard.js
@@ -11,7 +11,6 @@
        var nowClipData = res.data
        if (nowClipData.length > 6 && nowClipData!=uni.getStorageSync('clipboard')) {
          getApp().globalData.hasMode = true
          console.log(nowClipData);
          Vue.prototype.$u.api.identifyGoods({goods_url: nowClipData}).then(e => {
              console.log(e)
            if(e.code != 0) return Vue.prototype.$alert(e.msg)