zhaojs
2023-07-07 55803b1a7b478aade9b6e59ca6675777375e2a92
no message
已添加1个文件
已修改10个文件
101 ■■■■ 文件已修改
uniapp/App.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/goods/goodsDetail.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/index/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/bindingPhone.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/login.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/wxlogin.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/mine/mt.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/static/images/app/pushlogo.png 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/uniCloud-aliyun/cloudfunctions/getPhoneNumber/index.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/utils/getClipboard.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/utils/http.api.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/App.vue
@@ -65,7 +65,8 @@
                    if (msg.type == "receive") {
                        //创建本地消息,发送的本地消息也会被receive方法接收到,但没有type属性,且aps是null  
                        plus.push.createMessage(msg.content, JSON.stringify(msg), {
                            title: messageTitle
                            title: messageTitle,
                            //icon:'/static/images/app/pushlogo.png'
                        });
                    }
                } else { // Android
uniapp/pages/goods/goodsDetail.vue
@@ -281,7 +281,7 @@
    <uni-popup ref="popup_pddtip" type="center">
        <view class="pdd_pop_contant">
            <view class="pdd_pop_title">比价订单</view>
            <view class="pdd_pop_text">本次自购涉及比价行为,自购收益为0,建议先收藏该商品,2小时候通过大返官app购买,可正常获取对应收益。</view>
            <view class="pdd_pop_text">本次自购涉及比价行为,自购收益为0,建议先收藏该商品,2小时后通过大返官app购买,可正常获取对应收益。</view>
        </view>
    </uni-popup>
  </view>
@@ -383,7 +383,6 @@
            this.optionsInfo = JSON.parse(options.info);
            this.pageInfo = JSON.parse(options.info);
        }
        this.pageType = this.optionsInfo.sourceType;
        if (!this.optionsInfo.faction) {
          if (this.pageType == 'tb' || this.pageType == 'tm' || this.pageType == 'tmshop') this.faction = 't';
@@ -391,10 +390,7 @@
          if (this.pageType == 'pdd') 
          {
              this.faction = 'p';
              if(options.proform&&options.proform=="clipboard")
              {//来自剪贴板
                  this.isshowpdd=true;
              }
          }
          if (this.pageType == 'wph') this.faction = 'w';
           if (this.pageType == 'dy') this.faction = 'd';
@@ -423,6 +419,10 @@
        this.pageInfo.showImgs.push(a)
        this.getrecommend()
      } else if (this.pageType == 'pdd') {
          if(this.optionsInfo.predictPromotionRate==0)
          {//比价订单
              this.remindModel=true;
          }
      } else if (this.pageType == 'jd') {
@@ -439,6 +439,10 @@
        this.empowerModel = false
        this.pddempowerModel = false
      },
      closeremind()
      {
          this.remindModel=false;
      },
      getPageInfo(e) {
        var that = this;
        if (this.faction == 'j') {
uniapp/pages/index/index.vue
@@ -132,9 +132,9 @@
            }
        },
        onLoad() {
            this.getCategoryList();
            this.getPopBannerInfo();
            this.updateCid();
        },
        onShow() {
            if(!this.hasshow)
@@ -155,6 +155,21 @@
        },
        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;
