Commit 03b56eb6 by 杨明

10月底需求

1 parent 7e1a3097
...@@ -11,7 +11,7 @@ import router from './router/index' ...@@ -11,7 +11,7 @@ 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)
......
...@@ -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)
......
...@@ -14,14 +14,11 @@ import { ...@@ -14,14 +14,11 @@ import {
} from "~/mixins/index"; } from "~/mixins/index";
const IMG_URL = wx.$imgUrl; const IMG_URL = wx.$imgUrl;
let leftMenuIndex = 0 let leftMenuIndex = 0
Component({ Page({
properties: { // behaviors: [imgUrlMixin],
myTabIdx: Number
},
behaviors: [imgUrlMixin],
data: { data: {
// navList: ["增值服务", "客户数字化"], // navList: ["增值服务", "客户数字化"],
// myTabIdx: 0, myTabIdx: 0,
IMG_URL, IMG_URL,
// subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl), // subscriptionBannerUrl: Object.freeze(subscriptionBannerUrl),
// subscriptionSystemData: Object.freeze(subscriptionSystemData), // subscriptionSystemData: Object.freeze(subscriptionSystemData),
...@@ -38,7 +35,6 @@ Component({ ...@@ -38,7 +35,6 @@ Component({
systemData: [], systemData: [],
productData: [], productData: [],
}, },
methods: {
// 产品点击事件 // 产品点击事件
proClick(e) { proClick(e) {
//登录的用户手机号 //登录的用户手机号
...@@ -63,7 +59,10 @@ Component({ ...@@ -63,7 +59,10 @@ Component({
}, },
// 视频点击事件 // 视频点击事件
videoClick(e) { videoClick(e) {
const { info, sceneCode } = e.detail const {
info,
sceneCode
} = e.detail
// 一级菜单ID // 一级菜单ID
const typeId = this.data.myTabIdx == 0 ? this.data.productDataId : this.data.systemDataId const typeId = this.data.myTabIdx == 0 ? this.data.productDataId : this.data.systemDataId
const obj = { const obj = {
...@@ -149,6 +148,15 @@ Component({ ...@@ -149,6 +148,15 @@ Component({
myTabIdx: id myTabIdx: id
}); });
}, },
onShow() {
if (typeof this.getTabBar === 'function' ) {
this.getTabBar((tabBar) => {
tabBar.setData({
active: 1
})
})
}
},
onLoad(option) { onLoad(option) {
// this.setData({ // this.setData({
// tabIndex: option?.tabIndex || 0 // tabIndex: option?.tabIndex || 0
...@@ -262,7 +270,7 @@ Component({ ...@@ -262,7 +270,7 @@ Component({
url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e"
}, },
corpId: "ww047bdc0f1e76cc13", corpId: "ww047bdc0f1e76cc13",
complete: (r) => { }, complete: (r) => {},
}); });
}, },
...@@ -278,29 +286,10 @@ Component({ ...@@ -278,29 +286,10 @@ Component({
"/packagesList/packageDiscovery/pages/measure/measure/measure" "/packagesList/packageDiscovery/pages/measure/measure/measure"
); );
}, },
},
attached() { attached() {
this.setData({ this.setData({
isFullSucreen: wx.$api.isFullSucreen(), isFullSucreen: wx.$api.isFullSucreen(),
}); });
}, },
pageLifetimes: {
show() {
// const app = getApp()
// app.getBaseData().then(res => {
// const productData = res[0].subList
// const systemData = res[1].subList
// // this.getSceneData(productData)
// this.setData({
// [`tabList[0].name`]: res[0].name,
// [`tabList[1]name`]: res[1].name,
// systemData,
// systemDataId: res[1].id,
// productData,
// productDataId: res[0].id,
// })
// })
}
}
}); });
\ No newline at end of file \ No newline at end of file
...@@ -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!