代码拉取完成,页面将自动刷新
<script>
import utils from './utils/utils.js'
// #ifdef APP-PLUS
import idfa from './utils/idfa.js'
import APPUpdate from "@/utils/appUpdate.js";
import getClipboard from '@/utils/getClipboard.js'
/**
声明:
此代码为西瓜猪淘客APP导购版本
@本程序受法律保护,著作权©软著登记号2021SRA006390 < 未经版权所有权人书面许可,不能用于商业用途!>
获取许可
WeChat:shenlailai6 QQ:212156620 Email: admin.java3.cn
本程序仅用作被授权人二次开发,以及被授权人上架运营使用,未经版权所有权人书面许可,不能自行用于商业用途
*/
// #endif
export default {
onLaunch: function() {
// #ifdef APP-PLUS
APPUpdate();
// #endif
console.log('App Launch')
console.log('bug多?换一加。I’m the iron man!!!!!!!!')
this.getAppInfo()
uni.getSystemInfo({
success: e => {
console.log(this.globalData);
// #ifdef APP-PLUS
if (e.platform == 'android') {
this.globalData.platform = 'android'
this.globalData.systemLevel = e.system
if (e.system < 10) {
plus.device.getInfo({
success: e => {
console.log(e);
//这里获取到imei 剩下的逻辑也写在这里面
var a = e.imei.indexOf(",")
if (a < 0) {
this.globalData.equipmentNumber = e.imei
} else {
this.globalData.equipmentNumber = e.imei.substring(0, a);
}
//里面写接下来的逻辑
console.log('imei=' + imei); //这里是能获取imei的
}
})
} else {
plus.device.getOAID({
success: e => {
console.log('getOAID success: ' + e.oaid);
this.globalData.equipmentNumber = e.oaid;
}
});
}
} else {
this.globalData.platform = 'ios';
this.globalData.systemLevel = e.system;
this.globalData.equipmentNumber = idfa.value()
};
// #endif
}
})
// #ifdef APP-PLUS
if (plus.os.name == 'iOS') {
if (plus.runtime.isApplicationExist({
action: 'weixin://'
}) && plus.runtime.isApplicationExist({
action: 'taobao://'
})) {
this.globalData.ifwt = 0
} else {
this.globalData.ifwt = 1
}
}
// #endif
},
globalData: {
platform: '',
systemLevel: '',
equipmentNumber: '',
userInfo: {},
canlisten:false,
appinfo:{}
},
onShow: function() {
console.log('App Show')
// #ifdef APP-PLUS
if(this.globalData.canlisten){
getClipboard()
}
// #endif
},
onHide: function() {
console.log('App Hide')
},
methods: {
getAppInfo: function() {
this.$http.post('cpssystemConfig/getAPPInfo').then(res => {
console.log(res);
this.globalData.appinfo = res
utils.setCache('appInfo', res)
})
},
},
}
</script>
<style>
/*每个页面公共css */
/* #ifndef APP-NVUE */
@import url('./static/css/main.css');
@import url('./colorui/main.css');
@import url('./colorui/icon.css');
@import url('./uview-ui/iconfont.css');
page {
color: #333333;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500;
background-color: #F0F1F7;
}
/* #endif */
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。