| | |
| | | </view> |
| | | </view> |
| | | <view class="rightbackbox btnbox colCenCen" @tap="getCouponUrl()"> |
| | | <view class="priceText"> |
| | | <view v-if="frompage=='freebuy'" class="priceText"> |
| | | ¥{{optionsInfo.actualPrice}} |
| | | </view> |
| | | <view v-else class="priceText"> |
| | | ¥{{optionsInfo.fanli}} |
| | | </view> |
| | | <view class="texttips"> |
| | |
| | | platform: '', |
| | | inviteCodeShow: false, |
| | | inviterShow: false, |
| | | frompage:'', |
| | | }; |
| | | }, |
| | | onPageScroll(e) { |
| | |
| | | this.showtar = getApp().globalData.ifwt == 1 ? false : true; |
| | | this.platform = plus.os.name |
| | | // #endif |
| | | if(options.frompage) |
| | | { |
| | | this.frompage=options.frompage; |
| | | } |
| | | if (options.id) { |
| | | this.optionsInfo.goodsId = options.id |
| | | this.pageType = this.optionsInfo.sourceType ? this.optionsInfo.sourceType : 'tb'; |
| | |
| | | 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 |
| | |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | if(that.frompage=='freebuy') |
| | | {//0元购的记录商品id |
| | | console.log(e.data.info.itemId); |
| | | this.$u.api.updateFirstFreeBrowse({ |
| | | goodsid:that.optionsInfo.goodsId, |
| | | new_goodsId:e.data.info.itemId |
| | | }).then(e=>{ |
| | | |
| | | }); |
| | | } |
| | | var res = e.data.info; |
| | | var tburl = res.shortUrl |
| | | // #ifdef APP-PLUS |
| | |
| | | <template> |
| | | <view> |
| | | <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | var wv |
| | | var wv; |
| | | export default { |
| | | data() { |
| | | return { |
| | | empowerModel: false, |
| | | webviewUrl: '', |
| | | user:'', |
| | | webviewStyles: { |
| | | progress: { |
| | | color: '#EE1B14' |
| | |
| | | } |
| | | else{ |
| | | const value = uni.getStorageSync('userInfo'); |
| | | console.log(value); |
| | | this.user = value; |
| | | if(options.t_url) |
| | | { |
| | | console.log(encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id)); |
| | | this.webviewUrl = encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id); |
| | | } |
| | | } |
| | |
| | | onReady() { |
| | | this.clearMuiBack(); |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | received(e) { |
| | | console.log(e); |
| | | var res=e.detail.data[0]; |
| | | if(res.action=='target_tb') |
| | | if(res.action=='back') |
| | | { |
| | | this.getTbsrc(res.data.goodsId); |
| | | this.backLast(); |
| | | } |
| | | }, |
| | | //跳转淘宝 |
| | | getTbsrc(goodsid) { |
| | | var that = this; |
| | | this.$u.api.getPrivilegeLink({ |
| | | goodsId: goodsid, |
| | | type: 0 |
| | | }).then(e => { |
| | | console.log(e); |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data.info; |
| | | var tburl = res.shortUrl |
| | | // #ifdef APP-PLUS |
| | | if (plus.runtime.isApplicationExist({ |
| | | pname: 'com.taobao.taobao', |
| | | action: 'taobao://' |
| | | })) { |
| | | const plug = uni.requireNativePlugin('xiguazhu-baichuan') |
| | | plug.detailPage({ |
| | | url: tburl, |
| | | "openType": 0 |
| | | }, result => { |
| | | // console.log(result); |
| | | }); |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '../webView/webView?url=' + tburl |
| | | }) |
| | | } |
| | | // #endif |
| | | }).catch(function(err) {}) |
| | | backLast() |
| | | { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, |
| | | // 关闭mui返回 |
| | | clearMuiBack() { |
| | |
| | | let getHdkCategoryListUrl="/api/taoke/get_hdk_category_list"; |
| | | let changeCodeUrl="/api/user/changecode"; |
| | | let getRecomInviterUrl="/api/user/getRecomInviter"; |
| | | let updateFirstFreeBrowseUrl="/api/user/update_first_free_browse"; |
| | | |
| | | // 此处第二个参数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 |
| | |
| | | let getHdkCategoryList= (params = {}) => vm.$u.post(getHdkCategoryListUrl, params); |
| | | 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元购 |
| | | |
| | | |
| | | // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 |
| | | vm.$u.api = {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 = {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 { |