用户接口对接

This commit is contained in:
仲么了
2023-03-20 08:51:21 +08:00
parent c5ed54924b
commit c308a7131b
10 changed files with 284 additions and 110 deletions

22
App.vue
View File

@@ -2,21 +2,17 @@
import encrypt from './common/js/aes.js'
export default {
onLaunch: function () {
let cidAES = uni.getStorageSync('cidAES')
let cidAES = uni.getStorageSync('cidAES') || 'nnvmhMk8626D8QHhJefm+W9rTAJWuBPRxcnRm4+9bWXdSLRIyTnTruoYfLxGK3Oy'
uni.setStorageSync('cidAES', cidAES);
if (!cidAES) {
uni.getPushClientId({
success: (res) => {
console.log(res.cid);
uni.setStorageSync('cid', res.cid);
var cidAES = encrypt.Encrypt(res.cid, this.$config.key);
uni.setStorageSync('cidAES', cidAES);
},
fail (err) {
console.log(err)
}
})
document.addEventListener('plusready', () => {
// 页面加载时触发
let pinf = plus.push.getClientInfo();
let cid = pinf.clientid;//客户端标识
cidAES = encrypt.Encrypt(cid, this.$config.key);
uni.setStorageSync('cidAES', cidAES);
}, false);
}
},
onShow: function () {
console.log('App Show')