依据文档修改

pull/27/head
落日晚风 2023-12-13 17:42:12 +08:00
parent 98baaab9bc
commit e71091cbb0
9 changed files with 1354 additions and 1310 deletions

View File

@ -30,7 +30,8 @@
<!-- 日历表 --> <!-- 日历表 -->
<view class="myDateTable"> <view class="myDateTable">
<view v-for="(item, j) in state.data.days" :key="j" class="dateCell ss-flex ss-row-center ss-col-center"> <view v-for="(item, j) in state.data.days" :key="j"
class="dateCell ss-flex ss-row-center ss-col-center">
<!-- 空格 --> <!-- 空格 -->
<view class="ss-flex ss-row-center ss-col-center"> <view class="ss-flex ss-row-center ss-col-center">
<text :decode="true">&nbsp;&nbsp;</text> <text :decode="true">&nbsp;&nbsp;</text>
@ -39,7 +40,8 @@
<!-- 已签到日期 --> <!-- 已签到日期 -->
<view v-if="item.is_sign" class="is-sign ss-flex ss-row-center"> <view v-if="item.is_sign" class="is-sign ss-flex ss-row-center">
<view class="is-sign-num">{{ item.day < 10 ? '0' + item.day : item.day }}</view> <view class="is-sign-num">{{ item.day < 10 ? '0' + item.day : item.day }}</view>
<image class="is-sign-image" :src="sheep.$url.static('/static/img/shop/app/correct.png')"> <image class="is-sign-image"
:src="sheep.$url.static('/static/img/shop/app/correct.png')">
</image> </image>
</view> </view>
<!-- 未签到日期 --> <!-- 未签到日期 -->
@ -125,8 +127,14 @@
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad, onReady } from '@dcloudio/uni-app'; import {
import { computed, reactive } from 'vue'; onLoad,
onReady
} from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
const headerBg = sheep.$url.css('/static/img/shop/app/sign.png'); const headerBg = sheep.$url.css('/static/img/shop/app/sign.png');
@ -138,8 +146,7 @@ const state = reactive({
cur_year: 0, // cur_year: 0, //
cur_month: 0, // cur_month: 0, //
cur_day: 0, // cur_day: 0, //
weeks_ch: [ weeks_ch: [{
{
title: '日', title: '日',
value: '0', value: '0',
}, },
@ -177,7 +184,11 @@ const state = reactive({
loading: true, loading: true,
}); });
async function onSign() { async function onSign() {
const { error, data } = await sheep.$api.activity.signAdd(); //
const {
code: error,
data
} = await sheep.$api.activity.signAdd();
if (error === 0) { if (error === 0) {
state.showModel = true; state.showModel = true;
state.signin = data; state.signin = data;
@ -196,7 +207,10 @@ function onConfirm() {
} }
// //
async function onRetroactive() { async function onRetroactive() {
const { error, data } = await sheep.$api.activity.replenish({ const {
error,
data
} = await sheep.$api.activity.replenish({
date: state.date, date: state.date,
}); });
if (error === 0) { if (error === 0) {
@ -206,7 +220,12 @@ async function onRetroactive() {
} }
async function getData(mouth) { async function getData(mouth) {
const { error, data } = await sheep.$api.activity.signList(mouth); const {
error,
data
} = await sheep.$api.activity.signList(mouth);
//
const ren = await sheep.$api.activity.getSummary();
if (error === 0) { if (error === 0) {
state.data = data; state.data = data;
} else { } else {
@ -236,7 +255,8 @@ async function getData(mouth) {
} }
}); });
} }
state.continue_days = data.continue_days; state.isSign = ren.data.todaySignIn ? 1 : 0;
state.continue_days = ren.data.continuousDay;
} }
} }

View File

@ -34,7 +34,8 @@
<!-- 满减送/限时折扣活动的提示 TODO 芋艿promos 未写 --> <!-- 满减送/限时折扣活动的提示 TODO 芋艿promos 未写 -->
<div class="tag-content"> <div class="tag-content">
<view class="tag-box ss-flex"> <view class="tag-box ss-flex">
<view class="tag ss-m-r-10" v-for="promos in state.goodsInfo.promos" :key="promos.id" @tap="onActivity"> <view class="tag ss-m-r-10" v-for="promos in state.goodsInfo.promos"
:key="promos.id" @tap="onActivity">
{{ promos.title }} {{ promos.title }}
</view> </view>
</view> </view>
@ -101,12 +102,22 @@
</template> </template>
<script setup> <script setup>
import { reactive, computed } from 'vue'; import {
import { onLoad, onPageScroll } from '@dcloudio/uni-app'; reactive,
computed
} from 'vue';
import {
onLoad,
onPageScroll
} from '@dcloudio/uni-app';
import sheep from '@/sheep'; import sheep from '@/sheep';
import CouponApi from '@/sheep/api/promotion/coupon'; import CouponApi from '@/sheep/api/promotion/coupon';
import ActivityApi from '@/sheep/api/promotion/activity'; import ActivityApi from '@/sheep/api/promotion/activity';
import { formatSales, formatGoodsSwiper, fen2yuan, } from '@/sheep/hooks/useGoods'; import {
formatSales,
formatGoodsSwiper,
fen2yuan,
} from '@/sheep/hooks/useGoods';
import detailNavbar from './components/detail/detail-navbar.vue'; import detailNavbar from './components/detail/detail-navbar.vue';
import detailCellSku from './components/detail/detail-cell-sku.vue'; import detailCellSku from './components/detail/detail-cell-sku.vue';
import detailCellService from './components/detail/detail-cell-service.vue'; import detailCellService from './components/detail/detail-cell-service.vue';
@ -116,7 +127,9 @@
import detailCommentCard from './components/detail/detail-comment-card.vue'; import detailCommentCard from './components/detail/detail-comment-card.vue';
import detailContentCard from './components/detail/detail-content-card.vue'; import detailContentCard from './components/detail/detail-content-card.vue';
import detailActivityTip from './components/detail/detail-activity-tip.vue'; import detailActivityTip from './components/detail/detail-activity-tip.vue';
import { isEmpty } from 'lodash'; import {
isEmpty
} from 'lodash';
onPageScroll(() => {}); onPageScroll(() => {});
@ -193,8 +206,9 @@
}, { }, {
type: 'goods', // type: 'goods', //
title: state.goodsInfo.name, // title: state.goodsInfo.name, //
image: sheep.$url.cdn(state.goodsInfo.image), // // image: sheep.$url.cdn(state.goodsInfo.image), //
price: state.goodsInfo.price[0], // image: sheep.$url.cdn(state.goodsInfo.picUrl), //
price: state.goodsInfo.price, //
original_price: state.goodsInfo.original_price, // original_price: state.goodsInfo.original_price, //
}, ); }, );
}); });

View File

@ -1,22 +1,12 @@
<template> <template>
<s-layout <s-layout navbar="normal" :leftWidth="0" :rightWidth="0" tools="search" :defaultSearch="state.keyword"
navbar="normal" @search="onSearch">
:leftWidth="0"
:rightWidth="0"
tools="search"
:defaultSearch="state.keyword"
@search="onSearch"
>
<!-- 筛选 --> <!-- 筛选 -->
<su-sticky bgColor="#fff"> <su-sticky bgColor="#fff">
<view class="ss-flex"> <view class="ss-flex">
<view class="ss-flex-1"> <view class="ss-flex-1">
<su-tabs <su-tabs :list="state.tabList" :scrollable="false" @change="onTabsChange"
:list="state.tabList" :current="state.currentTab"></su-tabs>
:scrollable="false"
@change="onTabsChange"
:current="state.currentTab"
></su-tabs>
</view> </view>
<view class="list-icon" @tap="state.iconStatus = !state.iconStatus"> <view class="list-icon" @tap="state.iconStatus = !state.iconStatus">
<text v-if="state.iconStatus" class="sicon-goods-list"></text> <text v-if="state.iconStatus" class="sicon-goods-list"></text>
@ -26,58 +16,29 @@
</su-sticky> </su-sticky>
<!-- 弹窗 --> <!-- 弹窗 -->
<su-popup <su-popup :show="state.showFilter" type="top" round="10" :space="sys_navBar + 38" backgroundColor="#F6F6F6"
:show="state.showFilter" :zIndex="10" @close="state.showFilter = false">
type="top"
round="10"
:space="sys_navBar + 38"
backgroundColor="#F6F6F6"
:zIndex="10"
@close="state.showFilter = false"
>
<view class="filter-list-box"> <view class="filter-list-box">
<view <view class="filter-item" v-for="(item, index) in state.tabList[state.currentTab].list"
class="filter-item" :key="item.value" :class="[{ 'filter-item-active': index == state.curFilter }]"
v-for="(item, index) in state.tabList[state.currentTab].list" @tap="onFilterItem(index)">
:key="item.value"
:class="[{ 'filter-item-active': index == state.curFilter }]"
@tap="onFilterItem(index)"
>
{{ item.label }} {{ item.label }}
</view> </view>
</view> </view>
</su-popup> </su-popup>
<view v-if="state.iconStatus && state.pagination.total > 0" class="goods-list ss-m-t-20"> <view v-if="state.iconStatus && state.pagination.total > 0" class="goods-list ss-m-t-20">
<view <view class="ss-p-l-20 ss-p-r-20 ss-m-b-20" v-for="item in state.pagination.data" :key="item.id">
class="ss-p-l-20 ss-p-r-20 ss-m-b-20" <s-goods-column class="" size="lg" :data="item" :topRadius="10" :bottomRadius="10"
v-for="item in state.pagination.data" @click="sheep.$router.go('/pages/goods/index', { id: item.id })"></s-goods-column>
:key="item.id"
>
<s-goods-column
class=""
size="lg"
:data="item"
:topRadius="10"
:bottomRadius="10"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
></s-goods-column>
</view> </view>
</view> </view>
<view <view v-if="!state.iconStatus && state.pagination.total > 0"
v-if="!state.iconStatus && state.pagination.total > 0" class="ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top">
class="ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top"
>
<view class="goods-list-box"> <view class="goods-list-box">
<view class="left-list" v-for="item in state.leftGoodsList" :key="item.id"> <view class="left-list" v-for="item in state.leftGoodsList" :key="item.id">
<s-goods-column <s-goods-column class="goods-md-box" size="md" :data="item" :topRadius="10" :bottomRadius="10"
class="goods-md-box"
size="md"
:data="item"
:topRadius="10"
:bottomRadius="10"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })" @click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="mountMasonry($event, 'left')" @getHeight="mountMasonry($event, 'left')">
>
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn"> </button> <button class="ss-reset-button cart-btn"> </button>
</template> </template>
@ -86,15 +47,9 @@
</view> </view>
<view class="goods-list-box"> <view class="goods-list-box">
<view class="right-list" v-for="item in state.rightGoodsList" :key="item.id"> <view class="right-list" v-for="item in state.rightGoodsList" :key="item.id">
<s-goods-column <s-goods-column class="goods-md-box" size="md" :topRadius="10" :bottomRadius="10" :data="item"
class="goods-md-box"
size="md"
:topRadius="10"
:bottomRadius="10"
:data="item"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })" @click="sheep.$router.go('/pages/goods/index', { id: item.id })"
@getHeight="mountMasonry($event, 'right')" @getHeight="mountMasonry($event, 'right')">
>
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn"> </button> <button class="ss-reset-button cart-btn"> </button>
</template> </template>
@ -102,22 +57,22 @@
</view> </view>
</view> </view>
</view> </view>
<uni-load-more <uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
v-if="state.pagination.total > 0"
:status="state.loadStatus"
:content-text="{
contentdown: '上拉加载更多', contentdown: '上拉加载更多',
}" }" @tap="loadmore" />
@tap="loadmore"
/>
<s-empty v-if="state.pagination.total === 0" icon="/static/soldout-empty.png" text="暂无商品"> <s-empty v-if="state.pagination.total === 0" icon="/static/soldout-empty.png" text="暂无商品">
</s-empty> </s-empty>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue'; import {
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; reactive
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import sheep from '@/sheep'; import sheep from '@/sheep';
import _ from 'lodash'; import _ from 'lodash';
@ -145,12 +100,10 @@
showFilter: false, showFilter: false,
iconStatus: false, iconStatus: false,
categoryId: 0, categoryId: 0,
tabList: [ tabList: [{
{
name: '综合推荐', name: '综合推荐',
// value: '', // value: '',
list: [ list: [{
{
label: '综合推荐', label: '综合推荐',
// sort: '', // sort: '',
// order: true, // order: true,
@ -169,6 +122,8 @@
}, },
{ {
name: '销量', name: '销量',
sort: 'salesCount',
order: false,
// value: 'salesCount', // value: 'salesCount',
}, },
{ {
@ -233,8 +188,8 @@
state.currentTab = e.index; state.currentTab = e.index;
} }
emptyList(); emptyList();
console.log(e, '6666')
getList(e.value, state.currentOrder, state.categoryId, state.keyword); getList(e.sort, e.order, state.categoryId, state.keyword);
} }
// //
@ -307,54 +262,68 @@
.goods-list-box { .goods-list-box {
width: 50%; width: 50%;
box-sizing: border-box; box-sizing: border-box;
.left-list { .left-list {
margin-right: 10rpx; margin-right: 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.right-list { .right-list {
margin-left: 10rpx; margin-left: 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
.goods-box { .goods-box {
&:nth-last-of-type(1) { &:nth-last-of-type(1) {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
&:nth-child(2n) { &:nth-child(2n) {
margin-right: 0; margin-right: 0;
} }
} }
.list-icon { .list-icon {
width: 80rpx; width: 80rpx;
.sicon-goods-card { .sicon-goods-card {
font-size: 40rpx; font-size: 40rpx;
} }
.sicon-goods-list { .sicon-goods-list {
font-size: 40rpx; font-size: 40rpx;
} }
} }
.goods-card { .goods-card {
margin-left: 20rpx; margin-left: 20rpx;
} }
.list-filter-tabs { .list-filter-tabs {
background-color: #fff; background-color: #fff;
} }
.filter-list-box { .filter-list-box {
padding: 28rpx 52rpx; padding: 28rpx 52rpx;
.filter-item { .filter-item {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: normal; line-height: normal;
margin-bottom: 24rpx; margin-bottom: 24rpx;
&:nth-last-child(1) { &:nth-last-child(1) {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.filter-item-active { .filter-item-active {
color: var(--ui-BG-Main); color: var(--ui-BG-Main);
} }
} }
.tab-item { .tab-item {
height: 50px; height: 50px;
position: relative; position: relative;

View File

@ -17,15 +17,17 @@
<view class="input-label ss-m-b-50">充值金额</view> <view class="input-label ss-m-b-50">充值金额</view>
<view class="input-box ss-flex border-bottom ss-p-b-20" v-if="state.data.custom_status"> <view class="input-box ss-flex border-bottom ss-p-b-20" v-if="state.data.custom_status">
<view class="unit"></view> <view class="unit"></view>
<uni-easyinput v-model="state.recharge_money" type="digit" placeholder="请输入充值金额" :inputBorder="false"> <uni-easyinput v-model="state.recharge_money" type="digit" placeholder="请输入充值金额"
:inputBorder="false">
</uni-easyinput> </uni-easyinput>
</view> </view>
<view class="face-value-box ss-flex ss-flex-wrap ss-m-y-40"> <view class="face-value-box ss-flex ss-flex-wrap ss-m-y-40">
<button class="ss-reset-button face-value-btn" v-for="item in state.faceValueList" :key="item.money" <button class="ss-reset-button face-value-btn" v-for="item in state.faceValueList" :key="item.money"
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]" @tap="onCard(item.money)"> :class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]"
<text class="face-value-title">{{ item.money }}</text> @tap="onCard(item.payPrice/100)">
<view v-if="item.gift" class="face-value-tag"> <text class="face-value-title">{{ item.payPrice/100 }}</text>
{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view> <view v-if="item.bonusPrice" class="face-value-tag">
{{ item.bonusPrice/100 }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view>
</button> </button>
</view> </view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main" @tap="onConfirm"> <button class="ss-reset-button save-btn ui-BG-Main-Gradient ss-m-t-60 ui-Shadow-Main" @tap="onConfirm">
@ -38,9 +40,14 @@
</template> </template>
<script setup> <script setup>
import { computed, reactive } from 'vue'; import {
computed,
reactive
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app'; import {
onLoad
} from '@dcloudio/uni-app';
const userInfo = computed(() => sheep.$store('user').userInfo); const userInfo = computed(() => sheep.$store('user').userInfo);
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
@ -58,10 +65,14 @@ function onCard(e) {
} }
async function getRechargeTabs() { async function getRechargeTabs() {
const res = await sheep.$api.trade.rechargeRules(); const res = await sheep.$api.trade.rechargeRules();
const res2 = await sheep.$api.trade.rechargeRules2();
if (res.error === 0) { if (res.error === 0) {
state.data = res.data; state.data = res.data;
state.data.status = res.data.status; state.data.status = res.data.status;
state.faceValueList = res.data.quick_amounts; console.log(res);
console.log(res2);
// state.faceValueList = res.data.quick_amounts;
state.faceValueList = res2.data;
} }
} }
@ -70,14 +81,21 @@ function onChange(e) {
} }
async function onConfirm() { async function onConfirm() {
const { error, data } = await sheep.$api.trade.recharge({ const {
recharge_money: state.recharge_money, code,
data
} = await sheep.$api.trade.recharge({
packageId: 0,
payPrice: state.recharge_money * 100
}); });
if (error === 0) { if (code === 0) {
// #ifdef MP // #ifdef MP
sheep.$platform.useProvider('wechat').subscribeMessage('money_change'); sheep.$platform.useProvider('wechat').subscribeMessage('money_change');
// #endif // #endif
sheep.$router.go('/pages/pay/index', { orderSN: data.order_sn, type: 'recharge' }); sheep.$router.go('/pages/pay/index', {
orderSN: data.order_sn,
type: 'recharge'
});
} }
} }
onLoad(() => { onLoad(() => {

View File

@ -101,6 +101,7 @@
}, },
); );
const onRegionConfirm = (e) => { const onRegionConfirm = (e) => {
console.log(e);
state.model = { state.model = {
...state.model, ...state.model,
...e, ...e,
@ -186,7 +187,13 @@
if (options.data) { if (options.data) {
let data = JSON.parse(options.data); let data = JSON.parse(options.data);
console.log(data) const areaData = uni.getStorageSync('areaData');
let provinceArr = areaData.filter(item => item.name == data.province_name);
data.province_id = provinceArr[0].id;
let provinceArr2 = provinceArr[0].children.filter(item => item.name == data.city_name);
data.city_id = provinceArr2[0].id;
let provinceArr3 = provinceArr2[0].children.filter(item => item.name == data.district_name);
data.district_id = provinceArr3[0].id;
state.model = { state.model = {
...state.model, ...state.model,
...data, ...data,

View File

@ -26,9 +26,14 @@ export default {
}), }),
signAdd: () => signAdd: () =>
request({ request({
url: 'activity/signin', url: '/app-api/member/sign-in/record/create',
method: 'POST', method: 'POST',
}), }),
// signAdd: () =>
// request({
// url: 'activity/signin',
// method: 'POST',
// }),
replenish: (data) => replenish: (data) =>
request({ request({
url: 'activity/signin/replenish', url: 'activity/signin/replenish',
@ -40,4 +45,10 @@ export default {
url: 'activity/activity/' + id, url: 'activity/activity/' + id,
method: 'GET', method: 'GET',
}), }),
getSummary: () =>
request({
url: '/app-api/member/sign-in/record/get-summary',
method: 'GET',
}),
}; };

View File

@ -28,9 +28,18 @@ export default {
showLoading: false, showLoading: false,
}, },
}), }),
rechargeRules2: () =>
request({
url: '/app-api/pay/wallet-recharge-package/list',
method: 'GET',
custom: {
showError: false,
showLoading: false,
},
}),
recharge: (data) => recharge: (data) =>
request({ request({
url: 'trade/order/recharge', url: '/app-api/pay/wallet-recharge/create',
method: 'POST', method: 'POST',
data, data,
}), }),

View File

@ -3,17 +3,14 @@
<view> <view>
<su-popup :show="state.showShareGuide" :showClose="false" @close="onCloseGuide"></su-popup> <su-popup :show="state.showShareGuide" :showClose="false" @close="onCloseGuide"></su-popup>
<view v-if="state.showShareGuide" class="guide-wrap"> <view v-if="state.showShareGuide" class="guide-wrap">
<image <image class="guide-image" :src="sheep.$url.static('/static/img/shop/share/share_guide.png')"></image>
class="guide-image"
:src="sheep.$url.static('/static/img/shop/share/share_guide.png')"
></image>
</view> </view>
<su-popup :show="show" round="10" :showClose="false" @close="closeShareModal"> <su-popup :show="show" round="10" :showClose="false" @close="closeShareModal">
<!-- 分享tools --> <!-- 分享tools -->
<view class="share-box"> <view class="share-box">
<view class="share-list-box ss-flex"> <view class="share-list-box ss-flex">
<button <!-- <button
v-if="shareConfig.methods.includes('forward')" v-if="shareConfig.methods.includes('forward')"
class="share-item share-btn ss-flex-col ss-col-center" class="share-item share-btn ss-flex-col ss-col-center"
open-type="share" open-type="share"
@ -25,20 +22,14 @@
mode="" mode=""
></image> ></image>
<text class="share-title">微信好友</text> <text class="share-title">微信好友</text>
</button> </button> -->
<button <button v-if="shareConfig.methods.includes('poster')"
v-if="shareConfig.methods.includes('poster')" class="share-item share-btn ss-flex-col ss-col-center" @tap="onShareByPoster">
class="share-item share-btn ss-flex-col ss-col-center" <image class="share-img" :src="sheep.$url.static('/static/img/shop/share/share_poster.png')"
@tap="onShareByPoster" mode=""></image>
>
<image
class="share-img"
:src="sheep.$url.static('/static/img/shop/share/share_poster.png')"
mode=""
></image>
<text class="share-title">生成海报</text> <text class="share-title">生成海报</text>
</button> </button>
<!--
<button <button
v-if="shareConfig.methods.includes('link')" v-if="shareConfig.methods.includes('link')"
class="share-item share-btn ss-flex-col ss-col-center" class="share-item share-btn ss-flex-col ss-col-center"
@ -50,7 +41,7 @@
mode="" mode=""
></image> ></image>
<text class="share-title">复制链接</text> <text class="share-title">复制链接</text>
</button> </button> -->
</view> </view>
<view class="share-foot ss-flex ss-row-center ss-col-center" @tap="closeShareModal"> <view class="share-foot ss-flex ss-row-center ss-col-center" @tap="closeShareModal">
取消 取消
@ -58,22 +49,27 @@
</view> </view>
</su-popup> </su-popup>
<!-- 分享海报 --> <!-- 分享海报 -->
<canvas-poster <canvas-poster ref="SharePosterRef" :show="state.showPosterModal" :shareInfo="shareInfo"
ref="SharePosterRef" @close="state.showPosterModal = false" />
:show="state.showPosterModal"
:shareInfo="shareInfo"
@close="state.showPosterModal = false"
/>
</view> </view>
</template> </template>
<script setup> <script setup>
/** /**
* 分享弹窗 * 分享弹窗
*/ */
import { ref, unref, reactive, computed } from 'vue'; import {
ref,
unref,
reactive,
computed
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import canvasPoster from './canvas-poster/index.vue'; import canvasPoster from './canvas-poster/index.vue';
import { showShareModal, closeShareModal, showAuthModal } from '@/sheep/hooks/useModal'; import {
showShareModal,
closeShareModal,
showAuthModal
} from '@/sheep/hooks/useModal';
const show = computed(() => sheep.$store('modal').share); const show = computed(() => sheep.$store('modal').share);
const shareConfig = computed(() => sheep.$store('app').platform.share); const shareConfig = computed(() => sheep.$store('app').platform.share);