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({ uni.loadFontFace({
family: 'FangZhengFonts', 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) =>{ success:(res) =>{
console.log('success',res); console.log('success',res);
}, },
@ -17,7 +17,7 @@ export const getFonts =()=>{
export const getZSFont = () => { export const getZSFont = () => {
uni.loadFontFace({ uni.loadFontFace({
family: 'ZhongShanFonts', 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) =>{ success:(res) =>{
console.log('success',res); console.log('success',res);
}, },
@ -31,7 +31,7 @@ export const getZSFont = () => {
export const getFZXZFont = () => { export const getFZXZFont = () => {
uni.loadFontFace({ uni.loadFontFace({
family: 'FangZhengXiaoZhuan', 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) =>{ success:(res) =>{
console.log('success',res); console.log('success',res);
}, },

View File

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

View File

@ -8,15 +8,10 @@
class="image" class="image"
:src="workshopUrl + '/searchGood/search.png'" :src="workshopUrl + '/searchGood/search.png'"
/> />
<!-- <input class="text-wrapper" placeholder="搜索商品" disabled /> -->
<text class="text-wrapper font" style="color: #B1B1B1;">搜索商品</text> <text class="text-wrapper font" style="color: #B1B1B1;">搜索商品</text>
</view> </view>
</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"/> <carousel class="pos_2" :img-list="imgList" url-key="url" @selected="selectedBanner"/>
<!-- 类别列表 --> <!-- 类别列表 -->