代码优化
This commit is contained in:
parent
656793dae2
commit
5a655ba09e
|
|
@ -69,7 +69,6 @@ export default {
|
||||||
],
|
],
|
||||||
getDiceName(val,key){
|
getDiceName(val,key){
|
||||||
let item = this[key].find(v => v.type == val)
|
let item = this[key].find(v => v.type == val)
|
||||||
console.log(item)
|
|
||||||
return item ? item.label : ''
|
return item ? item.label : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
width:${props.size}px;
|
width:${props.size}px;
|
||||||
height:${props.size}px;
|
height:${props.size}px;
|
||||||
border-color:${props.borderColor};
|
border-color:${props.borderColor};
|
||||||
border-color:${props.modelValue?color.ColorMain:props.borderColor};
|
border-color:${props.modelValue?uni.$utils.ColorMain:props.borderColor};
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
const emits = defineEmits(['update:modelValue', 'change'])
|
const emits = defineEmits(['update:modelValue', 'change'])
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,6 @@
|
||||||
*/
|
*/
|
||||||
async function getGroupBindGoods() {
|
async function getGroupBindGoods() {
|
||||||
let res = await getProdGroupDetail(option.id)
|
let res = await getProdGroupDetail(option.id)
|
||||||
console.log(res)
|
|
||||||
pageData.bindGoodsList = res.productList.filter(v=>{
|
pageData.bindGoodsList = res.productList.filter(v=>{
|
||||||
return pageData.query.categoryId === '' ? true : (v.categoryId==pageData.query.categoryId)&&(v.name.includes(pageData.query.name))
|
return pageData.query.categoryId === '' ? true : (v.categoryId==pageData.query.categoryId)&&(v.name.includes(pageData.query.name))
|
||||||
})
|
})
|
||||||
|
|
@ -209,7 +208,6 @@
|
||||||
*/
|
*/
|
||||||
function setCategory(category) {
|
function setCategory(category) {
|
||||||
pageData.query.categoryId = category.id
|
pageData.query.categoryId = category.id
|
||||||
console.log(pageData.query.categoryId );
|
|
||||||
pageData.categoryName = category.name
|
pageData.categoryName = category.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +219,6 @@
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(pageData.goodsList);
|
|
||||||
await updateProdGroup({
|
await updateProdGroup({
|
||||||
...option,
|
...option,
|
||||||
productIds: [...pageData.bindGoodsList.map(v => v.id), ...pageData.goodsList.filter(v => v.checked)
|
productIds: [...pageData.bindGoodsList.map(v => v.id), ...pageData.goodsList.filter(v => v.checked)
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@ const vdata = reactive({
|
||||||
shopInfo: {
|
shopInfo: {
|
||||||
status: 2,
|
status: 2,
|
||||||
isAccountPay: 0,
|
isAccountPay: 0,
|
||||||
|
isMemberPrice: 0,
|
||||||
},
|
},
|
||||||
extendList: [],
|
extendList: [],
|
||||||
registerTypeList: [
|
registerTypeList: [
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
let msg = JSON.parse(res);
|
let msg = JSON.parse(res);
|
||||||
let cartItem;
|
let cartItem;
|
||||||
let cartArr = [];
|
let cartArr = [];
|
||||||
console.log("onMessage===",msg)
|
// console.log("onMessage===",msg)
|
||||||
if( msg.msg_id ){
|
if( msg.msg_id ){
|
||||||
websocketUtil.send(JSON.stringify({
|
websocketUtil.send(JSON.stringify({
|
||||||
type: 'receipt',
|
type: 'receipt',
|
||||||
|
|
@ -347,7 +347,7 @@
|
||||||
switch (msg.operate_type) {
|
switch (msg.operate_type) {
|
||||||
case 'onboc_init':
|
case 'onboc_init':
|
||||||
cars.length = 0
|
cars.length = 0
|
||||||
console.log("购物车信息onboc_init===",msg)
|
// console.log("购物车信息onboc_init===",msg)
|
||||||
if( !data.table.tableCode ){
|
if( !data.table.tableCode ){
|
||||||
data.table.tableCode = msg.table_code
|
data.table.tableCode = msg.table_code
|
||||||
uni.setStorageSync("table_code",msg.table_code)
|
uni.setStorageSync("table_code",msg.table_code)
|
||||||
|
|
|
||||||
|
|
@ -559,7 +559,6 @@
|
||||||
function tuikuan(item, index) {
|
function tuikuan(item, index) {
|
||||||
hasPermission('允许退款').then(res => {
|
hasPermission('允许退款').then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log(item)
|
|
||||||
if (Array.isArray(item)) {
|
if (Array.isArray(item)) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
item.map(v=>{
|
item.map(v=>{
|
||||||
|
|
|
||||||
|
|
@ -66,10 +66,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function toOrder(){
|
function toOrder(){
|
||||||
go.to('PAGES_ORDER_INDEX',{
|
go.to('PAGES_ORDER_INDEX',{
|
||||||
userId:props.user.id||'',
|
userId:props.user.userId||'',
|
||||||
type:'user'
|
type:'user'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
// 监听选择用户事件
|
// 监听选择用户事件
|
||||||
let user = ref({
|
let user = ref({
|
||||||
headImg:'',
|
headImg:'',
|
||||||
telephone:'',
|
phone:'',
|
||||||
amount:'0.00',
|
amount:'0.00',
|
||||||
accountPoints:'0.00'
|
accountPoints:'0.00'
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -928,7 +928,6 @@
|
||||||
async function pay(par) {
|
async function pay(par) {
|
||||||
const payType = pays.payTypes.list[pays.payTypes.selIndex].payType
|
const payType = pays.payTypes.list[pays.payTypes.selIndex].payType
|
||||||
let pars = getPayParam()
|
let pars = getPayParam()
|
||||||
console.log(pars)
|
|
||||||
payStatus = 'paying'
|
payStatus = 'paying'
|
||||||
let params = {
|
let params = {
|
||||||
shopId: uni.getStorageSync("shopInfo").id,
|
shopId: uni.getStorageSync("shopInfo").id,
|
||||||
|
|
@ -945,9 +944,6 @@
|
||||||
params.creditBuyerId = pageData.buyer.id
|
params.creditBuyerId = pageData.buyer.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(params)
|
|
||||||
try {
|
try {
|
||||||
if (payType == 'scanCode') {
|
if (payType == 'scanCode') {
|
||||||
await microPay(params)
|
await microPay(params)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue