界面样式优化
This commit is contained in:
parent
50440ca8fc
commit
1caae06d1e
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
<slot/>
|
<slot/>
|
||||||
<view class="btns" wx:if="{{isShowCancel||isShowOk}}">
|
<view class="btns" wx:if="{{isShowCancel||isShowOk}}">
|
||||||
<button class="button cancel" plain wx:if="{{isShowCancel}}" bind:tap="cancelButtonTap">{{cancelButtonText}}</button>
|
<button class="cmv-button cancel" plain wx:if="{{isShowCancel}}" bind:tap="cancelButtonTap">{{cancelButtonText}}</button>
|
||||||
<button class="button confirm" wx:if="{{isShowOk}}" type="primary" bind:tap="okButtonTap">{{okButtonText}}</button>
|
<button class="cmv-button confirm" wx:if="{{isShowOk}}" type="primary" bind:tap="okButtonTap">{{okButtonText}}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</page-container>
|
</page-container>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 18rpx;
|
gap: 18rpx;
|
||||||
}
|
}
|
||||||
.modal-view-main .btns .button{
|
.modal-view-main .btns .cmv-button{
|
||||||
flex:1;
|
flex:1;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding:16px;
|
padding:16px;
|
||||||
@ -93,12 +93,12 @@
|
|||||||
border-width: 2rpx;/* 边框显示不完整 bug */
|
border-width: 2rpx;/* 边框显示不完整 bug */
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-view-main .btns .button.cancel{
|
.modal-view-main .btns .cmv-button.cancel{
|
||||||
border-color:rgba(153, 153, 153, 0.5);
|
border-color:rgba(153, 153, 153, 0.5);
|
||||||
background-color: rgba(153, 153, 153, 0.1);
|
background-color: rgba(153, 153, 153, 0.1);
|
||||||
color:var(--main-font-color);
|
color:var(--main-font-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-view-main .btns .button.confirm{
|
.modal-view-main .btns .cmv-button.confirm{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -33,12 +33,10 @@ Page({
|
|||||||
if(item.pickup_codes.length>0&&item.pickup_codes[0]!=''){
|
if(item.pickup_codes.length>0&&item.pickup_codes[0]!=''){
|
||||||
//倒着找相同的索引 因为需要从后往前找
|
//倒着找相同的索引 因为需要从后往前找
|
||||||
const codes = item.pickup_codes.join(',').split(',').reverse();
|
const codes = item.pickup_codes.join(',').split(',').reverse();
|
||||||
let sameValue = '';
|
|
||||||
let findIndex = codes.findIndex((_item)=>{
|
let findIndex = codes.findIndex((_item)=>{
|
||||||
let sames = codes.filter((__item)=>_item==__item);
|
let sames = codes.filter((__item)=>_item==__item);
|
||||||
//找到了相同的
|
//找到了相同的
|
||||||
if(sames.length>1){
|
if(sames.length>1){
|
||||||
sameValue = _item;
|
|
||||||
hasSame = true;
|
hasSame = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -48,7 +46,6 @@ Page({
|
|||||||
findIndex = item.pickup_codes.length - findIndex - 1;
|
findIndex = item.pickup_codes.length - findIndex - 1;
|
||||||
this.data.choosedStationList[index].focus = true;
|
this.data.choosedStationList[index].focus = true;
|
||||||
this.data.choosedStationList[index].focusIndex = findIndex;
|
this.data.choosedStationList[index].focusIndex = findIndex;
|
||||||
console.log(findIndex,sameValue);
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon:'none',
|
icon:'none',
|
||||||
title: '取件码重复',
|
title: '取件码重复',
|
||||||
@ -68,7 +65,6 @@ Page({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(hasSame,'----');
|
|
||||||
if(hasSame)return;
|
if(hasSame)return;
|
||||||
//录入了有效取件码 或者 上传了取件图片||this.data.tempImgs.length>0
|
//录入了有效取件码 或者 上传了取件图片||this.data.tempImgs.length>0
|
||||||
if(data.length>0){
|
if(data.length>0){
|
||||||
@ -243,10 +239,32 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
choosedStationList:this.data.choosedStationList
|
choosedStationList:this.data.choosedStationList
|
||||||
})
|
})
|
||||||
|
// this.addAnimation(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
addAnimation(index){
|
||||||
|
const duration = 2000;
|
||||||
|
//
|
||||||
|
let animation = wx.createAnimation({
|
||||||
|
duration:duration
|
||||||
|
});
|
||||||
|
animation.opacity(1).height('390rpx').step();
|
||||||
|
|
||||||
|
wx.nextTick(()=>{
|
||||||
|
console.log(this.data.choosedStationList[index]);
|
||||||
|
this.setData({
|
||||||
|
[`choosedStationList[${index}].animation`]:animation.export()
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setData({
|
||||||
|
[`choosedStationList[${index}].animationOver`]:true,
|
||||||
|
[`choosedStationList[${index}].animation`]:null
|
||||||
|
})
|
||||||
|
}, duration);
|
||||||
|
})
|
||||||
|
},
|
||||||
chooseImage(){
|
chooseImage(){
|
||||||
if(this.data.imgUploading||this.data.recogniting)return;
|
if(this.data.imgUploading||this.data.recogniting)return;
|
||||||
wx.chooseMedia({
|
wx.chooseMedia({
|
||||||
|
|||||||
@ -21,7 +21,9 @@
|
|||||||
<image src="/assets/icon/help/plus2.png" class="icon"/>手动录入取件码
|
<image src="/assets/icon/help/plus2.png" class="icon"/>手动录入取件码
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="page-container station" wx:for="{{choosedStationList}}" wx:key="index">
|
<view class="page-container station {{item.animationOver?'animation-over':''}}"
|
||||||
|
wx:for="{{choosedStationList}}" wx:key="index"
|
||||||
|
animation="{{item.animation}}">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="icon ai" wx:if="{{item.imgUrl}}">AI识别</view>
|
<view class="icon ai" wx:if="{{item.imgUrl}}">AI识别</view>
|
||||||
@ -30,8 +32,8 @@
|
|||||||
<image data-index="{{index}}" bind:tap="showStationName" class="edit"
|
<image data-index="{{index}}" bind:tap="showStationName" class="edit"
|
||||||
src="/assets/icon/help/edit.png" wx:if="{{item.imgUrl}}"/>
|
src="/assets/icon/help/edit.png" wx:if="{{item.imgUrl}}"/>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<image class="view-image" src="/assets/icon/help/images.png"
|
<image wx:if="{{item.imgUrl}}" class="view-image" data-url="{{item.imgUrl}}"
|
||||||
data-url="{{item.imgUrl}}" bind:tap="viewImage"/>
|
src="/assets/icon/help/images.png" bind:tap="viewImage"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-title" wx:if="{{!item.imgUrl}}">
|
<view class="sub-title" wx:if="{{!item.imgUrl}}">
|
||||||
|
|||||||
@ -1,5 +1,13 @@
|
|||||||
.station{
|
.station{
|
||||||
padding-top:16rpx;
|
padding-top:16rpx;
|
||||||
|
/* opacity: 0;
|
||||||
|
height:0;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box; */
|
||||||
|
}
|
||||||
|
.station.animation-over{
|
||||||
|
opacity: 1;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
.station .head{
|
.station .head{
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -43,6 +51,7 @@
|
|||||||
.station .head .title .name{
|
.station .head .title .name{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
line-height: 68rpx;
|
||||||
}
|
}
|
||||||
.station .head .sub-title{
|
.station .head .sub-title{
|
||||||
font-size:26rpx;
|
font-size:26rpx;
|
||||||
|
|||||||
@ -66,10 +66,6 @@ Page({
|
|||||||
skip:this.data.pager[tabName].limit*this.data.pager[tabName].pageIndex,
|
skip:this.data.pager[tabName].limit*this.data.pager[tabName].pageIndex,
|
||||||
limit:this.data.pager[tabName].limit
|
limit:this.data.pager[tabName].limit
|
||||||
}).then((data)=>{
|
}).then((data)=>{
|
||||||
data.map((item)=>{
|
|
||||||
item.expire_time = item.expire_time.substr(0,10).replaceAll('-','.');
|
|
||||||
})
|
|
||||||
console.log('tabname',tabName);
|
|
||||||
if(this.data.pager[tabName].pageIndex==0){
|
if(this.data.pager[tabName].pageIndex==0){
|
||||||
this.data[tabName+'List'] = data;
|
this.data[tabName+'List'] = data;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -23,15 +23,6 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
activityId:options.id||2
|
activityId:options.id||2
|
||||||
});
|
});
|
||||||
this.getActivityDetail();
|
|
||||||
userApi.coupon.check(options.id||2).then((data)=>{
|
|
||||||
if(!data.can_receive){
|
|
||||||
this.setData({
|
|
||||||
isShowModal:true,
|
|
||||||
errorMsg:data.message
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getActivityDetail(){
|
getActivityDetail(){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -89,7 +80,15 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.getActivityDetail();
|
||||||
|
userApi.coupon.check(this.data.activityId).then((data)=>{
|
||||||
|
if(!data.can_receive){
|
||||||
|
this.setData({
|
||||||
|
isShowModal:true,
|
||||||
|
errorMsg:data.message
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<view class="left">{{item.name}} <block wx:if="{{item.count>1}}">x {{item.count}}</block></view>
|
<view class="left">{{item.name}} <block wx:if="{{item.count>1}}">x {{item.count}}</block></view>
|
||||||
<view class="right money money-normal" wx:if="{{item.amount>0}}">{{item.amount}}</view>
|
<view class="right money money-normal" wx:if="{{item.amount>0}}">{{item.amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tips">先领券,再下单,免费配送</view>
|
<view class="tips">使用有效期:{{item.available_days}} 天</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <button class="button diabled" disabled type="primary"
|
<!-- <button class="button diabled" disabled type="primary"
|
||||||
@ -24,7 +24,7 @@
|
|||||||
}}
|
}}
|
||||||
</button> -->
|
</button> -->
|
||||||
<button disabled="{{getting}}" loading="{{getting}}" type="primary"
|
<button disabled="{{getting}}" loading="{{getting}}" type="primary"
|
||||||
class="button" bind:tap="getActivity">一键领取</button>
|
class="button get" bind:tap="getActivity">一键领取</button>
|
||||||
</view>
|
</view>
|
||||||
<image src="/assets/imgs/login/main.png" class="bottom-img"/>
|
<image src="/assets/imgs/login/main.png" class="bottom-img"/>
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ page{
|
|||||||
color: #999999;
|
color: #999999;
|
||||||
margin-top:44rpx;
|
margin-top:44rpx;
|
||||||
}
|
}
|
||||||
.button{
|
.button.get{
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
margin-top:60rpx;
|
margin-top:60rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user