| | |
| | | inviteCodeShow: false, |
| | | inviterShow: false, |
| | | frompage:'', |
| | | isshowpdd:false |
| | | isshowpdd:false, |
| | | beforePddAuth:false, |
| | | }; |
| | | }, |
| | | onPageScroll(e) { |
| | |
| | | } else { |
| | | this.memberId = '' |
| | | } |
| | | console.log(this.user); |
| | | if(this.user.pdd_authority_ios==1||this.user.pdd_authority_android==1) |
| | | { |
| | | this.beforePddAuth=true; |
| | | } |
| | | console.log(this.beforePddAuth); |
| | | } catch (e) { |
| | | this.memberId = '' |
| | | } |
| | |
| | | this.pageInfo.showImgs.push(a) |
| | | this.getrecommend() |
| | | } else if (this.pageType == 'pdd') { |
| | | if(this.optionsInfo.predictPromotionRate==0) |
| | | /* if(this.optionsInfo.predictPromotionRate==0) |
| | | {//比价订单 |
| | | this.remindModel=true; |
| | | } |
| | | } */ |
| | | |
| | | } else if (this.pageType == 'jd') { |
| | | |
| | |
| | | }, |
| | | getPageInfo(e) { |
| | | var that = this; |
| | | console.log(this.faction) |
| | | if (this.faction == 'j') { |
| | | this.$u.api.getJdsDetail({ |
| | | goodsId: this.optionsInfo.goodsId, |
| | |
| | | this.optionsInfo = res |
| | | }).catch(function(err) {}) |
| | | } else if (this.faction == 'p') { |
| | | var that = this; |
| | | this.$u.api.getPddDetail({ |
| | | goods_sign: this.optionsInfo.goods_sign |
| | | }).then(e => { |
| | | var res = e.data; |
| | | that.pageInfo = res; |
| | | that.optionsInfo.imgs = that.pageInfo.imgs; |
| | | }) |
| | | this.getPddGoodsDetail(this.optionsInfo.goods_sign); |
| | | } else if (this.faction == 'w') { |
| | | var that = this; |
| | | this.$u.api.getWphGoodsDetail({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | |
| | | getPddGoodsDetail(goods_sign) |
| | | { |
| | | var that = this; |
| | | this.$u.api.getPddDetail({ |
| | | goods_sign: goods_sign |
| | | }).then(e => { |
| | | var res = e.data; |
| | | that.pageInfo = res; |
| | | console.log(res); |
| | | that.optionsInfo.imgs = that.pageInfo.imgs; |
| | | if(res.predictPromotionRate==0) |
| | | {//比价订单 |
| | | this.remindModel=true; |
| | | } |
| | | }) |
| | | }, |
| | | goDetails(info) { |
| | | info.searchSource = 1 |
| | | uni.navigateTo({ |
| | | url: './goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | getrecommend() { |
| | | var that = this; |
| | | this.$u.api.getSimilerGoods({ |
| | |
| | | updataUser() { |
| | | var that = this; |
| | | this.$u.api.getUserInfo({}).then(e => { |
| | | console.log(e) |
| | | utils.setCache('userInfo', e.data.userinfo) |
| | | that.user = e.data.userinfo; |
| | | if(that.pageType == 'pdd'&&!that.beforePddAuth&&(e.data.userinfo.pdd_authority_ios == 1||e.data.userinfo.pdd_authority_android == 1)) |
| | | {//重新查询商品详情 |
| | | console.log('重新查询pdd商品'); |
| | | that.getPddGoodsDetail(that.optionsInfo.goods_sign);0 |
| | | } |
| | | }).catch(function(err) {}) |
| | | }, |
| | | |