Commit b3c5586e by 李嘉林

道可兼容、首页组件样式优化

parent b4a1e9ea
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
}, },
computed: { computed: {
pageUrl() { pageUrl() {
console.log(this.link,'******',this.page,'-------',this.params,'++++++++')
return ( return (
this.link + this.link +
this.page + this.page +
...@@ -50,7 +51,7 @@ export default { ...@@ -50,7 +51,7 @@ export default {
}, },
}, },
onLoad(options) { onLoad(options) {
this.params = this.$options.data.call(this).params
let ss = wx.getStorageSync("sessionid"); let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : ""; this.ss = ss ? `&sessionid=${ss}` : "";
...@@ -69,6 +70,7 @@ export default { ...@@ -69,6 +70,7 @@ export default {
this.mpApp.globalData.footerVal.componentData.list[this.index].link this.mpApp.globalData.footerVal.componentData.list[this.index].link
); );
let query=serialize(options) let query=serialize(options)
console.log(query,'==================', this.params,'-----------------')
this.params+=query?'&'+query:'' this.params+=query?'&'+query:''
} }
let reg = /^\/pages\//; let reg = /^\/pages\//;
......
...@@ -15,10 +15,36 @@ ...@@ -15,10 +15,36 @@
<script> <script>
let forUrlAddKey = require("mayi-front-tools/forUrlAddKey").default; let forUrlAddKey = require("mayi-front-tools/forUrlAddKey").default;
let getUrlKey = require("mayi-front-tools/getUrlKey").default; let getUrlKey = require("mayi-front-tools/getUrlKey").default;
let getUrlAllKey = require("mayi-front-tools/getUrlAllKey").default;
let removeUrlKey = require("mayi-front-tools/removeUrlKey").default; let removeUrlKey = require("mayi-front-tools/removeUrlKey").default;
import { serialize, getQueryVariable, DFSImg } from "@/utils/index"; import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
import login from "@/api/login"; import login from "@/api/login";
import indexApi from "@/api/index"; import indexApi from "@/api/index";
function forUrlAddKey2(url, params) {
let urlHost = url.slice(0, url.indexOf('?'));
let urlParams = null;
let url2 = url;
let url3 = '';
if(url2.includes('#/')){
url2 = url.split('#/')[0];
url3 = url.split('#/')[1];
}
urlParams = getUrlAllKey(url2)
if (params && params.length) {
params.forEach(res => {
delete urlParams[res]
})
}
let datas = [];
for (let key in urlParams) {
datas.push(key + '=' + urlParams[key])
}
if (datas.length) {
return urlHost + '?' + datas.join('&') + (url3?`#/${url3}`:'')
} else {
return urlHost
}
}
export default { export default {
data() { data() {
return { return {
...@@ -30,6 +56,7 @@ export default { ...@@ -30,6 +56,7 @@ export default {
}; };
}, },
async onLoad(options) { async onLoad(options) {
console.log(options,'--------------------options')
this.link=''; this.link='';
/** /**
* scene=sso 第三方需要登录的页面 * scene=sso 第三方需要登录的页面
...@@ -105,6 +132,7 @@ export default { ...@@ -105,6 +132,7 @@ export default {
} }
}, },
async onShareAppMessage(res) { async onShareAppMessage(res) {
console.log(res,'----------------------onShareAppMessage---------res')
let url = ""; let url = "";
console.log(this.newWindowHref + "this.newWindowHref"); console.log(this.newWindowHref + "this.newWindowHref");
//分享路径 //分享路径
...@@ -113,9 +141,9 @@ export default { ...@@ -113,9 +141,9 @@ export default {
} else { } else {
url = res.webViewUrl; url = res.webViewUrl;
} }
console.log(removeUrlKey(url, ["token"]),777777777) console.log(forUrlAddKey2(url, ["token"]),777777777)
if(url.indexOf('setToken={token}') == -1) { if(url.indexOf('setToken={token}') == -1) {
url = removeUrlKey(url, ["token"]); url = forUrlAddKey2(url, ["token"]);
} }
//分享页面去掉登录态 //分享页面去掉登录态
if (url.indexOf("sessionid") > -1) { if (url.indexOf("sessionid") > -1) {
...@@ -159,6 +187,7 @@ export default { ...@@ -159,6 +187,7 @@ export default {
console.log(this.link,89999999) console.log(this.link,89999999)
}, },
getSsoBcakUrl(link) { getSsoBcakUrl(link) {
console.log(link,'--------------------------------------------163-----link')
let op = { let op = {
callbackUrl: link, callbackUrl: link,
email: "", email: "",
...@@ -166,7 +195,7 @@ export default { ...@@ -166,7 +195,7 @@ export default {
// mobilephone: '15821335747',hgFTLLhgnBmeOyCkcbyv // mobilephone: '15821335747',hgFTLLhgnBmeOyCkcbyv
// toAppid: 'hgFTLLhgnBmeOyCkcbyv', // toAppid: 'hgFTLLhgnBmeOyCkcbyv',
toAppid: getUrlKey(link, "toAppid"), //道可 toAppid: getUrlKey(link, "toAppid"), //道可
wxAvatarUrl: this.$store.state.userInfo.avatarUrl, wxAvatarUrl: this.$store.state.userInfo?this.$store.state.userInfo.avatarUrl:'',
}; };
login.getSsoBcakUrl(op).then((res) => { login.getSsoBcakUrl(op).then((res) => {
if (res.data.code == "200") { if (res.data.code == "200") {
......
...@@ -125,12 +125,8 @@ ...@@ -125,12 +125,8 @@
style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;" style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;"
wx:if="{{datas.componentData['priceShow']}}" wx:if="{{datas.componentData['priceShow']}}"
> >
<text> <text>¥{{items!=null ? items['minPrice']:0}}</text>
¥{{items!=null ? items['minPrice']:0}} <text style="font-size:24rpx;color:#999;text-decoration:line-through;" wx:if="{{items!=null&&datas.componentData['priceMarking']&&items['minGoodsSuggestedRetailPrice']&&(items['minPrice']-0<items['minGoodsSuggestedRetailPrice']-0)&&datas.componentData['columnNum']<3}}">¥{{items['minGoodsSuggestedRetailPrice']}}</text>
</text>
<text style="font-size:24rpx;color:#999;text-decoration:line-through;" wx:if="{{items!=null&&datas.componentData['priceMarking']&&items['minGoodsSuggestedRetailPrice']&&(items['minPrice']-0<items['minGoodsSuggestedRetailPrice']-0)&&datas.componentData['columnNum']<3}}">
¥{{items['minGoodsSuggestedRetailPrice']}}
</text>
</view> </view>
<view class="vipPrice2 flex" wx:if="{{datas.componentData.vipPrice}}"> <view class="vipPrice2 flex" wx:if="{{datas.componentData.vipPrice}}">
<view class="left" wx:if="{{items.showVipPrice==true}}"> <view class="left" wx:if="{{items.showVipPrice==true}}">
......
...@@ -214,7 +214,7 @@ align-items: flex-start; ...@@ -214,7 +214,7 @@ align-items: flex-start;
align-items: flex-end; align-items: flex-end;
} }
.priceItem .price{ .priceItem .price{
align-items: center; align-items: flex-end;
} }
.vipPrice2{ .vipPrice2{
align-items: flex-end; align-items: flex-end;
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</view> </view>
<view <view
class="btn" class="btn"
style="background:#333;" style="background:{{mainColor}};"
data-items="{{goodsList[index]}}" data-items="{{goodsList[index]}}"
catchtap="onclickOrder" catchtap="onclickOrder"
> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment