字体
This commit is contained in:
parent
6cced560ec
commit
08bb73c838
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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); //选中后是数组下标
|
||||
//如果选中的checkbox的value的数组长度和后端传过来的数组长度相等则为全选状态 allCheck为true
|
||||
// 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; //用于记录checkedData不为null的个数
|
||||
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.value中有某个id则把这些元素的checked属性置为true(选中状态)
|
||||
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) {
|
||||
|
|
|
@ -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"/>
|
||||
|
||||
<!-- 类别列表 -->
|
||||
|
|
Loading…
Reference in New Issue
Block a user