feat: 一键分享按钮展示调整

This commit is contained in:
2026-06-05 16:16:13 +08:00
parent 07740f7746
commit a1c5dd5514
9 changed files with 55 additions and 20 deletions
+3 -2
View File
@@ -2,10 +2,11 @@
<view class="cardTitle p-x-20 cardBg" :style="[{ height: statusBarHeight + 44 + 'px' }, { backgroundColor: props.bg }]">
<view :style="{ height: statusBarHeight + 'px' }"></view>
<view class="flex-center ju-between h_88">
<view class="cardLeft" v-if="props.showLeftButton">
<view @tap="onClickLeft">
<view class="cardLeft" v-if="props.showLeftButton || $slots.left">
<view v-if="props.showLeftButton" @tap="onClickLeft">
<uni-icons type="left" :color="textColor" />
</view>
<slot name="left" />
</view>
<view class="title size36 flex1 center" :style="[{ color: textColor }]">{{
props.title
+3 -2
View File
@@ -2,10 +2,11 @@
<view class="cardTitle p-x-20" :style="{ background: backgroundColor }">
<view :style="{height: statusBarHeight + 'px'}"></view>
<view class="flex-center ju-between h_88">
<view class="cardLeft" v-if="props.showLeftButton">
<view @tap="onClickLeft">
<view class="cardLeft" v-if="props.showLeftButton || $slots.left">
<view v-if="props.showLeftButton" @tap="onClickLeft">
<uni-icons type="left" :color="textColor" />
</view>
<slot name="left" />
</view>
<view class="title size36 flex1 center" :style="[{ color: textColor }]">{{ props.title }}</view>
<view class="cardRight" :style="{ color: textColor }">
@@ -2,10 +2,11 @@
<view class="cardTitle p-x-20">
<view :style="{height: statusBarHeight + 'px'}"></view>
<view class="flex-center ju-between h_88">
<view class="cardLeft" v-if="props.showLeftButton">
<view @tap="onClickLeft">
<view class="cardLeft" v-if="props.showLeftButton || $slots.left">
<view v-if="props.showLeftButton" @tap="onClickLeft">
<uni-icons type="left" :color="textColor" />
</view>
<slot name="left" />
</view>
<view class="title size36 flex1 center" :style="[{ color: textColor }]">{{ props.title }}</view>
<view class="cardRight" :style="{ color: textColor }">
+3
View File
@@ -206,6 +206,9 @@
sheep.$helper.toast('请选择余额支付');
return;
}
if (state.orderType === 'aiGoods') {
uni.setStorageSync('pay_return_to', 'aiStore_myshop');
}
if (state.payment === 'wallet') {
uni.showModal({
title: '提示',
+6 -1
View File
@@ -102,7 +102,12 @@
// payOrderId: res.data.payOrderId,
// });
uni.redirectTo({
url: '/pages/AI/cashierDesk?id=' + res.data.id + '&payOrderId=' + res.data.payOrderId,
url:
'/pages/AI/cashierDesk?id=' +
res.data.id +
'&payOrderId=' +
res.data.payOrderId +
'&from=aiStore',
});
}, 1000);
} else {
+6 -11
View File
@@ -1,10 +1,9 @@
<template>
<s-pages title="列表记录" navPreset="light">
<template #navRight>
<view class="share-btn" @tap="onShare">一键分享</view>
</template>
<view class="list-record-page">
<view class="share-btn" :style="{ top: shareTop }" @tap="onShare">
一键分享
</view>
<view class="hero">
<image class="hero-img" :src="cover || '/static/home/bc.png'" mode="aspectFill" />
</view>
@@ -13,7 +12,7 @@
<view class="record-card" v-for="(item, i) in recordList" :key="item.id || i">
<view class="record-head flex-between">
<view class="record-title lineOne">{{ item.title }}</view>
<view class="record-status">{{ item.statusText }}</view>
<!-- <view class="record-status">{{ item.statusText }}</view> -->
</view>
<view class="record-progress">
@@ -47,9 +46,6 @@
import { getAiShopPage } from '@/sheep/api/ai';
import { formatOrderStatus } from '@/sheep/hooks/useGoods';
const statusBarHeight = uni.getSystemInfoSync()?.statusBarHeight || 0;
const shareTop = `${statusBarHeight + 8}px`;
const skuId = ref('');
const cover = ref('');
@@ -161,9 +157,6 @@
}
.share-btn {
position: fixed;
right: 24rpx;
z-index: 99;
height: 56rpx;
padding: 0 18rpx;
border-radius: 18rpx;
@@ -173,6 +166,8 @@
display: flex;
align-items: center;
justify-content: center;
position: relative;
top: -2rpx;
}
.hero {
+19 -2
View File
@@ -121,9 +121,26 @@
}
});
const goAiStoreMyShopTab = () => {
const url = '/pages/index/aiStore?tab=1';
uni.redirectTo({
url,
fail: () => {
uni.reLaunch({ url });
},
});
};
const onBackHome = () => {
if (state.orderType === 'aiGoods') {
uni.reLaunch({ url: '/pages/index/aiStore?tab=1' });
const returnTo = uni.getStorageSync('pay_return_to');
if (returnTo === 'aiStore_myshop') {
uni.removeStorageSync('pay_return_to');
goAiStoreMyShopTab();
return;
}
const orderType = String(state.orderType || '').trim();
if (orderType === 'aiGoods') {
goAiStoreMyShopTab();
return;
}
sheep.$router.redirect('/pages/index/index');
+9
View File
@@ -12,6 +12,9 @@
@clickLeft="onClickLeft"
:index="props.index"
>
<template #left>
<slot name="navLeft" />
</template>
<template #right>
<slot name="navRight" />
</template>
@@ -27,6 +30,9 @@
@clickLeft="onClickLeft"
:index="props.index"
>
<template #left>
<slot name="navLeft" />
</template>
<template #right>
<slot name="navRight" />
</template>
@@ -42,6 +48,9 @@
@clickLeft="onClickLeft"
:index="props.index"
>
<template #left>
<slot name="navLeft" />
</template>
<template #right>
<slot name="navRight" />
</template>
+3
View File
@@ -9,6 +9,9 @@
:tabbar="props.tabbar"
@onClickLeft="onClickLeft"
>
<template #navLeft>
<slot name="navLeft" />
</template>
<template #navRight>
<slot name="navRight" />
</template>