测试问题修改3

This commit is contained in:
zzyuan 2025-06-24 13:16:48 +08:00
parent ef79f1a466
commit 652e4da57a
6 changed files with 50 additions and 50 deletions

View File

@ -130,7 +130,7 @@ export function cancelLossCardApi(data) {
//获取食堂列表 //获取食堂列表
export function getAllCanteenStallApi(data) { export function getAllCanteenStallApi(data) {
return request({ return request({
url: '/smart-canteen/basic_canteen/list', url: '/smart-canteen/basic_canteen/listAll',
method: 'get', method: 'get',
params:data params:data
}) })
@ -138,7 +138,7 @@ export function getAllCanteenStallApi(data) {
//通过食堂查询档口 //通过食堂查询档口
export function getStallByCanteenApi(data) { export function getStallByCanteenApi(data) {
return request({ return request({
url: '/smart-canteen/basic_stall/list', url: '/smart-canteen/basic_stall/listAll',
method: 'get', method: 'get',
params:data params:data
}) })

View File

@ -226,24 +226,19 @@ export default {
this.stallId=options.stallId; this.stallId=options.stallId;
this.stallName=options.stallName; this.stallName=options.stallName;
this.recipeId=options.recipeId; this.recipeId=options.recipeId;
this.getReserveDate()
}, },
onShow() { onShow() {
setTimeout(()=>{ setTimeout(()=>{
this.tIndex=0
// //
this.getReserveDate() this.getShoppingCartList()
},200) },200)
}, },
methods: { methods: {
// //
async getReserveDate(){ async getReserveDate(){
// let param = {
// "reserveLimitDayNum": "1",
// "ifAllowReserveToday": "1"
// }
// const res = await getlistReserveDateAPI(param)
// this.getNowFormatDate(res.data[0])
// this.getNowFormatDate2(res.data[0])
this.getNowFormatDate() this.getNowFormatDate()
this.getNowFormatDate2() this.getNowFormatDate2()
// //

View File

@ -105,6 +105,7 @@ export default {
totalPrice:0, totalPrice:0,
orderDate:"", orderDate:"",
shoppingCartList:[], shoppingCartList:[],
shoppingCartList2:[],
// //
detailData: { detailData: {
// //
@ -149,6 +150,7 @@ export default {
this.totalPrice = Number(options.totalPrice).toFixed(2) this.totalPrice = Number(options.totalPrice).toFixed(2)
this.orderDate = options.orderDate; this.orderDate = options.orderDate;
this.shoppingCartList=JSON.parse(options.carList) this.shoppingCartList=JSON.parse(options.carList)
this.shoppingCartList2=JSON.parse(options.carList)
console.log(this.shoppingCartList) console.log(this.shoppingCartList)
// this.getListElectronMobileUsable() // this.getListElectronMobileUsable()
}, },
@ -185,11 +187,10 @@ export default {
if(!this.sumbitStatus){ if(!this.sumbitStatus){
this.sumbitStatus = true this.sumbitStatus = true
let mealtimeTypeList = [];// let mealtimeTypeList = [];//
let orderList = [] let orderList = []
console.log(this.shoppingCartList) // console.log(this.shoppingCartList)
this.shoppingCartList.forEach(item=>{ this.shoppingCartList.forEach(item=>{
let index = mealtimeTypeList.findIndex(v=>v==item.mealtimeType) let index = mealtimeTypeList.findIndex(v=>v==item.mealtimeType)
console.log(index)
if(index<0){//不存在 if(index<0){//不存在
mealtimeTypeList.push(item.mealtimeType) mealtimeTypeList.push(item.mealtimeType)
let obj = { let obj = {
@ -206,10 +207,13 @@ export default {
orderList.push(obj) orderList.push(obj)
}else{ }else{
let index2 = orderList.findIndex(v=>v.mealtimeType==item.mealtimeType) let index2 = orderList.findIndex(v=>v.mealtimeType==item.mealtimeType)
orderList[index2].orderDetailList.push(item.orderDetailList[0]) let index3 = orderList[index2].orderDetailList.findIndex(v=>v.cartId==item.orderDetailList[0].cartId)
if(index3<0){
orderList[index2].orderDetailList.push(item.orderDetailList[0])
}
} }
}) })
console.log(orderList) // console.log(orderList)
let param={ let param={
"realAmount": this.totalPrice*100, "realAmount": this.totalPrice*100,
"payableAmount": this.totalPrice*100, "payableAmount": this.totalPrice*100,
@ -238,7 +242,8 @@ export default {
},1000) },1000)
} }
}).catch(()=>{ }).catch(()=>{
this.sumbitStatus = false this.sumbitStatus = false;
// this.$set(this,'shoppingCartList',this.shoppingCartList2)
}) })
} }
}, },

View File

@ -24,19 +24,22 @@
<view>卡状态</view> <view>卡状态</view>
<view v-if="item.cardStatus==1">正常</view> <view v-if="item.cardStatus==1">正常</view>
<view v-if="item.cardStatus==4">已挂失</view> <view v-if="item.cardStatus==4">已挂失</view>
<view v-if="item.cardStatus==5">已发卡</view>
<view v-if="item.cardStatus==6">已退卡</view>
<view v-if="item.cardStatus==7">已过期</view>
</view> </view>
<view class="card-content-item"> <view class="card-content-item">
<view>卡物理号</view> <view>卡物理号</view>
<view>{{item.serialNum}}</view> <view>{{item.serialNum}}</view>
</view> </view>
<view class="card-content-item"> <!-- <view class="card-content-item">
<view>卡面号</view> <view>卡面号</view>
<view>{{item.cardFaceNum}}</view> <view>{{item.cardFaceNum}}</view>
</view> </view>
<view class="card-content-item"> <view class="card-content-item">
<view>卡有效期</view> <view>卡有效期</view>
<view>{{item.validityDate}}</view> <view>{{item.validityDate}}</view>
</view> </view> -->
<!-- <view class="card-content-item"> <!-- <view class="card-content-item">
<view>备注</view> <view>备注</view>
<view>{{item.remark}}</view> <view>{{item.remark}}</view>

View File

@ -158,7 +158,7 @@ export default {
}, },
// //
async getAllCanteen() { async getAllCanteen() {
const res = await getAllCanteenStallApi({}) const res = await getAllCanteenStallApi({"canteenType":1})
console.log(res) console.log(res)
this.allCanteenData = res.rows this.allCanteenData = res.rows
let arr=[] let arr=[]

View File

@ -1,9 +1,9 @@
<template><page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta> <template><page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
<view class="rating-page"> <view class="rating-page">
<view> <view style="margin: 20rpx 0;">
<text style="font-size: 30rpx;font-weight: bold;">{{dishesData.stallName}}</text> <text style="font-size: 30rpx;font-weight: bold;">{{dishesData.stallName}}</text>
</view> </view>
<view style="width: 100%;height: 8vh;margin: 20rpx 0;display: flex;"> <view style="width: 100%;height: 10vh;margin: 20rpx 0;display: flex;">
<view v-for="n in 5" :key="n" @click="changAllStar(n)" style="width: 19%;display: flex;flex-direction: column;align-items: center;"> <view v-for="n in 5" :key="n" @click="changAllStar(n)" style="width: 19%;display: flex;flex-direction: column;align-items: center;">
<u-icon :name="n <= starLevel ? 'star-fill' : 'star-fill'" <u-icon :name="n <= starLevel ? 'star-fill' : 'star-fill'"
:color="n <= starLevel ? '#ff9933' : '#ccc'" size="50"></u-icon> :color="n <= starLevel ? '#ff9933' : '#ccc'" size="50"></u-icon>
@ -52,25 +52,21 @@
</view> </view>
</view> </view>
<!-- 提交按钮 -->
<view class="submit-btn" @click="sumbitEvaluate">
<u-button
text="发布评价"
<!-- 提交按钮 --> shape="square"
<view class="submit-btn" @click="sumbitEvaluate"> :customStyle="{
<u-button width: '100%',
text="发布评价" height: '88rpx',
shape="square" background: '#ff9933',
:customStyle="{ color: '#ffffff',
width: '100%', border: 'none',
height: '88rpx', fontSize: '26rpx'
background: '#ff9933', }"
color: '#ffffff', ></u-button>
border: 'none', </view>
fontSize: '26rpx'
}"
></u-button>
</view>
</view> </view>
</template> </template>
@ -240,15 +236,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.rating-page { .rating-page {
min-height: 94vh; height: 94vh;
overflow-y: auto;
background-color: #ffffff; background-color: #ffffff;
padding: 40rpx; padding: 40rpx;
padding-bottom: 120rpx; // padding-bottom: 120rpx;
.detail-rating { .detail-rating {
margin-top: 40rpx; padding-top: 60rpx;
padding-bottom: 40rpx;
.rating-item { .rating-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -259,8 +257,7 @@ export default {
padding-left: 10rpx; padding-left: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
} }
.hearts-row { .hearts-row {
display: flex; display: flex;
gap: 0rpx; gap: 0rpx;
@ -277,10 +274,10 @@ export default {
} }
.submit-btn { .submit-btn {
position: fixed; // position: fixed;
left: 30rpx; // left: 30rpx;
right: 30rpx; // right: 30rpx;
bottom: 40rpx; // bottom: 40rpx;
} }
} }
.upload-box { .upload-box {