优化问题

This commit is contained in:
duan
2024-05-17 14:12:28 +08:00
parent ea60344f02
commit 07a6425ec4
10 changed files with 66 additions and 40 deletions

View File

@@ -111,6 +111,10 @@ export default {
orderfindWiningUser(data) { //获取免单订单
return uni.api.get("/order/findWiningUser", data);
},
// 获取自己的免单订单
ordermineWinner(data) {
return uni.api.get("/order/mineWinner", data);
},
indexlist(data) { //商品列表(今日上新/热榜/咖啡饮品)
return uni.api.get("/distirict/productCate", data, false);
},

View File

@@ -4,8 +4,7 @@
@click="viewHistorycategoryss(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text>
<u-icon v-if="item.isChild" style="margin-left: 8rpx;" name="arrow-down-fill" color="#333333"
size="16"></u-icon>
</view>
</view>
</template>

View File

@@ -18,7 +18,8 @@
<image :src="item.image" mode="aspectFill"></image>
<view class="therecontent_box_itembox_itemview flex-colum-start">
<view class="therecontent_box_itembox_itemviewone">
<text style="margin-left: 0;">{{item.productName}}</text>
<text
style="margin-left: 0;">{{item.productName.length>5?item.productName.substring(0,5)+'...':item.productName}}</text>
</view>
<view class="therecontent_box_itembox_itemviewtow flex-around">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/xia.png" mode="widthFix">
@@ -27,7 +28,7 @@
{{item.discount || '1'}}
</view>
</view>
<view class="therecontent_box_itembox_itemviewthere flex-start">
<view class="therecontent_box_itembox_itemviewthere ">
<text>{{item.salePrice}}</text>
<text>{{item.originPrice}}</text>
</view>
@@ -58,12 +59,12 @@
<view class="therecontent_box_itembox_itemviewoneafter">
TOP.{{index + 1}}
</view>
<text>{{item.productName}}</text>
<text>{{ item.productName.length>5?item.productName.substring(0,5)+'...':item.productName }}</text>
</view>
<view class="therecontent_box_itembox_itemviewtowdiscount flex-around">
已抢{{item.realSalesNumber}}
</view>
<view class="therecontent_box_itembox_itemviewthere flex-start">
<view class="therecontent_box_itembox_itemviewthere ">
<text>{{item.salePrice}}</text>
<text>{{item.originPrice}}</text>
</view>
@@ -126,7 +127,8 @@
width: 336rpx;
border-radius: 18rpx;
background: #FFFFFF;
height:396rpx;
height: 396rpx;
.therecontent_box_itembox {
padding: 10rpx 18rpx 24rpx 24rpx;
@@ -204,11 +206,11 @@
}
.therecontent_box_itembox_itemviewthere {
margin-top: 4rpx;
// margin-top: 4rpx;
// align-items: flex-end;
// display: flex;
// align-items: center;
// justify-content: center;
display: flex;
align-items: center;
justify-content: center;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
@@ -223,7 +225,7 @@
font-size: 16rpx;
color: #999999;
text-decoration-line: line-through;
margin-top: 10rpx;
margin-top: 4rpx;
}
}
}

View File

