Commit 35f514ce by 赵雅纹

Merge branch 'dev_7.1.0' into feature-zyw-sc

parents 0cd0b2c2 0e2ad93b
......@@ -18,9 +18,7 @@
"pages/shareNumber/shareNumber",
"pages/cart/cart",
"pages/my/my",
"component/bottom/bottom",
"pages/wantToBuyDetail/wantToBuyDetail",
"component/buyImageSwiper/buyImageSwiper",
"pages/myShare/myShare",
"pages/user-center/user-center",
"pages/productDetail/productDetail",
......@@ -57,35 +55,6 @@
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"tabBar": {
"custom": true,
"list": [
{
"pagePath": "pages/userCenter/userCenter",
"text": "首页",
"iconPath": "assets/imgs/7_1_0/home_un.png",
"selectedIconPath": "assets/imgs/7_1_0/home.png"
},
{
"pagePath": "pages/category/category",
"text": "分类",
"iconPath": "assets/imgs/7_1_0/category_un.png",
"selectedIconPath": "assets/imgs/7_1_0/category.png"
},
{
"pagePath": "pages/cart/cart",
"text": "购物车",
"iconPath": "assets/imgs/7_1_0/cart_un.png",
"selectedIconPath": "assets/imgs/7_1_0/cart.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "assets/imgs/7_1_0/my_un.png",
"selectedIconPath": "assets/imgs/7_1_0/my.png"
}
]
},
"navigateToMiniProgramAppIdList": [
"wxeb490c6f9b154ef9",
"wxcf6d299fecd830cf",
......@@ -93,6 +62,5 @@
"wx358b56af62edbde1",
"wxc3b64b09b1d3dfc2",
"wx857ea77f4f7f4f34"
],
"sitemapLocation": "sitemap.json"
]
}
\ No newline at end of file
// component/bottomTabs/bottomTabs.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
},
attached () {
},
ready() {
this.setData({
currentRoute: `/${utils.getCurrentPageUrl()}`
})
},
// pages/consumptionDetails/consumptionDetails
observers: {
currentRoute(nRoute, oRoute) {
console.log('nRoute, oRoute', nRoute, oRoute)
const {currentRoute} = this.data
if(nRoute != oRoute){
}
}
},
/**
* 组件的初始数据
*/
data: {
currentRoute: '',
tabs: [
{
active: '/assets/imgs/heart-primary.png',
inactive: '/assets/imgs/heart-default.png',
route: '/pages/consumptionDetails/consumptionDetails'
},
{
active: '/assets/imgs/heart-primary.png',
inactive: '/assets/imgs/heart-default.png',
route: '/pages/home/home'
},
{
active: '/assets/imgs/heart-primary.png',
inactive: '/assets/imgs/heart-default.png',
route: '/pages/my/my'
},
{
active: '/assets/imgs/heart-primary.png',
inactive: '/assets/imgs/heart-default.png',
route: '/pages/productDetail/productDetail'
},
{
active: '/assets/imgs/heart-primary.png',
inactive: '/assets/imgs/heart-default.png',
route: '/pages/refund/refund'
}
],
type: 1
},
/**
* 组件的方法列表
*/
methods: {
handelToPage(e){
const {route} = e.currentTarget.dataset
wxService.router(route)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/bottomTabs/bottomTabs.wxml-->
<view class='bgc fixed-bottom0' style="background-image:url('/assets/imgs/7_1_0/bg.png')" wx:if="{{type == 1}}">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view
class="tab"
data-route="{{tab.route}}"
bindtap="handelToPage"
>
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:if="{{currentRoute == tab.route}}" src='{{tab.active}}' />
<image class='tab-img {{index != 2 ? "pdt":""}}' wx:else src='{{tab.inactive}}' />
</view>
</block>
</view>
<view class="bottom-tab fixed-bottom0" style="height: 108rpx;" wx:if="{{type == 2}}">
<block wx:for="{{tabs}}" wx:key="{{index}}" wx:for-item="tab">
<view class="tab" data-route="{{tab.route}}" bindtap="handelToPage">
<image class='tab-img' wx:if="{{currentRoute == tab.route}}" src='{{tab.active}}' />
<image class='tab-img' wx:else src='{{tab.inactive}}' />
</view>
</block>
</view>
/* component/bottomTabs/bottomTabs.wxss */
@import './../../base/base.wxss';
.bottom-tab {
display: flex;
align-items: center;
justify-content: center;
}
.tab-img {
width: 50rpx;
height: 50rpx;
}
.tab {
flex: 1;
text-align: center;
}
.bgc {
height: 144rpx;
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
}
.pdt {
padding-top: 50rpx;
}
\ No newline at end of file
{
"navigationBarTitleText": "消费详情",
"usingComponents": {
"table": "./../../component/table/table"
"table": "./../../component/table/table",
"bottom-tabs": "./../../component/bottomTabs/bottomTabs"
}
}
\ No newline at end of file
/* pages/consumptionDetails.wxss */
.consumption {
margin: 46rpx;
box-shadow: 0 0 10px #eee;
......
......@@ -12,6 +12,7 @@
"hot-item": "/component/hotItem/hotItem",
"bannerAd": "/component/bannerAd/bannerAd",
"attention": "/component/attention/attention",
"guide-page-modal": "/component/guidePageModal/guidePageModal"
"guide-page-modal": "/component/guidePageModal/guidePageModal",
"bottom-tabs": "./../../component/bottomTabs/bottomTabs"
}
}
\ No newline at end of file
......@@ -52,3 +52,4 @@
<!--<authorization-modal isAuthorization='{{isAuthorization}}' />-->
<guide-page-modal show="{{guidePageModalShow}}" />
<bottom-tabs />
......@@ -14,7 +14,7 @@
"compileType": "miniprogram",
"libVersion": "2.6.6",
"appid": "wxc3b64b09b1d3dfc2",
"projectname": "微商城",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
"hidedInDevtools": []
},
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 25,
"current": -1,
"list": [
{
"id": -1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment