依据文档修改
parent
98baaab9bc
commit
e71091cbb0
|
|
@ -30,7 +30,8 @@
|
|||
|
||||
<!-- 日历表 -->
|
||||
<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">
|
||||
<text :decode="true"> </text>
|
||||
|
|
@ -39,7 +40,8 @@
|
|||
<!-- 已签到日期 -->
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
<!-- 未签到日期 -->
|
||||
|
|
@ -125,8 +127,14 @@
|
|||
|
||||
<script setup>
|
||||
import sheep from '@/sheep';
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||
import { computed, reactive } from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onReady
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
computed,
|
||||
reactive
|
||||
} from 'vue';
|
||||
|
||||
const headerBg = sheep.$url.css('/static/img/shop/app/sign.png');
|
||||
|
||||
|
|
@ -138,8 +146,7 @@ const state = reactive({
|
|||
cur_year: 0, //当前选的年
|
||||
cur_month: 0, //当前选的月
|
||||
cur_day: 0, //当前选择的天
|
||||
weeks_ch: [
|
||||
{
|
||||
weeks_ch: [{
|
||||
title: '日',
|
||||
value: '0',
|
||||
},
|
||||
|
|
@ -177,7 +184,11 @@ const state = reactive({
|
|||
loading: true,
|
||||
});
|
||||
async function onSign() {
|
||||
const { error, data } = await sheep.$api.activity.signAdd();
|
||||
// 换签到接口
|
||||
const {
|
||||
code: error,
|
||||
data
|
||||
} = await sheep.$api.activity.signAdd();
|
||||
if (error === 0) {
|
||||
state.showModel = true;
|
||||
state.signin = data;
|
||||
|
|
@ -196,7 +207,10 @@ function onConfirm() {
|
|||
}
|
||||
//补签
|
||||
async function onRetroactive() {
|
||||
const { error, data } = await sheep.$api.activity.replenish({
|
||||
const {
|
||||
error,
|
||||
data
|
||||
} = await sheep.$api.activity.replenish({
|
||||
date: state.date,
|
||||
});
|
||||
if (error === 0) {
|
||||
|
|
@ -206,7 +220,12 @@ async function onRetroactive() {
|
|||
}
|
||||
|
||||
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) {
|
||||
state.data = data;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@
|
|||
<!-- 满减送/限时折扣活动的提示 TODO 芋艿:promos 未写 -->
|
||||
<div class="tag-content">
|
||||
<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 }}
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -101,12 +102,22 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed } from 'vue';
|
||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
|
||||
import {
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onPageScroll
|
||||
} from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import CouponApi from '@/sheep/api/promotion/coupon';
|
||||
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 detailCellSku from './components/detail/detail-cell-sku.vue';
|
||||
import detailCellService from './components/detail/detail-cell-service.vue';
|
||||
|
|
@ -116,7 +127,9 @@
|
|||
import detailCommentCard from './components/detail/detail-comment-card.vue';
|
||||
import detailContentCard from './components/detail/detail-content-card.vue';
|
||||
import detailActivityTip from './components/detail/detail-activity-tip.vue';
|
||||
import { isEmpty } from 'lodash';
|
||||
import {
|
||||
isEmpty
|
||||
} from 'lodash';
|
||||
|
||||
onPageScroll(() => {});
|
||||
|
||||
|
|
@ -193,8 +206,9 @@
|
|||
}, {
|
||||
type: 'goods', // 商品海报
|
||||
title: state.goodsInfo.name, // 商品标题
|
||||
image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
|
||||
price: state.goodsInfo.price[0], // 商品价格
|
||||
// image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
|
||||
image: sheep.$url.cdn(state.goodsInfo.picUrl), // 商品主图
|
||||
price: state.goodsInfo.price, // 商品价格
|
||||
original_price: state.goodsInfo.original_price, // 商品原价
|
||||
}, );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,22 +1,12 @@
|
|||
<template>
|
||||
<s-layout
|
||||
navbar="normal"
|
||||
:leftWidth="0"
|
||||
:rightWidth="0"
|
||||
tools="search"
|
||||
:defaultSearch="state.keyword"
|
||||
@search="onSearch"
|
||||
>
|
||||
<s-layout navbar="normal" :leftWidth="0" :rightWidth="0" tools="search" :defaultSearch="state.keyword"
|
||||
@search="onSearch">
|
||||
<!-- 筛选 -->
|
||||
<su-sticky bgColor="#fff">
|
||||
<view class="ss-flex">
|
||||
<view class="ss-flex-1">
|
||||
<su-tabs
|
||||
:list="state.tabList"
|
||||
:scrollable="false"
|
||||
@change="onTabsChange"
|
||||
:current="state.currentTab"
|
||||
></su-tabs>
|
||||
<su-tabs :list="state.tabList" :scrollable="false" @change="onTabsChange"
|
||||
:current="state.currentTab"></su-tabs>
|
||||
</view>
|
||||
<view class="list-icon" @tap="state.iconStatus = !state.iconStatus">
|
||||
<text v-if="state.iconStatus" class="sicon-goods-list"></text>
|
||||
|
|
@ -26,58 +16,29 @@
|
|||
</su-sticky>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<su-popup
|
||||
:show="state.showFilter"
|
||||
type="top"
|
||||
round="10"
|
||||
:space="sys_navBar + 38"
|
||||
backgroundColor="#F6F6F6"
|
||||
:zIndex="10"
|
||||
@close="state.showFilter = false"
|
||||
>
|
||||
<su-popup :show="state.showFilter" type="top" round="10" :space="sys_navBar + 38" backgroundColor="#F6F6F6"
|
||||
:zIndex="10" @close="state.showFilter = false">
|
||||
<view class="filter-list-box">
|
||||
<view
|
||||
class="filter-item"
|
||||
v-for="(item, index) in state.tabList[state.currentTab].list"
|
||||
:key="item.value"
|
||||
:class="[{ 'filter-item-active': index == state.curFilter }]"
|
||||
@tap="onFilterItem(index)"
|
||||
>
|
||||
<view class="filter-item" v-for="(item, index) in state.tabList[state.currentTab].list"
|
||||
:key="item.value" :class="[{ 'filter-item-active': index == state.curFilter }]"
|
||||
@tap="onFilterItem(index)">
|
||||
{{ item.label }}
|
||||
</view>
|
||||
</view>
|
||||
</su-popup>
|
||||
<view v-if="state.iconStatus && state.pagination.total > 0" class="goods-list ss-m-t-20">
|
||||
<view
|
||||
class="ss-p-l-20 ss-p-r-20 ss-m-b-20"
|
||||
v-for="item in state.pagination.data"
|
||||
: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 class="ss-p-l-20 ss-p-r-20 ss-m-b-20" v-for="item in state.pagination.data" :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
|
||||
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"
|
||||
>
|
||||
<view 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">
|
||||
<view class="goods-list-box">
|
||||
<view class="left-list" v-for="item in state.leftGoodsList" :key="item.id">
|
||||
<s-goods-column
|
||||
class="goods-md-box"
|
||||
size="md"
|
||||
:data="item"
|
||||
:topRadius="10"
|
||||
:bottomRadius="10"
|
||||
<s-goods-column class="goods-md-box" size="md" :data="item" :topRadius="10" :bottomRadius="10"
|
||||
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'left')"
|
||||
>
|
||||
@getHeight="mountMasonry($event, 'left')">
|
||||
<template v-slot:cart>
|
||||
<button class="ss-reset-button cart-btn"> </button>
|
||||
</template>
|
||||
|
|
@ -86,15 +47,9 @@
|
|||
</view>
|
||||
<view class="goods-list-box">
|
||||
<view class="right-list" v-for="item in state.rightGoodsList" :key="item.id">
|
||||
<s-goods-column
|
||||
class="goods-md-box"
|
||||
size="md"
|
||||
:topRadius="10"
|
||||
:bottomRadius="10"
|
||||
:data="item"
|
||||
<s-goods-column class="goods-md-box" size="md" :topRadius="10" :bottomRadius="10" :data="item"
|
||||
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'right')"
|
||||
>
|
||||
@getHeight="mountMasonry($event, 'right')">
|
||||
<template v-slot:cart>
|
||||
<button class="ss-reset-button cart-btn"> </button>
|
||||
</template>
|
||||
|
|
@ -102,22 +57,22 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more
|
||||
v-if="state.pagination.total > 0"
|
||||
:status="state.loadStatus"
|
||||
:content-text="{
|
||||
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||
contentdown: '上拉加载更多',
|
||||
}"
|
||||
@tap="loadmore"
|
||||
/>
|
||||
}" @tap="loadmore" />
|
||||
<s-empty v-if="state.pagination.total === 0" icon="/static/soldout-empty.png" text="暂无商品">
|
||||
</s-empty>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
import {
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
|
@ -145,12 +100,10 @@
|
|||
showFilter: false,
|
||||
iconStatus: false,
|
||||
categoryId: 0,
|
||||
tabList: [
|
||||
{
|
||||
tabList: [{
|
||||
name: '综合推荐',
|
||||
// value: '',
|
||||
list: [
|
||||
{
|
||||
list: [{
|
||||
label: '综合推荐',
|
||||
// sort: '',
|
||||
// order: true,
|
||||
|
|
@ -169,6 +122,8 @@
|
|||
},
|
||||
{
|
||||
name: '销量',
|
||||
sort: 'salesCount',
|
||||
order: false,
|
||||
// value: 'salesCount',
|
||||
},
|
||||
{
|
||||
|
|
@ -233,8 +188,8 @@
|
|||
state.currentTab = e.index;
|
||||
}
|
||||
emptyList();
|
||||
|
||||
getList(e.value, state.currentOrder, state.categoryId, state.keyword);
|
||||
console.log(e, '6666')
|
||||
getList(e.sort, e.order, state.categoryId, state.keyword);
|
||||
}
|
||||
|
||||
// 点击筛选项
|
||||
|
|
@ -307,54 +262,68 @@
|
|||
.goods-list-box {
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.left-list {
|
||||
margin-right: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.right-list {
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-box {
|
||||
&:nth-last-of-type(1) {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
&:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.list-icon {
|
||||
width: 80rpx;
|
||||
|
||||
.sicon-goods-card {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.sicon-goods-list {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.list-filter-tabs {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.filter-list-box {
|
||||
padding: 28rpx 52rpx;
|
||||
|
||||
.filter-item {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: normal;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&:nth-last-child(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-item-active {
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
height: 50px;
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -17,15 +17,17 @@
|
|||
<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="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>
|
||||
</view>
|
||||
<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"
|
||||
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]" @tap="onCard(item.money)">
|
||||
<text class="face-value-title">{{ item.money }}</text>
|
||||
<view v-if="item.gift" class="face-value-tag">
|
||||
送{{ item.gift }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view>
|
||||
:class="[{ 'btn-active': state.recharge_money == parseFloat(item.money) }]"
|
||||
@tap="onCard(item.payPrice/100)">
|
||||
<text class="face-value-title">{{ item.payPrice/100 }}</text>
|
||||
<view v-if="item.bonusPrice" class="face-value-tag">
|
||||
送{{ item.bonusPrice/100 }}{{ state.data.gift_type == 'money' ? '元' : '积分' }}</view>
|
||||
</button>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<script setup>
|
||||
import { computed, reactive } from 'vue';
|
||||
import {
|
||||
computed,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app';
|
||||
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||
|
|
@ -58,10 +65,14 @@ function onCard(e) {
|
|||
}
|
||||
async function getRechargeTabs() {
|
||||
const res = await sheep.$api.trade.rechargeRules();
|
||||
const res2 = await sheep.$api.trade.rechargeRules2();
|
||||
if (res.error === 0) {
|
||||
state.data = res.data;
|
||||
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() {
|
||||
const { error, data } = await sheep.$api.trade.recharge({
|
||||
recharge_money: state.recharge_money,
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await sheep.$api.trade.recharge({
|
||||
packageId: 0,
|
||||
payPrice: state.recharge_money * 100
|
||||
});
|
||||
if (error === 0) {
|
||||
if (code === 0) {
|
||||
// #ifdef MP
|
||||
sheep.$platform.useProvider('wechat').subscribeMessage('money_change');
|
||||
// #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(() => {
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
},
|
||||
);
|
||||
const onRegionConfirm = (e) => {
|
||||
console.log(e);
|
||||
state.model = {
|
||||
...state.model,
|
||||
...e,
|
||||
|
|
@ -186,7 +187,13 @@
|
|||
|
||||
if (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,
|
||||
...data,
|
||||
|
|
|
|||
|
|
@ -26,9 +26,14 @@ export default {
|
|||
}),
|
||||
signAdd: () =>
|
||||
request({
|
||||
url: 'activity/signin',
|
||||
url: '/app-api/member/sign-in/record/create',
|
||||
method: 'POST',
|
||||
}),
|
||||
// signAdd: () =>
|
||||
// request({
|
||||
// url: 'activity/signin',
|
||||
// method: 'POST',
|
||||
// }),
|
||||
replenish: (data) =>
|
||||
request({
|
||||
url: 'activity/signin/replenish',
|
||||
|
|
@ -40,4 +45,10 @@ export default {
|
|||
url: 'activity/activity/' + id,
|
||||
method: 'GET',
|
||||
}),
|
||||
getSummary: () =>
|
||||
request({
|
||||
url: '/app-api/member/sign-in/record/get-summary',
|
||||
method: 'GET',
|
||||
}),
|
||||
|
||||
};
|
||||
|
|
@ -28,9 +28,18 @@ export default {
|
|||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
rechargeRules2: () =>
|
||||
request({
|
||||
url: '/app-api/pay/wallet-recharge-package/list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
recharge: (data) =>
|
||||
request({
|
||||
url: 'trade/order/recharge',
|
||||
url: '/app-api/pay/wallet-recharge/create',
|
||||
method: 'POST',
|
||||
data,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -3,17 +3,14 @@
|
|||
<view>
|
||||
<su-popup :show="state.showShareGuide" :showClose="false" @close="onCloseGuide"></su-popup>
|
||||
<view v-if="state.showShareGuide" class="guide-wrap">
|
||||
<image
|
||||
class="guide-image"
|
||||
:src="sheep.$url.static('/static/img/shop/share/share_guide.png')"
|
||||
></image>
|
||||
<image class="guide-image" :src="sheep.$url.static('/static/img/shop/share/share_guide.png')"></image>
|
||||
</view>
|
||||
|
||||
<su-popup :show="show" round="10" :showClose="false" @close="closeShareModal">
|
||||
<!-- 分享tools -->
|
||||
<view class="share-box">
|
||||
<view class="share-list-box ss-flex">
|
||||
<button
|
||||
<!-- <button
|
||||
v-if="shareConfig.methods.includes('forward')"
|
||||
class="share-item share-btn ss-flex-col ss-col-center"
|
||||
open-type="share"
|
||||
|
|
@ -25,20 +22,14 @@
|
|||
mode=""
|
||||
></image>
|
||||
<text class="share-title">微信好友</text>
|
||||
</button>
|
||||
<button
|
||||
v-if="shareConfig.methods.includes('poster')"
|
||||
class="share-item share-btn ss-flex-col ss-col-center"
|
||||
@tap="onShareByPoster"
|
||||
>
|
||||
<image
|
||||
class="share-img"
|
||||
:src="sheep.$url.static('/static/img/shop/share/share_poster.png')"
|
||||
mode=""
|
||||
></image>
|
||||
</button> -->
|
||||
<button v-if="shareConfig.methods.includes('poster')"
|
||||
class="share-item share-btn ss-flex-col ss-col-center" @tap="onShareByPoster">
|
||||
<image class="share-img" :src="sheep.$url.static('/static/img/shop/share/share_poster.png')"
|
||||
mode=""></image>
|
||||
<text class="share-title">生成海报</text>
|
||||
</button>
|
||||
|
||||
<!--
|
||||
<button
|
||||
v-if="shareConfig.methods.includes('link')"
|
||||
class="share-item share-btn ss-flex-col ss-col-center"
|
||||
|
|
@ -50,7 +41,7 @@
|
|||
mode=""
|
||||
></image>
|
||||
<text class="share-title">复制链接</text>
|
||||
</button>
|
||||
</button> -->
|
||||
</view>
|
||||
<view class="share-foot ss-flex ss-row-center ss-col-center" @tap="closeShareModal">
|
||||
取消
|
||||
|
|
@ -58,22 +49,27 @@
|
|||
</view>
|
||||
</su-popup>
|
||||
<!-- 分享海报 -->
|
||||
<canvas-poster
|
||||
ref="SharePosterRef"
|
||||
:show="state.showPosterModal"
|
||||
:shareInfo="shareInfo"
|
||||
@close="state.showPosterModal = false"
|
||||
/>
|
||||
<canvas-poster ref="SharePosterRef" :show="state.showPosterModal" :shareInfo="shareInfo"
|
||||
@close="state.showPosterModal = false" />
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
/**
|
||||
* 分享弹窗
|
||||
*/
|
||||
import { ref, unref, reactive, computed } from 'vue';
|
||||
import {
|
||||
ref,
|
||||
unref,
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
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 shareConfig = computed(() => sheep.$store('app').platform.share);
|
||||
|
|
|
|||
Loading…
Reference in New Issue