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
8cb99bc6
Commit
8cb99bc6
authored
Apr 26, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
02cb75aa
4ab5e0b9
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
344 additions
and
1194 deletions
+344
-1194
App.vue
src/App.vue
+1
-0
classify.data.js
src/common/classify.data.js
+35
-1014
http.interceptor.js
src/common/http.interceptor.js
+8
-8
XhCheckbox.vue
src/components/createCom/XhCheckbox.vue
+16
-10
XhFiles.vue
src/components/createCom/XhFiles.vue
+82
-24
XhInput.vue
src/components/createCom/XhInput.vue
+8
-4
XhLocation.vue
src/components/createCom/XhLocation.vue
+31
-8
XhMultiInput.vue
src/components/createCom/XhMultiInput.vue
+5
-3
XhRadio.vue
src/components/createCom/XhRadio.vue
+18
-9
XhScan.vue
src/components/createCom/XhScan.vue
+9
-7
preview.vue
src/components/photo/preview.vue
+10
-10
setting.vue
src/components/photo/setting.vue
+1
-1
index.vue
src/components/take/index.vue
+15
-6
pages.json
src/pages.json
+3
-1
index.vue
src/pages/index/index.vue
+4
-3
index.vue
src/pages/mine/index.vue
+16
-3
complete.vue
src/pages/order/complete.vue
+54
-25
index.vue
src/pages/order/index.vue
+28
-58
No files found.
src/App.vue
View file @
8cb99bc6
...
@@ -68,6 +68,7 @@ export default {
...
@@ -68,6 +68,7 @@ export default {
currentItem
:
null
,
// 选择的某一项
currentItem
:
null
,
// 选择的某一项
setting
:
null
,
//自定义设置
setting
:
null
,
//自定义设置
waterSetting
:
null
,
// 水印设置
waterSetting
:
null
,
// 水印设置
allImages
:
[],
tempPath
:
{
tempPath
:
{
origin
:
''
,
// 缓存拍照图片
origin
:
''
,
// 缓存拍照图片
mixWater
:
''
// 缓存水印拍照图片
mixWater
:
''
// 缓存水印拍照图片
...
...
src/common/classify.data.js
View file @
8cb99bc6
This diff is collapsed.
Click to expand it.
src/common/http.interceptor.js
View file @
8cb99bc6
...
@@ -58,14 +58,14 @@ const install = (Vue, vm) => {
...
@@ -58,14 +58,14 @@ const install = (Vue, vm) => {
return
config
;
return
config
;
}
}
function
getCode
(
res
){
function
getCode
(
res
){
const
result
=
res
.
data
||
res
//
const result = res.data || res
let
code
//
let code
if
(
result
.
hasOwnProperty
(
'statusCode'
)){
//
if(result.hasOwnProperty('statusCode')){
code
=
res
.
statusCode
//
code = res.statusCode
}
else
if
(
result
.
hasOwnProperty
(
'code'
)){
//
}else if(result.hasOwnProperty('code')){
code
=
result
.
code
//
code = result.code
}
//
}
return
code
return
res
.
statusCode
||
res
.
code
||
res
.
data
.
statusCode
||
res
.
data
.
code
}
}
function
getMsg
(
res
){
function
getMsg
(
res
){
res
=
res
.
data
||
res
res
=
res
.
data
||
res
...
...
src/components/createCom/XhCheckbox.vue
View file @
8cb99bc6
...
@@ -51,16 +51,22 @@
...
@@ -51,16 +51,22 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list
{
.list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
.txt
{
.txt
{
color
:
#666
;
color
:
#666
;
padding
:
10rpx
;
padding
:
10rpx
30rpx
;
margin
:
5rpx
;
&
.active
{
background
:
#F4F5F7
;
background-color
:
red
;
border-radius
:
10rpx
;
color
:
#fff
;
display
:
flex
;
}
flex-wrap
:
wrap
;
line-height
:
50rpx
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhFiles.vue
View file @
8cb99bc6
<!-- ******************* 文件上传 ******************* -->
<!-- ******************* 文件上传 ******************* -->
<
template
>
<
template
>
<view
class=
"file-box"
>
<view
class=
"file-box"
>
<
view
class=
"u-flex"
@
click=
"selectUpload
"
>
<
!--
<view
class=
"u-flex
"
>
<view
class=
"txt u-flex-1"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"txt u-flex-1"
>
{{
item
.
fieldsTitle
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
-->
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<u-image
class=
"pic"
v-for=
"(item,index) in imgList"
width=
"170rpx"
height=
"170"
:src=
"item.path"
:key=
"index"
></u-image>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<!--
<u-image
class=
"pic"
v-for=
"item in 6"
width=
"170rpx"
height=
"170"
src=
"'https://cdn.uviewui.com/uview/example/fade.jpg"
></u-image>
-->
<u-image
class=
"pic"
width=
"170"
height=
"170"
:src=
"item.path"
@
click
.
stop=
"prviewImage(item.path,index)"
></u-image>
</view>
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
<u-popup
v-model=
"maskShow"
mode=
"center"
width=
"500"
>
<view
class=
"icon-del"
></view>
<view
class=
"upload-box u-p-30"
>
<view
class=
"icon-del rotate"
></view>
<view
class=
"title"
>
请选择图片
</view>
</view>
<view
class=
"u-flex u-row-between"
>
</view>
<view
class=
"upload-item u-text-center"
@
click=
"uploadFile('photo')"
>
<view
class=
"img-list"
@
click=
"choose"
>
<u-image
class=
"pic"
width=
"170rpx"
height=
"170"
src=
"'https://cdn.uviewui.com/uview/example/fade.jpg"
></u-image>
<u-image
class=
"pic"
width=
"170rpx"
height=
"170"
@
click=
"selectUpload"
src=
"https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"
></u-image>
相册
</view>
<view
class=
"upload-item u-text-center"
@
click=
"uploadFile"
>
<u-image
class=
"pic"
width=
"170rpx"
height=
"170"
src=
"'https://cdn.uviewui.com/uview/example/fade.jpg"
></u-image>
拍摄
</view>
</view>
</view>
</view>
</u-popup>
<!--
<u-image
class=
"pic"
v-for=
"item in 6"
width=
"170rpx"
height=
"170"
src=
"'https://cdn.uviewui.com/uview/example/fade.jpg"
></u-image>
-->
</view>
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
</view>
</view>
</
template
>
</
template
>
...
@@ -38,7 +33,15 @@
...
@@ -38,7 +33,15 @@
filters
:{},
filters
:{},
data
()
{
data
()
{
return
{
return
{
maskShow
:
false
maskShow
:
false
,
list
:
[
{
text
:
'相册'
},
{
text
:
'拍照'
}
]
}
}
},
},
computed
:
{
computed
:
{
...
@@ -52,6 +55,13 @@
...
@@ -52,6 +55,13 @@
selectUpload
(){
selectUpload
(){
// 弹窗展示
// 弹窗展示
this
.
maskShow
=
true
this
.
maskShow
=
true
},
uploadSelect
(
index
)
{
if
(
index
===
0
)
{
this
.
uploadFile
(
'photo'
)
}
else
{
this
.
uploadFile
()
}
},
},
async
uploadFile
(
type
){
async
uploadFile
(
type
){
const
self
=
this
const
self
=
this
...
@@ -59,7 +69,9 @@
...
@@ -59,7 +69,9 @@
// 直接打开相册
// 直接打开相册
let
config
=
{
let
config
=
{
options
:{
options
:{
sourceType
:[
'album'
],
//['album', 'camera']
sourceType
:[
'album'
],
//['album', 'camera']
count
:
5
,
sizeType
:
[
'compressed'
]
}
}
}
}
await
this
.
chooseImage
(
'qiniu'
,
config
)
await
this
.
chooseImage
(
'qiniu'
,
config
)
...
@@ -73,8 +85,18 @@
...
@@ -73,8 +85,18 @@
const
dataValue
=
[]
const
dataValue
=
[]
this
.
imgList
.
map
(
item
=>
{
this
.
imgList
.
map
(
item
=>
{
dataValue
.
push
(
item
.
key
)
dataValue
.
push
(
item
.
key
)
})
})
console
.
log
(
this
.
imgList
)
this
.
valueChange
(
dataValue
)
this
.
valueChange
(
dataValue
)
},
prviewImage
(
url
,
index
)
{
uni
.
previewImage
({
urls
:
[
url
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
}
}
}
}
}
}
...
@@ -86,7 +108,43 @@
...
@@ -86,7 +108,43 @@
&
:nth-child
(
3n
)
{
&
:nth-child
(
3n
)
{
margin-right
:
0
;
margin-right
:
0
;
}
}
}
}
.img-list
{
position
:
relative
;
margin
:
8rpx
;
border
:
1px
solid
#eee
;
width
:
170rpx
;
height
:
170rpx
;
.icon-del-box
{
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del
{
width
:
30rpx
;
height
:
4rpx
;
background-color
:
#fff
;
border-radius
:
2px
;
}
.rotate
{
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
}
// .list {
// .list {
// display: flex;
// display: flex;
...
...
src/components/createCom/XhInput.vue
View file @
8cb99bc6
<!-- ******************* 输入框 ******************* -->
<!-- ******************* 输入框 ******************* -->
<
template
>
<
template
>
<view>
<view>
<u-input
v-model=
"dataValue"
@
input=
"valueChange"
:type=
"type
"
/>
<u-input
:type=
"type"
class=
"input-item"
v-model=
"dataValue"
@
input=
"valueChange"
:border=
"true"
placeholder=
"请输入
"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -16,8 +16,9 @@
...
@@ -16,8 +16,9 @@
return
{}
return
{}
},
},
computed
:
{
computed
:
{
type
()
{
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
console
.
log
(
this
.
item
)
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
||
this
.
item
.
fieldsType
==
'textarea'
)
{
return
this
.
item
.
fieldsType
return
this
.
item
.
fieldsType
}
else
{
}
else
{
return
'text'
return
'text'
...
@@ -30,5 +31,8 @@
...
@@ -30,5 +31,8 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
.input-item
{
background
:
#F4F5F7
;
}
</
style
>
</
style
>
src/components/createCom/XhLocation.vue
View file @
8cb99bc6
<!-- ******************* 定位 ******************* -->
<!-- ******************* 定位 ******************* -->
<
template
>
<
template
>
<view
class=
"list u-flex u-row-between"
>
<view>
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
<view
class=
"list u-flex u-row-between"
>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-flex-1"
>
{{
valueTxt
||
''
}}
</view>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<u-button
type=
"primary"
size=
"mini"
@
click=
"$u.debounce(getLocation,1000)"
>
默认按钮
</u-button>
<!--
<u-button
type=
"primary"
size=
"mini"
@
click=
"$u.debounce(getLocation,1000)"
>
自动定位
</u-button>
-->
<view
class=
"u-flex-1 location-name"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
自动定位
</view>
</view>
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -23,14 +28,19 @@
...
@@ -23,14 +28,19 @@
valueTxt
()
{
valueTxt
()
{
let
str
=
''
let
str
=
''
const
dataValue
=
this
.
dataValue
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
if
(
dataValue
&&
dataValue
.
length
>
1
){
str
=
'经度:'
+
dataValue
[
0
]
+
','
+
'维度:'
+
dataValue
[
1
]
str
=
'经度:'
+
dataValue
[
0
]
+
','
+
'维度:'
+
dataValue
[
1
]
}
}
return
str
return
str
},
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
}
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
created
()
{
this
.
getLocation
()
},
methods
:
{
methods
:
{
getLocation
()
{
getLocation
()
{
let
self
=
this
let
self
=
this
...
@@ -59,5 +69,18 @@
...
@@ -59,5 +69,18 @@
font-size
:
28rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F7
;
padding
:
10rpx
;
}
}
</
style
>
</
style
>
src/components/createCom/XhMultiInput.vue
View file @
8cb99bc6
<!-- ******************* 多个输入框 ******************* -->
<!-- ******************* 多个输入框 ******************* -->
<
template
>
<
template
>
<view
class=
"u-flex u-flex-wrap"
>
<view
class=
"u-flex u-flex-wrap"
>
<u-input
class=
"input-item"
v-for=
"(item,index) in inputOptions"
v-model=
"item.value"
@
input=
"val=>
{getValue(item)}" type="text" :key="index"/>
<u-input
class=
"input-item"
v-for=
"(item,index) in inputOptions"
v-model=
"item.value"
@
input=
"val=>
{getValue(item)}" type="text" :key="index"
:border="true" :placeholder="item.placeholder"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -40,8 +40,10 @@
...
@@ -40,8 +40,10 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
.input-item
{
.input-item
{
width
:
33.3%
;
width
:
31%
;
margin
:
5
rpx
;
background
:
#F4F5F7
;
}
}
</
style
>
</
style
>
src/components/createCom/XhRadio.vue
View file @
8cb99bc6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
return
{}
return
{}
},
},
computed
:
{
computed
:
{
settings
(){
settings
(){
return
this
.
item
.
settings
||
[]
return
this
.
item
.
settings
||
[]
}
}
},
},
...
@@ -33,14 +33,23 @@
...
@@ -33,14 +33,23 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list
{
.list
{
display
:
flex
;
display
:
flex
;
.txt
{
flex-wrap
:
wrap
;
color
:
#666
;
.txt
{
padding
:
10rpx
;
color
:
#666
;
&
.active
{
padding
:
10rpx
30rpx
;
background-color
:
red
;
margin
:
5rpx
;
color
:
#fff
;
background
:
#F4F5F7
;
}
border-radius
:
10rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
text-align
:
center
;
max-width
:
48%
;
&
.active
{
background-color
:
#2272FF
;
color
:
#fff
;
}
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhScan.vue
View file @
8cb99bc6
<!-- ******************* 扫码 ******************* -->
<!-- ******************* 扫码 ******************* -->
<
template
>
<
template
>
<view
class=
""
>
<view
class=
""
>
<view
class=
"u-flex"
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
请输入:
<u-input
class=
"u-flex-1"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
/>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"u-flex"
>
<view
class=
"txt u-flex-1"
>
扫描二维码(仅挚达充电桩可扫描)
</view>
<u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
/>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -62,5 +61,8 @@
...
@@ -62,5 +61,8 @@
font-size
:
28rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
.input-item
{
background
:
#F4F5F7
;
}
}
</
style
>
</
style
>
src/components/photo/preview.vue
View file @
8cb99bc6
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
fileMaps
:
[],
fileMaps
:
[],
keys
:
[],
keys
:
[],
token
:
''
,
token
:
''
,
product
:
''
,
product
:
''
,
allImages
:
[]
}
}
},
},
created
(
e
)
{
created
(
e
)
{
...
@@ -37,10 +38,10 @@
...
@@ -37,10 +38,10 @@
console
.
log
(
getApp
().
globalData
.
photo
.
currentItem
)
console
.
log
(
getApp
().
globalData
.
photo
.
currentItem
)
const
product
=
app
.
globalData
.
photo
.
product
const
product
=
app
.
globalData
.
photo
.
product
this
.
product
=
`?brandId=
${
product
.
brandId
}
&brand=
${
product
.
brandName
}
&classifyId=
${
product
.
classifyId
}
&systemId=
${
product
.
systemId
}
`
this
.
product
=
`?brandId=
${
product
.
brandId
}
&brand=
${
product
.
brandName
}
&classifyId=
${
product
.
classifyId
}
&systemId=
${
product
.
systemId
}
`
//
if(app.globalData.photo.currentItem) {
if
(
app
.
globalData
.
photo
.
currentItem
)
{
//
// 获取规格Id
// 获取规格Id
//
this.standardId = app.globalData.photo.currentItem._id
this
.
standardId
=
app
.
globalData
.
photo
.
currentItem
.
_id
//
}
}
getApp
().
trackPage
(
'照片预览页'
)
getApp
().
trackPage
(
'照片预览页'
)
const
globalTempPath
=
getApp
().
globalData
.
photo
.
tempPath
const
globalTempPath
=
getApp
().
globalData
.
photo
.
tempPath
...
@@ -50,7 +51,6 @@
...
@@ -50,7 +51,6 @@
// if(e.standardId) {
// if(e.standardId) {
// this.standardId = e.standardId
// this.standardId = e.standardId
// }
// }
console
.
log
(
this
.
files
)
this
.
token
=
getApp
().
globalData
.
token
this
.
token
=
getApp
().
globalData
.
token
},
},
methods
:
{
methods
:
{
...
@@ -73,7 +73,8 @@
...
@@ -73,7 +73,8 @@
title
:
'已将照片原图保存到本地相册'
title
:
'已将照片原图保存到本地相册'
})
})
}
}
}
}
photo
.
allImages
.
unshift
(
photo
.
tempPath
.
mixWater
)
if
(
photo
.
currentItem
){
if
(
photo
.
currentItem
){
photo
.
currentItem
.
imageList
.
unshift
(
photo
.
tempPath
.
mixWater
)
photo
.
currentItem
.
imageList
.
unshift
(
photo
.
tempPath
.
mixWater
)
}
}
...
@@ -137,9 +138,8 @@
...
@@ -137,9 +138,8 @@
self
.
saveTempToLocal
()
self
.
saveTempToLocal
()
self
.
confirmUpload
(
true
)
self
.
confirmUpload
(
true
)
},
},
submitFile
()
{
submitFile
()
{
let
self
=
this
let
self
=
this
if
(
self
.
keys
.
length
)
{
if
(
self
.
keys
.
length
)
{
for
(
let
s
of
self
.
keys
)
{
for
(
let
s
of
self
.
keys
)
{
self
.
$u
.
api
.
saveImage
({
self
.
$u
.
api
.
saveImage
({
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
console
.
log
(
res
,
"云服务保存图片"
);
console
.
log
(
res
,
"云服务保存图片"
);
if
(
res
.
result
.
code
)
{
if
(
res
.
result
.
code
)
{
// TODO 参数是否要来回传递
// TODO 参数是否要来回传递
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
uni
.
hideLoading
()
uni
.
hideLoading
()
// 当前项的图片显示
// 当前项的图片显示
...
...
src/components/photo/setting.vue
View file @
8cb99bc6
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
getApp
().
trackPage
(
'水印设置页'
)
getApp
().
trackPage
(
'水印设置页'
)
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
this
.
icon_close_new
=
globalData
.
icon_close_new
this
.
icon_close_new
=
globalData
.
icon_close_new
this
.
systemId
=
globalData
.
photo
.
product
.
systemId
this
.
systemId
=
globalData
.
photo
.
currentItem
.
systemId
this
.
getItemList
()
this
.
getItemList
()
},
},
methods
:
{
methods
:
{
...
...
src/components/take/index.vue
View file @
8cb99bc6
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<photo-preview
v-if=
"showType === 2"
@
changeType=
"changeType"
@
finish=
"
goBack
"
/>
<photo-preview
v-if=
"showType === 2"
@
changeType=
"changeType"
@
finish=
"
finish
"
/>
<photo-setting
v-if=
"showType === 3"
@
changeType=
"changeType"
/>
<photo-setting
v-if=
"showType === 3"
@
changeType=
"changeType"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -57,16 +57,20 @@
...
@@ -57,16 +57,20 @@
import
setting
from
'@/components/photo/setting.vue'
import
setting
from
'@/components/photo/setting.vue'
export
default
{
export
default
{
props
:
{
props
:
{
currentItem
:
{
//
拍照要求,示意图,system_id, standardId
currentItem
:
{
//
对应的规范item
type
:
Object
,
type
:
Object
,
default
()
{
default
()
{
return
{
return
{
images
:
[
_id
:
''
,
// 规格ID
system_id
:
''
,
// 系统ID
brand_id
:
''
,
// 品牌ID
classify_id
:
''
,
// 分类ID
images
:
[
// 拍照要求示意图
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
'https://qn-static.banshouhui.com/live_mark.png'
],
],
main_point
:
[]
main_point
:
[]
// 要点
}
}
}
}
}
}
...
@@ -109,7 +113,7 @@
...
@@ -109,7 +113,7 @@
shadowInitShow
:
true
,
// 第一次进入页面需显示弹窗
shadowInitShow
:
true
,
// 第一次进入页面需显示弹窗
}
}
},
},
created
(
e
)
{
created
(
e
)
{
const
photo
=
getApp
().
globalData
.
photo
const
photo
=
getApp
().
globalData
.
photo
getApp
().
trackPage
(
'拍照页'
)
getApp
().
trackPage
(
'拍照页'
)
// this.ctx = uni.createCameraContext();
// this.ctx = uni.createCameraContext();
...
@@ -118,7 +122,7 @@
...
@@ -118,7 +122,7 @@
this
.
getMarkPath
()
this
.
getMarkPath
()
this
.
initData
()
this
.
initData
()
//this.currentItem = photo
.currentItem
photo
.
currentItem
=
this
.
currentItem
},
},
computed
:
{
computed
:
{
titleTxt
()
{
titleTxt
()
{
...
@@ -178,6 +182,11 @@
...
@@ -178,6 +182,11 @@
goBack
()
{
goBack
()
{
uni
.
showTabBar
()
uni
.
showTabBar
()
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
finish
()
{
uni
.
showTabBar
()
const
photo
=
getApp
().
globalData
.
photo
this
.
$emit
(
'close'
,
photo
.
allImages
)
},
},
changeType
(
type
)
{
changeType
(
type
)
{
this
.
showType
=
type
this
.
showType
=
type
...
...
src/pages.json
View file @
8cb99bc6
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
{
{
"path"
:
"pages/order/complete"
,
"path"
:
"pages/order/complete"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"订单-完工配置"
"navigationBarTitleText"
:
"订单-完工配置"
,
"navigationBarBackgroundColor"
:
"#2272FF"
,
"navigationBarTextStyle"
:
"white"
}
}
},{
},{
"path"
:
"pages/order/feedback"
,
"path"
:
"pages/order/feedback"
,
...
...
src/pages/index/index.vue
View file @
8cb99bc6
...
@@ -162,7 +162,9 @@
...
@@ -162,7 +162,9 @@
}
}
};
};
await
app
.
getBaseInfo
(
self
,
callBack
);
await
app
.
getBaseInfo
(
self
,
callBack
);
this
.
orderList
=
[]
this
.
messageList
=
[]
// 加载消息列表
// 加载消息列表
self
.
loadMessageList
();
self
.
loadMessageList
();
self
.
loadOrderList
();
self
.
loadOrderList
();
...
@@ -184,7 +186,6 @@
...
@@ -184,7 +186,6 @@
},
},
loadOrderList
()
{
loadOrderList
()
{
console
.
log
(
'-----------准备加载推荐列表-----------'
)
console
.
log
(
'-----------准备加载推荐列表-----------'
)
return
let
self
=
this
;
let
self
=
this
;
// 加载订单列表
// 加载订单列表
self
.
search
.
token
=
self
.
vuex_token
;
self
.
search
.
token
=
self
.
vuex_token
;
...
@@ -192,7 +193,7 @@
...
@@ -192,7 +193,7 @@
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
self
.
orderList
.
push
(
).
apply
(
res
.
data
);
self
.
orderList
.
push
(
...
res
.
data
);
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
...
...
src/pages/mine/index.vue
View file @
8cb99bc6
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</u-cell-group>
</u-cell-group>
</view>
</view>
</view>
</view>
<take-photo
type=
"test"
v-if=
"takeStatus"
@
close=
"closeTake"
></take-photo>
<take-photo
type=
"test"
v-if=
"takeStatus"
:currentItem=
"testData"
@
close=
"closeTake"
></take-photo>
</view>
</view>
</
template
>
</
template
>
...
@@ -45,7 +45,19 @@
...
@@ -45,7 +45,19 @@
return
{
return
{
pic
:
'https://uviewui.com/common/logo.png'
,
pic
:
'https://uviewui.com/common/logo.png'
,
show
:
true
,
show
:
true
,
takeStatus
:
false
takeStatus
:
false
,
testData
:
{
_id
:
'1'
,
// 规格ID
system_id
:
'2'
,
// 系统ID
brand_id
:
'3'
,
// 品牌ID
classify_id
:
'4'
,
// 分类ID
images
:
[
// 拍照要求示意图
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
,
'https://qn-static.banshouhui.com/live_mark.png'
],
main_point
:
[]
// 要点
}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -68,7 +80,8 @@
...
@@ -68,7 +80,8 @@
uni
.
hideTabBar
()
uni
.
hideTabBar
()
this
.
takeStatus
=
true
this
.
takeStatus
=
true
},
},
closeTake
()
{
closeTake
(
img
)
{
console
.
log
(
img
)
this
.
takeStatus
=
false
this
.
takeStatus
=
false
}
}
}
}
...
...
src/pages/order/complete.vue
View file @
8cb99bc6
<
template
>
<
template
>
<view
class=
"u-wrap"
>
<view
class=
"u-wrap"
>
<view
class=
"u-search-box"
>
<u-tabs-swiper
ref=
"tabs"
:current=
"tabIndex"
:list=
"list"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"120"
></u-tabs-swiper>
<view
class=
"u-search-inner"
>
<u-icon
name=
"search"
color=
"#909399"
:size=
"28"
></u-icon>
<text
class=
"u-search-text"
>
搜索
</text>
</view>
</view>
<view
class=
"u-menu-wrap"
>
<view
class=
"u-menu-wrap"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId"
>
:scroll-into-view=
"itemId"
>
...
@@ -23,9 +18,10 @@
...
@@ -23,9 +18,10 @@
<view
class=
"title"
>
{{
groupItem
.
groupName
}}
</view>
<view
class=
"title"
>
{{
groupItem
.
groupName
}}
</view>
<view
class=
"class-bd"
>
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.item"
:key=
"itemIndex"
<u-form-item
v-for=
"(item,itemIndex) in groupItem.item"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
>
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
>
<view
class=
"label"
v-if=
"item.fieldsType!=='location'"
>
<view
class=
"label"
v-if=
"item.fieldsType!=='location'"
>
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
<!--
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
-->
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
{{
item
.
fieldsTitle
}}
</view>
</view>
<template
v-if=
"item.fieldsType"
>
<template
v-if=
"item.fieldsType"
>
...
@@ -95,7 +91,19 @@
...
@@ -95,7 +91,19 @@
// import XhRadio from '@/components/createCom/XhRadio.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[
{
name
:
'基础信息'
},
{
name
:
'勘察信息'
},
{
name
:
'安装信息'
}
],
tabIndex
:
0
,
scrollTop
:
0
,
//tab标题的滚动条位置
scrollTop
:
0
,
//tab标题的滚动条位置
oldScrollTop
:
0
,
oldScrollTop
:
0
,
current
:
0
,
// 预设当前项的值
current
:
0
,
// 预设当前项的值
...
@@ -163,7 +171,12 @@
...
@@ -163,7 +171,12 @@
this
.
getMenuItemTop
()
this
.
getMenuItemTop
()
},
},
updated
()
{
updated
()
{
console
.
log
(
this
.
form
.
name
,
'form.name'
)
//console.log(this.form.name, 'form.name')
},
computed
:
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
},
},
methods
:
{
methods
:
{
// 字段的值更新
// 字段的值更新
...
@@ -193,7 +206,7 @@
...
@@ -193,7 +206,7 @@
// 将fieldType类型统一转换为公共组件判定类型
// 将fieldType类型统一转换为公共组件判定类型
let
formType
=
''
let
formType
=
''
type
=
type
.
toLocaleLowerCase
()
type
=
type
.
toLocaleLowerCase
()
console
.
log
(
type
,
'type'
)
//
console.log(type,'type')
switch
(
type
)
{
switch
(
type
)
{
case
'text'
:
case
'text'
:
case
'password'
:
case
'password'
:
...
@@ -206,6 +219,9 @@
...
@@ -206,6 +219,9 @@
break
;
break
;
case
'select'
:
case
'select'
:
formType
=
'select'
formType
=
'select'
break
case
'radio'
:
formType
=
'radio'
break
break
case
'checkbox'
:
case
'checkbox'
:
formType
=
'checkbox'
formType
=
'checkbox'
...
@@ -226,11 +242,11 @@
...
@@ -226,11 +242,11 @@
case
'time'
:
case
'time'
:
formType
=
'time'
formType
=
'time'
break
break
//
case 'file':
case
'file'
:
//
formType = 'XhFiles'
formType
=
'XhFiles'
//
break
break
}
}
console
.
log
(
formType
,
'formType'
)
//
console.log(formType,'formType')
return
formType
return
formType
},
},
// ------------------------- 以下方法为展示滚动切换 -------------------------
// ------------------------- 以下方法为展示滚动切换 -------------------------
...
@@ -355,7 +371,14 @@
...
@@ -355,7 +371,14 @@
}
}
}
}
.class-item
{
.class-item
{
padding
:
50rpx
;
.title
{
font-weight
:
bold
;
font-size
:
32rpx
;
line-height
:
32rpx
;
color
:
#333
;
}
.label
{
.label
{
color
:
#333
;
color
:
#333
;
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -367,6 +390,12 @@
...
@@ -367,6 +390,12 @@
font-size
:
28rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
line-height
:
40rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
.item-image
{
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
}
}
}
}
...
@@ -426,20 +455,20 @@
...
@@ -426,20 +455,20 @@
.u-tab-item-active
{
.u-tab-item-active
{
position
:
relative
;
position
:
relative
;
color
:
#
000
;
color
:
#
2272FF
;
font-size
:
30rpx
;
font-size
:
30rpx
;
font-weight
:
600
;
font-weight
:
600
;
background
:
#fff
;
background
:
#fff
;
}
}
.
u-tab-item-active
:
:
before
{
//
.u-tab-item-active::before {
content
:
""
;
//
content: "";
position
:
absolute
;
//
position: absolute;
border-left
:
4px
solid
$u-type-primary
;
//
border-left: 4px solid $u-type-primary;
height
:
32rpx
;
//
height: 32rpx;
left
:
0
;
//
left: 0;
top
:
39rpx
;
//
top: 39rpx;
}
//
}
.u-tab-view
{
.u-tab-view
{
height
:
100%
;
height
:
100%
;
...
...
src/pages/order/index.vue
View file @
8cb99bc6
...
@@ -13,24 +13,23 @@
...
@@ -13,24 +13,23 @@
</view>
</view>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
-swiper
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
<u-tabs
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[-1,10]"
ref=
"tabs"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:offset=
"[-1,10]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper
>
:is-scroll=
"false"
></u-tabs
>
</view>
</view>
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
<!--
<swiper
class=
"swiper-box"
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
>
-->
@
animationfinish=
"animationfinish"
>
<!--
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
-->
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
class=
"page-box"
>
<view
class=
"page-box"
>
<view
v-for=
"(item, index) in
res
"
:key=
"item.orderId"
>
<view
v-for=
"(item, index) in
orderList
"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
</view>
<u-loadmore
:status=
"loadStatus
[ind]
"
bgColor=
"#F4F5F7"
></u-loadmore>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</view>
</scroll-view>
</scroll-view>
</swiper-item>
<!--
</swiper-item>
</swiper>
</swiper>
-->
<!--
</view>
-->
<!--
</view>
-->
</TabBarPage>
</TabBarPage>
...
@@ -48,8 +47,6 @@
...
@@ -48,8 +47,6 @@
return
{
return
{
showSview
:
true
,
showSview
:
true
,
curNow
:
0
,
curNow
:
0
,
timestamp
:
1000
,
triggered
:
false
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
pageSize
:
10
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
...
@@ -61,8 +58,7 @@
...
@@ -61,8 +58,7 @@
4
:
'exception'
,
4
:
'exception'
,
5
:
'finish'
5
:
'finish'
},
},
orderList
:
[[],[],[],[],[],[]],
orderList
:
[],
dataList
:
[],
list
:
[{
list
:
[{
name
:
'待预约'
,
name
:
'待预约'
,
total
:
0
,
total
:
0
,
...
@@ -85,12 +81,8 @@
...
@@ -85,12 +81,8 @@
}
}
],
],
current
:
0
,
current
:
0
,
swiperCurrent
:
0
,
loadStatus
:
'loading'
,
tabsHeight
:
0
,
dx
:
0
,
loadStatus
:
[
'loading'
,
'loading'
,
'loading'
,
'loading'
,
'loading'
,
'loading'
],
dataValue
:
[],
dataValue
:
[],
total
:
0
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -107,22 +99,23 @@
...
@@ -107,22 +99,23 @@
return
this
.
currentIndex
+
1
return
this
.
currentIndex
+
1
},
},
currentIndex
()
{
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
swiperC
urrent
:
5
return
this
.
curNow
==
0
?
this
.
c
urrent
:
5
}
}
},
},
methods
:
{
methods
:
{
sectionChange
(
index
)
{
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
curNow
=
index
;
this
.
pageNumber
=
0
this
.
pageNumber
=
0
if
(
index
===
1
)
{
this
.
orderList
=
[]
this
.
showSview
=
false
this
.
loadStatus
=
'loading'
// 加载已完工的数据
this
.
getOrderList
(
index
===
0
?
0
:
5
)
this
.
getOrderList
(
5
)
},
}
else
{
// tab栏切换
this
.
showSview
=
true
change
(
index
)
{
// 加载已完工的数据
this
.
current
=
index
;
this
.
getOrderList
(
0
)
this
.
orderList
=
[]
}
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
},
},
/**
/**
* 获取当前位置的经纬度
* 获取当前位置的经纬度
...
@@ -145,10 +138,8 @@
...
@@ -145,10 +138,8 @@
},
},
reachBottom
(
e
)
{
reachBottom
(
e
)
{
console
.
log
(
e
)
if
(
this
.
loadStatus
!=
'loadmore'
)
return
console
.
log
(
this
.
loadStatus
[
this
.
currentIndex
])
this
.
loadStatus
==
'loading'
if
(
this
.
loadStatus
[
this
.
currentIndex
]
!=
'loadmore'
)
return
this
.
loadStatus
[
this
.
currentIndex
]
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
this
.
getOrderList
(
this
.
currentIndex
)
},
},
// 页面数据
// 页面数据
...
@@ -196,11 +187,11 @@
...
@@ -196,11 +187,11 @@
...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
]
...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
]
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回order
_t
ype,防止数据返回延迟期间点击了其他的tab
// 后台需要返回order
T
ype,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
if
(
res
.
data
)
{
self
.
orderList
[
res
.
data
.
orderType
]
.
push
(...
res
.
data
.
list
)
self
.
orderList
.
push
(...
res
.
data
.
list
)
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
self
.
loadStatus
[
res
.
data
.
orderType
]
=
res
.
data
.
total
>
self
.
orderList
[
res
.
data
.
orderType
]
.
length
?
'loadmore'
:
'nomore'
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
...
@@ -235,27 +226,6 @@
...
@@ -235,27 +226,6 @@
}
}
});
});
},
},
// tab栏切换
change
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
getOrderList
(
index
);
},
transition
({
detail
:
{
dx
}
})
{
this
.
$refs
.
tabs
.
setDx
(
dx
);
},
animationfinish
({
detail
:
{
current
}
})
{
this
.
$refs
.
tabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
url
:
'pages/order/detail?id='
+
orderId
...
...
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