代码优化

This commit is contained in:
GaoHao
2025-03-26 14:35:59 +08:00
parent 413222a5f0
commit 656793dae2
47 changed files with 142 additions and 4103 deletions

View File

@@ -63,18 +63,11 @@
</template>
<script setup>
import { reactive, onMounted, ref, watch } from 'vue';
import myButton from '@/components/my-components/my-button';
import myRadio from '@/components/my-components/my-radio';
import mySwitch from '@/components/my-components/my-switch';
import myPagination from '@/components/my-components/my-pagination'
import $coupon from '@/http/yskApi/couponCategory.js';
$coupon.get()
import {
reactive,
onMounted,
ref,
watch
} from 'vue';
const props = defineProps({
modelValue: {
type: Boolean,
@@ -136,13 +129,13 @@
}
})
function getGoods() {
$coupon.get(goods.query).then(res=>{
goods.list=res.content.map(v=>{
return {...v,checked:false}
})
goods.allChecked=false
goods.totalElements=res.totalElements
})
// $coupon.get(goods.query).then(res=>{
// goods.list=res.content.map(v=>{
// return {...v,checked:false}
// })
// goods.allChecked=false
// goods.totalElements=res.totalElements
// })
}
getGoods()

View File

@@ -36,9 +36,7 @@
<script setup>
import { reactive, ref, watch } from 'vue';
import { $tbProduct } from '@/http/yskApi/goods.js';
import infoBox from '@/commons/utils/infoBox.js'
const props = defineProps({
modelValue: {
type: Boolean,
@@ -81,7 +79,7 @@
function confrim() {
if(!sel.value.id){
return infoBox.showToast('请选择选择一个规格')
return uni.$utils.showToast('请选择选择一个规格')
}
emits('confirm', sel.value)
close()

View File

@@ -73,7 +73,6 @@
<script setup>
import { ref, reactive, watch, computed, onMounted } from 'vue';
import { deletetbProskuCon, } from "@/http/yskApi/consumable.js";
import infoBox from '@/commons/utils/infoBox.js'
import chooseHaocai from './choose-haocai.vue';

View File

@@ -85,9 +85,6 @@
</template>
<script setup>
import {
$productSpec
} from '@/http/yskApi/goods.js'
import { onLoad } from '@dcloudio/uni-app';
import infoBox from '@/commons/utils/infoBox.js'
import { reactive, nextTick, ref, } from 'vue';

View File

@@ -32,11 +32,7 @@
<script setup>
import { reactive, ref, watch } from 'vue';
import {
$updateGrounding,
$updateProductStatus,$updateProductData,
$tbProskuConV2
} from '@/http/yskApi/goods.js'
import { hasPermission } from '@/commons/utils/hasPermission.js'
import infoBox from '@/commons/utils/infoBox.js'
@@ -103,14 +99,7 @@
emits('save')
}
function upDateGoods(par) {
return $updateProductData([{
id: data.value.id,
isSku: 1,
shopId: uni.getStorageSync('shopId'),
...par
}])
}
let canShangXiaJia=ref(false)
async function hasShangXiajia(tips=false){