From 6ba7ccece31dc6ba798565d0bcecc37a15d74629 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 09 六月 2023 14:28:21 +0800 Subject: [PATCH] no message --- uniapp/pages/goods/goodsDetail.vue | 21 ++++++++++ uniapp/utils/http.api.js | 6 ++ uniapp/pages/rankinglist/common_act.vue | 51 ++++++++----------------- 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue index 793fe8b..b06bed0 100644 --- a/uniapp/pages/goods/goodsDetail.vue +++ b/uniapp/pages/goods/goodsDetail.vue @@ -225,7 +225,10 @@ </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"> @@ -297,6 +300,7 @@ platform: '', inviteCodeShow: false, inviterShow: false, + frompage:'', }; }, onPageScroll(e) { @@ -324,6 +328,10 @@ 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'; @@ -513,6 +521,7 @@ 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 @@ -567,6 +576,16 @@ }).then(e => { console.log(e) if (e.code != 0) return that.$alert(e.msg) + if(that.frompage=='freebuy') + {//0鍏冭喘鐨勮褰曞晢鍝乮d + 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 diff --git a/uniapp/pages/rankinglist/common_act.vue b/uniapp/pages/rankinglist/common_act.vue index f167e2f..379ddf4 100644 --- a/uniapp/pages/rankinglist/common_act.vue +++ b/uniapp/pages/rankinglist/common_act.vue @@ -1,15 +1,19 @@ <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' @@ -25,9 +29,10 @@ } 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); } } @@ -36,45 +41,21 @@ 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() { diff --git a/uniapp/utils/http.api.js b/uniapp/utils/http.api.js index 765d781..6680331 100644 --- a/uniapp/utils/http.api.js +++ b/uniapp/utils/http.api.js @@ -99,6 +99,7 @@ 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"; // 姝ゅ绗簩涓弬鏁皏m锛屽氨鏄垜浠湪椤甸潰浣跨敤鐨則his锛屼綘鍙互閫氳繃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 @@ -204,8 +205,11 @@ 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鍏冭喘 + + // 灏嗗悇涓畾涔夌殑鎺ュ彛鍚嶇О锛岀粺涓�鏀捐繘瀵硅薄鎸傝浇鍒皏m.$u.api(鍥犱负vm灏辨槸this锛屼篃鍗硉his.$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 { -- Gitblit v1.9.3