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