代码优化
This commit is contained in:
@@ -75,19 +75,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
defineProps
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import { reactive, defineProps } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
$table,
|
||||
tableswitch
|
||||
} from '@/http/yskApi/table.js'
|
||||
|
||||
import { getShopTable } from '@/http/api/table.js'
|
||||
let datas = reactive({
|
||||
current: 0,
|
||||
@@ -137,13 +128,13 @@
|
||||
if (datas.current == 0) {
|
||||
// 转桌是否选择菜品
|
||||
if (datas.changeTable.length) {
|
||||
let res = await tableswitch({
|
||||
masterId: datas.item[0].masterId,
|
||||
useType: datas.item[0].useType,
|
||||
cartIds: datas.changeTable,
|
||||
currentTableId: datas.item[0].tableId,
|
||||
targetTableId: datas.selecttableList
|
||||
})
|
||||
// let res = await tableswitch({
|
||||
// masterId: datas.item[0].masterId,
|
||||
// useType: datas.item[0].useType,
|
||||
// cartIds: datas.changeTable,
|
||||
// currentTableId: datas.item[0].tableId,
|
||||
// targetTableId: datas.selecttableList
|
||||
// })
|
||||
if (res) {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
|
||||
Reference in New Issue
Block a user