fix:兼容HbuilderX 3.6.15版本更新小程序平台的BUG

This commit is contained in:
kele
2023-01-17 15:34:16 +08:00
parent 5fa43dfb5b
commit 100dc94f53
21 changed files with 96 additions and 58 deletions
@@ -32,6 +32,10 @@
<script setup>
import { ref, reactive } from 'vue';
import sheep from '@/sheep';
const seckillBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-tip-bg.png');
const grouponBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/groupon-tip-bg.png');
const props = defineProps({
data: {
type: Object,
@@ -81,12 +85,12 @@
//秒杀卡片
.seckill-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png')") no-repeat;
background: v-bind(seckillBg) no-repeat;
background-size: 100% 100%;
}
.groupon-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png')") no-repeat;
background: v-bind(grouponBg) no-repeat;
background-size: 100% 100%;
}
</style>
+16 -7
View File
@@ -189,6 +189,15 @@
import grouponCardList from './components/groupon/groupon-card-list.vue';
import { useDurationTime, formatPrice, formatGoodsSwiper } from '@/sheep/hooks/useGoods';
const headerBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/groupon-bg.png');
const btnBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/groupon-btn.png');
const disabledBtnBg = sheep.$url.css(
'/assets/addons/shopro/frontend_img/goods/activity-btn-disabled.png',
);
const seckillBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-tip-bg.png');
const grouponBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/groupon-tip-bg.png');
onPageScroll(() => {});
const state = reactive({
skeletonLoading: true, // 骨架屏
@@ -337,7 +346,7 @@
// height: 320rpx;
background-size: 100% 100%;
border-radius: 10rpx;
background-image: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-bg.png')");
background-image: v-bind(headerBg);
background-repeat: no-repeat;
.price-box {
@@ -461,7 +470,7 @@
font-size: 24rpx;
font-weight: 600;
margin-left: -36rpx;
background-image: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-btn.png')");
background-image: v-bind(btnBg);
background-repeat: no-repeat;
background-size: 100% 100%;
color: #ffffff;
@@ -474,9 +483,7 @@
font-size: 24rpx;
font-weight: 600;
margin-left: -36rpx;
background-image: v-bind(
"sheep.$url.css('/static/img/shop/goods/activity-btn-disabled.png')"
);
background-image: v-bind(disabledBtnBg);
background-repeat: no-repeat;
background-size: 100% 100%;
color: #999999;
@@ -523,12 +530,14 @@
//秒杀卡片
.seckill-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png')") no-repeat;
background: v-bind(seckillBg)
no-repeat;
background-size: 100% 100%;
}
.groupon-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png')") no-repeat;
background: v-bind(grouponBg)
no-repeat;
background-size: 100% 100%;
}
+8 -6
View File
@@ -90,9 +90,7 @@
</button>
</view>
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-else>
<button class="ss-reset-button disabled-btn" disabled>
已兑完
</button>
<button class="ss-reset-button disabled-btn" disabled> 已兑完 </button>
</view>
</detail-tabbar>
</block>
@@ -115,6 +113,10 @@
import detailCommentCard from './components/detail/detail-comment-card.vue';
import detailContentCard from './components/detail/detail-content-card.vue';
const headerBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/score-bg.png');
const seckillBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-tip-bg.png');
const grouponBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-tip-bg.png');
onPageScroll(() => {});
const state = reactive({
@@ -209,7 +211,7 @@
box-sizing: border-box;
background-size: 100% 100%;
border-radius: 10rpx;
background-image: v-bind("sheep.$url.css('/static/img/shop/goods/score-bg.png')");
background-image: v-bind(headerBg);
background-repeat: no-repeat;
.price-box {
.score-img {
@@ -306,12 +308,12 @@
//秒杀卡片
.seckill-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png')") no-repeat;
background: v-bind(seckillBg) no-repeat;
background-size: 100% 100%;
}
.groupon-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png')") no-repeat;
background: v-bind(grouponBg) no-repeat;
background-size: 100% 100%;
}
+14 -8
View File
@@ -6,7 +6,7 @@
<detailSkeleton v-if="state.skeletonLoading" />
<!-- 空置页 -->
<s-empty
v-else-if="state.goodsInfo === null || state.goodsInfo.activity_type !== 'seckill' "
v-else-if="state.goodsInfo === null || state.goodsInfo.activity_type !== 'seckill'"
text="活动不存在或已结束"
icon="/static/soldout-empty.png"
showAction
@@ -153,6 +153,14 @@
import detailContentCard from './components/detail/detail-content-card.vue';
import detailProgress from './components/detail/detail-progress.vue';
const headerBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-bg.png');
const btnBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-btn.png');
const disabledBtnBg = sheep.$url.css(
'/assets/addons/shopro/frontend_img/goods/activity-btn-disabled.png',
);
const seckillBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/seckill-tip-bg.png');
const grouponBg = sheep.$url.css('/assets/addons/shopro/frontend_img/goods/groupon-tip-bg.png');
onPageScroll(() => {});
const state = reactive({
goodsId: 0,
@@ -267,7 +275,7 @@
// height: 320rpx;
background-size: 100% 100%;
border-radius: 10rpx;
background-image: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-bg.png')");
background-image: v-bind(headerBg);
background-repeat: no-repeat;
.price-box {
@@ -415,7 +423,7 @@
font-size: 24rpx;
font-weight: 600;
margin-left: -36rpx;
background-image: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-btn.png')");
background-image: v-bind(btnBg);
background-repeat: no-repeat;
background-size: 100% 100%;
color: #ffffff;
@@ -429,9 +437,7 @@
font-size: 24rpx;
font-weight: 600;
margin-left: -36rpx;
background-image: v-bind(
"sheep.$url.css('/static/img/shop/goods/activity-btn-disabled.png')"
);
background-image: v-bind(disabledBtnBg);
background-repeat: no-repeat;
background-size: 100% 100%;
color: #999999;
@@ -467,12 +473,12 @@
//秒杀卡片
.seckill-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png')") no-repeat;
background: v-bind(seckillBg) no-repeat;
background-size: 100% 100%;
}
.groupon-box {
background: v-bind("sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png')") no-repeat;
background: v-bind(grouponBg) no-repeat;
background-size: 100% 100%;
}