From 6c114d7336ebcb6cac485dcb11797737ad9f7611 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期二, 27 六月 2023 15:39:12 +0800 Subject: [PATCH] no message --- public/html/fengqiangbang.html | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 45 insertions(+), 4 deletions(-) diff --git a/public/html/fengqiangbang.html b/public/html/fengqiangbang.html index da74431..4c75968 100644 --- a/public/html/fengqiangbang.html +++ b/public/html/fengqiangbang.html @@ -29,13 +29,28 @@ var _config = { appKey: 'bkuibk',//姝ゅ鏇挎崲鎴愮敤鎴穉ppKey - jumpGoodsUrl: function (items) { //榛樿鐩存帴杞摼 + jumpGoodsUrl: function (items,sourceType) { //榛樿鐩存帴杞摼 + var url=''; + if(sourceType=="jd") + { + var itemsStr=Infoformat(JSON.stringify(items)); + url='/pages/goods/goodsDetail?sourcefrom=fqb&info=' + encodeURIComponent(itemsStr) + } + else{ + url='/pages/goods/goodsDetail?id=' + items.goodsid + } uni.navigateTo({ - url: '/pages/goods/goodsDetail?id=' + items.goodsid + url: url }); - // return '/pages/goods/goodsDetail?id=' + items.goodsid; //鏇挎崲涓鸿缁嗛〉闈㈢殑鍦板潃 } }; + function Infoformat(info){ + let formatObj = info.replace(/\%/g,"%25") + formatObj = info.replace(/\#/g,"%23") + formatObj = info.replace(/\&/g,"%26") + formatObj = info.replace(/\?/g,"%3F") + return formatObj; + } </script> <style> body{ @@ -445,9 +460,35 @@ console.log(options); }, methods:{ + getItemDetail:function(items) + { + var _this = this; + $.ajax({ + headers:{ + "token":_this.getUrlPar("token") + }, + url:_this.posturl+'/api/Activity/fqb_goods_detail', + type:"post", + dataType:"json", + data:{ + plat:_this.platid, + goodsid:items.goodsid + } + }).done(function(res){ + _config.jumpGoodsUrl(res.data,_this.platid); + }) + }, handleCdetailFavorite: function (items) { if(_config.jumpGoodsUrl){ - _config.jumpGoodsUrl(items); + + if(this.platid!="tb") + { + this.getItemDetail(items); + } + else{ + _config.jumpGoodsUrl(items,this.platid); + } + } return; var params = { -- Gitblit v1.9.3