Merge branches 'dev' and 'dev' of git.oa00.com:xiaowen/swsWecat into dev

* 'dev' of git.oa00.com:xiaowen/swsWecat:
  cxw-010203
  lhf
  cxw-010203
  cxw-010203

* 'dev' of git.oa00.com:xiaowen/swsWecat:
  cxw-010203
  lhf
  cxw-010203
  cxw-010203

# Conflicts:
#	pages/index/index.js
#	pages/index/index.json
#	pages/index/index.wxml
dev
liuyongli 3 years ago
commit 73b238f4f5

@ -1,19 +1,79 @@
// app.js
//app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
onLaunch: function () {
this.hidetabbar();
this.getSystemInfo();
},
//自己对wx.hideTabBar的一个封装
hidetabbar() {
wx.hideTabBar({
fail: function() {
setTimeout(function() { // 做了个延时重试一次,作为保底。
wx.hideTabBar()
}, 500)
}
});
},
getSystemInfo: function() {
let t = this;
wx.getSystemInfo({
success: function(res) {
t.globalData.systemInfo = res;
}
})
});
},
editTabbar: function() {
let tabbar = this.globalData.tabBar;
let currentPages = getCurrentPages();
let _this = currentPages[currentPages.length - 1];
let pagePath = _this.route;
(pagePath.indexOf('/') != 0) && (pagePath = '/' + pagePath);
for (let i in tabbar.list) {
tabbar.list[i].selected = false;
(tabbar.list[i].pagePath == pagePath) && (tabbar.list[i].selected = true);
}
_this.setData({
tabbar: tabbar
});
},
globalData: {
userInfo: null
systemInfo: null,//客户端设备信息
tabBar: {
"color": "#727272",
"selectedColor": "#F46368",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/components/tabbarComponent/icon/home.png",
"selectedIconPath": "/component/tabbarComponent/icon/homeSel.png"
},
{
"pagePath": "pages/insight/index",
"text": "服务",
"iconPath": "/components/tabbarComponent/icon/service.png",
"selectedIconPath": "/component/tabbarComponent/icon/serviceSel.png"
},
{
"pagePath": "pages/brandSearch/index",
"text": "导航",
"iconPath": "/components/tabbarComponent/icon/navagati.png",
"isSpecial": true,
},
{
"pagePath": "pages/varComm/index",
"text": "订单",
"iconPath": "/components/tabbarComponent/icon/order.png",
"selectedIconPath": "/component/tabbarComponent/icon/orderSel.png"
},
{
"pagePath": "pages/mine/index",
"text": "我的",
"iconPath": "/components/tabbarComponent/icon/my.png",
"selectedIconPath": "/component/tabbarComponent/icon/mySel.png"
}
]
}
}
})