@@ -28,7 +28,7 @@
</view>
<view class="towcontentoness">
<view class="towcontentonebox_box">
订单数82
订单数{{total}}
</view>
<view class="towcontentonebox">
<view class="towcontentoneboxswiper">
@@ -43,7 +43,7 @@
免单状态
</view>
</view>
<view class="swiperitem" v-for="(item,index) in orderfindWiningUserlist" :key="index">
<view class="swiperitem" v-for="(item,index) in ordermineWinnerList" :key="index">
<view class="swiper-item" style="margin-top: 32rpx;">
<view class="swiper_itemone">
{{item.orderAmount}}
@@ -97,6 +97,7 @@
titlename: '',
opacity: false,
orderfindWiningUserlist: [],
ordermineWinnerList: [],
form: {
address: '', //地址
type: '', //品类
@@ -106,10 +107,12 @@
size: 10, //页容量
status: 'loadmore'
},
total:0
};
},
onLoad(e) {
this.orderfindWiningUser()
this.ordermineWinnerEvent()
let _this = this
uni.getStorage({
key: 'itemData',
@@ -118,6 +121,9 @@
}
});
},
onReachBottom() {
this.ordermineWinnerEvent()
},
onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏
this.opacity = false
@@ -133,7 +139,22 @@
return str.slice(start, end + 1); //slice方法截取的部分不包括第二参数所在位置
},
async ordermineWinnerEvent() {
let res = await this.api.ordermineWinner({
userId: uni.cache.get('userInfo').id,
page: this.form.page,
size: this.form.size
})
if(res.code ==0){
this.total = res.data.total
if(this.form.page==1){
this.ordermineWinnerList = res.data.list
}else{
this.ordermineWinnerList.push(...res.data.list)
}
this.form.page = ++this.form.page;
}
},
async orderfindWiningUser() {
let res = await this.api.orderfindWiningUser()
this.orderfindWiningUserlist = res.data.map((i) => {

View File

@@ -54,8 +54,8 @@
<view class="fourcontent_item flex-start" v-for="(item,index) in hometoplist.menu" :key="index"
@click="viewHistory(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text>
<u-icon v-if="item.isChild" style="margin-left: 8rpx;" name="arrow-down-fill" color="#333333"
<text style="margin-right: 16rpx;">{{item.name}}</text>
<u-icon v-if="item.isChild" style="margin-left: 10rpx;" name="arrow-down-fill" color="#333333"
size="16"></u-icon>
</view>
</view>
@@ -74,7 +74,7 @@
{{item.shopName}}
</view>
<view>
{{item.districts}}{{item.distances}}
{{item.districts}}&nbsp;{{item.distances}}
</view>
</view>
<view class="fivecontent_item_nav_lefttopstart flex-start">
@@ -92,8 +92,8 @@
<view class="fivecontent_item_boxitem flex-between">
<image :src="item.image" mode=""></image>
<view class="fivecontent_item_boxitemleft flex-colum-start">
<view class="fivecontent_item_boxitemleftone flex-between">
<view>{{item.productName}}</view>
<view class="fivecontent_item_boxitemleftone flex-between" style="display: flex;justify-content: space-between;align-items: center;">
<view>{{item.productName.length>7?item.productName.substring(0,7)+'...':item.productName}}</view>
<text>已抢{{item.realSalesNumber}}</text>
</view>
<view class="flex-start flexstartboxfttow">
@@ -128,7 +128,7 @@
:day="item.end_times.d" :hour="item.end_times.h"
:minute="item.end_times.m" :second="item.end_times.s"
:indexs='index' color="#FFFFFF" border-color="#00B26A"
splitorColor="#FFFFFF" :font-size="8"></uni-countdown>
splitorColor="#FFFFFF" :font-size="10"></uni-countdown>
</view>
@@ -183,7 +183,7 @@
:key="index" @click="viewHistory(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text>
<u-icon v-if="item.isChild" style="margin-left: 8rpx;" name="arrow-down-fill"
<u-icon v-if="item.isChild" style="margin-left: 10rpx;" name="arrow-down-fill"
color="#333333" size="16"></u-icon>
</view>
</view>
@@ -679,7 +679,7 @@
border-radius: 34rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
font-size: 20rpx;
color: #999999;
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
@@ -695,11 +695,10 @@
padding: 32rpx 28rpx;
overflow-x: auto;
flex-wrap: nowrap;
.fourcontent_item {
flex-wrap: nowrap;
margin-left: 22rpx;
padding: 8rpx 28rpx;
padding: 11rpx 31rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
@@ -851,7 +850,7 @@
}
view {
width: 300rpx;
// width: 300rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; //溢出不换行white-space:nowrap; //溢出不换行

View File

@@ -2,8 +2,9 @@
<view class="container">
<view class="box flex-center">
<!-- <text>欢迎登录零点八零</text> -->
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/login/czgqrlogin.png" mode=""></image>
</view>
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/Logo" mode=""></image>
</view>
<view class="top_box">
<view class="top_box_one" v-if="showbox">
<text class="top_box_one_text">手机号码</text>
@@ -52,7 +53,7 @@
<view class="agreement flex-start">
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
size="24"></u-checkbox></u-checkbox-group>
<text>阅读并同意{{uni.cache.set('NAME', '零点八零')}}</text>
<text>阅读并同意零点八零</text>
<view class="agreement-Item" @click="Privacy(1)">用户协议</view>
<view class="agreement-Item" @click="Privacy(2)">隐私政策</view>

View File

@@ -2,7 +2,7 @@
<view class="container">
<view class="box flex-colum-start">
<text>您好</text>
<text>欢迎使用{{uni.cache.set('NAME', '零点八零')}}</text>
<text>欢迎使用零点八零</text>
</view>
<view class="top_box" :style="h">
<view class="top_box_one">

View File

@@ -184,7 +184,7 @@
</image>
<text>首页</text>
</view>
<view class="fixedview_letr_item flex-colum" @click="makePhoneCall">
<view class="fixedview_letr_item flex-colum" @click="clickphone(listdata.phone)">
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/product/Call.png" mode="aspectFill">
</image>
<text>客服</text>
@@ -383,6 +383,9 @@
//#endif
},
methods: {
eeInfoindex(){
uni.pro.switchTab('index/index')
},
overlayshowsboxs(e) {
// this.cartshping = e
// this.overlayshow = true

View File

@@ -27,7 +27,7 @@
</u-number-box>
</view>
</view>
<view class="redMoney">
<view class="redMoney" v-if="false">
<view>
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/hongbao.png"
style="width: 30rpx;height: 30.24rpx;;" mode=""></image>
@@ -140,7 +140,7 @@
width: 750rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 30rpx;
padding: 20rpx 30rpx;
.placetopone {
.df(space-between);
@@ -209,21 +209,18 @@
}
.jiesuanmoney {
height: 112rpx;
line-height: 112rpx;
height: 50rpx;
line-height: 50rpx;
text-align: right;
margin-top: 8rpx;
>text:first-child {
font-size: 24rpx;
}
>text:last-child {
font-size: 32rpx;
margin-left: 20rpx;
}
}

View File

@@ -133,7 +133,7 @@
color,
backgroundColor,
fontSize: `${fontSize}px`,
width: `${fontSize * 22 / 14}px`, // 按字体大小为 14px 时的比例缩放
width: `${fontSize * 16 / 14}px`, // 按字体大小为 14px 时的比例缩放
lineHeight: `${fontSize * 20 / 14}px`,
borderRadius: `${fontSize * 3 / 14}px`,
}