2 Star 4 Fork 6

前端老林 / MyEdu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
前端老林 提交于 2021-07-04 23:31 . 添加视频播放界面
<script>
import {
base
} from "./api/index.js"
export default {
onLaunch: function() {
console.log('App Launch');
base.config().then(res => {
console.log(res);
// 系统的基本配置项
this.globalData.user_protocol = res.user_protocol;
this.globalData.user_private_protocol = res.user_private_protocol;
this.globalData.aboutus = res.aboutus;
this.globalData.player_cover = res.player.cover;
console.log(this.globalData)
})
// 小程序 seesion
uni.login({
success: (res) => {
base.wxLogin({
code: res.code
}).then(res => {
uni.setStorageSync("openid", res.openid);
})
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
globalData: {
AppName: "MyEdu",
Version: "1.0",
user_protocol: "",
user_private_protocol: "",
aboutus: "",
player_cover: ""
}
}
</script>
<style>
/*每个页面公共css */
/* @import '../../assets/fonts/iconfont.wxss'; */
@import url("@/static/assets/fonts/iconfont.css");
/* #ifdef MP-WEIXIN */
view,
page,
navigator,
button,
swiper,
swiper-item {
padding: 0;
margin: 0;
box-sizing: border-box;
}
page {
background-color: #f2f2f2;
}
/* #endif */
*{
padding:0;
margin:0;
box-sizing: border-box;
}
</style>
1
https://gitee.com/thomaslwq/my-edu.git
git@gitee.com:thomaslwq/my-edu.git
thomaslwq
my-edu
MyEdu
master

搜索帮助