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

调整部分样式

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