|
@@ -10,17 +10,17 @@
|
|
|
<app-trademark />
|
|
<app-trademark />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
import AppSwiper from "@/components/app-swiper";
|
|
import AppSwiper from "@/components/app-swiper";
|
|
|
import AppTrademark from "@/components/module/app-trademark";
|
|
import AppTrademark from "@/components/module/app-trademark";
|
|
|
-// 商品组件
|
|
|
|
|
import goodsListBig from "@/pages/home/components/goods-list-big";
|
|
import goodsListBig from "@/pages/home/components/goods-list-big";
|
|
|
import goodsListMiddle from "@/pages/home/components/goods-list-middle";
|
|
import goodsListMiddle from "@/pages/home/components/goods-list-middle";
|
|
|
import goodsListSmall from "@/pages/home/components/goods-list-small";
|
|
import goodsListSmall from "@/pages/home/components/goods-list-small";
|
|
|
import { getMainIndex } from "@/api/home";
|
|
import { getMainIndex } from "@/api/home";
|
|
|
import { getOrderShop } from "@/utils/config";
|
|
import { getOrderShop } from "@/utils/config";
|
|
|
|
|
+import { getShopUser } from "@/utils/auth";
|
|
|
|
|
+import { share } from "@/mixins";
|
|
|
export default {
|
|
export default {
|
|
|
name: "home",
|
|
name: "home",
|
|
|
components: {
|
|
components: {
|
|
@@ -30,6 +30,7 @@ export default {
|
|
|
goodsListMiddle,
|
|
goodsListMiddle,
|
|
|
goodsListSmall
|
|
goodsListSmall
|
|
|
},
|
|
},
|
|
|
|
|
+ mixins: [share],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
data: {},
|
|
data: {},
|
|
@@ -51,6 +52,23 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
this._detail();
|
|
this._detail();
|
|
|
|
|
+
|
|
|
|
|
+ getShopUser().then(res => {
|
|
|
|
|
+ // 设置分享
|
|
|
|
|
+ let shareParams = {
|
|
|
|
|
+ title: `${res.merchantName}`, // 分享标题
|
|
|
|
|
+ desc: "", // 分享内容
|
|
|
|
|
+ imgUrl: '',
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ pagePath: `${window.location.protocol}//mall.${this.$constant.firstHost}.com/#/pages/home/index?account=${res.merchantId}&fromUserId=${res.id}`,
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifndef H5
|
|
|
|
|
+ pagePath: `/pages/home/index?fromUserId=${res.id}`
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ };
|
|
|
|
|
+ this.jweixinFn(shareParams);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
_detail() {
|
|
_detail() {
|
|
|
getMainIndex().then(res => {
|
|
getMainIndex().then(res => {
|