Commit d7d3e63c authored by ly's avatar ly

更新

parent 9f412baf
No preview for this file type
...@@ -12,29 +12,65 @@ ...@@ -12,29 +12,65 @@
this.loadNetwork(); this.loadNetwork();
this.loadLocation(); this.loadLocation();
this.loadUuid() this.loadUuid()
} }
let versionNumber
plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo){
if(wgtinfo.version){
versionNumber = wgtinfo.version;
}else{
versionNumber = plus.runtime.version;
}
console.log(versionNumber,'versionNumber')
uni.setStorageSync('version',versionNumber)
})
plus.screen.lockOrientation("portrait-primary") plus.screen.lockOrientation("portrait-primary")
console.log('App Launch') console.log('App Launch')
/*** tabbar*/ /*** tabbar*/
this.switchShowTabbar() this.switchShowTabbar()
// 重点是以下: 一定要监听后台恢复 !一定要
// plus.globalEvent.addEventListener('newintent', (e) => {
// // this.checkArguments() // 检测启动参数
// console.log(e,'333')
// if (plus.runtime.isAgreePrivacy()) {
// console.log(e,'444')
// initHeaderInfo()
// }
// })
//app更新版本 //app更新版本
// silentlyAppUpdate() silentlyAppUpdate()
// if (plus.runtime.isAgreePrivacy()) { if (plus.runtime.isAgreePrivacy()) {
// initHeaderInfo() // initHeaderInfo()
// silentlyAppUpdate() console.log(333)
// } silentlyAppUpdate()
}
// this.getAppVersion()
}, },
methods:{ methods:{
getAppVersion(){
const self=this
uni.getSystemInfo({
success: (res) => {
let platform = res.platform;
// 获取本机版本号
let type;
platform === "android" ? (type = "ANDROID") : (type = "IOS");
self.$request(`/pawn/setting/other/appVersion/${type}`,'GET').then(res => {
if (res.success==true) {
let response = res.result.data;
let result = {};
result.versionCode = response.version;
result.versionName = response.versionName;
result.versionInfo = response.content || "暂无";
result.forceUpdate = response.forceUpdate;
result.downloadUrl = response.downloadUrl;
result.is_silently = response.is_silently || false;
result.platform = platform;
result.storeList = response.storeList || '';
result.title = response.title || '';
result.type = response.type || '';
uni.setStorageSync('appVersion-info',result)
// resolve(result);
}
})
}
});
},
//tab的信息 //tab的信息
switchShowTabbar(){ switchShowTabbar(){
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
"permissions" : [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
...@@ -37,9 +39,11 @@ ...@@ -37,9 +39,11 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>", "<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/> ", "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/> ",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
...@@ -64,10 +68,11 @@ ...@@ -64,10 +68,11 @@
"ios" : { "ios" : {
"dSYMs" : false, "dSYMs" : false,
"privacyDescription" : { "privacyDescription" : {
"NSLocationWhenInUseUsageDescription" : "", "NSLocationWhenInUseUsageDescription" : "为保护您账户安全,便于为您提供所在区域专属产品和服务,请您开启定位权限",
"NSLocationAlwaysUsageDescription" : "", "NSLocationAlwaysUsageDescription" : "为保护您账户安全,便于为您提供所在区域专属产品和服务,请您开启定位权限",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "", "NSLocationAlwaysAndWhenInUseUsageDescription" : "为保护您账户安全,便于为您提供所在区域专属产品和服务,请您开启定位权限",
"NSPhotoLibraryUsageDescription" : "为了给您提供意见反馈服务,请允许访问您的相册信息" "NSPhotoLibraryUsageDescription" : "为了给您提供意见反馈服务,请允许访问您的相册信息",
"NSCameraUsageDescription" : "以便于您可以使用正常使用身份证认证、刷脸、申请借款等功能"
}, },
"idfa" : false "idfa" : false
}, },
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
import config from './config.js'; import config from './config.js';
import checkVersion from './js-sdk/checkVersion.js'; import checkVersion from './js-sdk/checkVersion.js';
import {loadDevice,loadNetwork,loadUuid,loadLocation} from '../../utils/deviceInfo.js'
export default { export default {
name: 'geekAppUpdata', name: 'geekAppUpdata',
props: config.props, props: config.props,
...@@ -225,7 +225,42 @@ ...@@ -225,7 +225,42 @@
uni.removeStorageSync('userLastRefuseTime'); uni.removeStorageSync('userLastRefuseTime');
} }
} }
// const checkVersion=uni.getStorageSync('appVersion-info')
// if (!checkVersion.is_silently) {
// // 读取下载好的包的缓存
// const appDownLoadTempFilePath = uni.getStorageSync('appDownLoadTempFilePath');
// // 更新的版本号
// this.version = checkVersion.versionName;
// // 系统环境
// this.platform = checkVersion.platform;
// // 网络下载地址
// this.url = checkVersion.downloadUrl;
// // 跳转的应用市场列表
// this.storeList = checkVersion.store_list || [];
// // 更新内容
// this.content = checkVersion.versionInfo && this.getContentHTML(checkVersion.versionInfo);
// // 更新标题
// this.title = checkVersion.title || '发现新版本';
// // 是否强制更新
// this.isForceUpdata = checkVersion.forceUpdate;
// // 是否wgt资源包
// this.isWGT = checkVersion.type == 'wgt';
// // 如果已经有下载好的包
// if (appDownLoadTempFilePath && this.compare(this.version, uni.getStorageSync(
// 'appDownLoadTempFilePathVersion')) == 0) {
// this.tempFilePath = appDownLoadTempFilePath;
// this.downloadSuccess = true;
// this.installForBeforeFilePath = appDownLoadTempFilePath;
// } else {
// uni.clearStorageSync('appDownLoadTempFilePath');
// uni.clearStorageSync('appDownLoadTempFilePathVersion');
// }
// // 打开更新提示
// this.$refs.popup.open();
// }
// 检查版本 需要更新时才会触发回调 // 检查版本 需要更新时才会触发回调
checkVersion().then((res) => { checkVersion().then((res) => {
// 非静默更新时触发 // 非静默更新时触发
...@@ -381,6 +416,10 @@ ...@@ -381,6 +416,10 @@
console.log('m-agreement成功') console.log('m-agreement成功')
} }
}) })
// loadDevice()
// loadNetwork()
// loadLocation()
// loadUuid()
const headerDevice = uni.getStorageSync('m-header-device') const headerDevice = uni.getStorageSync('m-header-device')
console.log(headerDevice,'headerDevice') console.log(headerDevice,'headerDevice')
if (this.downloading) { if (this.downloading) {
......
...@@ -33,7 +33,17 @@ export const compare = (v1 = '0', v2 = '0') => { ...@@ -33,7 +33,17 @@ export const compare = (v1 = '0', v2 = '0') => {
return result; return result;
} }
export default function silentlyAppUpdate() { export default function silentlyAppUpdate() {
// const checkVersion=uni.getStorageSync('appVersion-info')
// console.log(checkVersion,'checkVersion')
// plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
// if (compare(checkVersion.versionName, wgtinfo.version) === 1) {
// uni.redirectTo({
// url: "/pages/app-update/index",
// })
// }
// });
checkVersion().then(res => { checkVersion().then(res => {
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => { plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
......
.a-page{ .a-page{
width: 100%; width: 100%;
height: calc(100vh-120px); height: calc(100vh-120px);
// min-height: 3811rpx; min-height: 100vh;
background: #F7FAFF; background: #F7FAFF;
padding-bottom:280rpx; padding-bottom:180rpx;
.a-main{ .a-main{
padding-top:29rpx; padding-top:29rpx;
.box-at-home{ .box-at-home{
......
...@@ -58,6 +58,7 @@ export default { ...@@ -58,6 +58,7 @@ export default {
// #endif // #endif
}, },
onTabItemTap(e) { onTabItemTap(e) {
console.log('点击tabbar', JSON.stringify(e))
// if (!this.$options.filters.isLogin('auth')) { // if (!this.$options.filters.isLogin('auth')) {
// this.$options.filters.navigateToLogin() // this.$options.filters.navigateToLogin()
// } else { // } else {
...@@ -83,6 +84,7 @@ export default { ...@@ -83,6 +84,7 @@ export default {
}, },
onShow() { onShow() {
console.log('WEB show方法') console.log('WEB show方法')
this.switchShowTabbar()
if (uni.getStorageSync('canRefreshWeb')) { if (uni.getStorageSync('canRefreshWeb')) {
uni.removeStorageSync('canRefreshWeb') uni.removeStorageSync('canRefreshWeb')
if (this.wv) { if (this.wv) {
...@@ -103,7 +105,39 @@ export default { ...@@ -103,7 +105,39 @@ export default {
uni.$off('loadingSubnvue'); //移除监听配置的原生子窗体 uni.$off('loadingSubnvue'); //移除监听配置的原生子窗体
}, },
methods: { methods: {
switchShowTabbar(){
const token=uni.getStorageSync('token')
if (!token) {
console.log(token,'tokentab')
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
const self=this
self.$request('/pawn/setting/other/switch/loan','GET').then(res => {
const {data}=res.result
if (res.code == 200 && data == true) {
try {
console.log(data,'显示')
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
console.log(data,'隐藏')
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
},
subnvue_open() { subnvue_open() {
this.subNVue = uni.getSubNVueById('loadingSubnvue'); //通过id获取nvue子窗体 this.subNVue = uni.getSubNVueById('loadingSubnvue'); //通过id获取nvue子窗体
this.subNVue.show(); this.subNVue.show();
......
...@@ -65,28 +65,41 @@ ...@@ -65,28 +65,41 @@
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
this.tokenShow=token this.tokenShow=token
const common = uni.getStorageSync("m-header-device") const common = uni.getStorageSync("m-header-device")
// if(!common && plus.os.name!='iOS' && token){
// loadDevice()
// loadNetwork()
// loadUuid()
// loadLocation()
// this.init()
// }else{
this.init()
// }
}, },
methods: { methods: {
init(){ switchShowTabbar(){
const self=this const token=uni.getStorageSync('token')
if (!token) {
self.$request('/app/v1/billsApp','GET').then(res => { console.log(token,'tokentab')
console.log(res,'billsApp'); uni.setTabBarItem({
const { billList }=res.result index: 1,
self.billList=billList visible: false
}).catch(err=>{ })
console.log(err,'请求出错') } else {
}) const self=this
self.$request('/pawn/setting/other/switch/loan','GET').then(res => {
const {data}=res.result
if (res.code == 200 && data == true) {
try {
console.log(data,'显示')
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
console.log(data,'隐藏')
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
}, },
gopay(item){ gopay(item){
const {loanNo,appNo,orderNo }=item const {loanNo,appNo,orderNo }=item
...@@ -121,9 +134,8 @@ ...@@ -121,9 +134,8 @@
onShow() { onShow() {
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
this.tokenShow=token this.tokenShow=token
this.init() this.switchShowTabbar()
} }
} }
</script> </script>
......
...@@ -59,24 +59,23 @@ export default { ...@@ -59,24 +59,23 @@ export default {
// #endif // #endif
}, },
onTabItemTap(e) { onTabItemTap(e) {
// if (!this.$options.filters.isLogin('auth')) {
// this.$options.filters.navigateToLogin()
// } else {
this.wv && this.wv.evalJS(`callback({ 'action': 'OnShow' })`)
// }
},
async onLoad(option) {
// this.subnvue_open();
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
const common = uni.getStorageSync("m-header-device") const common = uni.getStorageSync("m-header-device")
//这里是获取位置信息 //这里是获取位置信息
if(!common && plus.os.name!='iOS' && token){ if(!common && token){
loadDevice() loadDevice()
loadNetwork() loadNetwork()
loadUuid() loadUuid()
loadLocation() loadLocation()
} }
// if (!this.$options.filters.isLogin('auth')) {
// this.$options.filters.navigateToLogin()
// } else {
this.wv && this.wv.evalJS(`callback({ 'action': 'OnShow' })`)
// }
},
async onLoad(option) {
// this.subnvue_open();
const that = this const that = this
if (option.src) { if (option.src) {
that.src = option.src that.src = option.src
...@@ -93,6 +92,16 @@ export default { ...@@ -93,6 +92,16 @@ export default {
// uni.removeStorageSync('hasRefresh') // uni.removeStorageSync('hasRefresh')
}, },
onShow() { onShow() {
const token=uni.getStorageSync('token')
const common = uni.getStorageSync("m-header-device")
//这里是获取位置信息
if(!common && token){
console.log(kkkkk)
loadDevice()
loadNetwork()
loadUuid()
loadLocation()
}
console.log('WEB show方法') console.log('WEB show方法')
if (uni.getStorageSync('canRefreshWeb')) { if (uni.getStorageSync('canRefreshWeb')) {
uni.removeStorageSync('canRefreshWeb') uni.removeStorageSync('canRefreshWeb')
......
...@@ -72,8 +72,7 @@ ...@@ -72,8 +72,7 @@
</template> </template>
<script> <script>
import {switchShowTabbar} from '../../utils/deviceInfo.js' import {loadDevice,loadNetwork,loadUuid,loadLocation} from '../../utils/deviceInfo.js'
import silentlyAppUpdate from '@/pages/app-update/js-sdk/silentlyAppUpdate'
export default { export default {
data() { data() {
return { return {
...@@ -117,8 +116,6 @@ ...@@ -117,8 +116,6 @@
if (!isAgree) { if (!isAgree) {
console.log(isAgree,'isAgree') console.log(isAgree,'isAgree')
this.Go('uni:/pages/agreement/index') this.Go('uni:/pages/agreement/index')
}else{
// silentlyAppUpdate()
} }
} }
}, },
...@@ -129,6 +126,39 @@ ...@@ -129,6 +126,39 @@
this.searchGood() this.searchGood()
}, },
methods:{ methods:{
switchShowTabbar(){
const token=uni.getStorageSync('token')
if (!token) {
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
const self=this
self.$request('/pawn/setting/other/switch/loan','GET').then(res => {
const {data}=res.result
if (res.code == 200 && data == true) {
try {
console.log(data,'显示')
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
console.log(data,'隐藏')
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
},
init(){ init(){
const self=this const self=this
self.$request('/pawn/index','GET').then(res => { self.$request('/pawn/index','GET').then(res => {
...@@ -262,10 +292,37 @@ ...@@ -262,10 +292,37 @@
}, },
onShow() { onShow() {
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
const common = uni.getStorageSync("m-header-device")
if(!common && plus.os.name!='iOS'){
let versionNumber
plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo){
if(wgtinfo.version){
versionNumber = wgtinfo.version;
}else{
versionNumber = plus.runtime.version;
}
console.log(versionNumber,'versionNumber')
// 存储所有请求的头部信息
uni.setStorage({
key: 'm-header-version',
data: versionNumber,
success: function () {
console.log('m-header-version存储成功4');
}
});
})
}else{
console.log('777655')
loadDevice();
loadNetwork();
loadLocation();
loadUuid()
}
this.token=token this.token=token
this.init() this.init()
this.searchGood() this.searchGood()
// switchShowTabbar() this.switchShowTabbar()
} }
} }
</script> </script>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
} }
.my-line{ .my-line{
margin:66rpx 30rpx 19rpx; margin:66rpx 30rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
height: 144rpx; height: 144rpx;
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
} }
} }
.my-box-s{ .my-box-s{
margin: 0 30rpx 30rpx; margin: 19rpx 30rpx 30rpx;
width: 690rpx; width: 690rpx;
height: 169rpx; height: 169rpx;
background: #FFFFFF; background: #FFFFFF;
......
...@@ -77,9 +77,43 @@ ...@@ -77,9 +77,43 @@
} }
this.initMy() this.initMy()
this.initTels() this.initTels()
this.switchShowTabbar()
}, },
methods: { methods: {
switchShowTabbar(){
const token=uni.getStorageSync('token')
if (!token) {
console.log(token,'tokentab')
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
const self=this
self.$request('/pawn/setting/other/switch/loan','GET').then(res => {
const {data}=res.result
if (res.code == 200 && data == true) {
try {
console.log(data,'显示')
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
console.log(data,'隐藏')
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
},
initTels(){ initTels(){
const self=this const self=this
self.$request('/app/v1/settings','GET').then(res => { self.$request('/app/v1/settings','GET').then(res => {
...@@ -156,6 +190,7 @@ ...@@ -156,6 +190,7 @@
}else{ }else{
this.initMy() this.initMy()
this.initTels() this.initTels()
this.switchShowTabbar()
} }
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<!doctype html><html data-scale="true" lang="en"><head><meta charset="utf-8"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="盈盈有钱"><meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"><meta content="email=no" name="format-detection"/><meta name="full-screen" content="yes"><meta name="x5-fullscreen" content="true"><meta name="x5-page-mode" content="app"><meta name="format-detection" content="telephone=yes"/><script src="https://sj.jqtianxia.com/public/AppBridge.js"></script><script src="https://bank.jqtianxia.com/public/libs/flexible.js"></script><meta name="theme-color" content="#000000"><link rel="manifest" href="http://backtest.jqtianxia.com/1.5.2/manifest.json"><link rel="stylesheet" href="https://sj.jqtianxia.com/public/swiper.min.css"><script src="https://jic.talkingdata.com/app/h5/v1?appid=1EF9D61C606E4AF5B80D65ABBEDF4B5F"></script><script>window.Promise||document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"><\/script>'),window.win=null</script><link href="http://backtest.jqtianxia.com/1.5.2/static/css/25.3e0df96d.chunk.css" rel="stylesheet"><link href="http://backtest.jqtianxia.com/1.5.2/static/css/main.428bac2a.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(u){function e(e){for(var t,r,n=e[0],a=e[1],o=e[2],c=0,f=[];c<n.length;c++)r=n[c],l[r]&&f.push(l[r][0]),l[r]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(u[t]=a[t]);for(b&&b(e);f.length;)f.shift()();return d.push.apply(d,o||[]),i()}function i(){for(var e,t=0;t<d.length;t++){for(var r=d[t],n=!0,a=1;a<r.length;a++){var o=r[a];0!==l[o]&&(n=!1)}n&&(d.splice(t--,1),e=s(s.s=r[0]))}return e}var r={},f={28:0},l={28:0},d=[];function s(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return u[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(d){var e=[];f[d]?e.push(f[d]):0!==f[d]&&{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,27:1}[d]&&e.push(f[d]=new Promise(function(e,n){for(var t="static/css/"+({}[d]||d)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"0a2222b5",4:"237f0abd",5:"51b9f549",6:"e75eb872",7:"c0e557b7",8:"52423a9c",9:"0a43a441",10:"cd5bdacf",11:"1f0cb8ed",12:"68abaa09",13:"90b02d2b",14:"0b128aba",15:"7c32e690",16:"71885239",17:"4e8b3121",18:"868fcb85",19:"c1c49245",20:"e2942e1f",21:"e1df0114",22:"6d59483e",23:"efc116b9",24:"4e6edbf3",26:"31d6cfe0",27:"26900eb2"}[d]+".chunk.css",a=s.p+t,r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var c=(u=r[o]).getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(c===t||c===a))return e()}var f=document.getElementsByTagName("style");for(o=0;o<f.length;o++){var u;if((c=(u=f[o]).getAttribute("data-href"))===t||c===a)return e()}var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.onload=e,i.onerror=function(e){var t=e&&e.target&&e.target.src||a,r=new Error("Loading CSS chunk "+d+" failed.\n("+t+")");r.request=t,n(r)},i.href=a,document.getElementsByTagName("head")[0].appendChild(i)}).then(function(){f[d]=0}));var r=l[d];if(0!==r)if(r)e.push(r[2]);else{var t=new Promise(function(e,t){r=l[d]=[e,t]});e.push(r[2]=t);var n,a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.src=s.p+"static/js/"+({}[d]||d)+"."+{0:"f5176b69",1:"c3c22efa",2:"c391a915",4:"42dd17df",5:"9b9b4d1e",6:"5d0ec2ff",7:"6faf0d00",8:"5a4b2252",9:"163c12bc",10:"322bf751",11:"5c493e0a",12:"dfe07b56",13:"b0f2b8a1",14:"b44c743e",15:"068e71dd",16:"a7d80c20",17:"f3d04a46",18:"488a75b1",19:"c4286287",20:"54437612",21:"63b9075f",22:"3994a400",23:"84971afc",24:"3d03a0e3",26:"22535f5f",27:"c7c75581"}[d]+".chunk.js",n=function(e){o.onerror=o.onload=null,clearTimeout(c);var t=l[d];if(0!==t){if(t){var r=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src,a=new Error("Loading chunk "+d+" failed.\n("+r+": "+n+")");a.type=r,a.request=n,t[1](a)}l[d]=void 0}};var c=setTimeout(function(){n({type:"timeout",target:o})},12e4);o.onerror=o.onload=n,a.appendChild(o)}return Promise.all(e)},s.m=u,s.c=r,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(r,n,function(e){return t[e]}.bind(null,n));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="http://backtest.jqtianxia.com/1.5.2/",s.oe=function(e){throw console.error(e),e};var t=window.webpackJsonp=window.webpackJsonp||[],n=t.push.bind(t);t.push=e,t=t.slice();for(var a=0;a<t.length;a++)e(t[a]);var b=n;i()}([])</script><script src="http://backtest.jqtianxia.com/1.5.2/static/js/25.7d054e2f.chunk.js"></script><script src="http://backtest.jqtianxia.com/1.5.2/static/js/main.ea265ee2.chunk.js"></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<!doctype html><html data-scale="true" lang="en"><head><meta charset="utf-8"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="盈盈有钱"><meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"><meta content="email=no" name="format-detection"/><meta name="full-screen" content="yes"><meta name="x5-fullscreen" content="true"><meta name="x5-page-mode" content="app"><meta name="format-detection" content="telephone=yes"/><script src="https://sj.jqtianxia.com/public/AppBridge.js"></script><script src="https://bank.jqtianxia.com/public/libs/flexible.js"></script><meta name="theme-color" content="#000000"><link rel="manifest" href="http://backtest.jqtianxia.com/1.5.2/manifest.json"><link rel="stylesheet" href="https://sj.jqtianxia.com/public/swiper.min.css"><script src="https://jic.talkingdata.com/app/h5/v1?appid=1EF9D61C606E4AF5B80D65ABBEDF4B5F"></script><script>window.Promise||document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"><\/script>'),window.win=null</script><link href="http://backtest.jqtianxia.com/1.5.2/static/css/25.3e0df96d.chunk.css" rel="stylesheet"><link href="http://backtest.jqtianxia.com/1.5.2/static/css/main.428bac2a.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(u){function e(e){for(var t,r,n=e[0],a=e[1],o=e[2],c=0,f=[];c<n.length;c++)r=n[c],l[r]&&f.push(l[r][0]),l[r]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(u[t]=a[t]);for(b&&b(e);f.length;)f.shift()();return d.push.apply(d,o||[]),i()}function i(){for(var e,t=0;t<d.length;t++){for(var r=d[t],n=!0,a=1;a<r.length;a++){var o=r[a];0!==l[o]&&(n=!1)}n&&(d.splice(t--,1),e=s(s.s=r[0]))}return e}var r={},f={28:0},l={28:0},d=[];function s(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return u[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(d){var e=[];f[d]?e.push(f[d]):0!==f[d]&&{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,27:1}[d]&&e.push(f[d]=new Promise(function(e,n){for(var t="static/css/"+({}[d]||d)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"0a2222b5",4:"237f0abd",5:"51b9f549",6:"e75eb872",7:"c0e557b7",8:"52423a9c",9:"0a43a441",10:"cd5bdacf",11:"1f0cb8ed",12:"68abaa09",13:"90b02d2b",14:"0b128aba",15:"7c32e690",16:"71885239",17:"4e8b3121",18:"868fcb85",19:"c1c49245",20:"e2942e1f",21:"e1df0114",22:"6d59483e",23:"efc116b9",24:"4e6edbf3",26:"31d6cfe0",27:"26900eb2"}[d]+".chunk.css",a=s.p+t,r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var c=(u=r[o]).getAttribute("data-href")||u.getAttribute("href");if("stylesheet"===u.rel&&(c===t||c===a))return e()}var f=document.getElementsByTagName("style");for(o=0;o<f.length;o++){var u;if((c=(u=f[o]).getAttribute("data-href"))===t||c===a)return e()}var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.onload=e,i.onerror=function(e){var t=e&&e.target&&e.target.src||a,r=new Error("Loading CSS chunk "+d+" failed.\n("+t+")");r.request=t,n(r)},i.href=a,document.getElementsByTagName("head")[0].appendChild(i)}).then(function(){f[d]=0}));var r=l[d];if(0!==r)if(r)e.push(r[2]);else{var t=new Promise(function(e,t){r=l[d]=[e,t]});e.push(r[2]=t);var n,a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.src=s.p+"static/js/"+({}[d]||d)+"."+{0:"f5176b69",1:"c3c22efa",2:"c391a915",4:"42dd17df",5:"9b9b4d1e",6:"5d0ec2ff",7:"6faf0d00",8:"5a4b2252",9:"163c12bc",10:"322bf751",11:"5c493e0a",12:"dfe07b56",13:"b0f2b8a1",14:"b44c743e",15:"068e71dd",16:"a7d80c20",17:"f3d04a46",18:"488a75b1",19:"c4286287",20:"54437612",21:"63b9075f",22:"3994a400",23:"84971afc",24:"3d03a0e3",26:"22535f5f",27:"c7c75581"}[d]+".chunk.js",n=function(e){o.onerror=o.onload=null,clearTimeout(c);var t=l[d];if(0!==t){if(t){var r=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src,a=new Error("Loading chunk "+d+" failed.\n("+r+": "+n+")");a.type=r,a.request=n,t[1](a)}l[d]=void 0}};var c=setTimeout(function(){n({type:"timeout",target:o})},12e4);o.onerror=o.onload=n,a.appendChild(o)}return Promise.all(e)},s.m=u,s.c=r,s.d=function(e,t,r){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(r,n,function(e){return t[e]}.bind(null,n));return r},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="http://backtest.jqtianxia.com/1.5.2/",s.oe=function(e){throw console.error(e),e};var t=window.webpackJsonp=window.webpackJsonp||[],n=t.push.bind(t);t.push=e,t=t.slice();for(var a=0;a<t.length;a++)e(t[a]);var b=n;i()}([])</script><script src="http://backtest.jqtianxia.com/1.5.2/static/js/25.7d054e2f.chunk.js"></script><script src="http://backtest.jqtianxia.com/1.5.2/static/js/main.ea265ee2.chunk.js"></script></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,28 @@ export const convertPromise = function (FnName, params = {}) { ...@@ -16,7 +16,28 @@ export const convertPromise = function (FnName, params = {}) {
}) })
}); });
} }
export const initHeaderInfo = function (){
const versionNew=uni.getStorageSync('m-header-version')
let deviceName
if(plus.os.name=='Android'){
deviceName='android'
}else{
deviceName='ios'
}
console.log(plus.os.name,'plus.os.name')
// 根据当前时间戳生成一个随机整数
var randomNum = new Date().getTime();
const commons={
"appName":"DDH",
"appSourceId":"1",
"token":randomNum,
"device":deviceName,
"appVersion":versionNew,
}
console.log(commons,'commons')
return commons
}
// 初始化请求头的device参数信息 // 初始化请求头的device参数信息
export const initHeaderDevice = function () { export const initHeaderDevice = function () {
const common = { const common = {
...@@ -39,7 +60,6 @@ export const initHeaderDevice = function () { ...@@ -39,7 +60,6 @@ export const initHeaderDevice = function () {
const networkInfo = uni.getStorageSync('m-network-info') const networkInfo = uni.getStorageSync('m-network-info')
const locationInfo = uni.getStorageSync('m-location-info') const locationInfo = uni.getStorageSync('m-location-info')
const loadUuid = uni.getStorageSync('m-load-udid') const loadUuid = uni.getStorageSync('m-load-udid')
let device = {}; let device = {};
if (deviceInfo) { if (deviceInfo) {
device = Object.assign(device, common, JSON.parse(deviceInfo)) device = Object.assign(device, common, JSON.parse(deviceInfo))
...@@ -49,9 +69,9 @@ export const initHeaderDevice = function () { ...@@ -49,9 +69,9 @@ export const initHeaderDevice = function () {
device = Object.assign(device, common, JSON.parse(networkInfo)) device = Object.assign(device, common, JSON.parse(networkInfo))
} }
// if (locationInfo) { if (locationInfo) {
// device = Object.assign(device, common, JSON.parse(locationInfo)) // device = Object.assign(device, common, JSON.parse(locationInfo))
// } }
if(loadUuid){ if(loadUuid){
device = Object.assign(device, common, JSON.parse(loadUuid)) device = Object.assign(device, common, JSON.parse(loadUuid))
} }
...@@ -59,7 +79,7 @@ export const initHeaderDevice = function () { ...@@ -59,7 +79,7 @@ export const initHeaderDevice = function () {
const headerDeviceInfo = { const headerDeviceInfo = {
...JSON.parse(deviceInfo), ...JSON.parse(deviceInfo),
...JSON.parse(networkInfo), ...JSON.parse(networkInfo),
// ...JSON.parse(locationInfo), ...JSON.parse(locationInfo),
...JSON.parse(loadUuid), ...JSON.parse(loadUuid),
...common ...common
} }
......
...@@ -6,16 +6,21 @@ const request=async(url,type,data)=>{ ...@@ -6,16 +6,21 @@ const request=async(url,type,data)=>{
const headerDevice = uni.getStorageSync('m-header-device') const headerDevice = uni.getStorageSync('m-header-device')
const deviceInfo = uni.getStorageSync('m-device-info') const deviceInfo = uni.getStorageSync('m-device-info')
let rd=null let rd=null
console.log(deviceInfo,'8888') const tokenF=uni.getStorageSync('tokenFinance')
if (headerDevice) { if(!deviceInfo || tokenF=='' && plus.os.name!='iOS'){
rd = headerDevice rd=initHeaderInfo()
console.log(rd,'rd1') }else{
} else { if (headerDevice) {
const common = initHeaderDevice() rd = headerDevice
console.log(rd,'rd1')
rd = JSON.stringify(common) } else {
console.log(rd,'rd2') const common = initHeaderDevice()
rd = JSON.stringify(common)
console.log(rd,'rd2')
}
} }
console.log(rd,'rd3') console.log(rd,'rd3')
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment