优化问题

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) { //获取免单订单 orderfindWiningUser(data) { //获取免单订单
return uni.api.get("/order/findWiningUser", data); return uni.api.get("/order/findWiningUser", data);
}, },
// 获取自己的免单订单
ordermineWinner(data) {
return uni.api.get("/order/mineWinner", data);
},
indexlist(data) { //商品列表(今日上新/热榜/咖啡饮品) indexlist(data) { //商品列表(今日上新/热榜/咖啡饮品)
return uni.api.get("/distirict/productCate", data, false); return uni.api.get("/distirict/productCate", data, false);
}, },

View File

@@ -4,8 +4,7 @@
@click="viewHistorycategoryss(item,index)" @click="viewHistorycategoryss(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''"> :class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text> <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>
</view> </view>
</template> </template>

View File

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

View File

@@ -28,7 +28,7 @@
</view> </view>
<view class="towcontentoness"> <view class="towcontentoness">
<view class="towcontentonebox_box"> <view class="towcontentonebox_box">
订单数82 订单数{{total}}
</view> </view>
<view class="towcontentonebox"> <view class="towcontentonebox">
<view class="towcontentoneboxswiper"> <view class="towcontentoneboxswiper">
@@ -43,7 +43,7 @@
免单状态 免单状态
</view> </view>
</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-item" style="margin-top: 32rpx;">
<view class="swiper_itemone"> <view class="swiper_itemone">
{{item.orderAmount}} {{item.orderAmount}}
@@ -97,6 +97,7 @@
titlename: '', titlename: '',
opacity: false, opacity: false,
orderfindWiningUserlist: [], orderfindWiningUserlist: [],
ordermineWinnerList: [],
form: { form: {
address: '', //地址 address: '', //地址
type: '', //品类 type: '', //品类
@@ -106,10 +107,12 @@
size: 10, //页容量 size: 10, //页容量
status: 'loadmore' status: 'loadmore'
}, },
total:0
}; };
}, },
onLoad(e) { onLoad(e) {
this.orderfindWiningUser() this.orderfindWiningUser()
this.ordermineWinnerEvent()
let _this = this let _this = this
uni.getStorage({ uni.getStorage({
key: 'itemData', key: 'itemData',
@@ -118,6 +121,9 @@
} }
}); });
}, },
onReachBottom() {
this.ordermineWinnerEvent()
},
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏 if (e.scrollTop <= 44) { //搜索导航栏
this.opacity = false this.opacity = false
@@ -133,7 +139,22 @@
return str.slice(start, end + 1); //slice方法截取的部分不包括第二参数所在位置 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() { async orderfindWiningUser() {
let res = await this.api.orderfindWiningUser() let res = await this.api.orderfindWiningUser()
this.orderfindWiningUserlist = res.data.map((i) => { 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" <view class="fourcontent_item flex-start" v-for="(item,index) in hometoplist.menu" :key="index"
@click="viewHistory(item,index)" @click="viewHistory(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''"> :class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text> <text style="margin-right: 16rpx;">{{item.name}}</text>
<u-icon v-if="item.isChild" style="margin-left: 8rpx;" name="arrow-down-fill" color="#333333" <u-icon v-if="item.isChild" style="margin-left: 10rpx;" name="arrow-down-fill" color="#333333"
size="16"></u-icon> size="16"></u-icon>
</view> </view>
</view> </view>
@@ -74,7 +74,7 @@
{{item.shopName}} {{item.shopName}}
</view> </view>
<view> <view>
{{item.districts}}{{item.distances}} {{item.districts}}&nbsp;{{item.distances}}
</view> </view>
</view> </view>
<view class="fivecontent_item_nav_lefttopstart flex-start"> <view class="fivecontent_item_nav_lefttopstart flex-start">
@@ -92,8 +92,8 @@
<view class="fivecontent_item_boxitem flex-between"> <view class="fivecontent_item_boxitem flex-between">
<image :src="item.image" mode=""></image> <image :src="item.image" mode=""></image>
<view class="fivecontent_item_boxitemleft flex-colum-start"> <view class="fivecontent_item_boxitemleft flex-colum-start">
<view class="fivecontent_item_boxitemleftone flex-between"> <view class="fivecontent_item_boxitemleftone flex-between" style="display: flex;justify-content: space-between;align-items: center;">
<view>{{item.productName}}</view> <view>{{item.productName.length>7?item.productName.substring(0,7)+'...':item.productName}}</view>
<text>已抢{{item.realSalesNumber}}</text> <text>已抢{{item.realSalesNumber}}</text>
</view> </view>
<view class="flex-start flexstartboxfttow"> <view class="flex-start flexstartboxfttow">
@@ -128,7 +128,7 @@
:day="item.end_times.d" :hour="item.end_times.h" :day="item.end_times.d" :hour="item.end_times.h"
:minute="item.end_times.m" :second="item.end_times.s" :minute="item.end_times.m" :second="item.end_times.s"
:indexs='index' color="#FFFFFF" border-color="#00B26A" :indexs='index' color="#FFFFFF" border-color="#00B26A"
splitorColor="#FFFFFF" :font-size="8"></uni-countdown> splitorColor="#FFFFFF" :font-size="10"></uni-countdown>
</view> </view>
@@ -183,7 +183,7 @@
:key="index" @click="viewHistory(item,index)" :key="index" @click="viewHistory(item,index)"
:class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''"> :class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
<text>{{item.name}}</text> <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> color="#333333" size="16"></u-icon>
</view> </view>
</view> </view>
@@ -679,7 +679,7 @@
border-radius: 34rpx; border-radius: 34rpx;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 20rpx;
color: #999999; color: #999999;
overflow: hidden; //超出的文本隐藏 overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示 text-overflow: ellipsis; //溢出用省略号显示
@@ -695,11 +695,10 @@
padding: 32rpx 28rpx; padding: 32rpx 28rpx;
overflow-x: auto; overflow-x: auto;
flex-wrap: nowrap; flex-wrap: nowrap;
.fourcontent_item { .fourcontent_item {
flex-wrap: nowrap; flex-wrap: nowrap;
margin-left: 22rpx; margin-left: 22rpx;
padding: 8rpx 28rpx; padding: 11rpx 31rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
@@ -851,7 +850,7 @@
} }
view { view {
width: 300rpx; // width: 300rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; //溢出不换行white-space:nowrap; //溢出不换行 white-space: nowrap; //溢出不换行white-space:nowrap; //溢出不换行

View File

@@ -2,8 +2,9 @@
<view class="container"> <view class="container">
<view class="box flex-center"> <view class="box flex-center">
<!-- <text>欢迎登录零点八零</text> --> <!-- <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">
<view class="top_box_one" v-if="showbox"> <view class="top_box_one" v-if="showbox">
<text class="top_box_one_text">手机号码</text> <text class="top_box_one_text">手机号码</text>
@@ -52,7 +53,7 @@
<view class="agreement flex-start"> <view class="agreement flex-start">
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange" <u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
size="24"></u-checkbox></u-checkbox-group> 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(1)">用户协议</view>
<view class="agreement-Item" @click="Privacy(2)">隐私政策</view> <view class="agreement-Item" @click="Privacy(2)">隐私政策</view>

View File

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

View File

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

View File

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

View File

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