1 Star 1 Fork 0

JingHong / HCloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
App.vue 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
JingHong 提交于 2021-06-10 20:46 . init
<script>
import {
createSelectNav
} from '@/util/page.js'
import {
mapMutations
} from 'vuex'
import sj_show_modal from '@/util/G_show_modal/index.js'
import downlist from '@/common/js/mixins/downlist.js'
import uplist from '@/common/js/mixins/uplist.js'
import tabbar from '@/common/js/mixins/tabbar.js'
import {
handlerClipboard
} from '@/util/index.js'
// import {
// getContent,
// } from '@/api/share.js'
// import {
// formatBytes,
// randomString
// } from '@/util/file.js'
export default {
mixins: [downlist, uplist, tabbar],
methods: {
...mapMutations('file', ['CHANGE_SELECT_LIST', 'TOGGLE_ACTION']),
},
onLaunch: function() {
// console.log('App Launch')
uni.$showModal = function(op = {}) {
return new Promise((resolve, reject) => {
let ssm = new sj_show_modal({
...op,
$event: function(e) {
if (e.res) {
resolve(e);
} else {
reject(e);
}
}
})
ssm.show();
uni.$hide = function() {
ssm.hide();
}
})
}
uni.onTabBarMidButtonTap(function() {
uni.navigateTo({
url: "/pages/tabbar/midButtomMenu/midButtomMenu",
animationType: "fade-in"
})
return
})
// 初始化选择模式的导航栏
this.nav = createSelectNav()
this.globalData.navObj = this.nav
// 锁定竖屏
plus.screen.lockOrientation("portrait-primary")
const domModule = uni.requireNativePlugin('dom')
// 只能在开发模式下使用 参考网站https://ask.dcloud.net.cn/article/36400
domModule.addRule('fontFace', {
'fontFamily': "iconfont",
'src': `url('file:/${plus.io.convertLocalFileSystemURL("_www/static/icon/iconfont/iconfont.ttf")}')`
});
},
globalData: {
mode: 'normlize'
},
onShow: async function() {
let Global = this.globalData
if (Global.mode === 'previewImage') return Global.mode = 'normlize'
// console.log('App Show')
if (!this.globalData.inClip) {
this.globalData.inClip = true
setTimeout(() => {
if (this.globalData.userinfo) {
handlerClipboard()
}
}, 2000)
}
},
onHide: function() {
let Global = this.globalData
if (Global.mode === 'previewImage') return
// console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
.iconfont {
font-family: iconfont;
font-size: 16px;
font-style: normal;
margin-bottom: 5px;
color: $uni-text-color;
}
</style>
1
https://gitee.com/jinghong0919/hcloud.git
git@gitee.com:jinghong0919/hcloud.git
jinghong0919
hcloud
HCloud
jane

搜索帮助