代码优化

This commit is contained in:
GaoHao 2025-03-26 17:18:49 +08:00
parent 656793dae2
commit 5a655ba09e
9 changed files with 6 additions and 15 deletions

View File

@ -69,7 +69,6 @@ export default {
],
getDiceName(val,key){
let item = this[key].find(v => v.type == val)
console.log(item)
return item ? item.label : ''
}
}

View File

@ -47,7 +47,7 @@
width:${props.size}px;
height:${props.size}px;
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'])

View File

@ -181,7 +181,6 @@
*/
async function getGroupBindGoods() {
let res = await getProdGroupDetail(option.id)
console.log(res)
pageData.bindGoodsList = res.productList.filter(v=>{
return pageData.query.categoryId === '' ? true : (v.categoryId==pageData.query.categoryId)&&(v.name.includes(pageData.query.name))
})
@ -209,7 +208,6 @@
*/
function setCategory(category) {
pageData.query.categoryId = category.id
console.log(pageData.query.categoryId );
pageData.categoryName = category.name
}
@ -221,7 +219,6 @@
if (!res) {
return
}
console.log(pageData.goodsList);
await updateProdGroup({
...option,
productIds: [...pageData.bindGoodsList.map(v => v.id), ...pageData.goodsList.filter(v => v.checked)

View File

@ -128,6 +128,7 @@ const vdata = reactive({
shopInfo: {
status: 2,
isAccountPay: 0,
isMemberPrice: 0,
},
extendList: [],
registerTypeList: [

View File

@ -325,7 +325,7 @@
let msg = JSON.parse(res);
let cartItem;
let cartArr = [];
console.log("onMessage===",msg)
// console.log("onMessage===",msg)
if( msg.msg_id ){
websocketUtil.send(JSON.stringify({
type: 'receipt',
@ -347,7 +347,7 @@
switch (msg.operate_type) {
case 'onboc_init':
cars.length = 0
console.log("购物车信息onboc_init===",msg)
// console.log("onboc_init===",msg)
if( !data.table.tableCode ){
data.table.tableCode = msg.table_code
uni.setStorageSync("table_code",msg.table_code)

View File

@ -559,7 +559,6 @@
function tuikuan(item, index) {
hasPermission('允许退款').then(res => {
if (res) {
console.log(item)
if (Array.isArray(item)) {
let arr = [];
item.map(v=>{

View File

@ -66,10 +66,9 @@
}
}
})
function toOrder(){
go.to('PAGES_ORDER_INDEX',{
userId:props.user.id||'',
userId:props.user.userId||'',
type:'user'
})
}

View File

@ -76,7 +76,7 @@
//
let user = ref({
headImg:'',
telephone:'',
phone:'',
amount:'0.00',
accountPoints:'0.00'
})

View File

@ -928,7 +928,6 @@
async function pay(par) {
const payType = pays.payTypes.list[pays.payTypes.selIndex].payType
let pars = getPayParam()
console.log(pars)
payStatus = 'paying'
let params = {
shopId: uni.getStorageSync("shopInfo").id,
@ -945,9 +944,6 @@
params.creditBuyerId = pageData.buyer.id
}
console.log(params)
try {
if (payType == 'scanCode') {
await microPay(params)