为改新的浅蓝色做准备

This commit is contained in:
lym
2026-03-10 16:57:45 +08:00
parent 0f6e2af469
commit cf6b5179fc
10 changed files with 126 additions and 227 deletions

64
app.js
View File

@@ -178,7 +178,7 @@ App({
}, },
globalData:{ globalData:{
userInfo:null, userInfo:null,
apiurl:"https://g.hnyhua.cn", //https://g.hnyhua.cn apiurl:"http://localhost:24382", //https://g.hnyhua.cn
IFRefreshCart:0, IFRefreshCart:0,
IFRefreshsell:0, IFRefreshsell:0,
IFRefreshsell0:0, IFRefreshsell0:0,
@@ -201,6 +201,66 @@ App({
selladdress0:{}, selladdress0:{},
IFYGM:0, IFYGM:0,
IFwxLogin:0,//是否点击微信一键登录1还是扫码自动登录0 IFwxLogin:0,//是否点击微信一键登录1还是扫码自动登录0
servermsg:"" servermsg:"",
// 全局菜单配置
tabBarList: [
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/shop/index",
"iconPath": "/images/footer-icon-07.png",
"selectedIconPath": "/images/footer-icon-07-active.png",
"text": "商城"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
],
// 特殊权限菜单配置bdshEnable=1
tabBarListBdsh: [
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/shop/index",
"iconPath": "/images/footer-icon-07.png",
"selectedIconPath": "/images/footer-icon-07-active.png",
"text": "商城"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
} }
}) })

View File

