Commit b3c5586e by 李嘉林

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

parent b4a1e9ea
......@@ -38,6 +38,7 @@ export default {
},
computed: {
pageUrl() {
console.log(this.link,'******',this.page,'-------',this.params,'++++++++')
return (
this.link +
this.page +
......@@ -50,7 +51,7 @@ export default {
},
},
onLoad(options) {
this.params = this.$options.data.call(this).params
let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : "";
......@@ -69,6 +70,7 @@ export default {
this.mpApp.globalData.footerVal.componentData.list[this.index].link
);
let query=serialize(options)
console.log(query,'==================', this.params,'-----------------')
this.params+=query?'&'+query:''
}
let reg = /^\/pages\//;
......
......@@ -15,10 +15,36 @@
<script>
let forUrlAddKey = require("mayi-front-tools/forUrlAddKey").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;
import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
import login from "@/api/login";
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 {
data() {
return {
......@@ -30,6 +56,7 @@ export default {
};
},
async onLoad(options) {
console.log(options,'--------------------options')
this.link='';
/**
* scene=sso 第三方需要登录的页面
......@@ -105,6 +132,7 @@ export default {
}
},
async onShareAppMessage(res) {
console.log(res,'----------------------onShareAppMessage---------res')
let url = "";
console.log(this.newWindowHref + "this.newWindowHref");
//分享路径
......@@ -113,9 +141,9 @@ export default {
} else {
url = res.webViewUrl;
}
console.log(removeUrlKey(url, ["token"]),777777777)
console.log(forUrlAddKey2(url, ["token"]),777777777)
if(url.indexOf('setToken={token}') == -1) {
url = removeUrlKey(url, ["token"]);
url = forUrlAddKey2(url, ["token"]);
}
//分享页面去掉登录态
if (url.indexOf("sessionid") > -1) {
......@@ -159,6 +187,7 @@ export default {
console.log(this.link,89999999)
},
getSsoBcakUrl(link) {
console.log(link,'--------------------------------------------163-----link')
let op = {
callbackUrl: link,
email: "",
......@@ -166,7 +195,7 @@ export default {
// mobilephone: '15821335747',hgFTLLhgnBmeOyCkcbyv
// toAppid: 'hgFTLLhgnBmeOyCkcbyv',
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) => {
if (res.data.code == "200") {
......
......@@ -125,12 +125,8 @@
style="color:{{datas.componentData['priceColor']}};font-size:{{datas.componentData['priceFontSize']}}em;"
wx:if="{{datas.componentData['priceShow']}}"
>
<text>
¥{{items!=null ? items['minPrice']:0}}
</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>
<text>¥{{items!=null ? items['minPrice']:0}}</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 class="vipPrice2 flex" wx:if="{{datas.componentData.vipPrice}}">
<view class="left" wx:if="{{items.showVipPrice==true}}">
......
......@@ -214,7 +214,7 @@ align-items: flex-start;
align-items: flex-end;
}
.priceItem .price{
align-items: center;
align-items: flex-end;
}
.vipPrice2{
align-items: flex-end;
......
......@@ -70,7 +70,7 @@
</view>
<view
class="btn"
style="background:#333;"
style="background:{{mainColor}};"
data-items="{{goodsList[index]}}"
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