diff --git a/http/yskApi/http.js b/http/yskApi/http.js
index 931b751..3b7178b 100644
--- a/http/yskApi/http.js
+++ b/http/yskApi/http.js
@@ -15,6 +15,7 @@ import {
} from '@/commons/utils/encryptUtil.js'
import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js';
+import { reject } from 'lodash';
// 测试服
// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
@@ -125,9 +126,11 @@ function commonsProcess(showLoading, httpReqCallback) {
return Promise.resolve(bodyData)
}).catch(res => {
- if(res.status==401||res.status==400){
- // storageManage.token(null, true)
- infoBox.showErrorToast(res.message||'状态码400').then(() => {
+ if(res.status==401){
+ storageManage.token(null, true)
+ infoBox.showErrorToast(res.message||'请登录').then(() => {
+ uni.redirectTo({url: '/pages/login/index'})
+ reject()
})
}
if(res.status==500){
diff --git a/pagesCreateOrder/choose-user/choose-user.vue b/pagesCreateOrder/choose-user/choose-user.vue
index 04f10fc..434560b 100644
--- a/pagesCreateOrder/choose-user/choose-user.vue
+++ b/pagesCreateOrder/choose-user/choose-user.vue
@@ -3,6 +3,7 @@
@@ -15,33 +16,44 @@
不选择用户
-
-
-
-
-
-
-
- {{item.nickName}}
-
- 非会员
- 会员
-
- 余额:
- {{item.amount}}
-
-
- 积分:
- {{item.totalScore}}
+
+
+
+
+
+
+
+
+ {{item.nickName}}
+
+ 非会员
+ 会员
+
+ 余额:
+ {{item.amount}}
+
+
+ 积分:
+ {{item.totalScore}}
+
+
-
-
+
+
+
+
+
+
+
+
+
@@ -54,20 +66,23 @@
onLoad
} from '@dcloudio/uni-app'
import {
- reactive,onBeforeMount,
+ reactive,
+ onBeforeMount,
ref
} from 'vue';
let nouser = ref(false)
- let timer=null
+ let timer = null
+
function emitChooser(data) {
uni.$emit('choose-user', data)
- timer=setTimeout(() => {
+ timer = setTimeout(() => {
uni.navigateBack()
}, 100)
}
- onBeforeMount(()=>{
+ onBeforeMount(() => {
clearInterval(timer)
})
+
function chooseUser(index, item) {
if (index === undefined || item === undefined) {
nouser.value = true
@@ -85,28 +100,38 @@
}
const query = reactive({
- page: 0,
+ page: 1,
name: '',
- size: 300,
- isVip:1
+ totalElements: 0,
+ size: 10,
+ isVip: 1
})
const list = reactive([])
+ let hasAjax=ref(false)
async function getUser() {
const {
- content
+ content,
+ totalElements
} = await Api.queryAllShopUser(query)
+ hasAjax.value=true
+ list.length=content.length
for (let i in content) {
- list.push({
+ list[i]={
...content[i],
checked: false
- })
+ }
}
+ query.totalElements = totalElements
console.log(list);
}
+ function pageChange(e) {
+ query.page=e
+ getUser()
+ }
+
function search() {
- query.page = 0
- list.length = 0
+ query.page = 1
getUser()
}
onLoad(() => {
diff --git a/pagesOrder/detail/components/extra.vue b/pagesOrder/detail/components/extra.vue
index 7393980..f56a5d9 100644
--- a/pagesOrder/detail/components/extra.vue
+++ b/pagesOrder/detail/components/extra.vue
@@ -2,61 +2,103 @@
附加费
-
+
退菜
退款
-
-
- {{data.name||'餐位费'}}
- x{{data.number}}
- ¥{{data.totalAmount}}
-
-
-
-
-
- {{data.name||'餐位费'}}
- 已退
+
+
+
+ {{data.name||'餐位费'}}
+ x{{data.number}}
+ ¥{{data.totalAmount}}
- x{{data.number}}
- ¥{{data.totalAmount}}
-
-
+
+
+
+
+ {{data.name||'餐位费'}}
+ 已退
+
+ x{{data.number||0}}
+ ¥{{data.totalAmount}}
+
+
+
+
+
+
+ 打包费
+ x{{packeNumbber}}
+ ¥{{packeFee}}
+
@@ -65,9 +107,14 @@
padding: 0 6rpx;
border-radius: 8rpx;
font-size: 24rpx;
+
&.yitui {
background-color: rgb(188, 188, 188);
color: #fff;
}
}
+ .price-min-width{
+ min-width: 100rpx;
+ text-align: right;
+ }
\ No newline at end of file
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index a18357e..7499ef6 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -53,7 +53,7 @@
-
+
-->
-
+
+
@@ -16,7 +17,7 @@
-
+
结账
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index 5a8bc8c..f35e154 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -30,22 +30,42 @@
{{goosZhonglei}}种商品,共{{goodsNumber}}件
-
-
- {{item.productName}}
-
- {{item.productSkuName}}
+
+
+ {{item.productName}}
+
+ {{item.productSkuName}}
+
+
+
+ ×{{item.num}}
+
+ ¥{{goodsPriceAmount(item)}}
+
+ ¥0
+
+
-
- ×{{item.num}}
- ¥{{item.priceAmount}}
-
+
+
+
+ 打包费
+ ¥{{data.packFee||0}}
+
+
+ {{data.seatInfo.productName}}
+ ¥{{data.seatInfo.priceAmount}}
+
+
+
+
订单备注
{{data.remark||'无'}}
@@ -78,7 +98,14 @@
data: {
type: Object,
default: () => {
- detailList: []
+ return{
+ packFee:0,
+ seatInfo:{
+ productName:'客座费',
+ priceAmount:0
+ },
+ detailList: []
+ }
}
},
index: {
@@ -89,9 +116,16 @@
let $goodsMap = {}
let goosZhonglei = ref(0)
let goodsNumber = ref(0)
-
+
const priceSize = 9
-
+ function goodsPriceAmount(item){
+ return item.price*item.num
+ }
+ // const packeFee=computed(()=>{
+ // return props.data.detailList.reduce((prve,cur)=>{
+ // return prve+cur.packAmount
+ // },0).toFixed(2)
+ // })
function computedPriceStyle() {
const item = props.data.detailList.reduce((prev, current) => (`${prev.price}`.length > `${current.price}`
.length) ? prev : current)