Commit 329f56c9 authored by ly's avatar ly

多典花

parent 287b34e0
No preview for this file type
...@@ -14,9 +14,9 @@ export default { ...@@ -14,9 +14,9 @@ export default {
plus.screen.lockOrientation("portrait-primary") plus.screen.lockOrientation("portrait-primary")
// 判断用户是否同意用户隐私协议,如果同意协议再获取设备信息等内容 // 判断用户是否同意用户隐私协议,如果同意协议再获取设备信息等内容
const isAgreePrivacy = plus.runtime.isAgreePrivacy(); // const isAgreePrivacy = plus.runtime.isAgreePrivacy();
// 同意了协议 // 同意了协议
if (isAgreePrivacy) { // if (isAgreePrivacy) {
const common = uni.getStorageSync("m-headers") const common = uni.getStorageSync("m-headers")
if (!common && plus.os.name == 'iOS') { if (!common && plus.os.name == 'iOS') {
loadDevice(); loadDevice();
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
loadLocation(); loadLocation();
loadUuid() loadUuid()
} }
} // }
// 当前版本号 // 当前版本号
......
...@@ -7,7 +7,7 @@ const BASE = { ...@@ -7,7 +7,7 @@ const BASE = {
development: { development: {
common: "http://portal.cloudsmake.cn", common: "http://portal.cloudsmake.cn",
event: 'http://118.31.124.88:21111', event: 'http://118.31.124.88:21111',
h5: 'http://192.168.0.23:8080/index.html#/loan' h5: 'http://192.168.0.23:8080/index.html#/'
}, },
stest: { stest: {
common: "http://portal.cloudsmake.cn", common: "http://portal.cloudsmake.cn",
...@@ -38,7 +38,7 @@ let env = process.env.VUE_APP_BASE_NODE_ENV ...@@ -38,7 +38,7 @@ let env = process.env.VUE_APP_BASE_NODE_ENV
*/ */
// #ifdef APP-PLUS // #ifdef APP-PLUS
env = "stest"; env = "development";
// #endif // #endif
const api = { const api = {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"targetSdkVersion" : 30, "targetSdkVersion" : 28,
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"permissionExternalStorage" : { "permissionExternalStorage" : {
"request" : "none", "request" : "none",
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
methods: { methods: {
/** 埋点 */ /** 埋点 */
buryingPoint(des, val) { buryingPoint(des, val) {
const mobile = uni.getStorageSync('d-mobile') const mobile = uni.getStorageSync('l-mobile')
const BaseUrl = api.event const BaseUrl = api.event
try { try {
const data = { const data = {
...@@ -47,10 +47,10 @@ export default { ...@@ -47,10 +47,10 @@ export default {
...data ...data
}, },
success: (res) => { success: (res) => {
console.log(res, '埋点返回') // console.log(res, '埋点返回')
}, },
fail: (err) => { fail: (err) => {
console.log(err, '埋点报错') // console.log(err, '埋点报错')
} }
}) })
......
...@@ -121,7 +121,13 @@ ...@@ -121,7 +121,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/web/contact",
"style": {
"navigationBarTitleText": "通讯录",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/webview/webview", "path": "pages/webview/webview",
"style": { "style": {
...@@ -129,6 +135,13 @@ ...@@ -129,6 +135,13 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path": "pages/websrc/websrc",
"style": {
"navigationBarTitleText": "454566",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/web/web", "path": "pages/web/web",
"style": { "style": {
......
No preview for this file type
...@@ -137,6 +137,8 @@ export default { ...@@ -137,6 +137,8 @@ export default {
this.isFirstShow = uni.getStorageSync('isFirstShow') this.isFirstShow = uni.getStorageSync('isFirstShow')
}, },
async onLoad() { async onLoad() {
// console.log(storage.getUserInfo().mobile,'uuuuuu')
await this.initAjax(); await this.initAjax();
await this.getAppVersion() await this.getAppVersion()
}, },
...@@ -229,10 +231,11 @@ export default { ...@@ -229,10 +231,11 @@ export default {
const self = this const self = this
self.$request('/pawn/index', 'GET').then(res => { self.$request('/pawn/index', 'GET').then(res => {
const { shortcutList, bannerList } = res.result const { shortcutList, bannerList } = res.result
if (shortcutList) { console.log(res,'999')
if (shortcutList && typeof(shortcutList)=='string') {
self.list = JSON.parse(shortcutList) self.list = JSON.parse(shortcutList)
} }
if (bannerList) { if (bannerList && typeof(bannerList)=='string' ) {
self.bannerList = JSON.parse(bannerList) self.bannerList = JSON.parse(bannerList)
} }
}).catch(err => { }).catch(err => {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<text>我已阅读并同意</text> <text>我已阅读并同意</text>
<uni-link class="link" :href="protocolf.protocolUrl">《注册协议》</uni-link> <uni-link class="link" :href="protocolf.protocolUrl">《注册协议》</uni-link>
<text></text> <text></text>
<uni-link class="link" :href="protocolf.protocolUrl">《隐私政策》</uni-link> <uni-link class="link" :href="protocols.protocolUrl">《隐私政策》</uni-link>
</view> </view>
</view> </view>
</view> </view>
...@@ -175,7 +175,7 @@ export default { ...@@ -175,7 +175,7 @@ export default {
uni.setStorageSync('deviceId', deviceId) uni.setStorageSync('deviceId', deviceId)
} }
uni.setStorageSync('token', token) uni.setStorageSync('token', token)
uni.setStorageSync('d-mobile', self.mobile) uni.setStorageSync('l-mobile', self.mobile)
self.loginNocheck() self.loginNocheck()
// 设置 // 设置
......
...@@ -4,7 +4,7 @@ import { nativeCommon } from './nativeCommon' ...@@ -4,7 +4,7 @@ import { nativeCommon } from './nativeCommon'
// 通讯录拒绝后弹框 // 通讯录拒绝后弹框
const onPermissionModal = function () { const onPermissionModal = function () {
uni.showModal({ uni.showModal({
title: '"花花有米"想访问您的通讯录', title: '"多典花"想访问您的通讯录',
content: '通过访问您的通讯录信息,添加联系人,提高授信通过率。', content: '通过访问您的通讯录信息,添加联系人,提高授信通过率。',
cancelText: '取消', cancelText: '取消',
confirmText: '去设置', confirmText: '去设置',
...@@ -92,7 +92,7 @@ export const CheckLocationPermission = function (callback) { ...@@ -92,7 +92,7 @@ export const CheckLocationPermission = function (callback) {
function (err) { function (err) {
console.log(err, '走这里了?') console.log(err, '走这里了?')
uni.showModal({ uni.showModal({
title: '"花花有米"想要访问您的位置信息', title: '"多典花"想要访问您的位置信息',
content: content:
'应用为您提供的服务,要访问您的位置信息,需要您提供权限,请允许。', '应用为您提供的服务,要访问您的位置信息,需要您提供权限,请允许。',
success: function (res) { success: function (res) {
...@@ -130,7 +130,7 @@ export const SelectLocation = async function (callback) { ...@@ -130,7 +130,7 @@ export const SelectLocation = async function (callback) {
console.log('未获得授权') console.log('未获得授权')
} else if (rContacts === -1) { } else if (rContacts === -1) {
uni.showModal({ uni.showModal({
title: '"花花有米"想要访问您的位置信息', title: '"多典花"想要访问您的位置信息',
content: content:
'应用为您提供的服务,要访问您的位置信息,需要您提供权限,请允许。', '应用为您提供的服务,要访问您的位置信息,需要您提供权限,请允许。',
success: function (res) { success: function (res) {
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
subNVue.show('slide-in-bottom', 300, () => { subNVue.show('slide-in-bottom', 300, () => {
// 向子窗体传递参数 // 向子窗体传递参数
uni.$emit('loan-from-popup', { uni.$emit('loan-from-popup', {
appName: '花花有米', appName: '多典花',
mobile: storage.getUserInfo().mobile, mobile: storage.getUserInfo().mobile,
}) })
}) })
......
...@@ -48,7 +48,7 @@ export const loadDeviceInfo = async (lat, lng, address) => { ...@@ -48,7 +48,7 @@ export const loadDeviceInfo = async (lat, lng, address) => {
} = result; } = result;
const deviceInfo = { const deviceInfo = {
deviceId: deviceId, //设备指纹ID deviceId: deviceId, //设备指纹ID
appName: "MMYX", //APP实例 appName: "DDH", //APP实例
appSourceId: "1", appSourceId: "1",
device: osName, // 设备类型 device: osName, // 设备类型
deviceName: platform, // 设备命名 deviceName: platform, // 设备命名
...@@ -132,7 +132,7 @@ export const loadNetwork = () => { ...@@ -132,7 +132,7 @@ export const loadNetwork = () => {
// 网络信息存储 // 网络信息存储
uni.setStorage({ uni.setStorage({
key: "m-network-info", key: "m-network-info",
data: res.networkType, data: JSON.stringify(res),
success: function() { success: function() {
console.log("m-network-info存储成功"); console.log("m-network-info存储成功");
}, },
...@@ -205,7 +205,7 @@ export const loadLocation = () => { ...@@ -205,7 +205,7 @@ export const loadLocation = () => {
// 这里应该判断用户 拒绝之后 才弹框 // 这里应该判断用户 拒绝之后 才弹框
uni.showModal({ uni.showModal({
title: '"花花有米"想要访问您的位置信息', title: '"多典花"想要访问您的位置信息',
content: "您手机系统的定位处于关闭状态,会导致您后续的授信不通过,授信需要访问您的位置信息,需要您提供权限,请开启手机的定位服务。", content: "您手机系统的定位处于关闭状态,会导致您后续的授信不通过,授信需要访问您的位置信息,需要您提供权限,请开启手机的定位服务。",
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
......
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
}, },
async onLoad(option) { async onLoad(option) {
console.log(option,'参数') console.log(option,'参数')
const that = this const that = this
if (option.src) { if (option.src) {
that.src = option.src that.src = option.src
...@@ -185,11 +186,25 @@ export default { ...@@ -185,11 +186,25 @@ export default {
}, },
// 获取用户手机号 // 获取用户手机号
GetUserMobile() { GetUserMobile() {
const self=this
try { try {
this.GetWebView().evalJS(`receiveUserMobile('${storage.getUserInfo().mobile}')`) uni.getStorage({
key: 'l-mobile',
success: function(res) {
console.log(res, '结果')
const mobile = res.data;
self.GetWebView().evalJS("receiveUserMobile('" + mobile + "')")
},
fail: function(err) {
console.log(err, '报错了')
}
})
// const mobileCell = uni.getStorageSync('d-mobile')
// this.GetWebView().evalJS(`receiveUserMobile('${mobileCell}')`)
} catch (err) { } catch (err) {
console.log(err, '什么错') console.log(err, '什么错')
this.toast('获取用户手机号报错') self.toast('获取用户手机号报错')
} }
}, },
// 拨打电话 // 拨打电话
......
<template>
<view class="page-web">
<web-view ref='webview' :webview-styles="webviewStyles" :src="src"></web-view>
</view>
</template>
<script>
export default {
name: "WEB",
data() {
return {
// src:'http://192.168.0.38:8081/index.html#/middle?type=mieye&',
src:null,
webviewStyles: {
progress: {
color: '#FF4050'
}
},
timer:null,
titleVal:'',
urlWeb:'',
typePage:false,
deviceStatus:'',
viewerUrl:'/hybrid/html/web/viewer.html'
}
},
onLoad(options){
const that=this
that.src=decodeURIComponent(options.src)
let pages = getCurrentPages();
let page = pages[pages.length - 1];
let currentWebView = page.$getAppWebview();
},
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>
<style lang="less" scoped>
.page-web {
width: 100vw;
height: 100vh;
web-view {
width: 100%;
height: 100%;
}
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -8,7 +8,7 @@ export function setDevice() { ...@@ -8,7 +8,7 @@ export function setDevice() {
const info = uni.getSystemInfoSync() const info = uni.getSystemInfoSync()
const { appVersion, deviceId, brand, platform, system } = info const { appVersion, deviceId, brand, platform, system } = info
let data = { let data = {
appKey: 'hhym', appKey: 'DDH',
appVersion, // app版本号 appVersion, // app版本号
deviceId, // 设备号 deviceId, // 设备号
deviceBrand: brand, // 品牌名称 deviceBrand: brand, // 品牌名称
......
...@@ -62,19 +62,24 @@ export const initHeaderDevice = function () { ...@@ -62,19 +62,24 @@ export const initHeaderDevice = function () {
const loadUuid = uni.getStorageSync('m-load-udid') const loadUuid = uni.getStorageSync('m-load-udid')
let device = {}; let device = {};
if (deviceInfo) { if (deviceInfo) {
device = Object.assign(device, common, JSON.parse(deviceInfo)) device = Object.assign(device, common, JSON.parse(deviceInfo))
} }
if (networkInfo) { if (networkInfo) {
device = Object.assign(device, common, JSON.parse(networkInfo)) device = Object.assign(device, common, JSON.parse(networkInfo))
} }
if (locationInfo) { if (locationInfo) {
console.log(locationInfo,'locationInfo')
device = Object.assign(device, common, JSON.parse(locationInfo)) device = Object.assign(device, common, JSON.parse(locationInfo))
} }
if (loadUuid) { if (loadUuid) {
console.log(loadUuid,'loadUuid')
device = Object.assign(device, common, JSON.parse(loadUuid)) device = Object.assign(device, common, JSON.parse(loadUuid))
} }
if (deviceInfo && networkInfo && loadUuid && locationInfo) { if (deviceInfo && networkInfo && loadUuid && locationInfo) {
const headerDeviceInfo = { const headerDeviceInfo = {
...JSON.parse(deviceInfo), ...JSON.parse(deviceInfo),
...@@ -95,7 +100,7 @@ export const initHeaderDevice = function () { ...@@ -95,7 +100,7 @@ export const initHeaderDevice = function () {
return headerDeviceInfo return headerDeviceInfo
} }
console.log(device,'device33333')
return device return device
} }
...@@ -55,7 +55,7 @@ export const switchShowTabbar = async () => { ...@@ -55,7 +55,7 @@ export const switchShowTabbar = async () => {
}) })
} else { } else {
try { try {
const { success } = await API.initTabBar() const {success }= await API.initTabBar()
if (success) { if (success) {
uni.setTabBarItem({ uni.setTabBarItem({
index: 1, index: 1,
......
...@@ -7,6 +7,7 @@ const request = async (url, type, data) => { ...@@ -7,6 +7,7 @@ const request = async (url, type, data) => {
const deviceInfo = uni.getStorageSync('m-device-info') const deviceInfo = uni.getStorageSync('m-device-info')
const tokenF = uni.getStorageSync('tokenFinance') const tokenF = uni.getStorageSync('tokenFinance')
let rd = null let rd = null
try{
if (!deviceInfo || tokenF == '' && plus.os.name != 'iOS') { if (!deviceInfo || tokenF == '' && plus.os.name != 'iOS') {
rd = initHeaderInfo() rd = initHeaderInfo()
...@@ -21,7 +22,12 @@ const request = async (url, type, data) => { ...@@ -21,7 +22,12 @@ const request = async (url, type, data) => {
} }
} }
} }
console.log(rd,'错误信息333')
}catch(err){
console.log(err,'congzhelizou')
}
console.log(rd,'设备信息')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const token = uni.getStorageSync('token') const token = uni.getStorageSync('token')
const tokenFinance = uni.getStorageSync('tokenFinance') const tokenFinance = uni.getStorageSync('tokenFinance')
......
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