This commit is contained in:
yuanteng0011 2025-03-19 16:22:28 +08:00
parent 6cced560ec
commit 08bb73c838
3 changed files with 18 additions and 18 deletions

View File

@ -3,7 +3,7 @@ export const getFonts =()=>{
//其他页面
uni.loadFontFace({
family: 'FangZhengFonts',
source: `url("https://carbon2.obs.cn-north-4.myhuaweicloud.com/fonts/FangZhengFonts.ttf")`,
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengFonts.ttf")`,
success:(res) =>{
console.log('success',res);
},
@ -17,7 +17,7 @@ export const getFonts =()=>{
export const getZSFont = () => {
uni.loadFontFace({
family: 'ZhongShanFonts',
source: `url("https://carbon2.obs.cn-north-4.myhuaweicloud.com/fonts/ZhongShanFonts.ttf")`,
source: `url("https://www.carboner.cn:8888/api/file/download/ZhongShanFonts.ttf")`,
success:(res) =>{
console.log('success',res);
},
@ -31,7 +31,7 @@ export const getZSFont = () => {
export const getFZXZFont = () => {
uni.loadFontFace({
family: 'FangZhengXiaoZhuan',
source: `url("https://carbon2.obs.cn-north-4.myhuaweicloud.com/fonts/FangZhengXiaoZhuan.ttf")`,
source: `url("https://www.carboner.cn:8888/api/file/download/FangZhengXiaoZhuan.ttf")`,
success:(res) =>{
console.log('success',res);
},

View File

@ -123,7 +123,7 @@
<script setup>
import { ref, onMounted, toRaw } from 'vue'
import { onShow, onLoad } from "@dcloudio/uni-app";
import { onShow, onLoad, onPullDownRefresh } from "@dcloudio/uni-app";
import { getFonts } from '../../../common/globalFont';
import { baseUrl, testUrl, suiUrl } from '../../../api/request';
import * as math from 'mathjs'
@ -175,7 +175,7 @@
if (res.data.code === 1) {
products.value = res.data.data
products.value.forEach((item) => {
item.checked = false
item.checked = false //
})
}
console.log('products-->', products.value);
@ -272,11 +272,10 @@
// });
//
const checkBoxChange = (event) => {
console.log('服务类打印出来是---->', event); //
//checkboxvalue allChecktrue
// console.log('---->', event); //
// console.log('length---->', event.detail.value.length);
// console.log('product--->',products.value);
if (event.detail.value.length == products.value.length) {
if (event.detail.value.length == products.value.length) { //
allCheck.value = true
} else {
allCheck.value = false
@ -284,14 +283,16 @@
checkedData.value = [] //
totalPrice.value = 0;
let count = 0; //checkedDatanull
console.log('event--->', event.detail);
if (event.detail.value.length) {
products.value[parseInt(event.detail.value)].checked = true; //
} else {
console.log('event--->', event.detail.value);
console.log('现在的商品---->',products.value);
if (!event.detail.value.length) {
// products.value[parseInt(event.detail.value)].checked = true; //
products.value.forEach((item) => {
item.checked = false
})
}
}
// else {
// }
//
for (let key in event.detail.value) {
let temp = parseInt(event.detail.value[parseInt(key)]) //
@ -303,6 +304,9 @@
}
event.detail.value.forEach((item) => {
products.value[parseInt(item)].checked = true
products.value.forEach((item) =>{
})
})
//checkboxGroup detail.valueidcheckedtrue()
products.value.forEach((x) => {
@ -368,6 +372,7 @@
const increase = (index, item) => { //item,obj,index
// console.log('increase,index-->', index);
// console.log('increase,item-->', item);
console.log('增加商品的--->',item);
if ( current.value === 1) { //
if (products.value[index].quantity <= products.value[index].cartGoodVO.inventory) {
if(item) {

View File

@ -8,15 +8,10 @@
class="image"
:src="workshopUrl + '/searchGood/search.png'"
/>
<!-- <input class="text-wrapper" placeholder="搜索商品" disabled /> -->
<text class="text-wrapper font" style="color: #B1B1B1;">搜索商品</text>
</view>
</view>
<!-- <image
class="image_2 pos_2"
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FloZarLZD-%E6%B5%8B%E8%AF%95%E6%8F%92%E5%85%A5.jpg"
/> -->
<carousel class="pos_2" :img-list="imgList" url-key="url" @selected="selectedBanner"/>
<!-- 类别列表 -->