style: 调整ai店铺商品布局、tabbar中心icon白边处理
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<view class="lineTwo size28 f500 m-b-14">
|
<view class="lineTwo size28 f500 m-b-14">
|
||||||
{{ props.source === 3 || props.source === 1 ? props.data.spuName : props.data.name }}
|
{{ props.source === 3 || props.source === 1 ? props.data.spuName : props.data.name }}
|
||||||
</view>
|
</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="flex1 m-r-28 progressCard card1">
|
||||||
<view class="progress"></view>
|
<view class="progress"></view>
|
||||||
<view
|
<view
|
||||||
@@ -33,25 +33,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="stockText size24">存量:{{ props.data.stocks }}</view>
|
<view class="stockText size24">存量:{{ props.data.stocks }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view class="flex-row al-flex-end m-t-14" v-if="props.source === 0">
|
||||||
class="flex-center ju-flex-start"
|
<view class="price-stock-row w100">
|
||||||
v-if="props.source === 0"
|
<view class="c13 size38 weight900">
|
||||||
:style="{ opacity: show ? 0 : 1 }"
|
<text class="size28">¥</text
|
||||||
>
|
>{{ fen2yuan(props.data.discountedPrice ? props.data.discountedPrice : props.data.price) }}
|
||||||
<view class="size24 m-r-10">
|
</view>
|
||||||
距离<span class="c15">本场{{ timeText }}</span
|
<!-- <text class="size20 c_999">存量:{{ props.data.stocks }}</text> -->
|
||||||
>仅剩
|
|
||||||
</view>
|
</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>
|
</view>
|
||||||
<view class="flex-center ju-flex-start">
|
<view class="flex-center ju-flex-start">
|
||||||
@@ -83,11 +72,31 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row ju-between">
|
<view class="flex-row ju-between footer-row">
|
||||||
<view class="flex-row al-flex-end">
|
<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"
|
<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">{{
|
<span class="size38" v-else-if="props.source == 3">{{
|
||||||
fen2yuan(
|
fen2yuan(
|
||||||
props.data.discountedTotalPrice
|
props.data.discountedTotalPrice
|
||||||
@@ -116,7 +125,7 @@
|
|||||||
}}</view
|
}}</view
|
||||||
>
|
>
|
||||||
</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]">
|
<uni-badge :text="props.data.cartCount" absolute="rightTop" :offset="[8, 3]">
|
||||||
<view class="ai-button1 w_144" style="color: #fff" @click.stop="addCar">选规格</view>
|
<view class="ai-button1 w_144" style="color: #fff" @click.stop="addCar">选规格</view>
|
||||||
</uni-badge>
|
</uni-badge>
|
||||||
@@ -152,6 +161,7 @@
|
|||||||
import { ref, onMounted, getCurrentInstance, defineProps, watch } from 'vue';
|
import { ref, onMounted, getCurrentInstance, defineProps, watch } from 'vue';
|
||||||
import { formatOrderStatus } from '@/sheep/hooks/useGoods';
|
import { formatOrderStatus } from '@/sheep/hooks/useGoods';
|
||||||
import * as api from '@/sheep/api/ai/index';
|
import * as api from '@/sheep/api/ai/index';
|
||||||
|
import { makeViewBoxTransform } from 'zrender/lib/tool/parseSVG';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
|
|
||||||
@@ -311,7 +321,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.card {
|
.card {
|
||||||
background: #fff;//#ffefe5;
|
background: #fff;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
padding: 24rpx 20rpx;
|
padding: 24rpx 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -356,9 +366,6 @@
|
|||||||
left: 14rpx;
|
left: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress {
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress1 {
|
.progress1 {
|
||||||
width: 0%;
|
width: 0%;
|
||||||
background: linear-gradient(90deg, #f7772e 0%, #ee0a24 98%),
|
background: linear-gradient(90deg, #f7772e 0%, #ee0a24 98%),
|
||||||
@@ -375,14 +382,46 @@
|
|||||||
width: 32rpx !important;
|
width: 32rpx !important;
|
||||||
height: 32rpx !important;
|
height: 32rpx !important;
|
||||||
line-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) {
|
:deep(.uni-countdown__splitor) {
|
||||||
color: #ff393a !important;
|
color: var(--countdown-grad-end) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 10rpx 22rpx rgba(38, 107, 246, 0.8);
|
box-shadow: 0 10rpx 22rpx rgba(38, 107, 246, 0.8);
|
||||||
background: transparent;
|
background: rgb(38, 107, 246);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"name" : "优购商城",
|
"name" : "优购商城",
|
||||||
"appid" : "__UNI__8B19741",
|
"appid" : "__UNI__8B19741",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.3.7",
|
"versionName" : "1.3.8",
|
||||||
"versionCode" : 137,
|
"versionCode" : 138,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"privacy" : {
|
"privacy" : {
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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="pages w100" :style="{ marginTop: -height + 'px' }">
|
||||||
<view class="w100">
|
<view class="w100">
|
||||||
<!-- <image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" /> -->
|
<!-- <image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" /> -->
|
||||||
|
|||||||
+52
-10
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<s-layout title="邀请好友">
|
<s-layout :navbar="navBar" title="邀请好友" navPreset="float">
|
||||||
<view class="share_page_bg" id="captureBox">
|
<view class="share_page_bg" id="captureBox" :style="{ marginTop: `-${navHeight}px` }">
|
||||||
<view class="slogan">
|
<view class="slogan">
|
||||||
<image class="slogan_img" src="/static/share_bg.png" mode="widthFix" />
|
<image class="slogan_img" src="/static/share_bg.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
@@ -55,10 +55,22 @@
|
|||||||
import Qrcode from './components/Qrcode';
|
import Qrcode from './components/Qrcode';
|
||||||
import { getCurrentInstance, nextTick, ref } from 'vue';
|
import { getCurrentInstance, nextTick, ref } from 'vue';
|
||||||
import * as api from '@/sheep/api/home/index';
|
import * as api from '@/sheep/api/home/index';
|
||||||
|
import { onPageScroll } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
const instance = getCurrentInstance();
|
||||||
const proxy = instance?.proxy;
|
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 inviteinfo = ref({});
|
||||||
const qrCodeUrl = ref('');
|
const qrCodeUrl = ref('');
|
||||||
const qrcodeRef = ref(null);
|
const qrcodeRef = ref(null);
|
||||||
@@ -168,6 +180,7 @@
|
|||||||
|
|
||||||
const rect = await getCaptureBoxRect();
|
const rect = await getCaptureBoxRect();
|
||||||
const sysInfo = uni.getSystemInfoSync();
|
const sysInfo = uni.getSystemInfoSync();
|
||||||
|
const excludeTopPx = (sysInfo?.statusBarHeight || 0) + 44;
|
||||||
const ratioX =
|
const ratioX =
|
||||||
typeof plus !== 'undefined' && plus.screen && plus.screen.resolutionWidth
|
typeof plus !== 'undefined' && plus.screen && plus.screen.resolutionWidth
|
||||||
? plus.screen.resolutionWidth / sysInfo.windowWidth
|
? plus.screen.resolutionWidth / sysInfo.windowWidth
|
||||||
@@ -180,20 +193,18 @@
|
|||||||
const maxHeight = Math.max(1, Math.floor(sysInfo.windowHeight * ratioY));
|
const maxHeight = Math.max(1, Math.floor(sysInfo.windowHeight * ratioY));
|
||||||
|
|
||||||
const clip = {
|
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)),
|
left: Math.max(0, Math.floor((rect.left || 0) * ratioX)),
|
||||||
width: Math.max(1, Math.floor((rect.width || 1) * 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 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));
|
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.left = Math.max(0, clip.left - sideExpand);
|
||||||
clip.width = clip.width + sideExpand * 2;
|
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.left >= maxWidth) clip.left = maxWidth - 1;
|
||||||
if (clip.top >= maxHeight) clip.top = maxHeight - 1;
|
if (clip.top >= maxHeight) clip.top = maxHeight - 1;
|
||||||
@@ -282,9 +293,40 @@
|
|||||||
try {
|
try {
|
||||||
uni.showLoading({ title: '生成分享图片...' });
|
uni.showLoading({ title: '生成分享图片...' });
|
||||||
await nextTick();
|
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();
|
uni.hideLoading();
|
||||||
const { localPath: shareImage } = await drawCurrentWebviewToFile();
|
const { localPath: shareImage } = await drawCurrentWebviewToFile({ clip });
|
||||||
uni.share({
|
uni.share({
|
||||||
provider,
|
provider,
|
||||||
type: 1,
|
type: 1,
|
||||||
@@ -306,7 +348,7 @@
|
|||||||
.share_page_bg {
|
.share_page_bg {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 520rpx 40rpx 80rpx;
|
padding: 570rpx 40rpx 80rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// background: #0b53d8;
|
// background: #0b53d8;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import cardTabber from '@/components/card_tabber/card_tabber.vue';
|
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 { onShow } from '@dcloudio/uni-app';
|
||||||
import { getWallet } from '@/sheep/api/home/pay';
|
import { getWallet } from '@/sheep/api/home/pay';
|
||||||
|
|
||||||
@@ -128,6 +128,7 @@
|
|||||||
let sysInfo = uni.getSystemInfoSync();
|
let sysInfo = uni.getSystemInfoSync();
|
||||||
let paddingTop = ref(20);
|
let paddingTop = ref(20);
|
||||||
paddingTop.value = sysInfo.statusBarHeight + uni.upx2px(88);
|
paddingTop.value = sysInfo.statusBarHeight + uni.upx2px(88);
|
||||||
|
const headerBgHeight = computed(() => `${paddingTop.value + uni.upx2px(320)}px`);
|
||||||
let realStatus = ref(0); //是否已经实名认证
|
let realStatus = ref(0); //是否已经实名认证
|
||||||
let agentLevelObj = {
|
let agentLevelObj = {
|
||||||
2: 'home/igency_1.png',
|
2: 'home/igency_1.png',
|
||||||
@@ -324,7 +325,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 380rpx;
|
height: v-bind('headerBgHeight');
|
||||||
background: #00f;
|
background: #00f;
|
||||||
border-radius: 0 0 30rpx 30rpx;
|
border-radius: 0 0 30rpx 30rpx;
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const navBarColors = computed(() => {
|
const navBarColors = computed(() => {
|
||||||
if (props.navPreset === 'seed') {
|
if (props.navPreset === 'float') {
|
||||||
if (props.navbar === 'normal') {
|
if (props.navbar === 'normal') {
|
||||||
return {
|
return {
|
||||||
bg: '#ffffff',
|
bg: '#ffffff',
|
||||||
|
|||||||
@@ -53,6 +53,8 @@
|
|||||||
--primary-grad-start: #2c8cfa;
|
--primary-grad-start: #2c8cfa;
|
||||||
--primary-grad-end: #3d5efb;
|
--primary-grad-end: #3d5efb;
|
||||||
--primary-shadow: rgba(47, 124, 246, 0.35);
|
--primary-shadow: rgba(47, 124, 246, 0.35);
|
||||||
|
--countdown-grad-start: #ff976a;
|
||||||
|
--countdown-grad-end: #ff4700;
|
||||||
--fff: #ffffff;
|
--fff: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 542 KiB After Width: | Height: | Size: 565 KiB |
Reference in New Issue
Block a user