Commit 588687ad authored by 罗超's avatar 罗超

调整部分样式

parent ca7feb03
......@@ -31,6 +31,7 @@ export default {
},
(res) => {
uni.setStorageSync("basedata", res.data);
uni.setStorageSync('navs', res.data.navbar.navs??[])
this.basedata = res.data;
this.$uiConfig.mainColor=res.data.mall.setting.mallStyle.main
this.$uiConfig.secondary=res.data.mall.setting.mallStyle.secondary
......
......@@ -158,15 +158,11 @@ export default {
}
// #endif
});
if(uni.getStorageSync("basedata")){
this.navs = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").navbar.navs
: [];
if(uni.getStorageSync("navs")){
this.navs = uni.getStorageSync("navs")??[];
}else{
setTimeout(()=>{
this.navs = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").navbar.navs
: [];
this.navs = uni.getStorageSync("navs")??[];
this.activeHandler();
},3000)
}
......
......@@ -2,8 +2,7 @@
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"pages": [{
"path": "pages/index/index",
"enablePullDownRefresh": true,
"style": {
......@@ -64,8 +63,7 @@
// },
{
"root": "pages/balance",
"pages": [
{
"pages": [{
"path": "recharge"
},
{
......@@ -88,6 +86,8 @@
},
"pages": [{
"path": "index"
}, {
"path": "share"
}]
},
{
......@@ -105,22 +105,21 @@
},
{
"root": "pages/mySupplier",
"pages": [
{
"pages": [{
"path": "index/index",
"style": {
"navigationStyle": "custom"
}
},{
"path":"myBill"
},{
"path":"billDetails"
},{
"path":"mySupplierList"
},{
"path":"myProduct"
},{
"path":"supplierOrder"
}, {
"path": "myBill"
}, {
"path": "billDetails"
}, {
"path": "mySupplierList"
}, {
"path": "myProduct"
}, {
"path": "supplierOrder"
}
]
......
......@@ -175,11 +175,26 @@ export default {
//兼容之前小程序的调转
this.getjump(options.scene);
}
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
});
if(uni.getStorageSync('mall_UserInfo')){
let uid=uni.getStorageSync('mall_UserInfo').UserId
wx.getUserInfo({
success: function (res) {
let msg={
Id:uid,
AliasName:res.userInfo.nickName,
Photo:res.userInfo.avatarUrl
}
that.updateuserinfo(msg)
},
});
}
// #endif
this.init();
let set = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").mall.setting
......@@ -196,6 +211,7 @@ export default {
this.isShowBack();
uni.showNavigationBarLoading();
},
// #ifdef MP-WEIXIN
onShareTimeline() {
setTimeout(() => {
console.log("分享调用");
......@@ -227,6 +243,7 @@ export default {
imageUrl: this.setting.share_pic ? this.setting.share_pic : "",
};
},
// #endif
onShow() {
setTimeout(() => {
uni.hideNavigationBarLoading();
......@@ -236,15 +253,25 @@ export default {
},
methods: {
updateuserinfo(msg){
this.request2(
{
url: "/api/MemberUser/SetMemberPhoto",
data: msg,
},
(res) => {
//静默处理不做任何提示
},
(error) => {}
);
},
goback() {
uni.navigateBack({
delta: 1,
});
},
isShowBack() {
let navs = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").navbar.navs
: [];
let navs = uni.getStorageSync("navs") ?? [];
if (navs) {
let t = getCurrentPages();
let query = t[t.length - 1].__displayReporter.query;
......@@ -255,10 +282,10 @@ export default {
if (queryString != "") {
queryString = "?" + queryString.substring(1, queryString.length);
}
this.crtPath = "/" + t[t.length - 1].route + queryString;
let crtPath = "/" + t[t.length - 1].route + queryString;
let isExsit = false;
navs.forEach((x, i) => {
if (x.url == this.crtPath) {
if (x.url == crtPath) {
isExsit = true;
}
});
......@@ -304,6 +331,9 @@ export default {
(res) => {
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData = res.data;
if (res.data.navbar.navs) {
uni.setStorageSync("navs", res.data.navbar.navs);
}
uni.setStorageSync("basedata", res.data);
if (res.data.home_pages.title != "") {
if (this.pageId == 0) {
......@@ -344,7 +374,6 @@ export default {
},
formatBg() {
this.myPageData.home_pages.navs.forEach((y) => {
y.template.data.forEach((x) => {
if (x.id == "background") {
let t = "";
......@@ -380,8 +409,8 @@ export default {
// y.templateBg +="padding-bottom:"+(this.$uiConfig.is_bang ? '88px' : '60px')+";box-sizing: border-box;";
}
});
if(!y.templateBg){
y.templateBg={titleColor:"#000"};
if (!y.templateBg) {
y.templateBg = { titleColor: "#000" };
}
});
},
......@@ -443,7 +472,6 @@ export default {
border-bottom: 12px solid black;
position: fixed;
right: 65px;
}
.index-title {
line-height: 45px !important;
......
This diff is collapsed.
This diff is collapsed.
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