1 Star 0 Fork 40

比方/2024热门短剧微短剧抖音微信APP短剧系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
qiaoyonggang 提交于 2023-11-01 21:28 . v1.0.5
/**
* @Description:
* @Author: FangYaoTang
* @Date: 2023-08-16 09:12:28
* @LastEditor: FangYaoTang
* @LastEditTime: 2023-08-21 14:56:54
* @Copyright: by 南阳迈特网络科技有限公司 禁止任何形式(包含二次开发)转售系统源码,违者必究。
*/
import Vue from 'vue'
import App from './App'
import { BASE_URL, SIGN } from './env.js'
Vue.prototype.$BASE_URL = BASE_URL
Vue.prototype.$SIGN = SIGN
// #ifdef H5
Vue.prototype.$WXOA_CALLBACK = `${window.location.origin + window.location.pathname}?${SIGN}#/pages/login/login`
// #endif
import uView from '@/uview-ui'
Vue.use(uView)
import request from '@/common/request/index.js'
Vue.prototype.$request = request
import utils from '@/common/utils/index.js'
Vue.prototype.$utils = utils
import store from '@/common/store/index.js'
Vue.prototype.$store = store
import CustomNavbar from '@/components/CustomNavbar.vue'
Vue.component('CustomNavbar', CustomNavbar)
import CustomBackTop from '@/components/CustomBackTop.vue'
Vue.component('CustomBackTop', CustomBackTop)
// #ifdef H5
// import Vconsole from 'vconsole'
// const vConsole = new Vconsole();
import wxoaShare from '@/common/utils/share.js'
// #endif
Vue.mixin({
data() {
return {
shareData: {
spm: this.$store.state.user.userInfo?.id ? `${this.$store.state.user?.userInfo?.id}.1.0.3.1` : "",
title: this.$store.state.app.config?.share?.title ? this.$store.state.app.config?.share?.title : "",
imageUrl: this.$store.state.app.config?.share?.image ? this.$store.state.app.config?.share?.image : "",
desc: this.$store.state.app.config?.share?.description ? this.$store.state.app.config?.share?.description : ""
}
}
},
onLoad(option) {
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: false,
menus: ["shareAppMessage", "shareTimeline"]
})
// #endif
},
onShow() {
// #ifdef H5
wxoaShare()
// #endif
},
onShareAppMessage(res) {
// #ifdef MP-WEIXIN
this.$request('user.taskFinish', { type: 'share_wx_after' })
return {
title: this.shareData.title,
path: `/pages/home/index?scene=${this.shareData.spm}`,
imageUrl: this.shareData.imageUrl
}
// #endif
},
onShareTimeline(res) {
// #ifdef MP-WEIXIN
this.$request('user.taskFinish', { type: 'share_wxf_after' })
return {
title: this.shareData.title,
query: `scene=${this.shareData.spm}`,
imageUrl: this.shareData.imageUrl
}
// #endif
},
methods: {
// 跳转页面
jumpView(url) {
uni.navigateTo({ url })
},
// 视频详情
openVideoDetail(id, title, image, desc) {
// #ifdef H5
const obj = { title, image, desc }
this.jumpView(`/pages/video/play?id=${id}&d=${JSON.stringify(obj)}`)
// #endif
// #ifndef H5
this.jumpView(`/pages/video/play?id=${id}`)
// #endif
},
}
})
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
store,
...App
})
app.$mount()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hailunchina/uniapp-fastadmin-duanju.git
git@gitee.com:hailunchina/uniapp-fastadmin-duanju.git
hailunchina
uniapp-fastadmin-duanju
2024热门短剧微短剧抖音微信APP短剧系统
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385