Commit 456ddf99 authored by caimeng's avatar caimeng

修复借款记录和账单第二次跳转到三方页面时token失效的问题

parent 7b69a037
......@@ -21,13 +21,13 @@ export default {
// const isAgreePrivacy = plus.runtime.isAgreePrivacy();
// 同意了协议
// if (isAgreePrivacy) {
const common = uni.getStorageSync("m-headers")
if (!common && plus.os.name == 'iOS') {
loadDevice();
loadNetwork();
loadLocation();
loadUuid()
}
const common = uni.getStorageSync("m-headers")
if (!common && plus.os.name == 'iOS') {
loadDevice();
loadNetwork();
loadLocation();
loadUuid()
}
// }
// 当前版本号
......@@ -48,9 +48,17 @@ export default {
switchShowTabbar()
},
onShow() {
onBackPress(e) {
console.log(e,'全局返回监听');
},
onShow() { },
/** 切换到后台 */
onHide() {
uni.setStorageSync('canRefreshWeb', 'YES')
console.log('APP 组件 的onHide方法')
},
ontabitemtap(e) {
console.log(e, 'tab点击监听')
}
}
</script>
......
......@@ -8,4 +8,8 @@
证书别名:
测试:ddhtest.keystore
线上:ddhprod.keystore
私钥:123456
\ No newline at end of file
私钥:123456
package id:io.dcloud.ddh
查看证书信息的命令:`keytool -v -list -keystore (keystore/jks的文件绝对路径)`
\ No newline at end of file
......@@ -237,10 +237,8 @@ export default {
init() {
const self = this
self.$request('/pawn/index', 'GET').then(res => {
const { shortcutList, bannerList } = res.result
const showIndex = uni.getStorageSync('showIndex')
console.log(showIndex,'99933showIndex')
const { shortcutList, bannerList } = res.result
const showIndex = uni.getStorageSync('showIndex')
const token = uni.getStorageSync('token')
if (shortcutList && typeof(shortcutList)=='string') {
let newArr=[]
......
......@@ -119,7 +119,7 @@ export default {
title: err.message,
icon: "none",
duration: 2000
})
})
},
......@@ -181,6 +181,7 @@ export default {
const { deviceId } = userInfo
uni.setStorageSync('deviceId', deviceId)
}
uni.setStorageSync('token', token)
uni.setStorageSync('l-mobile', self.mobile)
self.loginNocheck()
......@@ -204,6 +205,12 @@ export default {
}
self.$request('/app/v1/loginNoCheck', 'POST', params).then(res => {
const { deviceId, token } = res.result
const cacheData = Object.assign({}, res.result, { mobile: self.mobile })
console.log(cacheData, '返回的结果')
uni.setStorageSync('user_info_obj', JSON.stringify(cacheData));
uni.setStorageSync('mobileCall', self.mobile)
uni.setStorageSync('deviceId', deviceId)
uni.setStorageSync('tokenFinance', token)
......
......@@ -73,7 +73,7 @@ export default {
async onLoad(option) {
const mianH5Url = uni.getStorageSync('mianH5Url')
console.log('web onload',option)
console.log('')
const that = this
if (option.src) {
......
......@@ -6,22 +6,12 @@
<script>
import { loadLocation } from './tools'
import {
CheckContactPermission,
SelectContact
} from './authPermission'
import storage from '@/utils/storage'
import {
UploadFile
} from './utils/uploads'
import { CheckContactPermission, SelectContact } from './authPermission'
import { UploadFile } from './utils/uploads'
import Permission from '@/js_sdk/wa-permission/permission' //权限工具类
const LF = uni.requireNativePlugin('AThree-LFv2')
import api from '@/config/api'
let reloadTimeOut = null
let token = uni.getStorageSync('token')
console.log(token,'是否登录')
let reloadTimeOut = null
export default {
name: "WEB",
data() {
......@@ -36,7 +26,7 @@ export default {
}
},
deviceStatus: '',
typePage:false,
typePage: false,
};
},
onBackPress(e) {
......@@ -73,13 +63,9 @@ export default {
},
async onLoad(option) {
console.log(option,'866')
const that = this
if(option.url){
that.src=option.url
// that.src=decodeURIComponent(option.url)
}
console.log(option,'参数555')
if (option.url) that.src = option.url
console.log(option, '参数')
uni.getStorage({
key: 'm-device-info',
success: function (res) {
......@@ -88,25 +74,17 @@ export default {
}
})
},
onHide() {
// uni.removeStorageSync('hasRefresh')
},
onShow() {
console.log('WEB show方法')
if (uni.getStorageSync('canRefreshWeb')) {
uni.removeStorageSync('canRefreshWeb')
if (this.wv) {
const needReload = uni.getStorageSync('reloadFlag')
if (!needReload) {
console.log('刷新页面')
if (reloadTimeOut) clearTimeout(reloadTimeOut)
reloadTimeOut = setTimeout(() => {
this.wv.reload()
}, 1000)
} else {
console.log('不刷新页面')
}
}
console.log('onShow方法')
const canRefresh = uni.getStorageSync('canRefresh');
console.log(canRefresh, '可以刷新吗?')
if (canRefresh) {
uni.removeStorageSync('canRefresh')
if (reloadTimeOut) clearTimeout(reloadTimeOut)
reloadTimeOut = setTimeout(() => {
console.log('到这里了')
this.wv && this.wv.reload()
}, 400)
}
},
onUnload() {
......@@ -142,25 +120,26 @@ export default {
}
},
//返回方法
GoBack(num){
console.log('wori')
try{
const self=this
GoBack(num) {
console.log('wori')
try {
const self = this
uni.navigateBack({
delta:num,
delta: num,
success(res) {
console.log(res,'9877')
self.typePage=true
console.log(self.typePage,'resss')
console.log(res, '9877')
self.typePage = true
console.log(self.typePage, 'resss')
}
})
}catch(err){
} catch (err) {
this.toast('返回失败')
console.log(err,'err')
console.log(err, 'err')
}
},
UserToken(token) {
uni.setStorage({
key: 'm-token',
......@@ -170,11 +149,13 @@ export default {
}
})
},
// 删除localtabbar
removeRefreshStorage() {
uni.removeStorageSync('hasRefresh')
console.log('删除了hasRefresh')
},
// 隐藏tabbar
hideLoading() {
// console.log('调用了APP的hideLoading方法')
......@@ -209,16 +190,16 @@ export default {
},
// 获取用户手机号
GetUserMobile() {
const self=this
const self = this
try {
uni.getStorage({
key: 'l-mobile',
success: function(res) {
console.log(res, '结果')
const mobile = res.data;
success: function (res) {
console.log(res, '结果')
const mobile = res.data;
self.GetWebView().evalJS("receiveUserMobile('" + mobile + "')")
},
fail: function(err) {
fail: function (err) {
console.log(err, '报错了')
}
})
......@@ -247,6 +228,17 @@ export default {
title
})
},
// 设置缓存
SetLocalStore(config) {
try {
if (!config) return
const { key, val } = config
uni.setStorageSync(key, val)
} catch (err) {
console.log(err, '设置本地存储报错')
}
},
// Toast 提示框
Toast(config) {
try {
......
......@@ -48,20 +48,6 @@
methods: {
},
onShow(){
const currentWebview = this.$scope.$getAppWebview().children()[0];
if(currentWebview){
uni.getStorage({
key:'scanType',
success:function(res){
console.log(res,'二维码,不刷新')
},
fail:function(err){
console.log(err,'刷新')
currentWebview.reload(true);
}
})
}
}
}
</script>
......
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/sort/index","pages/my/index","pages/recruit/index","pages/recruitResult/index","pages/category/category","pages/application/application","pages/myneed/myneed","pages/Ineed/Ineed","pages/productDetails/productDetails","pages/detailResult/detailResult","pages/useFeed/useFeed","pages/lookGoods/lookGoods","pages/login/login","pages/prolist/prolist","pages/setting/setting","pages/contact/contact","pages/web/contact","pages/webview/webview","pages/websrc/websrc","pages/web/web","pages/web/websrc","pages/bill/indexs","pages/finance/index","pages/app-update/index","pages/agreement/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#F8F8F8","bounce":"none"},"tabBar":{"borderStyle":"white","color":"#BBBBBB","selectedColor":"#2263E6","list":[{"pagePath":"pages/index/index","iconPath":"/static/tab/indexfh.png","selectedIconPath":"/static/tab/indexf.png","text":"首页"},{"pagePath":"pages/web/web","iconPath":"/static/tab/index-h.png","selectedIconPath":"/static/tab/index.png","text":"贷款"},{"pagePath":"pages/sort/index","iconPath":"/static/tab/sort-h.png","selectedIconPath":"/static/tab/sort.png","text":"分类"},{"pagePath":"pages/my/index","iconPath":"/static/tab/my-h.png","selectedIconPath":"/static/tab/my.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"多典花","compilerVersion":"4.24","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniConfig = {"pages":["pages/index/index","pages/sort/index","pages/my/index","pages/recruit/index","pages/recruitResult/index","pages/category/category","pages/application/application","pages/myneed/myneed","pages/Ineed/Ineed","pages/productDetails/productDetails","pages/detailResult/detailResult","pages/useFeed/useFeed","pages/lookGoods/lookGoods","pages/login/login","pages/prolist/prolist","pages/setting/setting","pages/contact/contact","pages/web/contact","pages/webview/webview","pages/websrc/websrc","pages/web/web","pages/web/websrc","pages/bill/indexs","pages/finance/index","pages/app-update/index","pages/agreement/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#F8F8F8","bounce":"none"},"tabBar":{"borderStyle":"white","color":"#BBBBBB","selectedColor":"#2263E6","list":[{"pagePath":"pages/index/index","iconPath":"/static/tab/indexfh.png","selectedIconPath":"/static/tab/indexf.png","text":"首页"},{"pagePath":"pages/web/web","iconPath":"/static/tab/index-h.png","selectedIconPath":"/static/tab/index.png","text":"贷款"},{"pagePath":"pages/sort/index","iconPath":"/static/tab/sort-h.png","selectedIconPath":"/static/tab/sort.png","text":"分类"},{"pagePath":"pages/my/index","iconPath":"/static/tab/my-h.png","selectedIconPath":"/static/tab/my.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"多典花","compilerVersion":"4.29","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom","bounce":"none"}},{"path":"/pages/sort/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"款式"}},{"path":"/pages/my/index","meta":{"isQuit":true,"isTabBar":true},"window":{"enablePullDownRefresh":true,"navigationStyle":"custom"}},{"path":"/pages/recruit/index","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"鉴定师招聘"}},{"path":"/pages/recruitResult/index","meta":{},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/category/category","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"选择鉴定品类"}},{"path":"/pages/application/application","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我的鉴定申请"}},{"path":"/pages/myneed/myneed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我需要的"}},{"path":"/pages/Ineed/Ineed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我需要"}},{"path":"/pages/productDetails/productDetails","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"商品详情"}},{"path":"/pages/detailResult/detailResult","meta":{},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/useFeed/useFeed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"用户反馈"}},{"path":"/pages/lookGoods/lookGoods","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/login/login","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"登录"}},{"path":"/pages/prolist/prolist","meta":{},"window":{"navigationBarTitleText":"相关协议"}},{"path":"/pages/setting/setting","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"设置"}},{"path":"/pages/contact/contact","meta":{},"window":{"navigationBarTitleText":"通讯录","enablePullDownRefresh":false}},{"path":"/pages/web/contact","meta":{},"window":{"navigationBarTitleText":"通讯录","enablePullDownRefresh":false}},{"path":"/pages/webview/webview","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/websrc/websrc","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/web/web","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom","enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/web/websrc","meta":{},"window":{"navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/bill/indexs","meta":{},"window":{"navigationBarTitleText":"账单"}},{"path":"/pages/finance/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationStyle":"custom"}},{"path":"/pages/app-update/index","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"","enablePullDownRefresh":false,"bounce":"none","animationType":"fade-in","background":"transparent","backgroundColor":"rgba(0,0,0,0)","webviewBGTransparent":true,"mask":"none"}},{"path":"/pages/agreement/index","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"","enablePullDownRefresh":false,"bounce":"none","animationType":"fade-in","background":"transparent","backgroundColor":"rgba(0,0,0,0)","webviewBGTransparent":true,"mask":"none"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/sort/index","pages/my/index","pages/recruit/index","pages/recruitResult/index","pages/category/category","pages/application/application","pages/myneed/myneed","pages/Ineed/Ineed","pages/productDetails/productDetails","pages/detailResult/detailResult","pages/useFeed/useFeed","pages/lookGoods/lookGoods","pages/login/login","pages/prolist/prolist","pages/setting/setting","pages/contact/contact","pages/web/contact","pages/webview/webview","pages/websrc/websrc","pages/web/web","pages/web/websrc","pages/bill/indexs","pages/finance/index","pages/app-update/index","pages/agreement/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#F8F8F8","bounce":"none"},"tabBar":{"borderStyle":"white","color":"#BBBBBB","selectedColor":"#2263E6","list":[{"pagePath":"pages/index/index","iconPath":"/static/tab/indexfh.png","selectedIconPath":"/static/tab/indexf.png","text":"首页"},{"pagePath":"pages/web/web","iconPath":"/static/tab/index-h.png","selectedIconPath":"/static/tab/index.png","text":"贷款"},{"pagePath":"pages/sort/index","iconPath":"/static/tab/sort-h.png","selectedIconPath":"/static/tab/sort.png","text":"分类"},{"pagePath":"pages/my/index","iconPath":"/static/tab/my-h.png","selectedIconPath":"/static/tab/my.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"多典花","compilerVersion":"4.24","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniConfig = {"pages":["pages/index/index","pages/sort/index","pages/my/index","pages/recruit/index","pages/recruitResult/index","pages/category/category","pages/application/application","pages/myneed/myneed","pages/Ineed/Ineed","pages/productDetails/productDetails","pages/detailResult/detailResult","pages/useFeed/useFeed","pages/lookGoods/lookGoods","pages/login/login","pages/prolist/prolist","pages/setting/setting","pages/contact/contact","pages/web/contact","pages/webview/webview","pages/websrc/websrc","pages/web/web","pages/web/websrc","pages/bill/indexs","pages/finance/index","pages/app-update/index","pages/agreement/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#F8F8F8","bounce":"none"},"tabBar":{"borderStyle":"white","color":"#BBBBBB","selectedColor":"#2263E6","list":[{"pagePath":"pages/index/index","iconPath":"/static/tab/indexfh.png","selectedIconPath":"/static/tab/indexf.png","text":"首页"},{"pagePath":"pages/web/web","iconPath":"/static/tab/index-h.png","selectedIconPath":"/static/tab/index.png","text":"贷款"},{"pagePath":"pages/sort/index","iconPath":"/static/tab/sort-h.png","selectedIconPath":"/static/tab/sort.png","text":"分类"},{"pagePath":"pages/my/index","iconPath":"/static/tab/my-h.png","selectedIconPath":"/static/tab/my.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"多典花","compilerVersion":"4.29","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom","bounce":"none"}},{"path":"/pages/sort/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"款式"}},{"path":"/pages/my/index","meta":{"isQuit":true,"isTabBar":true},"window":{"enablePullDownRefresh":true,"navigationStyle":"custom"}},{"path":"/pages/recruit/index","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"鉴定师招聘"}},{"path":"/pages/recruitResult/index","meta":{},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/category/category","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"选择鉴定品类"}},{"path":"/pages/application/application","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我的鉴定申请"}},{"path":"/pages/myneed/myneed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我需要的"}},{"path":"/pages/Ineed/Ineed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"我需要"}},{"path":"/pages/productDetails/productDetails","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"商品详情"}},{"path":"/pages/detailResult/detailResult","meta":{},"window":{"enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pages/useFeed/useFeed","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"用户反馈"}},{"path":"/pages/lookGoods/lookGoods","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/login/login","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"登录"}},{"path":"/pages/prolist/prolist","meta":{},"window":{"navigationBarTitleText":"相关协议"}},{"path":"/pages/setting/setting","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":"设置"}},{"path":"/pages/contact/contact","meta":{},"window":{"navigationBarTitleText":"通讯录","enablePullDownRefresh":false}},{"path":"/pages/web/contact","meta":{},"window":{"navigationBarTitleText":"通讯录","enablePullDownRefresh":false}},{"path":"/pages/webview/webview","meta":{},"window":{"enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/websrc/websrc","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pages/web/web","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom","enablePullDownRefresh":false,"navigationBarTitleText":""}},{"path":"/pages/web/websrc","meta":{},"window":{"navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/bill/indexs","meta":{},"window":{"navigationBarTitleText":"账单"}},{"path":"/pages/finance/index","meta":{},"window":{"enablePullDownRefresh":true,"navigationStyle":"custom"}},{"path":"/pages/app-update/index","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"","enablePullDownRefresh":false,"bounce":"none","animationType":"fade-in","background":"transparent","backgroundColor":"rgba(0,0,0,0)","webviewBGTransparent":true,"mask":"none"}},{"path":"/pages/agreement/index","meta":{},"window":{"navigationStyle":"custom","navigationBarTitleText":"","enablePullDownRefresh":false,"bounce":"none","animationType":"fade-in","background":"transparent","backgroundColor":"rgba(0,0,0,0)","webviewBGTransparent":true,"mask":"none"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -9765,7 +9765,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
// Exports
module.exports = exports;
......@@ -61,25 +61,18 @@ export const initHeaderDevice = function () {
const locationInfo = uni.getStorageSync('m-location-info')
const loadUuid = uni.getStorageSync('m-load-udid')
console.log(networkInfo,loadUuid,'===================')
let device = {};
if (deviceInfo) {
device = Object.assign(device, common, JSON.parse(deviceInfo))
}
if (networkInfo) {
if (networkInfo) {
device = Object.assign(device, common, JSON.parse(networkInfo))
}
if (locationInfo) {
console.log(locationInfo,'locationInfo')
if (locationInfo) {
device = Object.assign(device, common, JSON.parse(locationInfo))
}
if (loadUuid) {
console.log(loadUuid,'loadUuid')
if (loadUuid) {
device = Object.assign(device, common, JSON.parse(loadUuid))
}
......@@ -100,7 +93,6 @@ export const initHeaderDevice = function () {
return headerDeviceInfo
}
console.log(device,'device33333')
return device
}
......@@ -55,8 +55,7 @@ export const switchShowTabbar = async () => {
})
} else {
try {
const res= await API.initTabBar()
console.log(res, 'success4444')
const res= await API.initTabBar()
const { data }=res.result
uni.setStorageSync('showIndex',data)
if (data==true) {
......
......@@ -7,28 +7,25 @@ const request = async (url, type, data) => {
const deviceInfo = uni.getStorageSync('m-device-info')
const tokenF = uni.getStorageSync('tokenFinance')
let rd = null
try{
if (!deviceInfo || tokenF == '' && plus.os.name != 'iOS') {
rd = initHeaderInfo()
} else {
if (headerDevice) {
rd = encodeURIComponent(headerDevice)
} else {
const common = initHeaderDevice()
console.log(common, '日===')
if (common) {
rd = JSON.stringify(common)
}
}
}
}catch(err){
console.log(err,'congzhelizou')
}
try {
if (!deviceInfo || tokenF == '' && plus.os.name != 'iOS') {
rd = initHeaderInfo()
} else {
if (headerDevice) {
rd = encodeURIComponent(headerDevice)
} else {
const common = initHeaderDevice()
if (common) {
rd = JSON.stringify(common)
}
}
}
} catch (err) {
console.log(err, 'congzhelizou')
}
return new Promise((resolve, reject) => {
const token = uni.getStorageSync('token')
const tokenFinance = uni.getStorageSync('tokenFinance')
......@@ -64,7 +61,7 @@ const request = async (url, type, data) => {
},
fail: (err) => {
const locationInfo = uni.getStorageSync('m-location-info')
if(locationInfo){
if (locationInfo) {
uni.showToast({
title: err.message ? err.message : '服务器开小差了~',
icon: "none",
......
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