"use strict";
const common_vendor = require("./vendor.js");
const config = require("../config.js");
const share = {
  data() {
    return {
      share: {}
    };
  },
  onShareAppMessage(res) {
    common_vendor.index.showShareMenu({
      withShareTicket: true
    });
    common_vendor.wx$1.updateShareMenu({
      isPrivateMessage: true,
      withShareTicket: true,
      success(res2) {
        console.log("updateShareMenu: ", res2);
      },
      fail() {
      }
    });
    return {
      title: config.configInfo.share.title,
      path: config.configInfo.share.path,
      imageUrl: config.configInfo.share.imageUrl,
      success(res2) {
        common_vendor.index.showToast({
          title: "分享成功"
        });
      },
      fail(res2) {
        common_vendor.index.showToast({
          title: "分享失败",
          icon: "none"
        });
      }
    };
  },
  onShareTimeline(res) {
    return {
      title: config.configInfo.share.title,
      path: config.configInfo.share.path,
      imageUrl: config.configInfo.share.imageUrl,
      success(res2) {
        common_vendor.index.showToast({
          title: "分享成功"
        });
      },
      fail(res2) {
        common_vendor.index.showToast({
          title: "分享失败",
          icon: "none"
        });
      }
    };
  }
};
exports.share = share;
