代客下单修改部分页面跳转逻辑
This commit is contained in:
@@ -80,12 +80,15 @@
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onBackPress
|
||||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import editDiscount from '/pagesCreateOrder/components/edit-discount.vue'
|
||||
import {queryAllShopUser} from '@/http/yskApi/shop-user.js'
|
||||
import {
|
||||
queryAllShopUser
|
||||
} from '@/http/yskApi/shop-user.js'
|
||||
const pays = reactive({
|
||||
list: ['扫码收款', '二维码收款'],
|
||||
selIndex: 0,
|
||||
@@ -94,7 +97,11 @@
|
||||
selIndex: 0
|
||||
}
|
||||
})
|
||||
|
||||
let option = opt
|
||||
onBackPress(()=>{
|
||||
console.log('-------------------');
|
||||
console.log('onBackPress');
|
||||
})
|
||||
const models = new Map();
|
||||
|
||||
function setModel(el) {
|
||||
@@ -107,8 +114,8 @@
|
||||
const model = models.get(key)
|
||||
model && model.open()
|
||||
}
|
||||
|
||||
let user=ref({})
|
||||
|
||||
let user = ref({})
|
||||
async function getPayType() {
|
||||
const payTypeList = await Api.$getPayType()
|
||||
pays.payTypes.list = payTypeList
|
||||
@@ -125,7 +132,7 @@
|
||||
uni.$emit('update:createOrderIndex')
|
||||
console.log('update:createOrderIndex');
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
@@ -184,11 +191,14 @@
|
||||
}
|
||||
})
|
||||
onLoad((opt) => {
|
||||
option = opt
|
||||
console.log(opt);
|
||||
Object.assign(order, opt)
|
||||
if(order.userId){
|
||||
queryAllShopUser({id:opt.userId}).then(res=>{
|
||||
user.value=res.content[0]||opt
|
||||
if (order.userId) {
|
||||
queryAllShopUser({
|
||||
id: opt.userId
|
||||
}).then(res => {
|
||||
user.value = res.content[0] || opt
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user