Commit a6afa57e authored by ly's avatar ly

实名

parent edfb392e
......@@ -27,33 +27,20 @@
this.Go('uni:/pages/login/login')
}else{
uni.setStorageSync('appNo',itemVal)
// if(label=='立即提现'){
uni.navigateTo({
url:`/pages/websrc/websrc?url=${item}`
})
// }else{
// console.log(item,'item')
// // this.Go(item)
// }
const indexs=item.indexOf(":")
if(indexs!==-1){
const schema = item.substring(0, indexs)
if(schema=='uni'){
this.Go(item)
}else{
uni.navigateTo({
url:`/pages/websrc/websrc?url=${item}`
})
}
}
}
},
// 授信提交
// onCredit(){
// const self=this
// const appNO=uni.getStorageSync('appNo')
// const params={
// "appNo": appNO
// }
// // return false
// self.$request('/app/v1/credit','POST',params).then(res => {
// console.log(res,'credit');
// self.toast('授信提交成功,请稍后查看')
// self.$emit("mydemo")
// }).catch(err=>{
// console.log(err,'请求出错')
// })
// },
}
}
}
</script>
......
......@@ -136,9 +136,31 @@
}).catch(err=>{
console.log(err,'请求出错')
})
},
handleCameraUP(type){
const self=this
const sureVal=uni.getStorageSync('authVals')
if(sureVal){
self.chooseShow(type)
}else{
uni.showModal({
title: '提示',
content: '该“实名认证”功能需要获取您的拍照和相册等权限,以便于您完成实名!',
showCancel: false,//没有取消按钮的弹框
confirmText: '确定',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
self.chooseShow(type)
}
}
});
}
},
// 调取图片
handleCameraUP(type){
chooseShow(type){
const self=this
uni.chooseImage({
count: 1, //默认9 original
......@@ -153,7 +175,14 @@
// }else{
// self.getOss(tempFilePaths,type)
// }
self.getOss(tempFilePaths,type)
},
fail: (err) => {
console.log(err,'err')
if(err.errMsg=='chooseImage:fail cancel'){
uni.setStorageSync('authVals','1')
}
}
})
},
......@@ -211,6 +240,7 @@
self.$request('/app/v1/oss','GET',params).then((res)=>{
console.log(res.result,'getOssToken')
const { oss }=res.result
self.uploadOss(oss, fileNames,type)
})
},
......@@ -333,12 +363,9 @@
uni.showToast({
title:authResult.message,
icon:"none",
duration: 2000
duration: 500
})
self.Go('uni:/pages/face/face','redirect')
// uni.redirectTo({
// url:'/pages/face/face'
// })
}
}).catch(err=>{
console.log(err,'请求出错')
......
......@@ -130,9 +130,31 @@
this.desQuest=e.detail.value
},
uploadImg(){
const self=this
const sureVal=uni.getStorageSync('sureVal')
if(sureVal){
self.chooseShow()
}else{
uni.showModal({
title: '提示',
content: '该“鉴定评估”功能需要获取您的照片上传权限,以便于您上传宝贝进行鉴定!',
showCancel: false,//没有取消按钮的弹框
confirmText: '确定',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
self.chooseShow()
}
}
});
}
},
chooseShow(){
const self=this
if(self.newList.length==3){
this.toast('最多上传三张哦')
self.toast('最多上传三张哦')
return false
}
//上传图片
......@@ -159,6 +181,7 @@
self.$request('/pawn/oss','GET',params).then((res)=>{
console.log(res,'getOssToken')
const { oss }=res.result
uni.setStorageSync('sureVal','1')
self.uploadimage(oss,fileNames)
})
},
......
......@@ -113,7 +113,7 @@
},
goPage(item){
// const mobileCall=uni.getStorageSync('mobileCall')
// const newurl='http://192.168.0.23:8080/#/loan'
// const newurl='http://ddhdctest.yyhock.com/#/loan?cellPhone=19957461501'
// this.Go('http://192.168.0.23:8080/#/loanMulti')
// uni.navigateTo({
// url:`/pages/websrc/websrc?url=${newurl}`
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,13 +16,29 @@ export const convertPromise = function (FnName, params = {}) {
})
});
}
export const initHeaderInfo = function (){
const versionNew=uni.getStorageSync('version')
console.log(versionNew,'versionNew')
// 根据当前时间戳生成一个随机整数
var randomNum = new Date().getTime();
const commons={
"appName":"DDH",
"appSourceId":"1",
"token":randomNum,
"device":plus.os.name,
"appVersion":versionNew,
}
return commons
}
// 初始化请求头的device参数信息
export const initHeaderDevice = function () {
const common = {
appName: 'DDH',
appSourceId: "1",
token: "c695fa285b9dc46a", // 设备令牌(device_token) 设备udid
device:'',//设备是安卓还是ios
appVersion:'',//版本号
idfa: "", // IOS设备则为:IDFA 广告标识
imei: "", //安卓设备为:imei
mac: "", // mac
......@@ -34,10 +50,10 @@ export const initHeaderDevice = function () {
totalStorage: "", //存储总空间
availableStorage: "" //可用存储空间
};
console.log(common,'common')
const deviceInfo = uni.getStorageSync('m-device-info')
const networkInfo = uni.getStorageSync('m-network-info')
// const locationInfo = uni.getStorageSync('m-location-info')
const locationInfo = uni.getStorageSync('m-location-info')
const loadUuid = uni.getStorageSync('m-load-udid')
let device = {};
......@@ -49,9 +65,9 @@ export const initHeaderDevice = function () {
device = Object.assign(device, common, JSON.parse(networkInfo))
}
// if (locationInfo) {
// device = Object.assign(device, common, JSON.parse(locationInfo))
// }
if (locationInfo) {
device = Object.assign(device, common, JSON.parse(locationInfo))
}
if(loadUuid){
device = Object.assign(device, common, JSON.parse(loadUuid))
}
......
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