|
请大佬帮忙看看,ios的启动页特别慢,差不多有10s才进去app
[复制链接]
用的vue+apicloud_cli做的项目config.xml配置了<preference name="autoLaunch" value="false"/>
然后在app.vue的mounted里面加了api.removeLaunchView(); 安卓就正常ios就特别慢
- mounted() {
- // console.log(this.keepAlive); // 设置缓存匹配
- var that = this;
- if (window.navigator.userAgent.match(/APICloud/i)) {
- //关闭启动图
- api.removeLaunchView();
- that.$store.state.systemType = api.systemType;
- // api.setStatusBarStyle({
- // style: "light",
- // color: "rgba(255,255,255,0)"
- // });
- // that.allEvent();
- // this.$RONGYUN.initRongyun(); //初始化融云
- // 更新
- api.addEventListener(
- {
- name: "smartupdatefinish"
- },
- function(ret, err) {
- that.$dialog
- .confirm({
- title: "更新",
- message: "APP更新完成,是否现在重启?"
- })
- .then(() => {
- api.rebootApp();
- });
- }
- );
- // var push = api.require("push");
- // push.setListener(function(ret, err) {
- // if (ret) {
- // //仅提示音
- // api.notification({
- // sound: "default",
- // notify: {
- // title: "通知",
- // content: ret.data
- // }
- // });
- // }
- // });
- }
- },
复制代码
|
|