Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
780a01e6
Commit
780a01e6
authored
Apr 20, 2021
by
DESKTOP-B3ACAM7\huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'扫描二维码'
parent
70df6407
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
3 deletions
+93
-3
classify.data.js
src/common/classify.data.js
+4
-1
XhLocation.vue
src/components/createCom/XhLocation.vue
+1
-1
XhScan.vue
src/components/createCom/XhScan.vue
+82
-0
complete.vue
src/pages/order/complete.vue
+6
-1
No files found.
src/common/classify.data.js
View file @
780a01e6
...
@@ -55,7 +55,10 @@ export default [{
...
@@ -55,7 +55,10 @@ export default [{
"cat"
:
10
"cat"
:
10
},
},
{
{
"fieldsTitle"
:
"连衣裙"
,
"fieldsTitle"
:
"充电桩编码"
,
"fieldsName"
:
"scan"
,
"fieldsType"
:
"scan"
,
"required"
:
true
,
"key"
:
"连衣裙"
,
"key"
:
"连衣裙"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/7.jpg"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/7.jpg"
,
"cat"
:
10
"cat"
:
10
...
...
src/components/createCom/XhLocation.vue
View file @
780a01e6
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<
script
>
<
script
>
import
objMixin
from
'./objMixin'
import
objMixin
from
'./objMixin'
export
default
{
export
default
{
name
:
'Xh
Radio
'
,
name
:
'Xh
Location
'
,
components
:
{},
components
:
{},
mixins
:
[
objMixin
],
mixins
:
[
objMixin
],
props
:
{},
props
:
{},
...
...
src/components/createCom/XhScan.vue
0 → 100644
View file @
780a01e6
<
template
>
<view
class=
""
>
<view
class=
"u-flex"
>
请输入:
<u-input
class=
"u-flex-1"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
/>
</view>
<view
class=
"u-flex"
@
click=
"getScan('')"
>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<!--
<view
class=
"list u-flex u-row-between"
>
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1"
>
{{
valueTxt
||
''
}}
</view>
<u-button
type=
"primary"
size=
"mini"
@
click=
"$u.debounce(getLocation,1000)"
>
默认按钮
</u-button>
</view>
-->
</view>
</
template
>
<
script
>
import
objMixin
from
'./objMixin'
export
default
{
name
:
'XhScan'
,
components
:
{},
mixins
:
[
objMixin
],
props
:
{},
filters
:{},
data
()
{
return
{}
},
computed
:
{
valueTxt
()
{
let
str
=
''
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
str
=
'经度:'
+
dataValue
[
0
]
+
','
+
'维度:'
+
dataValue
[
1
]
}
return
str
}
},
watch
:
{},
mounted
()
{},
methods
:
{
getScan
(
type
){
uni
.
scanCode
({
scanType
:
[
'barCode'
],
success
:
function
(
res
)
{
console
.
log
(
'条码类型:'
+
res
.
scanType
);
console
.
log
(
'条码内容:'
+
res
.
result
);
}
});
},
getLocation
()
{
let
self
=
this
const
dataValue
=
this
.
dataValue
||
[]
const
waterInfo
=
this
.
waterInfo
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
self
.
setValue
(
dataValue
)
},
fail
(
err
)
{}
});
},
setValue
(
txt
)
{
this
.
valueChange
(
this
.
dataValue
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.required
{
padding-right
:
10rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
}
</
style
>
src/pages/order/complete.vue
View file @
780a01e6
...
@@ -48,6 +48,9 @@
...
@@ -48,6 +48,9 @@
<xh-location
v-else-if=
"toLowerCase(item.fieldsType)==='location'"
:groupIndex=
"groupIndex"
<xh-location
v-else-if=
"toLowerCase(item.fieldsType)==='location'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-location>
</xh-location>
<xh-scan
v-else-if=
"toLowerCase(item.fieldsType)==='scan'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-scan>
</
template
>
</
template
>
</u-form-item>
</u-form-item>
</view>
</view>
...
@@ -67,6 +70,7 @@
...
@@ -67,6 +70,7 @@
import
XhSelect
from
'@/components/createCom/XhSelect.vue'
import
XhSelect
from
'@/components/createCom/XhSelect.vue'
import
XhFiles
from
'@/components/createCom/XhFiles.vue'
import
XhFiles
from
'@/components/createCom/XhFiles.vue'
import
XhLocation
from
'@/components/createCom/XhLocation.vue'
import
XhLocation
from
'@/components/createCom/XhLocation.vue'
import
XhScan
from
'@/components/createCom/XhScan.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -120,7 +124,8 @@
...
@@ -120,7 +124,8 @@
XhCheckbox
,
XhCheckbox
,
XhSelect
,
XhSelect
,
XhFiles
,
XhFiles
,
XhLocation
XhLocation
,
XhScan
// formCom
// formCom
},
},
created
()
{
created
()
{
...
...
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