Commit df26e329 authored by ly's avatar ly

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

parent a23a9e66
No preview for this file type
<script> <script>
import { convertPromise } from './utils/header.js' import { convertPromise } from './utils/header.js'
import Permission from '@/js_sdk/wa-permission/permission' import Permission from '@/js_sdk/wa-permission/permission'
import { SelectLocation } from "./utils/authPerission"; import { SelectLocation } from "./utils/authPerission";
import { switchShowTabbar } from './utils/filters'
import silentlyAppUpdate from '@/pages/app-update/js-sdk/silentlyAppUpdate'
export default { export default {
onLaunch: function() { onLaunch: function() {
const common = uni.getStorageSync("m-headers") const common = uni.getStorageSync("m-headers")
if (!common) { if (!common && plus.os.name=='iOS') {
this.loadDevice(); console.log(plus.os.name,'9')
this.loadNetwork(); this.loadDevice();
this.loadLocation(); this.loadNetwork();
this.loadUuid() this.loadLocation();
this.loadUuid()
}
/*** tabbar*/
switchShowTabbar()
//app更新版本
silentlyAppUpdate()
if (plus.runtime.isAgreePrivacy()) {
// setDevice()
silentlyAppUpdate()
} }
plus.screen.lockOrientation("portrait-primary") plus.screen.lockOrientation("portrait-primary")
console.log('App Launch') console.log('App Launch')
......
const name = "花花有米"; //全局商城name const name = "多典花"; //全局商城name
const schemeName = 'huahuayoumi' //唤醒app需要的schemeName const schemeName = 'duodianhua' //唤醒app需要的schemeName
export default { export default {
name: name, name: name,
schemeLink: `${schemeName}://`, //唤起app地址 schemeLink: `${schemeName}://`, //唤起app地址
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
aMapKey: "d04c16e59eab35d19812634b2b7cb548", //在高德中申请Web服务key aMapKey: "d04c16e59eab35d19812634b2b7cb548", //在高德中申请Web服务key
scanAuthNavigation:['https://mobile.meimeiyouxin.com'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 scanAuthNavigation:['https://mobile.meimeiyouxin.com'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id6450257420", //AppStore的应用地址id 具体在分享->拷贝链接中查看 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", //客服电话 customerServiceMobile:"4001035066", //客服电话
customerServiceEmail:"hhym@huahuayoumi.com", //客服邮箱 customerServiceEmail:"hhym@huahuayoumi.com", //客服邮箱
customerServiceUrl: "https://chatbot.aliyuncs.com/intl/index.htm?from=Knv39Casa0", // 阿里云客服 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
}
}
}
<template>
<view class="appUploadAlertBox">
<u-popup ref="popup" mode="center" :maskCloseAble="false" @touchmove.stop.prevent zIndex="9999" width="590rpx" border-radius="10">
<view class="content_popup" :style="{backgroundColor: bgColor}">
<!-- 关闭app -->
<u-icon v-if="!isForceUpdata" class="close" name="close" :size="closeIconSize"
:color="closeIconColor" @click="closeUpdate"></u-icon>
<!-- 版本提示 -->
<view class="version" :style="{color: versionColor}">v{{version}}</view>
<!-- 背景 -->
<image class="backgroundImg" width="100%" height="100%" src="./img/appUploadAlertBoxBg.png"></image>
<!-- 更新详细信息 -->
<view class="info center">
<text class="title" :style="{color: titleColor}">{{title}}</text>
<!-- 更新内容 -->
<scroll-view class="info_desc_scroll" :style="{color: contentColor}" scroll-y="true">
<rich-text :nodes="content"></rich-text>
</scroll-view>
</view>
<view class="footer" v-if="platform">
<button v-if="downloadSuccess && !wgtInstalled" class="btn" :style="btnStyle"
@click="installPackage" :loading="wgtInstalling" :disabled="wgtInstalling">
{{wgtInstalling ? wgtInstallingText : downloadSuccessText}}
</button>
<button v-else-if="wgtInstalled && isWGT" class="btn" :style="btnStyle" @click="restart">
{{wgtInstalledText}}
</button>
<!-- 更新进度 -->
<view class="progress-box flex f-c f-y-c" :style="{color: progressTextColor}"
v-else-if="downloading">
<progress class="progress" :percent="downLoadPercent" :activeColor="progressColor || themeColor"
show-info stroke-width="10" />
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<text>{{downLoadingText}}</text>
<text>({{downloadedSize}}M/{{packageFileSize || 0}}M)</text>
</view>
</view>
<!-- 选项 -->
<view v-else class="btns flex f-x-b">
<!-- IOS -->
<view v-if="platform == 'ios'" class="btn confirm" :style="btnStyle" @click="jumpToAppStore">
{{downloadBtnTextIOS}}
</view>
<!-- android -->
<view v-else class="btn confirm" :style="btnStyle" @click="updataApp">
{{downloadBtnTextAndroid}}
</view>
</view>
<!-- 短期内不在提醒 -->
<!-- <view v-if="!isForceUpdata" class="notRemind" @click="userNotRemind = !userNotRemind"
:class="{active: userNotRemind}">
<u-icon :name="userNotRemind ? 'checkbox' : 'circle'" :size="notRemindIconSize"
:color="userNotRemind ? (notRemindIconActColor || themeColor) : notRemindIconNotActColor"></u-icon>
<view class="remind-text"
:style="{color: userNotRemind ? notRemindTextActColor : notRemindTextNotActColor}">
{{intervalAlertUserUpdateDay}}日内不在提醒
</view>
</view> -->
</view>
</view>
</u-popup>
</view>
</template>
<script>
/**
* geek-appUpdata app更新提示框
* @description app更新提示框,支持热更新,强制更新,普通更新,暂不更新,后台下载,更新内容展示,进度条显示,ios跳转appstore等功能。
* @property {String} title 更新标题。
* @property {String} downloadBtnTextIOS 下载按钮ios文字。
* @property {String} downloadBtnText 下载按钮文字。
* @property {String} cancelDownloadBtnText 取消下载按钮文字。
* @property {String} downLoadingText 下载中文字提示。
* @property {Number} intervalAlertUserUpdateDay 用户提示更新的间隔时间 单位day(默认7day)。
* @example
*/
import config from './config.js';
import checkVersion from './js-sdk/checkVersion.js';
export default {
name: 'geekAppUpdata',
props: config.props,
data() {
return {
// 更新的版本号
version: '',
// 系统环境
platform: '',
// 下载链接
url: '',
// 跳转的应用市场列表
storeList: [],
// 是否wgt资源包
isWGT: false,
// 是否强制更新
isForceUpdata: false,
// 更新的标题
title: '',
// 更新的内容
content: ``,
// 下载下载状态
downloading: '',
// 是否下载完成
downloadSuccess: false,
// 下载进度
downLoadPercent: 0,
// 目前app已下载大小
downloadedSize: 0,
// app总大小
packageFileSize: 0,
// wgt是否安装中
wgtInstalling: false,
// wgt是否安装完成
wgtInstalled: false,
// 要安装的本地包地址
tempFilePath: false,
// 之前的安装的本地包地址
installForBeforeFilePath: null,
// 创建的下载任务
downloadTask: null,
// 用户上次拒绝的时间
userLastRefuseTime: uni.getStorageSync('userLastRefuseTime'),
// 用户是否短期内不更新
userNotRemind: false,
}
},
mounted() {
this.init();
},
methods: {
// 版本对比
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;
},
// 获取更新内容片段
getContentHTML(content) {
let contentArr = content.split('\n');
return contentArr.map(item => `<p>${item}</p>`).join('\n')
},
// 跳转应用市场
checkStoreScheme() {
/**
* 跳转应用市场逻辑
* 如果本次更新设置了需要跳转的应用市场则从整个列表中筛选出来启用的应用市场
* 按照设置的优先级(priority)从大到小排序
* 并尝试跳转到所有应用市场
* 如果都跳转失败的话则会显示失败
*/
// 可以跳转的应用市场
const canStoreList = (this.storeList || []).filter(item => item.enable)
let openSchemePromise;
if (canStoreList && canStoreList.length) {
canStoreList
.sort((cur, next) => next.priority - cur.priority)
.map(item => item.scheme)
.reduce((promise, cur, curIndex) => {
openSchemePromise = (promise || (promise = Promise.reject())).catch(() => {
return new Promise((resolve, reject) => {
plus.runtime.openURL(cur, (err) => {
reject(err)
})
})
})
return openSchemePromise
}, openSchemePromise)
return openSchemePromise
}
return Promise.reject()
},
// 初始化
init() {
// 如果在用户上次拒绝的时间存在
if (this.userLastRefuseTime) {
// 目标时间戳
let targetTime = this.userLastRefuseTime + this.intervalAlertUserUpdateDay * 24 * 60 * 60 * 1000;
// 现在时间戳
let nowTime = (new Date).getTime();
// 如果目标时间戳大于现在时间戳
if (targetTime > nowTime) {
// 并阻止执行
return;
} else {
// 清除拒绝时间
uni.removeStorageSync('userLastRefuseTime');
}
}
// 检查版本 需要更新时才会触发回调
checkVersion().then((res) => {
// 非静默更新时触发
if (!res.is_silently) {
// 读取下载好的包的缓存
const appDownLoadTempFilePath = uni.getStorageSync('appDownLoadTempFilePath');
// 更新的版本号
this.version = res.versionName;
// 系统环境
this.platform = res.platform;
// 网络下载地址
this.url = res.downloadUrl;
// 跳转的应用市场列表
this.storeList = res.store_list || [];
// 更新内容
this.content = res.versionInfo && this.getContentHTML(res.versionInfo);
// 更新标题
this.title = res.title || '发现新版本';
// 是否强制更新
this.isForceUpdata = res.forceUpdate;
// 是否wgt资源包
this.isWGT = res.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();
}
})
},
// 下载app
downloadPackage() {
if (!this.downloadTask) {
this.downloading = true;
//下载包
this.downloadTask = plus.downloader.createDownload(this.url, {}, (download, status) => {
if (status == 200) {
this.downloadSuccess = true;
this.tempFilePath = download.filename;
uni.setStorageSync('appDownLoadTempFilePathVersion', this.version)
uni.setStorageSync('appDownLoadTempFilePath', this.tempFilePath);
}
// 清空下载进度
this.downLoadPercent = 0;
this.downloadedSize = 0;
this.packageFileSize = 0;
this.downloadTask = null;
});
this.downloadTask.start();
this.downloadTask.addEventListener("statechanged", (task, status) => {
switch (task.state) {
case 3:
// 更新下载进度
this.downLoadPercent = parseInt(task.downloadedSize / task.totalSize * 100);
this.downloadedSize = (task.downloadedSize / Math.pow(1024, 2)).toFixed(2);
this.packageFileSize = (task.totalSize / Math.pow(1024, 2)).toFixed(2);
break;
}
});
}
},
// 安装app
installPackage() {
// wgt资源包安装
if (this.isWGT) {
this.wgtInstalling = true;
}
plus.runtime.install(this.tempFilePath, {
force: false
}, async res => {
this.wgtInstalling = false;
this.wgtInstalled = true;
}, async err => {
console.log(err)
this.downloadSuccess = false;
// 如果是安装之前的包,安装失败后删除之前的包
if (this.installForBeforeFilePath) {
await this.deleteSavedFile(this.installForBeforeFilePath)
this.installForBeforeFilePath = '';
}
uni.showLoading({
icon: 'none',
title: '更新失败,请重新下载',
mask: true
})
})
},
// 删除保存的文件
deleteSavedFile(tempFilePath) {
uni.removeStorageSync('appDownLoadTempFilePath')
uni.removeSavedFile({
tempFilePath
})
},
// 保存文件
saveFile(tempFilePath) {
return new Promise((resolve, reject) => {
uni.saveFile({
tempFilePath,
success({
savedFilePath
}) {
uni.setStorageSync('appDownLoadTempFilePath', tempFilePath)
},
complete() {
resolve()
}
})
})
},
// 重启应用
restart() {
this.wgtInstalled = false;
//更新完重启app
plus.runtime.restart();
},
// 跳转appstore
jumpToAppStore() {
// 请填入appid
plus.runtime.openURL(this.url);
},
// 更新用户拒绝时间
updataUserRefuseTime() {
// 存储用户暂不升级的时间戳
this.userLastRefuseTime = (new Date).getTime();
uni.setStorageSync('userLastRefuseTime', this.userLastRefuseTime);
},
// 关闭更新框
closeUpdate() {
if (this.downloading) {
uni.showModal({
title: '是否取消下载?',
cancelText: '否',
confirmText: '是',
success: res => {
if (res.confirm) {
this.downloadTask && this.downloadTask.abort();
this.$refs.popup.close();
uni.switchTab({
url: '/pages/index/index'
});
}
}
});
} else {
this.$refs.popup.close();
// 如果用户短期内不更新
if (this.userNotRemind) {
this.updataUserRefuseTime();
}
uni.switchTab({
url: '/pages/index/index'
});
}
if (this.downloadSuccess) {
// 包已经下载完毕,稍后安装,将包保存在本地
this.saveFile(this.tempFilePath)
}
},
// 应用更新
updataApp() {
// 检查可跳转的应用市场 如果失败则走应用内更新
this.checkStoreScheme().catch(() => {
this.downloadPackage()
})
},
},
computed: {
btnStyle() {
return {
color: this.btnColor,
backgroundColor: this.btnBgColor || this.themeColor
}
}
}
}
</script>
<style lang="less" scoped>
.appUploadAlertBox {
.bg {
width: 100%;
}
.content_popup {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
box-sizing: border-box;
background-color: #FFF;
padding-bottom: 40rpx;
position: relative;
.close {
position: absolute;
right: 15rpx;
top: 15rpx;
z-index: 3;
}
.version {
position: absolute;
left: 40rpx;
top: 45rpx;
z-index: 3;
font-size: 75rpx;
}
.backgroundImg {
width: 100.1%;
height: 270rpx;
position: absolute;
top: -48rpx;
}
.info {
position: relative;
padding: 240rpx 40rpx 0;
z-index: 2;
.title {
font-size: 42rpx;
}
.info_desc_scroll {
margin-top: 20rpx;
font-size: 33rpx;
min-height: 200rpx;
max-height: 400rpx;
box-sizing: border-box;
line-height: 1.3;
p:not(:last-child) {
margin-bottom: 12rpx;
}
}
}
.footer {
padding: 0 30rpx;
.progress-box {
width: 100%;
margin-top: 25rpx;
}
:deep(.progress) {
width: 90%;
height: 40rpx;
margin-bottom: 5rpx;
.uni-progress-bar {
border-radius: 35rpx;
.uni-progress-inner-bar {
border-radius: 35rpx;
}
}
}
.btn {
margin-top: 35rpx;
height: 75rpx;
line-height: 75rpx;
border-radius: 14rpx;
font-size: 34rpx;
font-weight: 400;
text-align: center;
width: 100%;
}
.notRemind {
display: flex;
justify-content: center;
align-items: flex-start;
margin-top: 15rpx;
.remind-text {
color: #9d9d9d;
font-size: 30rpx;
margin-left: 3rpx;
transition: color 80ms linear;
}
}
}
}
.close-img {
width: 70rpx;
height: 70rpx;
z-index: 1000;
position: absolute;
bottom: -120rpx;
left: calc(50% - 70rpx / 2);
}
}
</style>
/**
* 检测升级 使用说明
* 上传包:
* 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 { ...@@ -188,8 +188,10 @@ export default {
}, },
// 获取用户手机号 // 获取用户手机号
GetUserMobile() { GetUserMobile() {
const mobileCall=uni.getStorageSync('mobileCall')
console.log(mobileCall,'mobileCall')
try { try {
this.GetWebView().evalJS(`receiveUserMobile('${storage.getUserInfo().mobile}')`) this.GetWebView().evalJS(`receiveUserMobile('${mobileCall}')`)
} catch (err) { } catch (err) {
console.log(err, '什么错') console.log(err, '什么错')
this.toast('获取用户手机号报错') 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 @@ ...@@ -5,7 +5,8 @@
</template> </template>
<script> <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 {CheckContactPermission,SelectContact} from '../../utils/authPerission.js'
import storage from '../../utils/storage.js' import storage from '../../utils/storage.js'
import {UploadFile} from '../../utils/uploads.js' import {UploadFile} from '../../utils/uploads.js'
...@@ -66,6 +67,16 @@ export default { ...@@ -66,6 +67,16 @@ export default {
}, },
async onLoad(option) { async onLoad(option) {
// this.subnvue_open(); // 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 const that = this
if (option.src) { if (option.src) {
that.src = option.src that.src = option.src
...@@ -188,8 +199,10 @@ export default { ...@@ -188,8 +199,10 @@ export default {
}, },
// 获取用户手机号 // 获取用户手机号
GetUserMobile() { GetUserMobile() {
const mobileCall=uni.getStorageSync('mobileCall')
console.log(mobileCall,'mobileCall')
try { try {
this.GetWebView().evalJS(`receiveUserMobile('${storage.getUserInfo().mobile}')`) this.GetWebView().evalJS(`receiveUserMobile('${mobileCall}')`)
} catch (err) { } catch (err) {
console.log(err, '什么错') console.log(err, '什么错')
this.toast('获取用户手机号报错') this.toast('获取用户手机号报错')
......
...@@ -172,14 +172,30 @@ ...@@ -172,14 +172,30 @@
uni.setStorageSync('deviceId',deviceId) uni.setStorageSync('deviceId',deviceId)
} }
uni.setStorageSync('token',token) 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('mobileCall',self.mobile)
uni.setStorageSync('deviceId',deviceId)
uni.setStorageSync('tokenFinance',token)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}).catch(err=>{ }).catch(err=>{
console.log(err,'请求出错') console.log(err,'请求出错')
}) })
}, },
changeInput(e){ changeInput(e){
this.mobile = e.detail.value this.mobile = e.detail.value
}, },
......
.my-page{ .my-page{
width:100%; width:100%;
height: 100vh; height: 100vh;
max-height: 1624rpx; max-height: 100vh;
background: #F7FAFF; background: #F7FAFF;
// padding-bottom:10rpx;
.my-top{ .my-top{
padding-top:8rpx; padding-top:8rpx;
width: 100%; width: 100%;
...@@ -44,8 +45,85 @@ ...@@ -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{ .my-contain{
margin:97rpx 30rpx 34rpx; margin:0rpx 30rpx 34rpx;
.con-top{ .con-top{
display: inline-block; display: inline-block;
width:136rpx; width:136rpx;
...@@ -99,55 +177,70 @@ ...@@ -99,55 +177,70 @@
border-bottom:none; border-bottom:none;
} }
} }
}
.my-footer{
// .con-main{ margin-top:104rpx;
// background: #FFFFFF; background: #F7FAFF;
// border-radius: 10rpx; padding-bottom:10rpx;
// .mian-box{ .footer-btn{
// height: 111rpx; margin-left:38%;
// .main-line{ display: flex;
// margin-left: 27rpx; width: 180rpx;
// margin-right: 13rpx; height: 63rpx;
// border-bottom:1rpx solid #E9E9E9; border-radius: 32rpx;
// display: flex; border: 1rpx solid #999999;
// align-items: center; .btn-tel{
// justify-content: space-between; margin:16rpx 12rpx 0 24rpx;
// .line-l{ display: inline-block;
// display: flex; width: 30rpx;
// align-items: center; height: 30rpx;
// .l-img{ background: url('https://ddh.yyhock.com/ddhMall/my-tel.png') 0 0 no-repeat;
// width: 40rpx; background-size: 100%;
// height: 40rpx; vertical-align: middle;
// background-size: 100%; }
// } .btn-text{
// .l-text{ font-family: PingFangSC, PingFang SC;
// margin-left: 30rpx; font-weight: 400;
// font-family: PingFangSC, PingFang SC; font-size: 24rpx;
// font-weight: 400; color: #333333;
// font-size: 32rpx; line-height: 63rpx;
// color: #333333; text-align: center;
// line-height: 110rpx; font-style: normal;
// text-align: left; vertical-align: middle;
// font-style: normal; }
// } }
// } .footer-des{
// .line-r{ margin:24rpx 0 14rpx;
// width: 30rpx; height: 33rpx;
// height: 30rpx; font-family: PingFangSC, PingFang SC;
// background: url('https://ddh.yyhock.com/ddhMall/my-back.png') 0 0 no-repeat; font-weight: 400;
// background-size: 100%; font-size: 24rpx;
// } color: #333333;
// } line-height: 33rpx;
// .main-line:nth-last-child(1){ text-align: center;
// border-bottom:none; font-style: normal;
// // background: red; }
// } .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;
}
} }
} }
} }
\ No newline at end of file
...@@ -9,6 +9,21 @@ ...@@ -9,6 +9,21 @@
<view class='des-text'>多典花承诺保护您的信息安全</view> <view class='des-text'>多典花承诺保护您的信息安全</view>
</view> </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"> <view class="my-contain">
<i class='con-top'></i> <i class='con-top'></i>
<view class='con-box' v-show='menuList && menuList.length>0'> <view class='con-box' v-show='menuList && menuList.length>0'>
...@@ -25,55 +40,97 @@ ...@@ -25,55 +40,97 @@
</view> </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>
</view> </view>
</template> </template>
<script> <script>
import {loadDevice,loadNetwork,loadUuid,loadLocation} from '../../utils/deviceInfo.js'
export default { export default {
data() { data() {
return { return {
userTel:'', userTel:'',
menuList:[], menuList:[],
mobileNum:'' mobileNum:'',
menuBar:[],
serviceCall:'',
extMenuBarList:[]
} }
}, },
onLoad(){ onLoad(){
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
console.log(token,'token') const common = uni.getStorageSync("m-header-device")
if(token==''){ if(token==''){
this.userTel='' this.userTel=''
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
return false return false
}else{
this.init()
this.initTel()
} }
this.initMy()
this.initTels()
}, },
methods: { methods: {
init(){ initTels(){
const self=this const self=this
self.$request('/pawn/client/userIndex','POST').then((res)=>{ self.$request('/app/v1/settings','GET').then(res => {
const { userInfo,menuList }=res.result console.log(res,'settings');
self.userTel=userInfo.cell const { serviceCall }=res.result
self.menuList=JSON.parse(menuList) 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(){ goLogin(){
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
}, },
initTel(){ goBar(item){
const self=this const self=this
self.$request('/pawn/setting','GET').then(res => { const token=uni.getStorageSync('token')
if(token!=''){
const { protocol,phone }=res.result let newList=[]
newList=item.linkUrl.split(',')
self.mobileNum=phone self.Go(newList[0],newList[1])
}).catch(err=>{ }else{
console.log(err,'请求出错') self.Go('uni:/pages/login/login')
}) }
},
goTel(){
uni.makePhoneCall({
phoneNumber: this.serviceCall //仅为示例
});
}, },
goItem(item){ goItem(item){
...@@ -92,17 +149,15 @@ ...@@ -92,17 +149,15 @@
}, },
onShow(){ onShow(){
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
console.log(token,'token')
if(token==''){ if(token==''){
this.userTel='' this.userTel=''
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
return false return false
}else{ }else{
this.init() this.initMy()
this.initTel() this.initTels()
} }
} }
} }
</script> </script>
<style src='./index.less' lang="less" scoped></style> <style src='./index.less' lang="less" scoped></style>
\ No newline at end of file
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.
...@@ -1896,9 +1896,107 @@ var render = function () { ...@@ -1896,9 +1896,107 @@ var render = function () {
), ),
_c( _c(
"uni-view", "uni-view",
{ staticClass: _vm._$g(8, "sc"), attrs: { _i: 8 } }, {
directives: [
{
name: "show",
rawName: "v-show",
value: _vm._$g(8, "v-show"),
expression: "_$g(8,'v-show')",
},
],
staticClass: _vm._$g(8, "sc"),
attrs: { _i: 8 },
},
_vm._l(_vm._$g(9, "f"), function (item, $10, $20, $30) {
return _c(
"uni-view",
{
key: item,
staticClass: _vm._$g("9-" + $30, "sc"),
attrs: { _i: "9-" + $30 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[
_c("v-uni-image", {
staticClass: _vm._$g("10-" + $30, "sc"),
attrs: {
src: _vm._$g("10-" + $30, "a-src"),
_i: "10-" + $30,
},
}),
_c(
"uni-view",
{
staticClass: _vm._$g("11-" + $30, "sc"),
attrs: { _i: "11-" + $30 },
},
[_vm._v(_vm._$g("11-" + $30, "t0-0"))]
),
_c("i", {
staticClass: _vm._$g("12-" + $30, "sc"),
attrs: { _i: "12-" + $30 },
}),
],
1
)
}),
1
),
_c(
"uni-view",
{ staticClass: _vm._$g(13, "sc"), attrs: { _i: 13 } },
[ [
_c("i", { staticClass: _vm._$g(9, "sc"), attrs: { _i: 9 } }), _c(
"uni-view",
{ staticClass: _vm._$g(14, "sc"), attrs: { _i: 14 } },
_vm._l(_vm._$g(15, "f"), function (item, $11, $21, $31) {
return _c(
"uni-view",
{
key: item,
staticClass: _vm._$g("15-" + $31, "sc"),
attrs: { _i: "15-" + $31 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[
_c("v-uni-image", {
staticClass: _vm._$g("16-" + $31, "sc"),
attrs: {
src: _vm._$g("16-" + $31, "a-src"),
_i: "16-" + $31,
},
}),
_c(
"uni-view",
{
staticClass: _vm._$g("17-" + $31, "sc"),
attrs: { _i: "17-" + $31 },
},
[_vm._v(_vm._$g("17-" + $31, "t0-0"))]
),
],
1
)
}),
1
),
],
1
),
_c(
"uni-view",
{ staticClass: _vm._$g(18, "sc"), attrs: { _i: 18 } },
[
_c("i", { staticClass: _vm._$g(19, "sc"), attrs: { _i: 19 } }),
_c( _c(
"uni-view", "uni-view",
{ {
...@@ -1906,20 +2004,20 @@ var render = function () { ...@@ -1906,20 +2004,20 @@ var render = function () {
{ {
name: "show", name: "show",
rawName: "v-show", rawName: "v-show",
value: _vm._$g(10, "v-show"), value: _vm._$g(20, "v-show"),
expression: "_$g(10,'v-show')", expression: "_$g(20,'v-show')",
}, },
], ],
staticClass: _vm._$g(10, "sc"), staticClass: _vm._$g(20, "sc"),
attrs: { _i: 10 }, attrs: { _i: 20 },
}, },
_vm._l(_vm._$g(11, "f"), function (item, $10, $20, $30) { _vm._l(_vm._$g(21, "f"), function (item, $12, $22, $32) {
return _c( return _c(
"uni-view", "uni-view",
{ {
key: item, key: item,
staticClass: _vm._$g("11-" + $30, "sc"), staticClass: _vm._$g("21-" + $32, "sc"),
attrs: { _i: "11-" + $30 }, attrs: { _i: "21-" + $32 },
on: { on: {
click: function ($event) { click: function ($event) {
return _vm.$handleViewEvent($event) return _vm.$handleViewEvent($event)
...@@ -1930,38 +2028,38 @@ var render = function () { ...@@ -1930,38 +2028,38 @@ var render = function () {
_c( _c(
"uni-view", "uni-view",
{ {
staticClass: _vm._$g("12-" + $30, "sc"), staticClass: _vm._$g("22-" + $32, "sc"),
attrs: { _i: "12-" + $30 }, attrs: { _i: "22-" + $32 },
}, },
[ [
_c( _c(
"uni-view", "uni-view",
{ {
staticClass: _vm._$g("13-" + $30, "sc"), staticClass: _vm._$g("23-" + $32, "sc"),
attrs: { _i: "13-" + $30 }, attrs: { _i: "23-" + $32 },
}, },
[ [
_c("v-uni-image", { _c("v-uni-image", {
staticClass: _vm._$g("14-" + $30, "sc"), staticClass: _vm._$g("24-" + $32, "sc"),
attrs: { attrs: {
src: _vm._$g("14-" + $30, "a-src"), src: _vm._$g("24-" + $32, "a-src"),
_i: "14-" + $30, _i: "24-" + $32,
}, },
}), }),
_c( _c(
"uni-view", "uni-view",
{ {
staticClass: _vm._$g("15-" + $30, "sc"), staticClass: _vm._$g("25-" + $32, "sc"),
attrs: { _i: "15-" + $30 }, attrs: { _i: "25-" + $32 },
}, },
[_vm._v(_vm._$g("15-" + $30, "t0-0"))] [_vm._v(_vm._$g("25-" + $32, "t0-0"))]
), ),
], ],
1 1
), ),
_c("uni-view", { _c("uni-view", {
staticClass: _vm._$g("16-" + $30, "sc"), staticClass: _vm._$g("26-" + $32, "sc"),
attrs: { _i: "16-" + $30 }, attrs: { _i: "26-" + $32 },
}), }),
], ],
1 1
...@@ -1975,6 +2073,52 @@ var render = function () { ...@@ -1975,6 +2073,52 @@ var render = function () {
], ],
1 1
), ),
_c(
"uni-view",
{ staticClass: _vm._$g(27, "sc"), attrs: { _i: 27 } },
[
_c(
"uni-view",
{
staticClass: _vm._$g(28, "sc"),
attrs: { _i: 28 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[
_c("i", {
staticClass: _vm._$g(29, "sc"),
attrs: { _i: 29 },
}),
_c(
"uni-view",
{ staticClass: _vm._$g(30, "sc"), attrs: { _i: 30 } },
[_vm._v("联系我们")]
),
],
1
),
_c(
"uni-view",
{ staticClass: _vm._$g(31, "sc"), attrs: { _i: 31 } },
[_vm._v("周一至周日 09:00-18:00")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(32, "sc"), attrs: { _i: 32 } },
[_vm._v("(12:00-13:00休息)")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(33, "sc"), attrs: { _i: 33 } },
[_vm._v("理性借贷 合理消费")]
),
],
1
),
], ],
1 1
), ),
...@@ -2074,9 +2218,12 @@ if(false) {} ...@@ -2074,9 +2218,12 @@ if(false) {}
// Imports // Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../../Applications/HBuilderX 2.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10); var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../../Applications/HBuilderX 2.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
var ___CSS_LOADER_GET_URL_IMPORT___ = __webpack_require__(/*! ../../../../../../../Applications/HBuilderX 2.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/lib/app-plus/getUrl.js */ 11);
var ___CSS_LOADER_URL_IMPORT_0___ = __webpack_require__(/*! ../../static/img/back-icon.png */ 197);
exports = ___CSS_LOADER_API_IMPORT___(false); exports = ___CSS_LOADER_API_IMPORT___(false);
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
// Module // Module
exports.push([module.i, ".my-page[data-v-486dcc10] {\n width: 100%;\n height: 100vh;\n max-height: 1624rpx;\n background: #F7FAFF;\n}\n.my-page .my-top[data-v-486dcc10] {\n padding-top: 8rpx;\n width: 100%;\n height: 505rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-bg.png') 0 0 no-repeat;\n background-size: 100% 505rpx;\n}\n.my-page .my-top .my-header[data-v-486dcc10] {\n display: flex;\n}\n.my-page .my-top .my-header .header-img[data-v-486dcc10] {\n margin-top: 128rpx;\n margin-left: 28rpx;\n width: 122rpx;\n height: 122rpx;\n background-size: 100% ;\n}\n.my-page .my-top .my-header .header-des[data-v-486dcc10] {\n padding-left: 15rpx;\n margin-top: 128rpx;\n font-family: PingFangSC, PingFang SC;\n text-align: left;\n font-style: normal;\n}\n.my-page .my-top .my-header .header-des .des-name[data-v-486dcc10] {\n padding: 17rpx 0 10rpx;\n height: 50rpx;\n font-weight: 500;\n font-size: 36rpx;\n color: #333333;\n line-height: 50rpx;\n}\n.my-page .my-top .my-header .header-des .des-text[data-v-486dcc10] {\n height: 28rpx;\n font-weight: 400;\n font-size: 24rpx;\n color: #999999;\n line-height: 28rpx;\n}\n.my-page .my-top .my-contain[data-v-486dcc10] {\n margin: 97rpx 30rpx 34rpx;\n}\n.my-page .my-top .my-contain .con-top[data-v-486dcc10] {\n display: inline-block;\n width: 136rpx;\n height: 48rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-text.png') 0 0 no-repeat;\n background-size: 136rpx 48rpx;\n}\n.my-page .my-top .my-contain .con-box[data-v-486dcc10] {\n margin-top: 24rpx;\n background: #FFFFFF;\n}\n.my-page .my-top .my-contain .con-box .box-line[data-v-486dcc10] {\n margin: 0 13rpx 0 27rpx;\n height: 110rpx;\n background: #FFFFFF;\n border-bottom: 2rpx solid #E9E9E9;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item[data-v-486dcc10] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l[data-v-486dcc10] {\n display: flex;\n align-items: center;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l .l-img[data-v-486dcc10] {\n width: 40rpx;\n height: 40rpx;\n background-size: 100%;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l .l-text[data-v-486dcc10] {\n margin-left: 30rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 32rpx;\n color: #333333;\n line-height: 110rpx;\n text-align: left;\n font-style: normal;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-r[data-v-486dcc10] {\n width: 30rpx;\n height: 30rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-back.png') 0 0 no-repeat;\n background-size: 100%;\n}\n.my-page .my-top .my-contain .con-box .box-line[data-v-486dcc10]:last-child {\n border-bottom: none;\n}\n", ""]); exports.push([module.i, ".my-page[data-v-486dcc10] {\n width: 100%;\n height: 100vh;\n max-height: 100vh;\n background: #F7FAFF;\n}\n.my-page .my-top[data-v-486dcc10] {\n padding-top: 8rpx;\n width: 100%;\n height: 505rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-bg.png') 0 0 no-repeat;\n background-size: 100% 505rpx;\n}\n.my-page .my-top .my-header[data-v-486dcc10] {\n display: flex;\n}\n.my-page .my-top .my-header .header-img[data-v-486dcc10] {\n margin-top: 128rpx;\n margin-left: 28rpx;\n width: 122rpx;\n height: 122rpx;\n background-size: 100% ;\n}\n.my-page .my-top .my-header .header-des[data-v-486dcc10] {\n padding-left: 15rpx;\n margin-top: 128rpx;\n font-family: PingFangSC, PingFang SC;\n text-align: left;\n font-style: normal;\n}\n.my-page .my-top .my-header .header-des .des-name[data-v-486dcc10] {\n padding: 17rpx 0 10rpx;\n height: 50rpx;\n font-weight: 500;\n font-size: 36rpx;\n color: #333333;\n line-height: 50rpx;\n}\n.my-page .my-top .my-header .header-des .des-text[data-v-486dcc10] {\n height: 28rpx;\n font-weight: 400;\n font-size: 24rpx;\n color: #999999;\n line-height: 28rpx;\n}\n.my-page .my-top .my-line[data-v-486dcc10] {\n margin: 66rpx 30rpx 19rpx;\n display: flex;\n align-items: center;\n height: 144rpx;\n background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);\n border-radius: 10rpx;\n}\n.my-page .my-top .my-line .line-left[data-v-486dcc10] {\n display: flex;\n align-items: center;\n padding-left: 46rpx;\n flex: 1;\n height: 104rpx;\n}\n.my-page .my-top .my-line .line-left .left-img[data-v-486dcc10] {\n width: 46rpx;\n height: 46rpx;\n background-size: 100%;\n}\n.my-page .my-top .my-line .line-left .l-text[data-v-486dcc10] {\n padding: 0 45rpx 0 25rpx;\n height: 40rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 28rpx;\n color: #333333;\n line-height: 40rpx;\n text-align: center;\n font-style: normal;\n}\n.my-page .my-top .my-line .line-left .l-go[data-v-486dcc10] {\n display: inline-block;\n width: 24rpx;\n height: 24rpx;\n background: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") 0 0 no-repeat;\n background-size: 100%;\n}\n.my-page .my-top .my-line .line-left[data-v-486dcc10]:nth-child(2n) {\n padding-left: 46rpx;\n border-left: 2rpx solid #E9E9E9;\n}\n.my-page .my-top .my-box-s[data-v-486dcc10] {\n margin: 0 30rpx 30rpx;\n width: 690rpx;\n height: 169rpx;\n background: #FFFFFF;\n box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 232, 232, 0.49);\n border-radius: 10rpx;\n}\n.my-page .my-top .my-box-s .s-con[data-v-486dcc10] {\n padding: 27rpx 14rpx;\n display: flex;\n flex-wrap: wrap;\n}\n.my-page .my-top .my-box-s .s-con .con-item[data-v-486dcc10] {\n margin-right: 50rpx;\n}\n.my-page .my-top .my-box-s .s-con .con-item .item-img[data-v-486dcc10] {\n margin: 0 39rpx;\n width: 50rpx;\n height: 50rpx;\n background-size: 100%;\n}\n.my-page .my-top .my-box-s .s-con .con-item .item-text[data-v-486dcc10] {\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 28rpx;\n color: #333333;\n line-height: 45rpx;\n text-align: center;\n font-style: normal;\n}\n.my-page .my-top .my-box-s .s-con .con-item[data-v-486dcc10]:last-child {\n margin-right: 0;\n}\n.my-page .my-top .my-contain[data-v-486dcc10] {\n margin: 0rpx 30rpx 34rpx;\n}\n.my-page .my-top .my-contain .con-top[data-v-486dcc10] {\n display: inline-block;\n width: 136rpx;\n height: 48rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-text.png') 0 0 no-repeat;\n background-size: 136rpx 48rpx;\n}\n.my-page .my-top .my-contain .con-box[data-v-486dcc10] {\n margin-top: 24rpx;\n background: #FFFFFF;\n}\n.my-page .my-top .my-contain .con-box .box-line[data-v-486dcc10] {\n margin: 0 13rpx 0 27rpx;\n height: 110rpx;\n background: #FFFFFF;\n border-bottom: 2rpx solid #E9E9E9;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item[data-v-486dcc10] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l[data-v-486dcc10] {\n display: flex;\n align-items: center;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l .l-img[data-v-486dcc10] {\n width: 40rpx;\n height: 40rpx;\n background-size: 100%;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-l .l-text[data-v-486dcc10] {\n margin-left: 30rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 32rpx;\n color: #333333;\n line-height: 110rpx;\n text-align: left;\n font-style: normal;\n}\n.my-page .my-top .my-contain .con-box .box-line .line-item .item-r[data-v-486dcc10] {\n width: 30rpx;\n height: 30rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-back.png') 0 0 no-repeat;\n background-size: 100%;\n}\n.my-page .my-top .my-contain .con-box .box-line[data-v-486dcc10]:last-child {\n border-bottom: none;\n}\n.my-page .my-top .my-footer[data-v-486dcc10] {\n margin-top: 104rpx;\n background: #F7FAFF;\n padding-bottom: 10rpx;\n}\n.my-page .my-top .my-footer .footer-btn[data-v-486dcc10] {\n margin-left: 38%;\n display: flex;\n width: 180rpx;\n height: 63rpx;\n border-radius: 32rpx;\n border: 1rpx solid #999999;\n}\n.my-page .my-top .my-footer .footer-btn .btn-tel[data-v-486dcc10] {\n margin: 16rpx 12rpx 0 24rpx;\n display: inline-block;\n width: 30rpx;\n height: 30rpx;\n background: url('https://ddh.yyhock.com/ddhMall/my-tel.png') 0 0 no-repeat;\n background-size: 100%;\n vertical-align: middle;\n}\n.my-page .my-top .my-footer .footer-btn .btn-text[data-v-486dcc10] {\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 24rpx;\n color: #333333;\n line-height: 63rpx;\n text-align: center;\n font-style: normal;\n vertical-align: middle;\n}\n.my-page .my-top .my-footer .footer-des[data-v-486dcc10] {\n margin: 24rpx 0 14rpx;\n height: 33rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 24rpx;\n color: #333333;\n line-height: 33rpx;\n text-align: center;\n font-style: normal;\n}\n.my-page .my-top .my-footer .footer-time[data-v-486dcc10] {\n height: 28rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 20rpx;\n color: #999999;\n line-height: 28rpx;\n text-align: center;\n font-style: normal;\n}\n.my-page .my-top .my-footer .footer-tips[data-v-486dcc10] {\n padding-top: 30rpx;\n font-family: PingFangSC, PingFang SC;\n font-weight: 400;\n font-size: 24rpx;\n color: #999999;\n line-height: 33rpx;\n text-align: center;\n font-style: normal;\n}\n", ""]);
// Exports // Exports
module.exports = exports; module.exports = exports;
...@@ -7477,7 +7624,7 @@ if(false) {} ...@@ -7477,7 +7624,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX 2.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10); var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX 2.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false); exports = ___CSS_LOADER_API_IMPORT___(false);
// Module // 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\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\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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
// Exports // Exports
module.exports = exports; module.exports = exports;
...@@ -8052,5 +8199,15 @@ exports.push([module.i, ".good-page[data-v-ae80273e] {\n width: 100%;\n height ...@@ -8052,5 +8199,15 @@ exports.push([module.i, ".good-page[data-v-ae80273e] {\n width: 100%;\n height
module.exports = exports; module.exports = exports;
/***/ }),
/* 197 */
/*!****************************************************************************!*\
!*** /Users/jinzhouhang/work/zhanhai/uni-ddh-app/static/img/back-icon.png ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "static/img/back-icon.png";
/***/ }) /***/ })
/******/ ]); /******/ ]);
\ No newline at end of file
/*
* 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