@ -17,22 +17,32 @@
"tabBar": {
"list": [{
"pagePath": "pages/index/index",
"iconPath": "icons/home.png",
"selectedIconPath": "icons/homeActive.png",
"text": "首页"
},
{
"pagePath": "pages/insight/index",
"iconPath": "icons/insight.png",
"selectedIconPath": "icons/insightActive.png",
"text": "洞察"
},
{
"pagePath": "pages/brandSearch/index",
"iconPath": "icons/appSearch.png",
"selectedIconPath": "icons/appSearchActive.png",
"text": "品牌搜索"
},
{
"pagePath": "pages/varComm/index",
"iconPath": "icons/varComm.png",
"selectedIconPath": "icons/varCommActive.png",
"text": "对比"
},
{
"pagePath": "pages/mine/index",
"iconPath": "icons/mine.png",
"selectedIconPath": "icons/mineActive.png",
"text": "我的"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

@ -0,0 +1,51 @@
// tabBarComponent/tabBar.js
const app = getApp();
Component({
/**
* 组件的属性列表
*/
properties: {
tabbar: {
type: Object,
value: {
"backgroundColor": "#ffffff",
"color": "#979795",
"selectedColor": "#1c1c1b",
"list": [
{
"pagePath": "/pages/index/index",
"iconPath": "icon/icon_home.png",
"selectedIconPath": "icon/icon_home_HL.png",
"text": "首页"
},
{
"pagePath": "/pages/middle/middle",
"iconPath": "icon/icon_release.png",
"isSpecial": true,
"text": "发布"
},
{
"pagePath": "/pages/mine/mine",
"iconPath": "icon/icon_mine.png",
"selectedIconPath": "icon/icon_mine_HL.png",
"text": "我的"
}
]
}
}
},
/**
* 组件的初始数据
*/
data: {
isIphoneX: app.globalData.systemInfo.model.search('iPhone X') != -1 ? true : false
},
/**
* 组件的方法列表
*/
methods: {
}
})

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

@ -0,0 +1,13 @@
<view class="tabbar_box {{isIphoneX?'iphoneX-height':''}}" style="background-color:{{tabbar.backgroundColor}}">
<block wx:for="{{tabbar.list}}" wx:key="{{item.pagePath}}">
<navigator wx:if="{{item.isSpecial}}" class="tabbar_nav" hover-class="none" url="{{item.pagePath}}" style="color:{{tabbar.selectedColor}}" open-type="navigate">
<view class='special-wrapper'><image class="tabbar_icon" src="{{item.iconPath}}"></image></view>
<image class='special-text-wrapper'></image>
<text>{{item.text}}</text>
</navigator>
<navigator wx:else class="tabbar_nav" hover-class="none" url="{{item.pagePath}}" style="color:{{item.selected ? tabbar.selectedColor : tabbar.color}}" open-type="switchTab">
<image class="tabbar_icon" src="{{item.selected ? item.selectedIconPath : item.iconPath}}"></image>
<text>{{item.text}}</text>
</navigator>
</block>
</view>

@ -0,0 +1,63 @@
.tabbar_box{
display: flex;
flex-direction: row;
justify-content: space-around;
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
width: 100%;
height: 98rpx;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}
.tabbar_box.iphoneX-height{
padding-bottom: 66rpx;
}
.middle-wrapper{
position: absolute;
right: 310rpx;
bottom: 0;
background-color: #fff;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
border-top: 2rpx solid #f2f2f3;
}
.middle-wrapper.iphoneX-height{
bottom: 66rpx;
}
.tabbar_nav{
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 20rpx;
height: 100%;
position: relative;
}
.tabbar_icon{
width: 56rpx;
height: 56rpx;
}
.special-wrapper{
position: absolute;
left: 77rpx;
top: -36rpx;
width: 96rpx;
height: 96rpx;
border-radius: 50%;
border-top: 2rpx solid #f2f2f3;
background-color: #fff;
text-align: center;
box-sizing: border-box;
padding: 6rpx;
}
.special-wrapper .tabbar_icon{
width: 84rpx;
height: 84rpx;
}
.special-text-wrapper{
width: 56rpx;
height: 56rpx;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -4,6 +4,7 @@ const app = getApp()
Page({
data: {
tabbar:{},
condition: ['二十四小时','最近七天','最近三十天','自定义'],
toplist: [
{
@ -47,7 +48,8 @@ Page({
],
},
onLoad() {
onLoad: function (options) {
app.editTabbar()
},
})

@ -1,5 +1,7 @@
{
"usingComponents": {},
"usingComponents": {
"tabbar": "../../components/tabbarComponent/tabbar"
},
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#006BFF",
"navigationBarTitleText": "硕为思汽车智能洞查",

@ -1,13 +1,9 @@
<!--index.wxml-->
<view class="container">
<scroll-view class="scrollList" scroll-x="true" enable-flex="true">
<text wx:for="{{condition}}" class="{{index === 0 ? 'actived' : ''}}">{{item}}</text>
</scroll-view>
<text wx:for="{{condition}}" class="{{index === 0 ? 'actived' : ''}}">{{item}}</text>
</scroll-view>
<view class="top">
<!-- <view style="width: 100%;position: fixed;left: 0rpx;">
<image class="logo1" src="" style="width: 286rpx;height: 24rpx;"></image>
<image class="logo2" src="" style="width: 750rpx;height: 100rpx;"></image>
</view> -->
<view wx:for="{{toplist}}" wx:key="url" class="top_box">
<view class="box_image">
<image style="width: 100%;height: 100%;" src="{{item.url}}"></image>
@ -18,4 +14,5 @@
</view>
</view>
</view>
<tabbar tabbar="{{tabbar}}"></tabbar>
</view>

@ -1,3 +1,10 @@
<view class="container">
<text>我的</text>
<view class="mine_title">
<view class="title_left">
<view style="font-size:40rpx">胆怯的麦粒</view>
<view style="font-size:24rpx; color: #9b9999;"> 欢迎您使⽤硕为思平台</view>
</view>
<view class="title_right">
</view>
</view>
</view>

Loading…
Cancel
Save