Parcourir la source

临时提交~

release/210823_需求对对碰
王饶冀 il y a 3 ans
Parent
révision
2a1e5ef7ba

+ 28
- 8
app.js Voir le fichier

@@ -15,14 +15,34 @@ App({
},
globalData: {
userInfo: null,
openid: "",
appid: "",
sessionKey: "",
suiteCode: "",
customerId: "",
openid: "",
appid: "",
sessionKey: "",
suiteCode: "",
customerId: "",
},
// mangerUrl: 'http://test2.hhrchina.com',
mangerUrl: "http://192.168.18.156",
// mangerUrl: "https://www.hhrchina.com",
// mangerUrlPath: "https://www.hhrchina.com",
mangerUrl: "http://192.168.18.156",
// mangerUrl: "https://www.hhrchina.com",
// mangerUrlPath: "https://www.hhrchina.com",

// 自定义显示tabbar
onTabBar: function (key) {
var _curPageArr = getCurrentPages();
var _curPage = _curPageArr[_curPageArr.length - 1];
var _pagePath = _curPage.__route__;
if (_pagePath.indexOf('/') != 0) {
_pagePath = '/' + _pagePath;
}
var tabBar = this.tabBarData[key];
for (var i = 0; i < tabBar.list.length; i++) {
tabBar.list[i].active = false;
if (tabBar.list[i].pagePath == _pagePath) {
tabBar.list[i].active = true; // 根据页面地址设置当前页面状态
}
}
_curPage.setData({
tabBar: tabBar
});
},
})

+ 4
- 1
app.json Voir le fichier

@@ -1,7 +1,10 @@
{
"pages":[
"pages/index/index",
"pages/logs/logs"
"pages/logs/logs",
"pages/releaseModule/index",
"pages/myModule/index",
"pages/msgModule/index"
],
"usingComponents": {
"tabBar": "/components/tabbar/tabbar"

+ 25
- 10
components/tabbar/tabbar.js Voir le fichier

@@ -17,17 +17,29 @@ Component({
data: {
list: [
{
text: "对话",
iconPath: "/images/tabbar/tabbar_1.png",
selectedIconPath: "/images/tabbar/tabbar_1.png",
dot: true
text: "首页",
pagePath: "/pages/index/index",
iconPath: "/images/tabbar/home-bar.png",
selectedIconPath: "/images/tabbar/home-bar.png",
},
{
text: "设置",
iconPath: "/images/tabbar/tabbar_2.png",
selectedIconPath: "/images/tabbar/tabbar_2.png",
badge: '99+'
}
text: "发布需求",
pagePath: "/pages/releaseModule/index",
iconPath: "/images/tabbar/release-bar.png",
selectedIconPath: "/images/tabbar/release-bar.png",
},
{
text: "消息",
pagePath: "/pages/releaseModule/index",
iconPath: "/images/tabbar/msg-bar.png",
selectedIconPath: "/images/tabbar/msg-bar.png",
},
{
text: "我的",
pagePath: "/pages/myModule/index",
iconPath: "/images/tabbar/my-bar.png",
selectedIconPath: "/images/tabbar/my-bar.png",
},
]
},

@@ -36,7 +48,10 @@ Component({
*/
methods: {
tabChange(e) {
console.log('tab change--aa', e)
console.log('tab change', e)
const url = e.detail.item.pagePath;
wx.redirectTo({ url });
// wx.navigateTo({ url })
}
}
})

+ 6
- 1
components/tabbar/tabbar.wxml Voir le fichier

@@ -1,3 +1,8 @@
<view class="page">
<mp-tabbar style="position:fixed;bottom:0;width:100%;left:0;right:0;" list="{{list}}" bindchange="tabChange"></mp-tabbar>
<mp-tabbar
style="position:fixed;bottom:0;width:100%;left:0;right:0;"
list="{{list}}"
bindchange="tabChange"
current="{{currentIndex}}"
/>
</view>

BIN
images/tabbar/home-bar.png Voir le fichier


BIN
images/tabbar/msg-bar.png Voir le fichier


BIN
images/tabbar/my-bar.png Voir le fichier


BIN
images/tabbar/release-bar.png Voir le fichier


BIN
images/tabbar/tabbar_1.png Voir le fichier


BIN
images/tabbar/tabbar_2.png Voir le fichier


BIN
images/tabbar/tabbar_3.png Voir le fichier


+ 5
- 0
pages/A目录说明.md Voir le fichier

@@ -0,0 +1,5 @@
### 目录说明
- index 首页
- releaseModule 发布需求
- msgModule 消息
- myModule 我的

+ 1
- 1
pages/index/index.wxml Voir le fichier

@@ -1,6 +1,6 @@
<!--index.wxml-->
<view class="container">
康慧慧V8
康慧慧V9
<tabBar currentIndex="{{currentIndex}}"></tabBar>
</view>


+ 9
- 0
pages/msgModule/index.js Voir le fichier

@@ -0,0 +1,9 @@
// pages/release/release.js
// 获取应用实例
const app = getApp()

Page({
data: {
currentIndex: 2
},
})

+ 4
- 0
pages/msgModule/index.json Voir le fichier

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

+ 3
- 0
pages/msgModule/index.wxml Voir le fichier

@@ -0,0 +1,3 @@
<!--pages/msgPage/msgPage.wxml-->
<text>pages/msgPage/msgPage.wxml</text>
<tabBar currentIndex="{{currentIndex}}"></tabBar>

+ 1
- 0
pages/msgModule/index.wxss Voir le fichier

@@ -0,0 +1 @@
/* pages/msgPage/msgPage.wxss */

+ 9
- 0
pages/myModule/index.js Voir le fichier

@@ -0,0 +1,9 @@
// pages/release/release.js
// 获取应用实例
const app = getApp()

Page({
data: {
currentIndex: 3
},
})

+ 4
- 0
pages/myModule/index.json Voir le fichier

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

+ 3
- 0
pages/myModule/index.wxml Voir le fichier

@@ -0,0 +1,3 @@
<!--pages/myPage/myPage.wxml-->
<text>pages/myPage/myPage.wxml</text>
<tabBar currentIndex="{{currentIndex}}"></tabBar>

+ 1
- 0
pages/myModule/index.wxss Voir le fichier

@@ -0,0 +1 @@
/* pages/myPage/myPage.wxss */

+ 9
- 0
pages/releaseModule/index.js Voir le fichier

@@ -0,0 +1,9 @@
// pages/release/release.js
// 获取应用实例
const app = getApp()

Page({
data: {
currentIndex: 1
},
})

+ 4
- 0
pages/releaseModule/index.json Voir le fichier

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

+ 3
- 0
pages/releaseModule/index.wxml Voir le fichier

@@ -0,0 +1,3 @@
<!--pages/release/release.wxml-->
<text>pages/release/release.wxml</text>
<tabBar currentIndex="{{currentIndex}}"></tabBar>

+ 1
- 0
pages/releaseModule/index.wxss Voir le fichier

@@ -0,0 +1 @@
/* pages/release/release.wxss */

Chargement…
Annuler
Enregistrer