Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uni-app-ddh-shop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
uni-app-ddh-shop
Commits
a6afa57e
Commit
a6afa57e
authored
Sep 12, 2024
by
ly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实名
parent
edfb392e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
44 deletions
+97
-44
index.vue
components/moduleCard/index.vue
+12
-25
auth.vue
pages/auth/auth.vue
+32
-5
category.vue
pages/category/category.vue
+24
-1
index.vue
pages/my/index.vue
+1
-1
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+6
-6
header.js
utils/header.js
+22
-6
No files found.
components/moduleCard/index.vue
View file @
a6afa57e
...
...
@@ -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
>
...
...
pages/auth/auth.vue
View file @
a6afa57e
...
...
@@ -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
:
20
00
duration
:
5
00
})
self
.
Go
(
'uni:/pages/face/face'
,
'redirect'
)
// uni.redirectTo({
// url:'/pages/face/face'
// })
}
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
...
...
pages/category/category.vue
View file @
a6afa57e
...
...
@@ -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
)
})
},
...
...
pages/my/index.vue
View file @
a6afa57e
...
...
@@ -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}`
...
...
unpackage/dist/dev/app-plus/app-service.js
View file @
a6afa57e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
utils/header.js
View file @
a6afa57e
...
...
@@ -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
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment