Commit 5be28ac5 by 谢中龙

优化功能

parent 95215472
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
"pages/plus/plus", "pages/plus/plus",
"pages/friendShareList/friendShareList", "pages/friendShareList/friendShareList",
"pages/goToHome/goToHome", "pages/goToHome/goToHome",
"pages/noPermission/noPermission",
"pages/scanCoupon/scanCoupon", "pages/scanCoupon/scanCoupon",
"pages/scanCouponStoreList/scanCouponStoreList", "pages/scanCouponStoreList/scanCouponStoreList",
"pages/recordList/recordList", "pages/recordList/recordList",
...@@ -98,7 +97,8 @@ ...@@ -98,7 +97,8 @@
], ],
"usingComponents": { "usingComponents": {
"authorization-modal": "/component/authorization-modal/authorization-modal", "authorization-modal": "/component/authorization-modal/authorization-modal",
"go-guid": "/component/goGuid/goGuid" "go-guid": "/component/goGuid/goGuid",
"loading": "/component/loading/loading"
}, },
"window": { "window": {
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
......
// component/loading/loading.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{ {
"navigationBarTitleText": "" "component": true,
"usingComponents": {}
} }
\ No newline at end of file
<!--component/loading/loading.wxml-->
<view class="loading-container">
<view class="preloader_1">
<view></view>
<view></view>
<view></view>
<view></view>
<view></view>
</view>
<view class="loading-text">拼命加载中...</view>
</view>
/* component/loading/loading.wxss */
/* pages/laoding/loading.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
height: 100vh;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.loading-container{
position: fixed;
z-index: 999999;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background: rgba(255, 255, 255, 0.97);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.loading-container .loading-text{
color: #999999;
font-size: 24rpx;
margin-top: 40rpx;
}
.preloader_1{
position:relative;
width: 54px;
}
.preloader_1 view{
display:block;
bottom:0px;
width: 9px;
height: 5px;
background:#9b59b6;
position:absolute;
-webkit-animation: preloader_1 1.5s infinite ease-in-out;
animation: preloader_1 1.5s infinite ease-in-out;
}
.preloader_1 view:nth-child(2){
left:11px;
-webkit-animation-delay: .2s;
-moz-animation-delay: .2s;
-ms-animation-delay: .2s;
-o-animation-delay: .2s;
animation-delay: .2s;
}
.preloader_1 view:nth-child(3){
left:22px;
-webkit-animation-delay: .4s;
-moz-animation-delay: .4s;
-ms-animation-delay: .4s;
-o-animation-delay: .4s;
animation-delay: .4s;
}
.preloader_1 view:nth-child(4){
left:33px;
-webkit-animation-delay: .6s;
-moz-animation-delay: .6s;
-ms-animation-delay: .6s;
-o-animation-delay: .6s;
animation-delay: .6s;
}
.preloader_1 view:nth-child(5){
left:44px;
-webkit-animation-delay: .8s;
-moz-animation-delay: .8s;
-ms-animation-delay: .8s;
-o-animation-delay: .8s;
animation-delay: .8s;
}
@-webkit-keyframes preloader_1 {
0% {height:5px;-webkit-transform:translateY(0px);background:#9b59b6;}
25% {height:30px;-webkit-transform:translateY(15px);background:#3498db;}
50% {height:5px;-webkit-transform:translateY(0px);background:#9b59b6;}
75% {height:5px;-webkit-transform:translateY(0px);background:#9b59b6;}
100% {height:5px;-webkit-transform:translateY(0px);background:#9b59b6;}
}
@keyframes preloader_1 {
0% {height:5px;transform:translateY(0px);background:#9b59b6;}
25% {height:30px;transform:translateY(15px);background:#3498db;}
50% {height:5px;transform:translateY(0px);background:#9b59b6;}
75% {height:5px;transform:translateY(0px);background:#9b59b6;}
100% {height:5px;transform:translateY(0px);background:#9b59b6;}
}
...@@ -295,22 +295,20 @@ wxService.page({ ...@@ -295,22 +295,20 @@ wxService.page({
//是否有tabbar 或 plus //是否有tabbar 或 plus
let tabbar = products.filter(item => item.type == 5); let tabbar = products.filter(item => item.type == 5);
let plus = products.filter(item => item.type == 9); let plus = products.filter(item => item.type == 9);
if(plus.length != 0){ if(plus.length != 0){
this.setData({ this.data.paddingBottom = '320rpx';
paddingBottom : '320rpx'
})
} }
else if (tabbar.length != 0){ else if (tabbar.length != 0){
this.setData({ this.data.paddingBottom = '130rpx';
paddingBottom: '130rpx'
})
} }
else{ else{
this.setData({ this.data.paddingBottom = '40rpx';
paddingBottom: '40rpx'
})
} }
this.setData({
paddingBottom: this.data.paddingBottom,
loading : false
});
} }
}).finally(() => { }).finally(() => {
wx.hideLoading(); wx.hideLoading();
......
...@@ -72,4 +72,7 @@ ...@@ -72,4 +72,7 @@
<contact-us-modal contactShow="{{contactUsModal}}"/> <contact-us-modal contactShow="{{contactUsModal}}"/>
<!-- 回到导购 --> <!-- 回到导购 -->
<go-guid /> <go-guid />
\ No newline at end of file
<!-- loading -->
<loading wx:if="{{loading}}"/>
\ No newline at end of file
...@@ -339,13 +339,6 @@ ...@@ -339,13 +339,6 @@
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "导购无权限",
"pathName": "subPackage/page/pages/noPermission/noPermission",
"query": "",
"scene": null
},
{
"id": 50, "id": 50,
"name": "销售任务详情", "name": "销售任务详情",
"pathName": "shoppingGuid/page/pages/saleTaskInfo/saleTaskInfo", "pathName": "shoppingGuid/page/pages/saleTaskInfo/saleTaskInfo",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class='title-num-point'> <view class='title-num-point'>
<view class='title-img-point'> <view class='title-img-point'>
<view class='img-point'> <view class='img-point'>
<image class="point-img" src='/assets/imgs/integral_exchange/point.png' mode="widthFix" /> <image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view> </view>
<view class='text-point'> <view class='text-point'>
{{memberPoint.total}} {{memberPoint.total}}
......
// subPackage/page/pages/noPermission/noPermission.js
const wxService = require('../../../../utils/wxService')
let intervalid;
wxService.page({
/**
* 页面的初始数据
*/
data: {
num: 3
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function () {
this.countdown()
},
countdown(){
const { num } = this.data
if (num <= 0) {
clearInterval(intervalid)
return
}
intervalid = setTimeout(() => {
this.setData({
num: num - 1
},()=>{
this.countdown();
this.goMall()
});
}, 1000)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
goMall() {
clearInterval(intervalid)
wxService.router(`/pages/userCenter/userCenter`).replace()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
clearTimeout(intervalid)
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
<!--subPackage/page/pages/noPermission/noPermission.wxml-->
<view class="no-permission df">
<view class="permission-view">
<image class="permission-img" mode="widthFix" src="/assets/imgs/shop/no_permission.png"></image>
<view class="permission-tips">
<view>您还不是导购身份哦~</view>
<view>无法访问当前页面</view>
</view>
<view class="permission-num"><span class="num">{{num}}</span>秒后返回商城首页</view>
<view class="go-mall" bindtap="goMall">立即返回商城</view>
</view>
</view>
\ No newline at end of file
/* subPackage/page/pages/noPermission/noPermission.wxss */
@import '/base/base.wxss';
.no-permission {
text-align: center;
}
.permission-view {
padding-top: 156rpx;
}
.permission-img {
width: 179rpx;
height: 179rpx;
}
.permission-tips {
padding-top: 82rpx;
color: rgba(51, 51, 51, 1);
font-size: 32rpx;
}
.permission-num {
padding: 216rpx 0 27rpx 0;
font-size: 26rpx;
color: #ccc;
}
.num {
color: rgba(224, 32, 32, 1);
}
.go-mall {
width: 550rpx;
height: 94rpx;
line-height: 94rpx;
border-radius: 6rpx;
background-color: rgba(0, 145, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 36rpx;
text-align: left;
text-align: center;
}
...@@ -654,7 +654,9 @@ class WXService extends Http { ...@@ -654,7 +654,9 @@ class WXService extends Http {
config.data.shareLogo = envInfo.shareLogo; config.data.shareLogo = envInfo.shareLogo;
config.data.shareTitle = envInfo.shareTitle; config.data.shareTitle = envInfo.shareTitle;
config.data.speadProductsBanner = envInfo.speadProductsBanner; config.data.speadProductsBanner = envInfo.speadProductsBanner;
//默认
config.data.loading = true;
const CONFIG_PAPGE = { const CONFIG_PAPGE = {
onLoad: function (...args) { onLoad: function (...args) {
const page = this const page = 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