Commit df26e329 authored by ly's avatar ly

多典花新增联系人,tab , 更新

parent a23a9e66
No preview for this file type
......@@ -2,15 +2,26 @@
import { convertPromise } from './utils/header.js'
import Permission from '@/js_sdk/wa-permission/permission'
import { SelectLocation } from "./utils/authPerission";
import { switchShowTabbar } from './utils/filters'
import silentlyAppUpdate from '@/pages/app-update/js-sdk/silentlyAppUpdate'
export default {
onLaunch: function() {
const common = uni.getStorageSync("m-headers")
if (!common) {
if (!common && plus.os.name=='iOS') {
console.log(plus.os.name,'9')
this.loadDevice();
this.loadNetwork();
this.loadLocation();
this.loadUuid()
}
/*** tabbar*/
switchShowTabbar()
//app更新版本
silentlyAppUpdate()
if (plus.runtime.isAgreePrivacy()) {
// setDevice()
silentlyAppUpdate()
}
plus.screen.lockOrientation("portrait-primary")
console.log('App Launch')
},
......
const name = "花花有米"; //全局商城name
const schemeName = 'huahuayoumi' //唤醒app需要的schemeName
const name = "多典花"; //全局商城name
const schemeName = 'duodianhua' //唤醒app需要的schemeName
export default {
name: name,
schemeLink: `${schemeName}://`, //唤起app地址
......@@ -9,7 +9,7 @@ export default {
aMapKey: "d04c16e59eab35d19812634b2b7cb548", //在高德中申请Web服务key
scanAuthNavigation:['https://mobile.meimeiyouxin.com'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id6450257420", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo:"https://mmyx-res.meimeiyouxin.com/huahuayoumi/logo.png", //logo地址
logo:"https://mmyx-res.meimeiyouxin.com/duodianhua/logo.png", //logo地址
customerServiceMobile:"4001035066", //客服电话
customerServiceEmail:"hhym@huahuayoumi.com", //客服邮箱
customerServiceUrl: "https://chatbot.aliyuncs.com/intl/index.htm?from=Knv39Casa0", // 阿里云客服
......
No preview for this file type
export default {
// props里设置的是默认样式 使用组件时可以被覆盖
props: {
// 主题颜色
themeColor: {
default: '#61d287',
type: String
},
// 背景色
bgColor: {
default: '#fff',
type: String
},
// 版本号字体颜色
versionColor: {
default: '#fff',
type: String
},
// 关闭图标颜色
closeIconColor: {
default: "#fff",
type: String,
},
// 关闭图标大小
closeIconSize: {
default: 26,
type: Number
},
// 更新标题文字颜色
titleColor: {
default: '#5e5e5e',
type: String
},
// 更新内容文字颜色
contentColor: {
default: '#878787',
type: String
},
// 短期内不更新图标大小
notRemindIconSize: {
default: 22,
type: Number
},
// 短期内不更新选中图标颜色
notRemindIconActColor: {
default: '',
type: String
},
// 短期内不更新未选中图标颜色
notRemindIconNotActColor: {
default: '#9d9d9d',
type: String
},
// 短期内不更新选中文字颜色
notRemindTextActColor: {
default: '#6b6b6b',
type: String
},
// 短期内不更新未选中文字颜色
notRemindTextNotActColor: {
default: '#9d9d9d',
type: String
},
// 下载按钮ios文字
downloadBtnTextIOS: {
default: '立即跳转更新',
type: String
},
// 下载按钮Android文字
downloadBtnTextAndroid: {
default: '立即升级',
type: String
},
// 下载中文字提示
downLoadingText: {
default: '安装包下载中,请稍后',
type: String
},
// 下载完成文字提示
downloadSuccessText: {
default: '下载完成,立即安装',
type: String
},
// wgt安装中显示文字
wgtInstallingText: {
default: '正在安装....',
type: String
},
// wgt安装完成重启显示文字
wgtInstalledText: {
default: '安装完毕,点击重启',
type: String
},
// 按钮背景色
btnBgColor: {
default: '',
type: String
},
// 按钮文字颜色
btnColor: {
default: '#fff',
type: String
},
// 进度条颜色
progressColor: {
default: '',
type: String
},
// 进度条文字样式
progressTextColor: {
default: '#4c4c4c',
type: String
},
// 提示用户更新的间隔时间 单位day
intervalAlertUserUpdateDay: {
default: 1,
type: Number
}
}
}
This diff is collapsed.
/**
* 检测升级 使用说明
* 上传包:
* 1. 先从数据库取出所有该平台(从上下文读取平台信息,默认 Andriod)的所有线上发行更新
* 2. 再从所有线上发行更新中取出版本最大的一版。如果可以,尽量先检测wgt的线上发行版更新
* 3. 使用上步取出的版本包的版本号 和传参 appVersion、wgtVersion 来检测是否有更新,必须同时大于这两项,否则返回暂无更新
* 4. 如果库中 wgt包 版本大于传参 appVersion,但是不满足 min_uni_version < appVersion,则不会使用wgt更新,会接着判断库中 app包version 是否大于 appVersion
*/
// import { getAppVersion } from "@/api/message.js";
export default function checkVersion() {
return new Promise((resolve, reject) => {
// #ifdef APP-PLUS
uni.getSystemInfo({
success: (res) => {
let platform = res.platform;
// 获取本机版本号
let type;
platform === "android" ? (type = "ANDROID") : (type = "IOS");
getAppVersion(type).then((res) => {
if (res.data.success) {
let response = res.data.result;
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 || '';
resolve(result);
}
}).catch(err => {
reject(err);
})
}
});
// #endif
})
}
import checkVersion from './checkVersion.js';
// 版本对比
export const compare = (v1 = '0', v2 = '0') => {
v1 = String(v1).split('.')
v2 = String(v2).split('.')
const minVersionLens = Math.min(v1.length, v2.length);
let result = 0;
for (let i = 0; i < minVersionLens; i++) {
const curV1 = Number(v1[i])
const curV2 = Number(v2[i])
if (curV1 > curV2) {
result = 1
break;
} else if (curV1 < curV2) {
result = -1
break;
}
}
if (result === 0 && (v1.length !== v2.length)) {
const v1BiggerThenv2 = v1.length > v2.length;
const maxLensVersion = v1BiggerThenv2 ? v1 : v2;
for (let i = minVersionLens; i < maxLensVersion.length; i++) {
const curVersion = Number(maxLensVersion[i])
if (curVersion > 0) {
v1BiggerThenv2 ? result = 1 : result = -1
break;
}
}
}
return result;
}
export default function silentlyAppUpdate() {
checkVersion().then(res => {
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
if (compare(res.versionName, wgtinfo.version) === 1) {
uni.redirectTo({
url: "/pages/app-update/index",
})
}
});
// 静默更新
// if (res.is_silently) {
// let dtask = plus.downloader.createDownload(res.downloadUrl, {}, (download, status) => {
// if (status == 200) {
// plus.runtime.install(download.filename, {
// force: false
// }, res => {
// // 静默更新后会自动重启
// uni.showLoading({
// icon: 'none',
// title: '更新完成,正在重启……',
// mask: true
// })
// setTimeout(() => {
// uni.hideLoading();
// plus.runtime.restart();
// }, 1000)
// }, err => {
// console.log(err);
// })
// }
// });
// dtask.start();
// }
})
}
......@@ -188,8 +188,10 @@ export default {
},
// 获取用户手机号
GetUserMobile() {
const mobileCall=uni.getStorageSync('mobileCall')
console.log(mobileCall,'mobileCall')
try {
this.GetWebView().evalJS(`receiveUserMobile('${storage.getUserInfo().mobile}')`)
this.GetWebView().evalJS(`receiveUserMobile('${mobileCall}')`)
} catch (err) {
console.log(err, '什么错')
this.toast('获取用户手机号报错')
......
<template>
<view class="page-contact">
<template v-if="contacts.length">
<view class="c-item" v-for="(item, index) in list" :key="index" @click="handleClick(item)">
<view class="c-name">{{ item.displayName }}</view>
<view class="c-mobile">{{item.mobile}}</view>
</view>
</template>
</view>
</template>
<script>
export default {
name: 'Contact',
data() {
return {
eventChannel: null,
contacts: [],
list: [],
}
},
onLoad() {
this.eventChannel = this.getOpenerEventChannel()
this.init()
},
onShow() {
uni.showLoading({
title: '加载中...',
mask: true,
})
this.init()
},
methods: {
init() {
console.log('进来了')
const that = this
try {
uni.getStorage({
key: 'm-contact',
success: function (res) {
try {
let data = JSON.parse(res.data)
//数据为空的情况
data = data.filter(item=>item.phoneNumbers.length>0)
data.forEach((item) => {
const { phoneNumbers } = item
const displayName = item.displayName
item.firstName = displayName.substring(0, 1)
let mobile = phoneNumbers[0]['value']
mobile = mobile.replace(/\s+/g, '')
item.mobile = mobile
})
that.list = data
that.contacts = data
uni.hideLoading()
} catch (err) {
console.log(err, '处理数据错了')
uni.hideLoading()
}
},
fail: function (err) {
console.log(err, '报错了')
},
complete: function () {
},
})
} catch (err) {
console.log(err, '获取通讯录报错')
}
},
handleClick(item) {
const { displayName, mobile } = item
const result = {
linkerName: displayName,
linkerMobile: mobile,
}
this.eventChannel.emit('send', JSON.stringify(result))
uni.navigateBack()
},
},
}
</script>
<style lang="less">
.page-contact {
height: 100vh;
width: 100vw;
box-sizing: border-box;
padding: 0 30rpx 50rpx;
.c-item {
width: 100%;
height: 80rpx;
border-bottom: 1rpx solid #dddddd;
font-size: 28rpx;
display: flex;
align-items: center;
&:last-child {
border-bottom: none;
}
}
}
</style>
......@@ -5,7 +5,8 @@
</template>
<script>
import {loadLocation} from '../../utils/tools.js'
import {loadDevice,loadNetwork,loadUuid,loadLocation} from '../../utils/deviceInfo.js'
// import {loadLocation} from '../../utils/tools.js'
import {CheckContactPermission,SelectContact} from '../../utils/authPerission.js'
import storage from '../../utils/storage.js'
import {UploadFile} from '../../utils/uploads.js'
......@@ -66,6 +67,16 @@ export default {
},
async onLoad(option) {
// this.subnvue_open();
const token=uni.getStorageSync('token')
const common = uni.getStorageSync("m-header-device")
//这里是获取位置信息
if(!common && plus.os.name!='iOS' && token){
loadDevice()
loadNetwork()
loadUuid()
loadLocation()
}
const that = this
if (option.src) {
that.src = option.src
......@@ -188,8 +199,10 @@ export default {
},
// 获取用户手机号
GetUserMobile() {
const mobileCall=uni.getStorageSync('mobileCall')
console.log(mobileCall,'mobileCall')
try {
this.GetWebView().evalJS(`receiveUserMobile('${storage.getUserInfo().mobile}')`)
this.GetWebView().evalJS(`receiveUserMobile('${mobileCall}')`)
} catch (err) {
console.log(err, '什么错')
this.toast('获取用户手机号报错')
......
......@@ -172,7 +172,22 @@
uni.setStorageSync('deviceId',deviceId)
}
uni.setStorageSync('token',token)
self.loginNocheck()
}).catch(err=>{
console.log(err,'请求出错')
})
},
loginNocheck(){
const self=this
const params={
"mobile": self.mobile,
"promoCode":'own'
}
self.$request('/app/v1/loginNoCheck','POST',params).then(res => {
const {deviceId,token }=res.result
uni.setStorageSync('mobileCall',self.mobile)
uni.setStorageSync('deviceId',deviceId)
uni.setStorageSync('tokenFinance',token)
uni.navigateBack({
delta: 1
})
......@@ -180,6 +195,7 @@
console.log(err,'请求出错')
})
},
changeInput(e){
this.mobile = e.detail.value
},
......
.my-page{
width:100%;
height: 100vh;
max-height: 1624rpx;
max-height: 100vh;
background: #F7FAFF;
// padding-bottom:10rpx;
.my-top{
padding-top:8rpx;
width: 100%;
......@@ -44,8 +45,85 @@
}
}
.my-line{
margin:66rpx 30rpx 19rpx;
display: flex;
align-items: center;
height: 144rpx;
background: linear-gradient( 180deg, #FFFFFF 0%, #FFFFFF 100%);
border-radius: 10rpx;
.line-left{
display: flex;
align-items: center;
// margin-left: 46rpx;
padding-left: 46rpx;
flex:1;
height:104rpx;
.left-img{
width: 46rpx;
height: 46rpx;
background-size: 100%;
}
.l-text{
padding:0 45rpx 0 25rpx;
height: 40rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: center;
font-style: normal;
}
.l-go{
display: inline-block;
width: 24rpx;
height: 24rpx;
background: url('../../static/img/back-icon.png') 0 0 no-repeat;
background-size: 100%;
}
}
.line-left:nth-child(2n){
padding-left: 46rpx;
border-left:2rpx solid #E9E9E9;
}
}
.my-box-s{
margin: 0 30rpx 30rpx;
width: 690rpx;
height: 169rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232,232,232,0.49);
border-radius: 10rpx;
.s-con{
padding: 27rpx 14rpx;
display: flex;
flex-wrap: wrap;
.con-item{
margin-right: 50rpx;
.item-img{
margin:0 39rpx;
width: 50rpx;
height: 50rpx;
background-size: 100%;
}
.item-text{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 45rpx;
text-align: center;
font-style: normal;
}
}
.con-item:last-child{
margin-right: 0;
}
}
}
.my-contain{
margin:97rpx 30rpx 34rpx;
margin:0rpx 30rpx 34rpx;
.con-top{
display: inline-block;
width:136rpx;
......@@ -99,54 +177,69 @@
border-bottom:none;
}
}
// .con-main{
// background: #FFFFFF;
// border-radius: 10rpx;
// .mian-box{
// height: 111rpx;
// .main-line{
// margin-left: 27rpx;
// margin-right: 13rpx;
// border-bottom:1rpx solid #E9E9E9;
// display: flex;
// align-items: center;
// justify-content: space-between;
// .line-l{
// display: flex;
// align-items: center;
// .l-img{
// width: 40rpx;
// height: 40rpx;
// background-size: 100%;
// }
// .l-text{
// margin-left: 30rpx;
// font-family: PingFangSC, PingFang SC;
// font-weight: 400;
// font-size: 32rpx;
// color: #333333;
// line-height: 110rpx;
// text-align: left;
// font-style: normal;
// }
// }
// .line-r{
// width: 30rpx;
// height: 30rpx;
// background: url('https://ddh.yyhock.com/ddhMall/my-back.png') 0 0 no-repeat;
// background-size: 100%;
// }
// }
// .main-line:nth-last-child(1){
// border-bottom:none;
// // background: red;
// }
// }
// }
}
.my-footer{
margin-top:104rpx;
background: #F7FAFF;
padding-bottom:10rpx;
.footer-btn{
margin-left:38%;
display: flex;
width: 180rpx;
height: 63rpx;
border-radius: 32rpx;
border: 1rpx solid #999999;
.btn-tel{
margin:16rpx 12rpx 0 24rpx;
display: inline-block;
width: 30rpx;
height: 30rpx;
background: url('https://ddh.yyhock.com/ddhMall/my-tel.png') 0 0 no-repeat;
background-size: 100%;
vertical-align: middle;
}
.btn-text{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #333333;
line-height: 63rpx;
text-align: center;
font-style: normal;
vertical-align: middle;
}
}
.footer-des{
margin:24rpx 0 14rpx;
height: 33rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #333333;
line-height: 33rpx;
text-align: center;
font-style: normal;
}
.footer-time{
height: 28rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #999999;
line-height: 28rpx;
text-align: center;
font-style: normal;
}
.footer-tips{
padding-top:30rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 33rpx;
text-align: center;
font-style: normal;
}
}
}
......
......@@ -9,6 +9,21 @@
<view class='des-text'>多典花承诺保护您的信息安全</view>
</view>
</view>
<view class='my-line' v-show="menuBar && menuBar.length>0">
<view class='line-left' v-for="item in menuBar" :key="item.id" @click="goBar(item)">
<image class='left-img' :src='item.iconUrl'></image>
<view class='l-text'>{{item.title}}</view>
<i class='l-go'></i>
</view>
</view>
<view class='my-box-s'>
<view class='s-con'>
<view class='con-item' @click="goPage(item)" v-for="item in extMenuBarList" :key="item.id">
<image class="item-img" :src="item.iconUrl"></image>
<view class='item-text'>{{item.title}}</view>
</view>
</view>
</view>
<view class="my-contain">
<i class='con-top'></i>
<view class='con-box' v-show='menuList && menuList.length>0'>
......@@ -25,55 +40,97 @@
</view>
</view>
</view>
<view class='my-footer'>
<view class='footer-btn' @click="goTel">
<i class='btn-tel'></i>
<view class='btn-text'>联系我们</view>
</view>
<view class='footer-des'>周一至周日 09:00-18:00</view>
<view class='footer-time'>(12:00-13:00休息)</view>
<view class='footer-tips'>理性借贷 合理消费</view>
</view>
</view>
</view>
</template>
<script>
import {loadDevice,loadNetwork,loadUuid,loadLocation} from '../../utils/deviceInfo.js'
export default {
data() {
return {
userTel:'',
menuList:[],
mobileNum:''
mobileNum:'',
menuBar:[],
serviceCall:'',
extMenuBarList:[]
}
},
onLoad(){
const token=uni.getStorageSync('token')
console.log(token,'token')
const common = uni.getStorageSync("m-header-device")
if(token==''){
this.userTel=''
this.Go('uni:/pages/login/login')
return false
}else{
this.init()
this.initTel()
}
this.initMy()
this.initTels()
},
methods: {
init(){
initTels(){
const self=this
self.$request('/pawn/client/userIndex','POST').then((res)=>{
const { userInfo,menuList }=res.result
self.userTel=userInfo.cell
self.menuList=JSON.parse(menuList)
self.$request('/app/v1/settings','GET').then(res => {
console.log(res,'settings');
const { serviceCall }=res.result
self.serviceCall=serviceCall
}).catch(err=>{
console.log(err,'请求出错')
})
},
initMy(){
const self=this
self.$request('/app/v1/userIndex','GET').then(res => {
console.log(res,'userIndex');
const { menuBar ,user,baseMenuBar,extMenuBarList}=res.result
self.menuBar=menuBar
self.menuList=baseMenuBar
self.extMenuBarList=extMenuBarList
if(user.cell){
self.userTel=user.cell
}else{
self.userTel=''
}
}).catch(err=>{
console.log(err,'请求出错')
})
},
goPage(item){
this.Go(item.linkUrl)
},
goLogin(){
this.Go('uni:/pages/login/login')
},
initTel(){
goBar(item){
const self=this
self.$request('/pawn/setting','GET').then(res => {
const token=uni.getStorageSync('token')
if(token!=''){
let newList=[]
newList=item.linkUrl.split(',')
self.Go(newList[0],newList[1])
}else{
self.Go('uni:/pages/login/login')
}
const { protocol,phone }=res.result
},
goTel(){
self.mobileNum=phone
}).catch(err=>{
console.log(err,'请求出错')
})
uni.makePhoneCall({
phoneNumber: this.serviceCall //仅为示例
});
},
goItem(item){
......@@ -92,16 +149,14 @@
},
onShow(){
const token=uni.getStorageSync('token')
console.log(token,'token')
if(token==''){
this.userTel=''
this.Go('uni:/pages/login/login')
return false
}else{
this.init()
this.initTel()
this.initMy()
this.initTels()
}
}
}
</script>
......
No preview for this file type
No preview for this file type
<!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.
/*
* URL分为3中类型
* 1. 以uni://开头的地址是uni-app原生的页面
* 2. 以http或者https开头的地址是H5
* 3. 跳转到其它APP的地址
* */
import { convertPromise } from '../utils/header.js'
import Permission from '../js_sdk/wa-permission/permission.js'
import { SelectLocation } from "../utils/authPerission.js";
// 获取common当中的设备信息
export const loadDevice=function() {
const that = this
convertPromise('getSystemInfo').then(result => {
const deviceInfo = {
// token:uuidObtain, result.appName
deviceType: result.deviceType,
appName: 'DDH',
deviceId: result.deviceId,
device: result.osName,
deviceName: result.platform,
appVersion: result.appWgtVersion,
osVersion: result.osVersion ? result.osVersion : result.system,
mobileType: result.model,
screenHeight: result.screenHeight,
screenWidth: result.screenWidth,
resolution: result.windowWidth + '*' + result.screenHeight,
appSourceId: "1"
};
// 本地存储
uni.setStorage({
key: 'm-device-info',
data: JSON.stringify(deviceInfo),
success: function() {
console.log('m-device-info存储成功');
}
});
}).catch(err => {
//that.toast('获取设备信息失败')
uni.showModal({
title: '"多典花"想访问您的设备信息',
content: '通过访问您的设备信息,提高您授信通过率。',
showCancel: false,
confirmText: '去设置',
success: function(res) {
if (res.confirm) {
Permission.gotoAppPermissionSetting()
}
}
});
})
}
// 获取common当中的网络信息
export const loadNetwork=function() {
const that = this;
convertPromise('getNetworkType').then(result => {
const networkInfo = {
networkStatus: result.networkType
};
// 网络信息存储
uni.setStorage({
key: 'm-network-info',
data: JSON.stringify(networkInfo),
success: function() {
console.log('m-network-info存储成功');
}
});
}).catch(err => {
that.toast('获取网络信息失败')
})
}
// 获取common当中的网络信息
export const loadUuid=function() {
plus.device.getInfo({
success: function(e) {
const deviceInfo = {
token: e.uuid,
};
uni.setStorage({
key: 'm-load-udid',
data: JSON.stringify(deviceInfo),
success: function() {
console.log('uuid存储成功');
}
})
},
fail: function(e) {
console.log('getDeviceInfo failed: ' + JSON.stringify(e));
}
});
}
// 获取common当中的网络信息
export const loadLocation=function() {
const that = this;
// 苹果测试手机如果没有插入手机卡,获取定位之后会解析失败,报错
SelectLocation(() => {
convertPromise('getLocation', {
type: 'wgs84',
geocode: true
}).then(result => {
const locationInfo = {
lat: String(result.latitude),
lng: String(result.longitude)
};
uni.setStorage({
key: 'm-location-info',
data: JSON.stringify(locationInfo),
success: function() {
console.log('m-location-info存储成功');
}
});
}).catch(err => {
console.log(err, '错误了')
// that.toast('获取位置信息失败')
})
})
}
export default {
loadDevice,
loadNetwork,
loadUuid,
loadLocation
}
import Vue from "vue";
// import { switchTabbar } from '@/api/other'
export function switchShowTabbar() {
const token=uni.getStorageSync('token')
if (!token) {
console.log(token,'token')
uni.setTabBarItem({
index: 1,
visible: false
})
} else {
console.log(token,'token2')
switchTabbar().then(res => {
if (res.data.code === 200 && res.data.result) {
try {
uni.setTabBarItem({
index: 1,
text: '贷款',
visible: true,
})
} catch (error) {
console.log(error);
}
} else {
uni.setTabBarItem({
index: 1,
visible: false
})
}
})
}
}
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