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
5acc2c5c
Commit
5acc2c5c
authored
Sep 13, 2024
by
ly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础信息
parent
4c60c5ab
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16008 additions
and
5365 deletions
+16008
-5365
.DS_Store
.DS_Store
+0
-0
.DS_Store
components/.DS_Store
+0
-0
data.js
components/workAddress/data.js
+10265
-0
pickerAddress.vue
components/workAddress/pickerAddress.vue
+117
-0
baseInfo.vue
pages/baseInfo/baseInfo.vue
+4
-2
pay.vue
pages/pay/pay.vue
+6
-0
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+5182
-5078
app-view.js
unpackage/dist/dev/app-plus/app-view.js
+434
-285
No files found.
.DS_Store
View file @
5acc2c5c
No preview for this file type
components/.DS_Store
View file @
5acc2c5c
No preview for this file type
components/workAddress/data.js
0 → 100644
View file @
5acc2c5c
This diff is collapsed.
Click to expand it.
components/workAddress/pickerAddress.vue
0 → 100644
View file @
5acc2c5c
<
template
>
<picker
@
change=
"bindPickerChange"
@
columnchange=
"columnchange"
:range=
"array"
range-key=
"name"
:value=
"value"
mode=
"multiSelector"
>
<slot></slot>
</picker>
</
template
>
<
script
>
import
AllAddress
from
'./data.js'
let
selectVal
=
[
''
,
''
,
''
]
let
selectCode
=
[
''
,
''
,
''
]
export
default
{
data
()
{
return
{
value
:
[
0
,
0
,
0
],
array
:
[],
index
:
0
}
},
created
()
{
this
.
initSelect
()
},
methods
:{
// 初始化地址选项
initSelect
()
{
this
.
updateSourceDate
()
// 更新源数据
.
updateAddressDate
()
// 更新结果数据
.
updateAddressCode
()
// 更新结果数据
.
$forceUpdate
()
// 触发双向绑定
},
// 地址控件改变控件
columnchange
(
d
)
{
this
.
updateSelectIndex
(
d
.
detail
.
column
,
d
.
detail
.
value
)
// 更新选择索引
.
updateSourceDate
()
// 更新源数据
.
updateAddressDate
()
// 更新结果数据
.
updateAddressCode
()
// 更新结果数据
.
$forceUpdate
()
// 触发双向绑定
},
/**
* 更新源数据
* */
updateSourceDate
()
{
this
.
array
=
[]
this
.
array
[
0
]
=
AllAddress
.
map
(
obj
=>
{
return
{
name
:
obj
.
provinceName
,
cityCode
:
obj
.
provinceCode
}
})
this
.
array
[
1
]
=
AllAddress
[
this
.
value
[
0
]].
city
.
map
(
obj
=>
{
return
{
name
:
obj
.
cityName
,
cityCode
:
obj
.
cityCode
}
})
this
.
array
[
2
]
=
AllAddress
[
this
.
value
[
0
]].
city
[
this
.
value
[
1
]].
county
.
map
(
obj
=>
{
return
{
name
:
obj
.
countyName
,
cityCode
:
obj
.
countyCode
}
})
return
this
},
/**
* 更新索引
* */
updateSelectIndex
(
column
,
value
){
let
arr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
value
))
arr
[
column
]
=
value
if
(
column
===
0
)
{
arr
[
1
]
=
0
arr
[
2
]
=
0
}
if
(
column
===
1
)
{
arr
[
2
]
=
0
}
this
.
value
=
arr
return
this
},
/**
* 更新结果数据
* */
updateAddressDate
()
{
selectVal
[
0
]
=
this
.
array
[
0
][
this
.
value
[
0
]].
name
selectVal
[
1
]
=
this
.
array
[
1
][
this
.
value
[
1
]].
name
selectVal
[
2
]
=
this
.
array
[
2
][
this
.
value
[
2
]].
name
return
this
},
updateAddressCode
()
{
selectCode
[
0
]
=
this
.
array
[
0
][
this
.
value
[
0
]].
cityCode
selectCode
[
1
]
=
this
.
array
[
1
][
this
.
value
[
1
]].
cityCode
selectCode
[
2
]
=
this
.
array
[
2
][
this
.
value
[
2
]].
cityCode
return
this
},
/**
* 点击确定
* */
bindPickerChange
(
e
)
{
console
.
log
(
e
.
target
.
value
,
'change'
)
this
.
$emit
(
'change'
,
{
index
:
selectCode
,
data
:
selectVal
})
return
this
}
}
}
</
script
>
<
style
>
</
style
>
pages/baseInfo/baseInfo.vue
View file @
5acc2c5c
...
...
@@ -109,7 +109,7 @@
<view
class=
'line-main'
>
<label
class=
'main-lab'
>
工作城市
</label>
<view
class=
'main-right'
>
<
pickerAddress
class=
'line-right-picker'
@
change=
"changeWork"
>
{{
workCity
}}
</picker
Address>
<
workAddress
class=
'line-right-picker'
@
change=
"changeWork"
>
{{
workCity
}}
</work
Address>
<i
class=
'r-icon'
></i>
</view>
...
...
@@ -260,12 +260,14 @@
//1、使用插件
import
{
CheckContactPermission
,
SelectContact
}
from
'../../utils/authPerission'
import
pickerAddress
from
'../../components/pickerAddress/pickerAddress.vue'
import
workAddress
from
'../../components/workAddress/pickerAddress.vue'
import
{
nativeCommon
}
from
'../../utils/nativeCommon.js'
import
idCardNumberVerify
from
"../../utils/idCardNumber.js"
export
default
{
//2、使用插件
components
:{
pickerAddress
pickerAddress
,
workAddress
},
data
()
{
return
{
...
...
pages/pay/pay.vue
View file @
5acc2c5c
...
...
@@ -192,6 +192,12 @@
duration
:
2000
})
self
.
Go
(
'uni:/pages/payResult/payResult'
,
'redirect'
)
}
else
{
uni
.
showToast
({
title
:
repay
.
remark
,
icon
:
"none"
,
duration
:
2000
})
}
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
...
...
unpackage/dist/dev/app-plus/app-service.js
View file @
5acc2c5c
This diff is collapsed.
Click to expand it.
unpackage/dist/dev/app-plus/app-view.js
View file @
5acc2c5c
This diff is collapsed.
Click to expand it.
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