Commit ee1d042b by 程默

fix footer

parent 9fdeb4da
...@@ -16,8 +16,8 @@ module.exports = merge(prodEnv, {//zjgyl ...@@ -16,8 +16,8 @@ module.exports = merge(prodEnv, {//zjgyl
// BASE_URL:"'https://shop.mayi888.com'", // BASE_URL:"'https://shop.mayi888.com'",
// BASE_URL:"'http://192.168.1.146:3005'", // BASE_URL:"'http://192.168.1.146:3005'",
// BASE_URL:"'http://192.168.1.127:3000'", // BASE_URL:"'http://192.168.1.127:3000'",
BASE_URL:"'https://test-m-shop.mayi888.cn'", // BASE_URL:"'https://test-m-shop.mayi888.cn'",
// BASE_URL:"'http://172.16.1.61:3004'", BASE_URL:"'http://172.16.1.48:3004'",
OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"', OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"',
// OLSHOP_URL:'"https://shop.mayi888.com/innerApi/shopApiService"', // OLSHOP_URL:'"https://shop.mayi888.com/innerApi/shopApiService"',
......
...@@ -63,22 +63,34 @@ Component({ ...@@ -63,22 +63,34 @@ Component({
visible: 1 visible: 1
} }
], ],
mm:false,
componentData: {}, componentData: {},
show: true show: true
}, },
attached() { attached() {
let that = this; let that = this;
if (app.globalData.footerVal) { if (app.globalData.footerVal) {
let mm=(Math.ceil(app.globalData.footerVal.componentData.list.length/2-1)==that.data.selected&&app.globalData.footerVal.componentData['styleSelectionNum']==1)
console.log(733333,mm)
that.setData({ that.setData({
componentData: app.globalData.footerVal.componentData, componentData: app.globalData.footerVal.componentData,
list: app.globalData.footerVal.componentData.list list: app.globalData.footerVal.componentData.list,
mm:mm
}); });
console.log('777777',Math.ceil(this.data.list.length/2-1),this.data.selected,this.data.componentData['styleSelectionNum'])
} else { } else {
console.log(73333381)
app.footerCallBack = function(params) { app.footerCallBack = function(params) {
console.log('back')
that.setData({ that.setData({
componentData: params.componentData, componentData: params.componentData,
list: params.componentData.list list: params.componentData.list,
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&&params.componentData['styleSelectionNum']==1)
}); });
let mm=(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&&params.componentData['styleSelectionNum']==1)
console.log('87777777',mm)
}; };
} }
...@@ -88,6 +100,12 @@ Component({ ...@@ -88,6 +100,12 @@ Component({
app.webviewCallBack = function(state, params) { app.webviewCallBack = function(state, params) {
console.log("webview变化", state, params); console.log("webview变化", state, params);
}; };
//
this.setData({
mm:(Math.ceil(this.data.list.length/2-1)==this.data.selected&&this.data.componentData['styleSelectionNum']==1)
})
}, },
methods: { methods: {
init() {}, init() {},
......
<!--miniprogram/custom-tab-bar/index.wxml--> <!--miniprogram/custom-tab-bar/index.wxml-->
<cover-view class="tab-bar {{show?'':'hide'}}"> <view class="tab-bar {{show?'':'hide'}}">
<!-- <cover-view class="antt ant-daipinglun"></cover-view> --> <!-- <view class="antt ant-daipinglun"></view> -->
<!-- <cover-view class="iconfont icon-fenzhi">3</cover-view> --> <!-- <view class="iconfont icon-fenzhi">3</view> -->
<cover-view class="tab-bar-border"></cover-view> <view class="tab-bar-border"></view>
<cover-view <view
wx:for="{{list}}" wx:for="{{list}}"
wx:key="index" wx:key="index"
class="tab-bar-item" class="tab-bar-item {{(Math.ceil(list.length/2-1)==selected&&componentData['styleSelectionNum']==1)?isItem:''}}"
data-path="{{item.link}}" data-path="{{item.link}}"
data-index="{{index}}" data-index="{{index}}"
bindtap="switchTab" bindtap="switchTab"
> >
<!-- {{index}}{{selected}}--{{Math.ceil(5/2-1)}}--{{mm}} -->
<cover-view wx:if="{{item.iconType==0||!item.iconType}}"> <!-- &&componentData['styleSelectionNum']==1 -->
<cover-view class="antt {{item.icon}}"></cover-view> <!-- 图标 -->
</cover-view> <view >
<cover-view <view wx:if="{{item.iconType==0||!item.iconType}}">
wx:elif="{{item.iconType==1}}" <view class="antt {{item.icon}}" style="font-size:{{(index==selected?componentData.selectionIconSize*2:componentData.defaultIconSize*2)+'rpx'}};color:{{index==selected?componentData.selectIconColor:componentData.defaultIconColor}}"></view>
class="img-view" </view>
style="width:{{(index==selected?componentData.selectionIconSize*2:componentData.defaultIconSize*2)+'rpx'}};height:{{(index==selected?componentData.selectionIconSize*2:componentData.defaultIconSize*2)+'rpx'}}" <view
> wx:elif="{{item.iconType==1}}"
<cover-image src="{{selected === index ? item.selectImgUrl : item.imgUrl}}"></cover-image> class="img-view"
</cover-view> style="width:{{(index==selected?componentData.selectionIconSize*2:componentData.defaultIconSize*2)+'rpx'}};height:{{(index==selected?componentData.selectionIconSize*2:componentData.defaultIconSize*2)+'rpx'}}"
>
<image mode="aspectFit" src="{{selected === index ? item.selectImgUrl : item.imgUrl}}"></image>
</view>
</view>
<!-- 名称 --> <!-- 名称 -->
<cover-view style="color: {{selected === index ? componentData.selectTextColor : componentData.defaultTextColor}};font-size:{{selected === index ? componentData.selectionTextNum*2 : componentData.defaultTextNum*2}}rpx"> <view class="text" style="color: {{selected === index ? componentData.selectTextColor : componentData.defaultTextColor}};font-size:{{selected === index ? componentData.selectionTextNum*2 : componentData.defaultTextNum*2}}rpx">
{{item.title}}</cover-view> {{item.title}}</view>
</cover-view> </view>
</cover-view> </view>
...@@ -1378,10 +1378,15 @@ ...@@ -1378,10 +1378,15 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 48px; height: 51px;
background: white;
display: flex; display: flex;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
font-size: 10px;
width: 100%;
bottom: 0;
left: 0;
background: #f5f5f4;
/* border-top: 1px solid #e2e2e2; */
} }
.tab-bar-border { .tab-bar-border {
...@@ -1403,6 +1408,20 @@ ...@@ -1403,6 +1408,20 @@
flex-direction: column; flex-direction: column;
} }
.isItem {
transform: translateY(-30%)
}
.icons {
width: 50px;
height: 50px;
background: var(--main-color);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border: 4px solid #fff;
}
.tab-bar-item cover-image { .tab-bar-item cover-image {
width: 27px; width: 27px;
height: 27px; height: 27px;
...@@ -1412,11 +1431,18 @@ ...@@ -1412,11 +1431,18 @@
/* font-size: 10px; */ /* font-size: 10px; */
} }
.img-view cover-image{ /* .img-view{
object-fit: contain; display: flex;
align-items: center;
} */
.img-view image{
/* object-fit: contain; */
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.text{
margin-top: 4rpx;
}
.hide{ .hide{
display: none; display: none;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"description": "项目配置文件。", "description": "项目配置文件。",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": false, "es6": true,
"enhance": true, "enhance": true,
"postcss": true, "postcss": true,
"minified": true, "minified": true,
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"coverView": true, "coverView": true,
"nodeModules": true, "nodeModules": true,
"autoAudits": true, "autoAudits": true,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": false,
"scopeDataCheck": false, "scopeDataCheck": false,
"uglifyFileName": true, "uglifyFileName": true,
"checkInvalidKey": true, "checkInvalidKey": true,
......
...@@ -163,9 +163,9 @@ export default { ...@@ -163,9 +163,9 @@ export default {
onLoad(options) { onLoad(options) {
let location=JSON.parse(wx.getStorageSync('location') || '{}') let location=JSON.parse(wx.getStorageSync('location') || '{}')
if (!location.areaGroupId) { if (!location.areaGroupId) {
wx.redirectTo({ // wx.redirectTo({
url: '/pages/changeAdr/main?areaGroupId=' + this.data.designateAreaObj.areaGroupId // url: '/pages/changeAdr/main?areaGroupId=' + this.data.designateAreaObj.areaGroupId
}) // })
} }
let that = this; let that = this;
// 来源 // 来源
......
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