uniapp/pages/login/bindingPhone.vue
@@ -214,14 +214,19 @@
            },
            bindMobile(){
                var that = this;
                console.log(this.hasLogin)
                console.log(this.wxUser)
                let clientInfo = uni.getStorageSync('clientInfo');
                var pushCid="";
                if(clientInfo&&clientInfo.clientid)
                {
                    pushCid=clientInfo.clientid;
                }
                if(this.wxUser != ""){
                    this.$u.api.bindMobileLogin({
                        wxUser : encodeURIComponent(JSON.stringify(that.wxUser)),
                        mobile:this.phone,
                        captcha:this.code,
                        isyj:this.isyj
                        isyj:this.isyj,
                        pushCid:pushCid
                    }).then(e => {
                        console.log(e)
                        if (e.code != 0) return that.$alert(e.msg)
uniapp/pages/login/login.vue
@@ -40,9 +40,9 @@
            </view>
            <view class="bottom-fixed colCen">
                <view class="verification-Code" @click="changeWay()">
                <!-- <view class="verification-Code" @click="changeWay()">
                    {{ifPasslogin?'验证码':'密码'}}登录
                </view>
                </view> -->
                <view class="explain-text rowCen">
                    <switch type="checkbox" @change="changeread" :checked='isread' style="transform:scale(0.6)"/>
                    登陆代表已详细阅读并同意<text @click="goPage('agreement')">《用户协议》</text>和<text @click="goPage('policy')">《隐私政策》</text>
@@ -77,8 +77,7 @@
                showPass: true,
                second: 60,
                canGetCode: true,
                prevent: true,
                clientid:""
                prevent: true
            };
        },
        onLoad() {
@@ -96,12 +95,12 @@
            },
            dologin() {
                var that = this;
                // #ifdef APP-PLUS
                    plus.push.getClientInfoAsync((info) => {
                         that.clientid = info["clientid"];
                    });
                // #endif
                let clientInfo = uni.getStorageSync('clientInfo');
                var pushCid="";
                if(clientInfo&&clientInfo.clientid)
                {
                    pushCid=clientInfo.clientid;
                }
                if(this.isread){
                    if (this.ifPasslogin) {
                        //密码登录
@@ -123,11 +122,17 @@
                        }).catch(function (err) {
                        })
                    } else {
                        let strsr={
                            mobile: this.phone,
                            captcha: this.code,
                            pushCid:pushCid
                        };
                        console.log(strsr)
                        //验证码登录
                        this.$u.api.mobileLogin({
                            mobile: this.phone,
                            captcha: this.code,
                            push_cid:this.clientid
                            pushCid:pushCid
                        }).then(e => {
                            that.login(e.data.userinfo);
                            if(e.code != 0) return that.$alert(e.msg)
uniapp/pages/login/wxlogin.vue
@@ -113,12 +113,20 @@
            },
            doMobileLogin(mobRes)
            {
                //从缓存获取cid
                let clientInfo = uni.getStorageSync('clientInfo');
                let pushCid='';
                if(clientInfo&&clientInfo.clientid)
                {
                    pushCid=clientInfo.clientid
                }
                var that=this;
                uniCloud.callFunction({
                  name: 'getPhoneNumber', // 你的云函数名称
                  data: {
                    'access_token': mobRes.access_token, // 客户端一键登录接口返回的access_token
                    'openid': mobRes.openid // 客户端一键登录接口返回的openid
                    'openid': mobRes.openid, // 客户端一键登录接口返回的openid
                    'pushCid':pushCid//app推送cid
                  }
                }).then(res => {
                    console.log(res)
uniapp/pages/mine/mt.vue
@@ -129,6 +129,7 @@
                this.$u.api.meituanAct({type:this.optionsCurrent}).then(e => {
                    if(e.code != 0)return that.$alert(e.msg)
                    uni.stopPullDownRefresh()
                    console.log(e)
                    that.mtInfo = e.data.info;
                    that.wxQrcodeUrl = that.mtInfo.we_app_info.miniCode;
                }).catch(function (err) {
uniapp/static/images/app/pushlogo.png
uniapp/uniCloud-aliyun/cloudfunctions/getPhoneNumber/index.js
@@ -25,13 +25,19 @@
      }
      else
      {//手机号一键登录
          let pushCid='';
          if(event.pushCid)
          {
              pushCid=event.pushCid;
          }
          var apiUrl='http://dfgapp.ushopvip.com/api/user/mobilelogin';
          const apiRes = await uniCloud.httpclient.request(apiUrl, {
              method: 'POST',
              data: {
                mobile: res.phoneNumber,
                    mobile: res.phoneNumber,
                      captcha:'000',
                      ismobouth:true
                      ismobouth:true,
                    pushCid:pushCid
              },
              contentType: 'json', // 指定以application/json发送data内的数据
              dataType: 'json' // 指定返回值为json格式,自动进行parse
uniapp/utils/getClipboard.js
@@ -11,6 +11,7 @@
        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)
uniapp/utils/http.api.js
@@ -100,6 +100,7 @@
let changeCodeUrl="/api/user/changecode";
let getRecomInviterUrl="/api/user/getRecomInviter";
let updateFirstFreeBrowseUrl="/api/user/update_first_free_browse";
let updateCidUrl="/api/user/UpdateClientId";
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
@@ -206,10 +207,10 @@
    let changeCode=(params = {}) => vm.$u.post(changeCodeUrl, params); //修改邀请码
    let getRecomInviter=(params = {}) => vm.$u.post(getRecomInviterUrl, params); //获取推荐邀请人
    let updateFirstFreeBrowse=(params = {}) => vm.$u.post(updateFirstFreeBrowseUrl, params); //记录0元购
    let updateCid=(params={})=>vm.$u.post(updateCidUrl,params);//更新pushcid
    
    // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
    vm.$u.api = {updateFirstFreeBrowse,getRecomInviter,changeCode,getHdkCategoryList,eleStoreList,getPrivilegeShareLink,getDyGoodsDetail,bindMobileLogin,getTopMessId,changePwd,comminInt,wxapplogin,getTopCalss,getBanner,getHomeMenu,getSuperClass,getMQD,getGoodThing,login,sendSms,mobileLogin,setPwd,getUserInfo,getTalentInfo,getMessageList,getGoodsDetail,getPrivilegeLink,getSimilerGoods,getJdsDetail,getPddDetail,getM,getWphGoodsDetail,addCollect,delCollect,hotKey,suggestion,goodsSearch,activityLink,unionAct,singlePageLink,checkPddAuth,getPddAuth,getPineGoods,jdGoodsList,optimusMaterial,pddGoodsList,brandList,brandInfo,wphGoodsList,meituanAct,eleAct,eleShangjin,userHomemenu,getAppVersion,userBrowse,delBrowse,activitySingle,userCollect,bdHomemenu,getCity,coordinate,cityCate,searchDeals,getCityId,seckillShowinfo,seckillList,identifyGoods,changeMobile,bindInvitation,getInviteInfo,getEstimateAmount,fansList,getFansCount,getHelpType,getHelpList,getHelpDetail,getWpanurl,getChainTurning,superDiscountGoods,getHistory,getTbGoodsList,cateRankList,getUpgradeInfo,getEquityCard,levelApply,orderList,userProfit,bindZfb,withdraw,getBalanceLog,getPublisher,getAlbum,likeAlbum,albumDetail,anchorFollow,myFollowAlbum,feedback,userCancel,profile,bindWechat,unboundWechat};
    vm.$u.api = {updateCid,updateFirstFreeBrowse,getRecomInviter,changeCode,getHdkCategoryList,eleStoreList,getPrivilegeShareLink,getDyGoodsDetail,bindMobileLogin,getTopMessId,changePwd,comminInt,wxapplogin,getTopCalss,getBanner,getHomeMenu,getSuperClass,getMQD,getGoodThing,login,sendSms,mobileLogin,setPwd,getUserInfo,getTalentInfo,getMessageList,getGoodsDetail,getPrivilegeLink,getSimilerGoods,getJdsDetail,getPddDetail,getM,getWphGoodsDetail,addCollect,delCollect,hotKey,suggestion,goodsSearch,activityLink,unionAct,singlePageLink,checkPddAuth,getPddAuth,getPineGoods,jdGoodsList,optimusMaterial,pddGoodsList,brandList,brandInfo,wphGoodsList,meituanAct,eleAct,eleShangjin,userHomemenu,getAppVersion,userBrowse,delBrowse,activitySingle,userCollect,bdHomemenu,getCity,coordinate,cityCate,searchDeals,getCityId,seckillShowinfo,seckillList,identifyGoods,changeMobile,bindInvitation,getInviteInfo,getEstimateAmount,fansList,getFansCount,getHelpType,getHelpList,getHelpDetail,getWpanurl,getChainTurning,superDiscountGoods,getHistory,getTbGoodsList,cateRankList,getUpgradeInfo,getEquityCard,levelApply,orderList,userProfit,bindZfb,withdraw,getBalanceLog,getPublisher,getAlbum,likeAlbum,albumDetail,anchorFollow,myFollowAlbum,feedback,userCancel,profile,bindWechat,unboundWechat};
}
export default {