新增拼团/套餐分享功能
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<goodsList ref="goodsListRef" name="goodsList" key="goodsList" :top="headHeight + 54" v-if="tabsActive == 0" />
|
||||
<goodsList ref="goodsListRef" name="goodsList" key="goodsList" :top="headHeight + 54" v-if="tabsActive == 0" @share="shareCallback" />
|
||||
<orderList ref="orderListRef" name="orderList" key="orderList" :top="headHeight + 54" v-if="tabsActive == 1" />
|
||||
</view>
|
||||
<my-footer-btn confirmText="添加" v-if="tabsActive == 0" @confirm="toAdd"></my-footer-btn>
|
||||
@@ -27,13 +27,33 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { onLoad, onShow, onReachBottom, onPullDownRefresh, onShareAppMessage } from '@dcloudio/uni-app';
|
||||
import goodsList from './components/goodsList.vue';
|
||||
import orderList from './components/orderList.vue';
|
||||
import { upShopConfig } from '@/http/api/ware.js';
|
||||
import { getShopInfo } from '@/http/api/shop.js';
|
||||
import { isMainShop } from '@/store/account.js';
|
||||
|
||||
const path = '/pageMarket/groupGoods/share';
|
||||
const shareOptions = ref({
|
||||
title: '',
|
||||
path: '',
|
||||
imageUrl: ''
|
||||
});
|
||||
|
||||
onShareAppMessage(() => {
|
||||
console.log(shareOptions.value);
|
||||
return shareOptions.value;
|
||||
});
|
||||
|
||||
function shareCallback(item) {
|
||||
console.log('shareCallback', item);
|
||||
|
||||
shareOptions.value.title = item.wareName;
|
||||
shareOptions.value.path = `${path}?shopId=${item.shopId}&id=${item.id}`;
|
||||
shareOptions.value.imageUrl = item.wareImgs[0];
|
||||
}
|
||||
|
||||
const goodsListRef = ref(null);
|
||||
const orderListRef = ref(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user