style: 调整ai店铺商品布局、tabbar中心icon白边处理

This commit is contained in:
2026-06-02 15:26:19 +08:00
parent 3f01c33bfb
commit fe1ca06827
9 changed files with 129 additions and 45 deletions
+67 -28
View File
@@ -11,7 +11,7 @@
<view class="lineTwo size28 f500 m-b-14">
{{ props.source === 3 || props.source === 1 ? props.data.spuName : props.data.name }}
</view>
<view class="flex-center m-t-14 m-b-14" v-if="props.source === 0">
<view class="flex-center m-t-14 m-b-14" v-if="props.source === 0&&false">
<view class="flex1 m-r-28 progressCard card1">
<view class="progress"></view>
<view
@@ -33,25 +33,14 @@
</view>
<view class="stockText size24">存量:{{ props.data.stocks }}</view>
</view>
<view
class="flex-center ju-flex-start"
v-if="props.source === 0"
:style="{ opacity: show ? 0 : 1 }"
>
<view class="size24 m-r-10">
距离<span class="c15">本场{{ timeText }}</span
>仅剩
<view class="flex-row al-flex-end m-t-14" v-if="props.source === 0">
<view class="price-stock-row w100">
<view class="c13 size38 weight900">
<text class="size28">¥</text
>{{ fen2yuan(props.data.discountedPrice ? props.data.discountedPrice : props.data.price) }}
</view>
<!-- <text class="size20 c_999">存量:{{ props.data.stocks }}</text> -->
</view>
<uni-countdown
color="#FFFFFF"
background-color="#FF393A"
border-color="#FF393A"
:show-day="false"
:hour="hour"
:minute="minute"
:second="second"
@timeup="timeup"
></uni-countdown>
</view>
</view>
<view class="flex-center ju-flex-start">
@@ -83,11 +72,31 @@
</view>
</view>
</view>
<view class="flex-row ju-between">
<view class="flex-row al-flex-end">
<view class="flex-row ju-between footer-row">
<view
class="countdown-wrap"
v-if="props.source === 0"
:style="{ opacity: show ? 0 : 1 }"
>
<view class="size24 countdown-label">
距离<text>本场{{ timeText }}</text
>仅剩
</view>
<uni-countdown
color="#FFFFFF"
background-color="transparent"
border-color="transparent"
:show-day="false"
:hour="hour"
:minute="minute"
:second="second"
@timeup="timeup"
></uni-countdown>
</view>
<view class="flex-row al-flex-end" v-else>
<view class="c13 size28 weight900"
>¥
<span class="size38" v-if="props.source == 1">{{ fen2yuan(props.data.price) }}</span>
<text class="size38" v-if="props.source == 1">{{ fen2yuan(props.data.price) }}</text>
<span class="size38" v-else-if="props.source == 3">{{
fen2yuan(
props.data.discountedTotalPrice
@@ -116,7 +125,7 @@
}}</view
>
</view>
<view v-if="props.source === 0 && timeText !== '开始'">
<view v-if="props.source === 0 && timeText !== '开始'" class="spec-btn-wrap">
<uni-badge :text="props.data.cartCount" absolute="rightTop" :offset="[8, 3]">
<view class="ai-button1 w_144" style="color: #fff" @click.stop="addCar">选规格</view>
</uni-badge>
@@ -152,6 +161,7 @@
import { ref, onMounted, getCurrentInstance, defineProps, watch } from 'vue';
import { formatOrderStatus } from '@/sheep/hooks/useGoods';
import * as api from '@/sheep/api/ai/index';
import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
const { proxy } = getCurrentInstance() as any;
@@ -311,7 +321,7 @@
</script>
<style scoped lang="scss">
.card {
background: #fff;//#ffefe5;
background: #fff;
border-radius: 12rpx;
padding: 24rpx 20rpx;
box-sizing: border-box;
@@ -356,9 +366,6 @@
left: 14rpx;
}
.progress {
}
.progress1 {
width: 0%;
background: linear-gradient(90deg, #f7772e 0%, #ee0a24 98%),
@@ -375,14 +382,46 @@
width: 32rpx !important;
height: 32rpx !important;
line-height: 32rpx !important;
background: linear-gradient(
to bottom right,
var(--countdown-grad-start) 0%,
var(--countdown-grad-end) 100%
) !important;
border: 0 !important;
}
:deep(.uni-countdown__splitor) {
color: #ff393a !important;
color: var(--countdown-grad-end) !important;
}
.card {
border-radius: 16rpx;
overflow: hidden;
}
.footer-row {
align-items: center;
}
.countdown-wrap {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.countdown-label {
line-height: 34rpx;
margin-bottom: 8rpx;
}
.spec-btn-wrap {
display: flex;
align-items: center;
}
.price-stock-row {
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>
+1 -1
View File
@@ -209,7 +209,7 @@
border-radius: 50%;
border-radius: 50%;
box-shadow: 0 10rpx 22rpx rgba(38, 107, 246, 0.8);
background: transparent;
background: rgb(38, 107, 246);
}
.text {
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "优购商城",
"appid" : "__UNI__8B19741",
"description" : "",
"versionName" : "1.3.7",
"versionCode" : 137,
"versionName" : "1.3.8",
"versionCode" : 138,
"transformPx" : false,
"app-plus" : {
"privacy" : {
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<s-layout :navbar="navBar" title="金种子" navPreset="seed">
<s-layout :navbar="navBar" title="金种子" navPreset="float">
<view class="pages w100" :style="{ marginTop: -height + 'px' }">
<view class="w100">
<!-- <image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" /> -->
+52 -10
View File
@@ -1,6 +1,6 @@
<template>
<s-layout title="邀请好友">
<view class="share_page_bg" id="captureBox">
<s-layout :navbar="navBar" title="邀请好友" navPreset="float">
<view class="share_page_bg" id="captureBox" :style="{ marginTop: `-${navHeight}px` }">
<view class="slogan">
<image class="slogan_img" src="/static/share_bg.png" mode="widthFix" />
</view>
@@ -55,10 +55,22 @@
import Qrcode from './components/Qrcode';
import { getCurrentInstance, nextTick, ref } from 'vue';
import * as api from '@/sheep/api/home/index';
import { onPageScroll } from '@dcloudio/uni-app';
const instance = getCurrentInstance();
const proxy = instance?.proxy;
const sysInfoForNav = uni.getSystemInfoSync();
const navHeight = ref((sysInfoForNav?.statusBarHeight || 0) + 44);
const navBar = ref('inner');
onPageScroll((e) => {
if ((e?.scrollTop || 0) > 20) {
navBar.value = 'normal';
} else {
navBar.value = 'inner';
}
});
const inviteinfo = ref({});
const qrCodeUrl = ref('');
const qrcodeRef = ref(null);
@@ -168,6 +180,7 @@
const rect = await getCaptureBoxRect();
const sysInfo = uni.getSystemInfoSync();
const excludeTopPx = (sysInfo?.statusBarHeight || 0) + 44;
const ratioX =
typeof plus !== 'undefined' && plus.screen && plus.screen.resolutionWidth
? plus.screen.resolutionWidth / sysInfo.windowWidth
@@ -180,20 +193,18 @@
const maxHeight = Math.max(1, Math.floor(sysInfo.windowHeight * ratioY));
const clip = {
top: Math.max(0, Math.floor((rect.top || 0) * ratioY)),
top: Math.max(0, Math.floor(((rect.top || 0) + excludeTopPx) * ratioY)),
left: Math.max(0, Math.floor((rect.left || 0) * ratioX)),
width: Math.max(1, Math.floor((rect.width || 1) * ratioX)),
height: Math.max(1, Math.floor((rect.height || 1) * ratioY)),
height: Math.max(1, Math.floor(Math.max(1, (rect.height || 1) - excludeTopPx) * ratioY)),
};
const sideExpand = Math.max(0, Math.floor(30 * ratioX));
const topExpand = Math.max(0, Math.floor(60 * ratioY));
const bottomExpand = Math.max(0, Math.floor(20 * ratioY));
clip.top = Math.max(0, clip.top - topExpand);
clip.left = Math.max(0, clip.left - sideExpand);
clip.width = clip.width + sideExpand * 2;
clip.height = clip.height + topExpand + bottomExpand;
clip.height = clip.height + bottomExpand;
if (clip.left >= maxWidth) clip.left = maxWidth - 1;
if (clip.top >= maxHeight) clip.top = maxHeight - 1;
@@ -282,9 +293,40 @@
try {
uni.showLoading({ title: '生成分享图片...' });
await nextTick();
await sleep(450);
for (let i = 0; i < 8; i++) {
if (qrCodeUrl.value) break;
await sleep(200);
}
const rect = await getCaptureBoxRect();
const sysInfo = uni.getSystemInfoSync();
const excludeTopPx = (sysInfo?.statusBarHeight || 0) + 44;
const ratioX =
typeof plus !== 'undefined' && plus.screen && plus.screen.resolutionWidth
? plus.screen.resolutionWidth / sysInfo.windowWidth
: sysInfo.pixelRatio || 1;
const ratioY =
typeof plus !== 'undefined' && plus.screen && plus.screen.resolutionHeight
? plus.screen.resolutionHeight / sysInfo.windowHeight
: sysInfo.pixelRatio || 1;
const maxWidth = Math.max(1, Math.floor(sysInfo.windowWidth * ratioX));
const maxHeight = Math.max(1, Math.floor(sysInfo.windowHeight * ratioY));
const clip = {
top: Math.max(0, Math.floor(((rect.top || 0) + excludeTopPx) * ratioY)),
left: Math.max(0, Math.floor((rect.left || 0) * ratioX)),
width: Math.max(1, Math.floor((rect.width || 1) * ratioX)),
height: Math.max(1, Math.floor(Math.max(1, (rect.height || 1) - excludeTopPx) * ratioY)),
};
const sideExpand = Math.max(0, Math.floor(30 * ratioX));
const bottomExpand = Math.max(0, Math.floor(20 * ratioY));
clip.left = Math.max(0, clip.left - sideExpand);
clip.width = clip.width + sideExpand * 2;
clip.height = clip.height + bottomExpand;
if (clip.left >= maxWidth) clip.left = maxWidth - 1;
if (clip.top >= maxHeight) clip.top = maxHeight - 1;
if (clip.left + clip.width > maxWidth) clip.width = maxWidth - clip.left;
if (clip.top + clip.height > maxHeight) clip.height = maxHeight - clip.top;
uni.hideLoading();
const { localPath: shareImage } = await drawCurrentWebviewToFile();
const { localPath: shareImage } = await drawCurrentWebviewToFile({ clip });
uni.share({
provider,
type: 1,
@@ -306,7 +348,7 @@
.share_page_bg {
position: relative;
min-height: 100vh;
padding: 520rpx 40rpx 80rpx;
padding: 570rpx 40rpx 80rpx;
box-sizing: border-box;
// background: #0b53d8;
}
+3 -2
View File
@@ -118,7 +118,7 @@
<script setup>
import sheep from '@/sheep';
import cardTabber from '@/components/card_tabber/card_tabber.vue';
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick, computed } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import { getWallet } from '@/sheep/api/home/pay';
@@ -128,6 +128,7 @@
let sysInfo = uni.getSystemInfoSync();
let paddingTop = ref(20);
paddingTop.value = sysInfo.statusBarHeight + uni.upx2px(88);
const headerBgHeight = computed(() => `${paddingTop.value + uni.upx2px(320)}px`);
let realStatus = ref(0); //是否已经实名认证
let agentLevelObj = {
2: 'home/igency_1.png',
@@ -324,7 +325,7 @@
top: 0;
left: 0;
width: 100%;
height: 380rpx;
height: v-bind('headerBgHeight');
background: #00f;
border-radius: 0 0 30rpx 30rpx;
+1 -1
View File
@@ -210,7 +210,7 @@
});
const navBarColors = computed(() => {
if (props.navPreset === 'seed') {
if (props.navPreset === 'float') {
if (props.navbar === 'normal') {
return {
bg: '#ffffff',
+2
View File
@@ -53,6 +53,8 @@
--primary-grad-start: #2c8cfa;
--primary-grad-end: #3d5efb;
--primary-shadow: rgba(47, 124, 246, 0.35);
--countdown-grad-start: #ff976a;
--countdown-grad-end: #ff4700;
--fff: #ffffff;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 KiB

After

Width:  |  Height:  |  Size: 565 KiB