|
@@ -1,47 +1,50 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <page ref="list" />
|
|
|
- </view>
|
|
|
+ <view>
|
|
|
+ <page ref="list" />
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import page from "./modules/page.vue";
|
|
|
+import { winTheCustomer } from "../../utils/share";
|
|
|
export default {
|
|
|
- components: { page },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- id: "",
|
|
|
- detail: {}
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(options) {
|
|
|
- if (options.id) {
|
|
|
- this.id = options.id - 0;
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.list.getDetail(this.id).then(detail => {
|
|
|
- this.detail = detail;
|
|
|
- })
|
|
|
- }, 100)
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- methods: {
|
|
|
- getSheraDate() {
|
|
|
- let detail = this.detail
|
|
|
- return {
|
|
|
- title: detail.title, // 标题
|
|
|
- path: "/packageA/advertising/shareable?id=" + detail.sat_sharematerialid, // 分享路径
|
|
|
- imageUrl: this.detail.attinfos.find(v => v.usetype == "avatar").url || ""// 分享图
|
|
|
- };
|
|
|
- }
|
|
|
- },
|
|
|
- onShareAppMessage(res) {
|
|
|
- return this.getSheraDate()
|
|
|
- },
|
|
|
- onShareTimeline() {
|
|
|
- return this.getSheraDate()
|
|
|
+ components: { page },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ id: "",
|
|
|
+ detail: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ this.id = options.id - 0;
|
|
|
+ this.isInitializeLogin(render.bind(this));
|
|
|
+ function render() {
|
|
|
+ this.$refs.list.getDetail(this.id).then((detail) => {
|
|
|
+ this.detail = detail;
|
|
|
+ });
|
|
|
+ this.shareUserid = winTheCustomer(options.shareUserid || 0, "长图文");
|
|
|
}
|
|
|
-}
|
|
|
-</script>
|
|
|
-
|
|
|
-<style></style>
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getSheraDate() {
|
|
|
+ let detail = this.detail,
|
|
|
+ path =
|
|
|
+ "/packageA/advertising/shareable?id=" +
|
|
|
+ detail.sat_sharematerialid +
|
|
|
+ "&shareUserid=" +
|
|
|
+ this.shareUserid;
|
|
|
+ return {
|
|
|
+ title: detail.title, // 标题
|
|
|
+ path, // 分享路径
|
|
|
+ imageUrl: "", // 分享图
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ return this.getSheraDate();
|
|
|
+ },
|
|
|
+ onShareTimeline() {
|
|
|
+ return this.getSheraDate();
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|