Fix(购物车):无数据占位图片无法显示
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
|
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change">
|
||||||
<image class="icon-hook" :src="webUrl+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
|
<image class="icon-hook" :src="$VUE_APP_RESOURCES_URL+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script>
|
||||||
import {VUE_APP_RESOURCES_URL} from '../config/index'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckboxIcon',
|
name: 'CheckboxIcon',
|
||||||
props: {
|
props: {
|
||||||
@@ -21,11 +19,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
webUrl: VUE_APP_RESOURCES_URL
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
isSelected: function() {
|
isSelected: function() {
|
||||||
return this.defaultState
|
return this.defaultState
|
||||||
|
|||||||
+3
-5
@@ -3,7 +3,7 @@
|
|||||||
<u-navbar leftIcon="trash" title="购物车" fixed @leftClick="remove"/>
|
<u-navbar leftIcon="trash" title="购物车" fixed @leftClick="remove"/>
|
||||||
|
|
||||||
<view class="tc" style="margin-top: 300rpx" v-if="list.length===0">
|
<view class="tc" style="margin-top: 300rpx" v-if="list.length===0">
|
||||||
<image style="width: 420rpx;height: 418rpx" :src="webUrl+'/20240106211138206789.png'" mode="scaleToFill"/>
|
<image style="width: 420rpx;height: 418rpx" :src="$VUE_APP_RESOURCES_URL+'/20240106211138206789.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="group-item" v-for="(item,index) in list" :key="index">
|
<view class="group-item" v-for="(item,index) in list" :key="index">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex ai-center" style="color:#E92727;font-size: 24rpx" @click="navToStore(item['hotelId'])">
|
<view class="flex ai-center" style="color:#E92727;font-size: 24rpx" @click="navToStore(item['hotelId'])">
|
||||||
进店逛逛
|
进店逛逛
|
||||||
<image style="width: 24rpx;height: 24rpx" :src="webUrl+'/20240109234706982937.png'" mode="scaleToFill"/>
|
<image style="width: 24rpx;height: 24rpx" :src="$VUE_APP_RESOURCES_URL+'/20240109234706982937.png'" mode="scaleToFill"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -84,14 +84,12 @@
|
|||||||
import {changeCartNum, getCartGroup, postCartDel} from "@/api/store";
|
import {changeCartNum, getCartGroup, postCartDel} from "@/api/store";
|
||||||
import CheckboxIcon from "@/components/CheckboxIcon.vue";
|
import CheckboxIcon from "@/components/CheckboxIcon.vue";
|
||||||
import {VUE_APP_RESOURCES_URL} from '../config/index'
|
import {VUE_APP_RESOURCES_URL} from '../config/index'
|
||||||
|
|
||||||
const webUrl = VUE_APP_RESOURCES_URL
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {CheckboxIcon},
|
components: {CheckboxIcon},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ready: false,
|
ready: false,
|
||||||
|
webUrl: VUE_APP_RESOURCES_URL,
|
||||||
list: [],
|
list: [],
|
||||||
isAll: false
|
isAll: false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user