| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <!-- <view class="right-container rowCen borderBox" v-if="!showtar || platform!='iOS'"> |
| | | <view class="leftsharebox btnbox colCenCen" @tap="goPath()"> |
| | |
| | | <u-popup v-model="inviterShow" mode="center" border-radius="32" v-if="inviterShow" :mask-close-able='true'> |
| | | <inviter-model ref='invitermodel' @rewrite='rewriteCode' @setInvite='setCodebtn'></inviter-model> |
| | | </u-popup> |
| | | <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> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | inviteCodeShow: false, |
| | | inviterShow: false, |
| | | frompage:'', |
| | | isshowpdd:false, |
| | | beforePddAuth:false, |
| | | }; |
| | | }, |
| | | onPageScroll(e) { |
| | |
| | | getApp().bcInit(); |
| | | } |
| | | }, |
| | | onReady(){ |
| | | if(this.isshowpdd) |
| | | { |
| | | this.$refs.popup_pddtip.open(); |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.appinfo = utils.getCacheSync('appInfo') |
| | | // #ifdef APP-PLUS |
| | |
| | | console.log(options); |
| | | if(options.sourcefrom) |
| | | { |
| | | console.log(decodeURIComponent(options.info)); |
| | | this.optionsInfo = JSON.parse(decodeURIComponent(options.info)); |
| | | this.pageInfo = JSON.parse(decodeURIComponent(options.info)); |
| | | console.log(this.optionsInfo) |
| | |
| | | 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'; |
| | | if (this.pageType == 'jd') this.faction = 'j'; |
| | | if (this.pageType == 'pdd') this.faction = 'p'; |
| | | if (this.pageType == 'pdd') |
| | | { |
| | | this.faction = 'p'; |
| | | |
| | | } |
| | | if (this.pageType == 'wph') this.faction = 'w'; |
| | | if (this.pageType == 'dy') this.faction = 'd'; |
| | | } else { |
| | |
| | | } 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) |
| | | {//比价订单 |
| | | this.remindModel=true; |
| | | } */ |
| | | |
| | | } else if (this.pageType == 'jd') { |
| | | |
| | |
| | | this.empowerModel = false |
| | | this.pddempowerModel = false |
| | | }, |
| | | closeremind() |
| | | { |
| | | this.remindModel=false; |
| | | }, |
| | | getPageInfo(e) { |
| | | var that = this; |
| | | console.log(this.faction) |
| | | if (this.faction == 'j') { |
| | | var loinf={ |
| | | goodsId: this.optionsInfo.goodsId, |
| | | goods: JSON.stringify(this.optionsInfo) |
| | | } |
| | | console.log(loinf) |
| | | this.$u.api.getJdsDetail({ |
| | | goodsId: this.optionsInfo.goodsId, |
| | | goods: JSON.stringify(this.optionsInfo) |
| | | }).then(e => { |
| | | console.log(e) |
| | | var res = e.data.detailPics; |
| | | this.JdDetails = that.JdDetails.concat(res) |
| | | that.$forceUpdate() |
| | |
| | | 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({ |
| | |
| | | console.log(this.pageType) |
| | | if (this.pageType == 'tb' || this.pageType == 'tmshop' || this.pageType == 'tm') { |
| | | if (this.user.tb_account) { |
| | | |
| | | this.getTbsrc() |
| | | } else { |
| | | this.empowerModel = true |
| | |
| | | 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) {}) |
| | | }, |
| | | |
| | |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | if(that.frompage=='freebuy') |
| | | {//0元购的记录商品id |
| | | console.log(e.data.info.itemId); |
| | | console.log(e.data.info.itemId); |
| | | this.$u.api.updateFirstFreeBrowse({ |
| | | goodsid:that.optionsInfo.goodsId, |
| | | new_goodsId:e.data.info.itemId |
| | | new_goodsId:e.data.info.itemId, |
| | | plateform:'tb' |
| | | }).then(e=>{ |
| | | |
| | | }); |
| | |
| | | }, |
| | | |
| | | getJDsrc() { |
| | | var that = this; |
| | | 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 |
| | |
| | | }).then(e => { |
| | | var res = e.data.info; |
| | | console.log(res) |
| | | if(that.frompage=='freebuy') |
| | | {//0元购的记录商品id |
| | | this.$u.api.updateFirstFreeBrowse({ |
| | | goodsid:that.optionsInfo.goodsId, |
| | | new_goodsId:that.optionsInfo.goodsId, |
| | | plateform:'dy' |
| | | }).then(e=>{ |
| | | |
| | | }); |
| | | } |
| | | // #ifdef APP-PLUS |
| | | plus.runtime.openURL(res.dy_deeplink, e => { |
| | | uni.navigateTo({ |
| | |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .pdd_pop_contant{ |
| | | background-color: rgb(255, 255, 255); |
| | | padding: 40rpx; |
| | | width: 80%; |
| | | margin:0 auto; |
| | | border-radius: 20rpx; |
| | | .pdd_pop_title |
| | | { |
| | | text-align: center; |
| | | margin-bottom: 30rpx; |
| | | font-size: 18px; |
| | | } |
| | | .pdd_pop_text |
| | | { |
| | | margin-bottom: 30rpx; |
| | | color: #868080; |
| | | } |
| | | } |
| | | .container { |
| | | .flexbox { |
| | | position: fixed; |