diff --git a/main.js b/main.js index f5cd3ba..485a530 100644 --- a/main.js +++ b/main.js @@ -11,6 +11,7 @@ App.mpType = 'app' import store from '@/store/store' import i18n from './locale/index.js' +import configList from '@/mixins/configList.js' import './config' import './utils/index.js' @@ -21,6 +22,7 @@ import changeLanguage from '@/components/base/changeLanguage.vue' Vue.component('configPopup',configPopup) Vue.component('changeLanguage',changeLanguage) +Vue.mixin(configList) const app = new Vue({ ...App, diff --git a/manifest.json b/manifest.json index 9c7bf8f..7376fa0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "unapp模板", - "appid" : "__UNI__F370613", + "appid" : "__UNI__5405C20", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/mixins/configList.js b/mixins/configList.js new file mode 100644 index 0000000..cbe4c83 --- /dev/null +++ b/mixins/configList.js @@ -0,0 +1,34 @@ + + +import { mapState } from 'vuex' +export default { + data() { + return { + // 默认的全局分享内容 + Gshare: { + title: '艺易修', + path: '/pages/repair/repair', // 全局分享的路径,比如 首页 + // imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络) + } + } + }, + computed: { + }, + // 定义全局分享 + // 1.发送给朋友 + onShareAppMessage(res) { + let o = { + ...this.Gshare, + } + return o + }, + //2.分享到朋友圈 + onShareTimeline(res) { + let o = { + ...this.Gshare, + } + return o + }, + methods: { + } +} \ No newline at end of file