1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- "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.config.share.title,
- path: config.config.share.path,
- imageUrl: config.config.share.imageUrl,
- success(res2) {
- common_vendor.index.showToast({
- title: "分享成功"
- });
- },
- fail(res2) {
- common_vendor.index.showToast({
- title: "分享失败",
- icon: "none"
- });
- }
- };
- },
- onShareTimeline(res) {
- return {
- title: config.config.share.title,
- path: config.config.share.path,
- imageUrl: config.config.share.imageUrl,
- success(res2) {
- common_vendor.index.showToast({
- title: "分享成功"
- });
- },
- fail(res2) {
- common_vendor.index.showToast({
- title: "分享失败",
- icon: "none"
- });
- }
- };
- }
- };
- exports.share = share;
|