@@ -66,7 +66,7 @@
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "银花优选", "navigationBarTitleText": "仁E森命",
"navigationBarBackgroundColor": "#1E88E5", "navigationBarBackgroundColor": "#1E88E5",
"backgroundColor": "#F2f2f2", "backgroundColor": "#F2f2f2",
"enablePullDownRefresh": true "enablePullDownRefresh": true
@@ -89,6 +89,12 @@
"selectedIconPath": "images/footer-icon-05-active.png", "selectedIconPath": "images/footer-icon-05-active.png",
"text": "资讯" "text": "资讯"
}, },
{
"pagePath": "pages/shop/index",
"iconPath": "images/footer-icon-07.png",
"selectedIconPath": "images/footer-icon-07-active.png",
"text": "商城"
},
{ {
"pagePath": "pages/business/index", "pagePath": "pages/business/index",
"iconPath": "images/footer-icon-02.png", "iconPath": "images/footer-icon-02.png",

View File

@@ -2,36 +2,24 @@ Component({
data: { data: {
selected: 0, selected: 0,
color: "#6e6d6b", color: "#6e6d6b",
selectedColor: "#00B050", selectedColor: "#1E88E5",
"list": [ "list": []
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
}, },
attached() { attached() {
const app = getApp();
const userId = wx.getStorageSync("userId");
const userInfodata = wx.getStorageSync("userInfo");
let ifsel = 0;
if (userId && userInfodata) {
const userInfo = JSON.parse(userInfodata);
ifsel = userInfo.bdshEnable;
}
// 从全局配置获取菜单列表
this.setData({
list: ifsel == 1 ? app.globalData.tabBarListBdsh : app.globalData.tabBarList
});
}, },
methods: { methods: {
switchTab(e) { switchTab(e) {

View File

@@ -23,73 +23,22 @@ Page( {
keyword:"", keyword:"",
},onShow: function () { },onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) { if (typeof this.getTabBar === 'function' && this.getTabBar()) {
that0=this; const userId = wx.getStorageSync("userId")
var userId = wx.getStorageSync("userId") const userInfodata = wx.getStorageSync("userInfo")
var userInfodata = wx.getStorageSync("userInfo") let sel = 3;
var sel=2;
var ifsel=0; // 根据用户权限调整选中索引
if (userId && userInfodata) { if (userId && userInfodata) {
var userInfo = JSON.parse(userInfodata) const userInfo = JSON.parse(userInfodata);
if (userInfo.bdshEnable == 1) {
ifsel=userInfo.bdshEnable; sel = 3; // 在特殊权限菜单中,"门店"选项不存在,"我的"选项索引为3
}
if(ifsel==1){
that0.getTabBar().setData({
"list": [
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
} else { } else {
that0.getTabBar().setData({ sel = 3; // 在普通菜单中,"门店"选项索引为3
"list": [ }
{ }
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{ // 只设置选中状态,菜单列表由全局配置管理
"pagePath": "/pages/my/index", this.getTabBar().setData({
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
}
that0.getTabBar().setData({
selected: sel selected: sel
}) })
} }

View File

@@ -1,4 +1,4 @@
var WxParse = null; var WxParse = null;
//获取应用实例 //获取应用实例
var app = getApp() var app = getApp()
var sopenFrame = null var sopenFrame = null
@@ -124,70 +124,9 @@ Page({
}, },
onShow: function () { onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) { if (typeof this.getTabBar === 'function' && this.getTabBar()) {
that0 = this; // 只设置选中状态,菜单列表由全局配置管理
var userId = wx.getStorageSync("userId") this.getTabBar().setData({
var userInfodata = wx.getStorageSync("userInfo") selected: 0
var sel = 0;
var ifsel = 0;
if (userId && userInfodata) {
var userInfo = JSON.parse(userInfodata)
ifsel = userInfo.bdshEnable;
}
if (ifsel == 1) {
that0.getTabBar().setData({
"list": [{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
} else {
that0.getTabBar().setData({
"list": [{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
}
that0.getTabBar().setData({
selected: sel
}) })
} }
}, },

View File

@@ -128,7 +128,7 @@
<view class="title">{{cell.name}}</view> <view class="title">{{cell.name}}</view>
<view class="price">零售价:¥{{cell.scje}}</view> <view class="price">零售价:¥{{cell.scje}}</view>
<view class="price">会员价:¥{{cell.hyje}}</view> <view class="price">会员价:¥{{cell.hyje}}</view>
<view class="right_button"> <view wx:if="{{products.length == 1}}" class="right_button">
<view>立即购买</view> <view>立即购买</view>
</view> </view>
</view> </view>
@@ -160,7 +160,7 @@
<view class="title">{{cell.name}}</view> <view class="title">{{cell.name}}</view>
<view class="price" style="display:none;">零售价:¥{{cell.scje}}</view> <view class="price" style="display:none;">零售价:¥{{cell.scje}}</view>
<view class="price">兑换券:{{cell.hyje}}</view> <view class="price">兑换券:{{cell.hyje}}</view>
<view class="right_button"> <view wx:if="{{products0.length == 1}}" class="right_button">
<view>立即购买</view> <view>立即购买</view>
</view> </view>
</view> </view>

View File

@@ -46,66 +46,23 @@ Page({
that0 = this; that0 = this;
var userId = wx.getStorageSync("userId") var userId = wx.getStorageSync("userId")
var userInfodata = wx.getStorageSync("userInfo") var userInfodata = wx.getStorageSync("userInfo")
var sel = 3; var sel = 4;
var ifsel = 0; var ifsel = 0;
if (userId && userInfodata) { if (userId && userInfodata) {
var userInfo = JSON.parse(userInfodata) var userInfo = JSON.parse(userInfodata)
ifsel = userInfo.bdshEnable; ifsel = userInfo.bdshEnable;
that0.GetSignInfo(); that0.GetSignInfo();
} }
// 根据用户权限调整选中索引
if (ifsel == 1) { if (ifsel == 1) {
sel = 3; sel = 3; // 在特殊权限菜单中,"我的"选项索引为3
that0.getTabBar().setData({
"list": [{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
} else { } else {
that0.getTabBar().setData({ sel = 4; // 在普通菜单中,"我的"选项索引为4
"list": [{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
})
} }
// 只设置选中状态,菜单列表由全局配置管理
that0.getTabBar().setData({ that0.getTabBar().setData({
selected: sel selected: sel
}) })

View File

@@ -53,7 +53,7 @@
<view class="readbox"> <view class="readbox">
<view bindtap="onxz"> <view bindtap="onxz">
<view><image src="{{xzimage}}"></image></view> <view><image src="{{xzimage}}"></image></view>
<view>本人已阅读并同意银花优选</view> <view>本人已阅读并同意仁E森命</view>
</view> </view>
<view> <view>
<view class="red" bindtap="onread" data-id="341">《用户服务协议》</view> <view class="red" bindtap="onread" data-id="341">《用户服务协议》</view>

View File

@@ -52,7 +52,7 @@
</block> </block>
</view> </view>
</view> </view>
<view class="choice_text"> <!-- <view class="choice_text">
<view class="line_flag"></view> <view class="line_flag"></view>
<text>推荐商品</text> <text>推荐商品</text>
<view class="more"></view> <view class="more"></view>
@@ -78,7 +78,7 @@
</view> </view>
</block> </block>
</view> </view>
</view> </view> -->
<view style="height: 4em;"></view> <view style="height: 4em;"></view>
<loading hidden="{{loadingHidden}}"> <loading hidden="{{loadingHidden}}">
加载中... 加载中...

View File

@@ -1,5 +1,5 @@
page{ page{
background: #ccc; background: #FFFFFF;
} }
.container { .container {
position: relative; position: relative;
@@ -102,10 +102,10 @@ swiper-item image {
margin:0 auto; margin:0 auto;
} }
.menus .item-menu view.hover view{ .menus .item-menu view.hover view{
color:#000; color:#1E88E5;
font-weight: 900; font-weight: 900;
line-height: 2.5em; line-height: 2.5em;
border-bottom: 3px solid #ff4d00; border-bottom: 3px solid #1E88E5;
} }
.mydata_box{ .mydata_box{
float:left; float:left;
@@ -222,7 +222,7 @@ swiper-item image {
width:0.5em; width:0.5em;
height: 1.5em; height: 1.5em;
line-height: 1.5em; line-height: 1.5em;
background-color: #f0514d; background-color: #1E88E5;
border-radius:0.2em; border-radius:0.2em;
} }
@@ -230,7 +230,7 @@ swiper-item image {
flex: 1; flex: 1;
text-align: right; text-align: right;
align-self: center; align-self: center;
color:#ff0000 color:#1E88E5
} }
.choice_text{ .choice_text{
margin-top: 0.5em; margin-top: 0.5em;
@@ -239,7 +239,7 @@ swiper-item image {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
background-color: #1D7946; background-color: #1565C0;
} }
.choice_text .line_flag{ .choice_text .line_flag{
margin-top: 0em; margin-top: 0em;
@@ -248,7 +248,7 @@ swiper-item image {
width:0.5em; width:0.5em;
height: 1.5em; height: 1.5em;
line-height: 1.5em; line-height: 1.5em;
background-color: #00B050; background-color: #1E88E5;
border-radius:0.2em; border-radius:0.2em;
} }
.choice_text text{ .choice_text text{
@@ -327,7 +327,7 @@ box-sizing: border-box;
.choice_box .choice_list .je .jeto{ .choice_box .choice_list .je .jeto{
display: flex; display: flex;
flex-direction:row; flex-direction:row;
color: #00B050; color: #1E88E5;
} }
.choice_box .choice_list .je .jeto.jeto0{ .choice_box .choice_list .je .jeto.jeto0{