页面优化

This commit is contained in:
itgaojian163 2025-04-16 16:16:35 +08:00
parent 0621d6b735
commit 2fac414610
12 changed files with 32 additions and 19 deletions

View File

@ -2,11 +2,11 @@
<view wx:if="{{loadingVisible=='loading'}}" class="loading"></view>
<view wx:elif="{{loadingVisible=='error'}}" class="error-box" bind:tap="notifyParentToRefresh">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">加载失败</text>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">加载失败,点击重试</text>
</view>
<view wx:elif="{{loadingVisible=='empty'}}" class="error-box" bind:tap="notifyParentToRefresh">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">暂无数据</text>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">暂无数据,点击刷新</text>
</view>
<block wx:else="{{loadingVisible=='success'}}">
<slot></slot>

View File

@ -130,7 +130,7 @@
<mp-half-screen-dialog show="{{showCoupons}}">
<view slot="title">优惠卷</view>
<view slot="desc">
<scroll-view scroll-y style="height: 400rpx;">
<scroll-view scroll-y style="height: 500rpx;">
<view class="coupons-list-box">
<radio-group>
<block wx:for="{{couponsList}}" wx:key="index">
@ -164,7 +164,7 @@
<mp-half-screen-dialog show="{{showPackage}}">
<view slot="title">套餐包</view>
<view slot="desc">
<scroll-view scroll-y style="height: 400rpx;">
<scroll-view scroll-y style="height: 500rpx;">
<view class="coupons-list-box">
<radio-group>
<block wx:for="{{packageList}}" wx:key="index">

View File

@ -203,7 +203,9 @@ page {
background-color: #f0f0f0;
}
.weui-half-screen-dialog__ft {}
.weui-half-screen-dialog__ft {
padding: 0rpx 0rpx 40rpx;
}
.bottom-box {
position: fixed;
@ -325,12 +327,16 @@ page {
padding: 5px;
width: 88vw;
box-sizing: border-box;
height: 210rpx;
}
.l-tickets {
width: 60vw;
position: relative;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
background: radial-gradient(circle at right top, transparent 16rpx, #ffaa0017 0) right top / 100% 50% no-repeat,
radial-gradient(circle at right bottom, transparent 16rpx, #ffaa0017 0) right bottom / 100% 50% no-repeat;
}
@ -401,8 +407,7 @@ page {
font-size: 18px;
color: #5D3900;
text-align: center;
margin-top: 5px;
font-weight: 800;
font-weight: bold;
}
.ticket-desc {

View File

@ -322,6 +322,12 @@ Page({
addPrefixToPreviewImgs(data) {
const prefix = this.data.imgUrl;
return data.map(item => {
const values = Object.values(item.aiSetting);
const isSuccess = values.every(value => value === "SUCCESS");
const isCreate = values.every(value => value === "NONE");
const isFailed = values.some(value => value === "FAILED");
const isShow = !isSuccess && (isCreate || isFailed);
item.isShowCreate = isShow
if (item.codeTypePage && item.codeTypePage.previewImgs) {
const imgIds = item.codeTypePage.previewImgs.split(',');
item.codeTypePage.previewImgs = imgIds.map(id => prefix + id);
@ -359,6 +365,7 @@ Page({
url: url,
header: header,
success(res) {
console.log('下载成功', res)
_self.setData({
downloadProgress: 0,
downloading: false

View File

@ -87,7 +87,7 @@
<view class="project-create-time">{{item.gmtCreate}}</view>
<view wx:if="{{item.generate.generateStatus=='SUCCESS'}}" class="project-btn" bind:tap="doShowDownload" data-value="{{item}}">下载</view>
<view wx:if="{{item.generate.generateStatus=='FAILED'}}" class="project-re-btn" bind:tap="doReCreate" data-value="{{item}}">重新生成</view>
<view wx:if="{{item.aiSetting.settingStatus=='NONE'}}" class="project-btn" bind:tap="doCreatePro" data-value="{{item}}">生成</view>
<view wx:if="{{item.isShowCreate}}" class="project-btn" bind:tap="doCreatePro" data-value="{{item}}">生成</view>
</view>
</view>
</view>

View File

@ -553,5 +553,5 @@
.weui-half-screen-dialog__ft {
height: 0;
/* padding: 0; */
padding: 0rpx 0rpx 40rpx;
}

View File

@ -144,7 +144,7 @@ wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
}
.weui-half-screen-dialog__ft {
/* padding: 15px; */
padding: 0rpx 0rpx 40rpx;
text-align: center;
}

View File

@ -223,7 +223,7 @@ page {
}
.weui-half-screen-dialog__ft {
/* padding: 0rpx; */
padding: 0rpx 0rpx 40rpx;
}
.weui-half-screen-dialog__bd {

View File

@ -2,7 +2,7 @@
<view class="search-box">
<view class="search-container">
<input class="search-input" value="{{keywords}}" bindinput="inputKeywords" bindconfirm="doSearchKeyWord" type="text" confirm-type="search" placeholder="搜索" />
<view wx:if="{{keywords !=''}}" bind:tap="clearSearch" class="icon-clear" style="width: 20px;height: 20px;"></view>
<view wx:if="{{keywords !=''}}" bind:tap="clearSearch" class="icon-clear icon-position"></view>
</view>
</view>
<container-loading loadingState="{{loadingState}}" style="height: 85vh;margin-top: 80rpx;" bindrefresh="doRefreshList">

View File

@ -9,7 +9,6 @@ page {
top: 0;
left: 0;
width: 100vw;
}
.search-container {
@ -173,4 +172,10 @@ page {
flex: 1;
padding: 7px 10px;
margin-left: 10px;
}
.icon-position {
width: 42rpx;
height: 42rpx;
margin-right: 10rpx;
}

View File

@ -205,11 +205,8 @@ Page({
}, err => {
wx.hideLoading()
wx.showToast({
title: '数据有误,请稍后重试',
icon: 'error',
success: () => {
wx.navigateBack()
}
title: '数据有误,请刷新页面',
icon: 'error'
})
})
},

View File

@ -150,7 +150,6 @@ var timeSplit = function (value) {
var regex = getRegExp('-', 'g');
return value.replace(regex, '.')
}
module.exports = {
isEmpty: isEmpty,
status: status,