Commit 03b56eb6 by 杨明

10月底需求

1 parent 7e1a3097
...@@ -10,8 +10,8 @@ import '~/router/routerBefore' ...@@ -10,8 +10,8 @@ import '~/router/routerBefore'
import router from './router/index' import router from './router/index'
import BusassistantApi from "~/api/busassistantApi/index"; import BusassistantApi from "~/api/busassistantApi/index";
import { import {
Version Version
} from 'glsx-common-sdk' } from 'glsx-common-sdk'
// 有问题 前后顺序不能随意调整 // 有问题 前后顺序不能随意调整
// console.log(test) // console.log(test)
...@@ -56,11 +56,11 @@ App({ ...@@ -56,11 +56,11 @@ App({
wx.$storage = $Storage /** 挂载全局缓存方法 */ wx.$storage = $Storage /** 挂载全局缓存方法 */
wx.$eventbus = eventbus wx.$eventbus = eventbus
wx.$versionConfig = new Version({ wx.$versionConfig = new Version({
request: { request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config', baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false isSign: false
} }
}) })
// 存储设备信息 // 存储设备信息
setSystem_info() setSystem_info()
// console.log('test') // console.log('test')
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
"login/accountItems/accountItems", "login/accountItems/accountItems",
"packagesList/activityDetail/activityDetail", "packagesList/activityDetail/activityDetail",
"pages/tab/logout/logout", "pages/tab/logout/logout",
"packagesList/log/log" "packagesList/log/log",
"custom-tab-bar/index",
"pages/tab/stat/stat"
], ],
"requiredPrivateInfos": [ "requiredPrivateInfos": [
"getLocation" "getLocation"
...@@ -22,6 +24,7 @@ ...@@ -22,6 +24,7 @@
}, },
"__usePrivacyCheck__": true, "__usePrivacyCheck__": true,
"tabBar": { "tabBar": {
"custom": true,
"color": "#5A6066", "color": "#5A6066",
"selectedColor": "#3666FE", "selectedColor": "#3666FE",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
......
// custom-tab-bar/index.js
Component({
options:{
styleIsolation:'shared'
},
data: {
active: 0,
list:[
{
path:"/pages/tab/output/output",
normal: '/images/output.png',
active: '/images/output_active.png',
text:"产值"
},
{
path:"/pages/tab/discovery/discovery",
normal: '/images/home.png',
active: '/images/home_active.png',
text:"发现",
},
{
path:"/pages/tab/mine/mine",
normal: '/images/mine.png',
active: '/images/mine_active.png',
text:"我的"
}
]
},
methods: {
onChange(event) {
const {list} = this.data
this.setData({
active:event.detail
})
wx.switchTab({
url: list[event.detail].path
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"van-tabbar": "/miniprogram_npm/@vant/weapp/tabbar/index",
"van-tabbar-item": "/miniprogram_npm/@vant/weapp/tabbar-item/index"
}
}
\ No newline at end of file \ No newline at end of file
/* custom-tab-bar/index.wxss */
.van-tabbar-item{
--tabbar-item-margin-bottom: 10rpx
}
\ No newline at end of file \ No newline at end of file
<van-tabbar active="{{ active }}" bind:change="onChange">
<van-tabbar-item wx:for="{{list}}" wx:key="index">
<image
slot="icon"
src="{{ item.normal }}"
mode="aspectFit"
style="width: 24px; height: 24px;"
/>
<image
slot="icon-active"
src="{{ item.active }}"
mode="aspectFit"
style="width: 24px; height: 24px;"
/>
{{item.text}}
</van-tabbar-item>
</van-tabbar>
\ No newline at end of file \ No newline at end of file
...@@ -69,7 +69,6 @@ Component({ ...@@ -69,7 +69,6 @@ Component({
}, },
onLoad(options) { onLoad(options) {
console.log(options,'options');
const { merchantId, merchantName } = options; const { merchantId, merchantName } = options;
this.setData({ merchantId, merchantName }) this.setData({ merchantId, merchantName })
this.getSubscribeConfig(options) this.getSubscribeConfig(options)
......
...@@ -81,6 +81,14 @@ Page({ ...@@ -81,6 +81,14 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (){ onShow: function (){
if (typeof this.getTabBar === 'function' ) {
this.getTabBar((tabBar) => {
console.log(tabBar)
tabBar.setData({
active: 2
})
})
}
}, },
/** /**
......
...@@ -146,7 +146,7 @@ page { ...@@ -146,7 +146,7 @@ page {
.logoutBtn { .logoutBtn {
position: fixed; position: fixed;
bottom: 106rpx; bottom: 246rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
font-size: 32rpx !important; font-size: 32rpx !important;
......
...@@ -154,7 +154,15 @@ Page({ ...@@ -154,7 +154,15 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { }, onShow() {
if (typeof this.getTabBar === 'function' ) {
this.getTabBar((tabBar) => {
tabBar.setData({
active: 0
})
})
}
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
......
// pages/tab/stat/stat.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/stat/stat.wxss */
\ No newline at end of file \ No newline at end of file
<!--pages/tab/stat/stat.wxml-->
<text>pages/tab/stat/stat.wxml</text>
...@@ -190,7 +190,8 @@ ...@@ -190,7 +190,8 @@
} }
}, },
"setting": { "setting": {
"urlCheck": true "urlCheck": true,
"compileHotReLoad": true
}, },
"projectname": "store-assistant-assemble" "projectname": "store-assistant-assemble"
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!