Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
b328ad64
Commit
b328ad64
authored
Jan 05, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-photo-tools'
parents
492ce968
af75b2f0
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
3343 additions
and
495 deletions
+3343
-495
db_init.json
take-order/cloudfunctions-tcb/db_init.json
+1518
-0
index.js
take-order/cloudfunctions-tcb/getGroupStandard/index.js
+18
-0
cloud_rules.js
take-order/common/api/cloud_rules.js
+4
-0
manifest.json
take-order/manifest.json
+2
-2
pages.json
take-order/pages.json
+202
-165
index.vue
take-order/pages/index/index.vue
+1
-1
brand.vue
take-order/pages/photo/brand.vue
+55
-19
detail.vue
take-order/pages/photo/detail.vue
+194
-39
list.vue
take-order/pages/photo/list.vue
+170
-54
preview.vue
take-order/pages/photo/preview.vue
+21
-3
product.vue
take-order/pages/photo/product.vue
+51
-18
take.vue
take-order/pages/photo/take.vue
+451
-0
try.vue
take-order/pages/photo/try.vue
+589
-194
project.config.json
take-order/project.config.json
+67
-0
live_mark.png
take-order/static/live_mark.png
+0
-0
No files found.
take-order/cloudfunctions-tcb/db_init.json
0 → 100644
View file @
b328ad64
This diff is collapsed.
Click to expand it.
take-order/cloudfunctions-tcb/getGroupStandard/index.js
0 → 100644
View file @
b328ad64
'use strict'
;
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
();
let
res
=
await
db
.
collection
(
"standard"
).
where
(
event
).
get
();
let
data
=
res
.
data
const
map
=
new
Map
()
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
let
key
=
data
[
i
].
type
if
(
map
.
has
(
key
)){
data
[
i
].
images
=
data
[
i
].
images
.
split
(
","
)
map
.
get
(
key
).
list
.
push
(
data
[
i
])
}
else
{
data
[
i
].
images
=
data
[
i
].
images
.
split
(
","
)
map
.
set
(
key
,{
type
:
key
,
list
:[
data
[
i
]]})
}
}
return
[...
map
.
values
()]
};
take-order/common/api/cloud_rules.js
View file @
b328ad64
...
@@ -12,11 +12,15 @@ const db = uniCloud.database({
...
@@ -12,11 +12,15 @@ const db = uniCloud.database({
/* 查询规范项目 {product_code:"P0001"}*/
/* 查询规范项目 {product_code:"P0001"}*/
let
getstandard
=
async
(
params
=
{})
=>
await
db
.
collection
(
"standard"
).
where
(
params
).
get
();
let
getstandard
=
async
(
params
=
{})
=>
await
db
.
collection
(
"standard"
).
where
(
params
).
get
();
/* 查询分组规范项目 */
let
getGroupStandard
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'getGroupStandard'
,
data
:
params
});
const
rulesApi
=
{
const
rulesApi
=
{
getAllProduct
,
getAllProduct
,
getBrand
,
getBrand
,
getstandard
,
getstandard
,
getGroupStandard
,
}
}
return
rulesApi
return
rulesApi
}
}
...
...
take-order/manifest.json
View file @
b328ad64
{
{
"name"
:
"take-order"
,
"name"
:
"take-order"
,
"appid"
:
""
,
"appid"
:
"
__UNI__BA775F5
"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
/*
小程序特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
""
,
"appid"
:
"
wxd1d6eede324b0465
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
"urlCheck"
:
false
},
},
...
...
take-order/pages.json
View file @
b328ad64
{
{
/*
/*
"easycom"
:
{
"easycom"
:
{
"^u-(.*)"
:
"@/uview-ui/components/u-$1/u-$1.vue"
"^u-(.*)"
:
"@/uview-ui/components/u-$1/u-$1.vue"
},
},
*/
*/
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
{
"style"
:
{
"path"
:
"pages/index/index"
,
"navigationBarTitleText"
:
"下单"
"style"
:
{
}
"navigationBarTitleText"
:
"下单"
}
},
},
{
{
"path"
:
"pages/photo/product"
,
"path"
:
"pages/photo/product"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"选择产品"
"navigationBarTitleText"
:
"扳手会工单规范"
}
},
{
"path"
:
"pages/photo/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"图片展示"
}
},
{
"path"
:
"pages/photo/list"
,
"style"
:
{
"navigationBarTitleText"
:
"规范展示"
}
},
{
"path"
:
"pages/photo/brand"
,
"style"
:
{
"navigationBarTitleText"
:
"选择品牌"
}
},
{
"path"
:
"pages/photo/try"
,
"style"
:
{
"navigationBarTitleText"
:
"拍照"
}
},
{
"path"
:
"pages/photo/preview"
,
"style"
:
{
"navigationBarTitleText"
:
"照片预览"
}
}
},
},
//
{
//
"path"
:
"pages/photo/index"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"拍照"
//
}
//
},
{
{
"path"
:
"pages/index/success"
,
"path"
:
"pages/photo/try"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"下单"
"navigationBarTitleText"
:
"拍照"
,
}
"navigationBarBackgroundColor"
:
"#333333"
,
"navigationBarTextStyle"
:
"#FFFFFF"
,
"app-plus"
:
{
//app平台
"bounce"
:
"none"
//禁止滚动
}
}
},
{
"path"
:
"pages/photo/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"图片展示"
,
"navigationBarBackgroundColor"
:
"#333333"
,
"navigationBarTextStyle"
:
"#FFFFFF"
}
},
{
"path"
:
"pages/photo/preview"
,
"style"
:
{
"navigationBarTitleText"
:
"照片预览"
}
},
{
"path"
:
"pages/photo/list"
,
"style"
:
{
"navigationBarTitleText"
:
"规范展示"
}
},
{
"path"
:
"pages/photo/brand"
,
"style"
:
{
"navigationBarTitleText"
:
"扳手会工单规范"
}
},
{
"path"
:
"pages/photo/take"
,
"style"
:
{
"navigationBarTitleText"
:
"拍照-ljd"
}
},
//
{
//
"path"
:
"pages/photo/index"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"拍照"
//
}
//
},
{
"path"
:
"pages/index/success"
,
"style"
:
{
"navigationBarTitleText"
:
"下单"
}
},
//
{
//
"path"
:
"pages/take/try"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"接单"
,
//
"enablePullDownRefresh"
:
true
//
}
//
},
{
"path"
:
"pages/login/wxlogin"
,
"style"
:
{
"navigationBarTitleText"
:
"授权登录"
}
},
{
"path"
:
"pages/expand/download"
,
"style"
:
{
"navigationBarTitleText"
:
"下载APP"
}
},
},
{
{
"path"
:
"pages/take/index"
,
"path"
:
"pages/take/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"接单"
,
"navigationBarTitleText"
:
"接单"
"enablePullDownRefresh"
:
true
}
}
},
},
{
"path"
:
"pages/take/finish"
,
"style"
:
{
{
"navigationBarTitleText"
:
"完工信息"
"path"
:
"pages/login/wxlogin"
,
}
"style"
:
{
},
"navigationBarTitleText"
:
"授权登录"
}
{
},
"path"
:
"pages/index/protocol"
,
"style"
:
{
"navigationBarTitleText"
:
"服务协议"
{
}
"path"
:
"pages/expand/download"
,
"style"
:
{
},
"navigationBarTitleText"
:
"下载APP"
}
{
"path"
:
"pages/take/web"
,
},
"style"
:
{
"navigationBarTitleText"
:
"网页"
{
}
"path"
:
"pages/take/finish"
,
"style"
:
{
},
"navigationBarTitleText"
:
"完工信息"
}
},
{
"path"
:
"pages/take/measure"
,
"style"
:
{
{
"navigationBarTitleText"
:
"服务措施"
"path"
:
"pages/index/protocol"
,
}
"style"
:
{
},
"navigationBarTitleText"
:
"服务协议"
}
{
"path"
:
"pages/take/detail"
,
},
"style"
:
{
"navigationBarTitleText"
:
"工单详情"
{
}
"path"
:
"pages/take/web"
,
},
"style"
:
{
"navigationBarTitleText"
:
"网页"
{
}
"path"
:
"pages/take/rob"
,
"style"
:
{
},
"navigationBarTitleText"
:
"抢单"
}
},
{
"path"
:
"pages/take/measure"
,
"style"
:
{
{
"navigationBarTitleText"
:
"服务措施"
"path"
:
"pages/index/record"
,
}
"style"
:
{
},
"navigationBarTitleText"
:
"下的单"
,
"enablePullDownRefresh"
:
true
{
}
"path"
:
"pages/take/detail"
,
}
"style"
:
{
"navigationBarTitleText"
:
"工单详情"
}
},
{
"path"
:
"pages/take/rob"
,
"style"
:
{
"navigationBarTitleText"
:
"抢单"
}
},
{
"path"
:
"pages/index/record"
,
"style"
:
{
"navigationBarTitleText"
:
"下的单"
,
"enablePullDownRefresh"
:
true
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
"backgroundColor"
:
"#F8F8F8"
}
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
"拍照小工具"
,
//模式名称
"path"
:
"pages/photo/try"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
}
}
take-order/pages/index/index.vue
View file @
b328ad64
...
@@ -196,7 +196,7 @@
...
@@ -196,7 +196,7 @@
console
.
log
(
res
,
"品牌"
)
console
.
log
(
res
,
"品牌"
)
}
}
)
)
this
.
$u
.
cloudApi
.
get
standard
({
brand_code
:
"B0001"
}).
then
(
res
=>
{
this
.
$u
.
cloudApi
.
get
GroupStandard
({
product_code
:
"P0001"
,
brand_code
:
"B0001"
}).
then
(
res
=>
{
console
.
log
(
res
,
"规范标准"
)
console
.
log
(
res
,
"规范标准"
)
}
}
)
)
...
...
take-order/pages/photo/brand.vue
View file @
b328ad64
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
选择产品
</text>
<text
class=
"topTitle"
>
{{
product
}}
> 选择品牌
</text>
<view
class=
""
>
<view
class=
"
u-p-b-48
"
>
<view
class=
"itemView u-m-t-
80
"
v-for=
"(item,ikey) in brandList"
:key=
"ikey"
>
<view
class=
"itemView u-m-t-
48"
@
click=
"itemClick(item)
"
v-for=
"(item,ikey) in brandList"
:key=
"ikey"
>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
titl
e
}}
</text>
<text
class=
"itemTitle"
>
{{
item
.
nam
e
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -14,31 +14,61 @@
...
@@ -14,31 +14,61 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
brandList
:[]
product_code
:
''
,
brandList
:[],
brand_code
:
''
,
product
:
''
,
brand
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
if
(
e
&&
e
.
product_code
){
this
.
product_code
=
e
.
product_code
}
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
}
this
.
getBrandList
()
this
.
getBrandList
()
},
},
methods
:
{
methods
:
{
getBrandList
:
function
()
{
getBrandList
:
function
()
{
this
.
brandList
=
[
{
let
that
=
this
'title'
:
'广汽'
,
'id'
:
0
this
.
$u
.
cloudApi
.
getBrand
({
product_code
:
this
.
product_code
}).
then
(
res
=>
{
},
console
.
log
(
'获取品牌数据:'
)
{
console
.
log
(
res
)
'title'
:
'比亚迪'
,
'id'
:
1
if
(
res
.
result
.
data
){
that
.
brandList
=
res
.
result
.
data
}
}
]
}
)
},
},
//选择 点击
//选择 点击
itemClick
:
function
(
item
)
{
itemClick
:
function
(
item
)
{
if
(
item
.
product_code
){
this
.
brand_code
=
item
.
code
}
if
(
item
.
name
){
this
.
brand
=
item
.
name
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/list'
url
:
'/pages/photo/list'
+
'?brand_code='
+
this
.
brand_code
+
'&brand='
+
this
.
brand
+
'&product_code='
+
this
.
product_code
+
'&product='
+
this
.
product
,
})
})
},
},
...
@@ -62,21 +92,27 @@
...
@@ -62,21 +92,27 @@
}
}
.topTitle
{
.topTitle
{
margin-top
:
80
rpx
;
margin-top
:
192
rpx
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
}
}
.itemView
{
.itemView
{
background-color
:
#
999999
;
background-color
:
#
FFFFFF
;
width
:
400
rpx
;
width
:
548
rpx
;
height
:
80
rpx
;
height
:
96
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
}
}
.itemTitle
{
.itemTitle
{
font-size
:
28
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
}
</
style
>
</
style
>
take-order/pages/photo/detail.vue
View file @
b328ad64
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"topView"
>
<view
class=
"topView"
>
<
text
class=
"topTitle"
>
示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text
>
<
!--text class="topTitle">示范照片 (
{{
currentNumber
}}
/
{{
totalNumber
}}
)
</text--
>
</view>
</view>
<scroll-view
scroll-x
class=
"centerBackView"
>
<view
class=
"wrap"
>
<image
class=
"photoImage"
@
click=
"imageClick(item.image)"
:src=
"item.image"
mode=
""
v-for=
"(item,ikey) in photoList"
:key=
"ikey"
></image>
<u-swiper
</scroll-view>
@
click=
"imageClick"
<view
class=
"bottomView"
>
@
change=
"changeSwipter"
<view
class=
"takeView"
@
click=
"takeClick"
>
img-mode=
"aspectFill"
<text
class=
"takeText"
>
按规范\n拍照
</text>
bg-color=
"#333333"
</view>
:height=
"600"
:list=
"swiperList"
:autoplay=
"false"
:circular=
'false'
mode=
"dot"
:current=
"done_count"
></u-swiper>
</view>
</view>
<view
class=
"bottomView"
>
<image
class=
"takeView"
:src=
"icon_gotake"
mode=
""
@
click=
"takeClick"
></image>
<image
class=
"backIcon"
:src=
"icon_arrow_down"
mode=
""
@
click=
"backClick"
></image>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
uSwiper
from
'@/uview-ui/components/u-swiper/u-swiper'
export
default
{
export
default
{
components
:{
uSwiper
},
data
()
{
data
()
{
return
{
return
{
totalNumber
:
0
,
// background: ['color1', 'color2', 'color3'],
currentNumber
:
1
,
// indicatorDots: true,
photoList
:[]
// autoplay: true,
// interval: 2000,
// duration: 500,
image_count
:
1
,
current_count
:
1
,
current_image
:
''
,
done_count
:
0
,
images
:[],
icon_gotake
:
'https://qn-static.banshouhui.com/gotake.png'
,
icon_arrow_down
:
'https://qn-static.banshouhui.com/arrow_down.png'
,
ifFirst
:
true
,
last_done_count
:
0
,
swiperList
:[],
windowHeight
:
0
,
title
:
''
}
}
},
},
watch
:{
images
(
val
){
let
list
=
val
.
map
(
img
=>
{
return
{
image
:
img
}
})
this
.
swiperList
=
list
// console.log(this.swiperList,'this.swiperList')
}
},
computed
:{
// swiperList(){
// console.log(this.images,'this.images')
// let list = this.images.map(img=>{
// return {
// image:img
// }
// })
// return list
// }
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
initData
()
this
.
initData
(
e
)
},
onShow
(){
if
(
this
.
isFirst
==
false
){
this
.
checkDoneCount
()
}
},
},
methods
:
{
methods
:
{
initData
:
function
()
{
initData
:
function
(
e
)
{
if
(
e
&&
e
.
current_image
){
this
.
current_image
=
e
.
current_image
}
if
(
e
&&
e
.
image_count
){
this
.
image_count
=
e
.
image_count
}
if
(
e
&&
e
.
current_count
){
this
.
current_count
=
e
.
current_count
}
if
(
e
&&
e
.
images
){
this
.
images
=
[].
concat
(
JSON
.
parse
(
e
.
images
))
}
if
(
e
&&
e
.
title
){
this
.
title
=
e
.
title
if
(
this
.
title
.
length
>
6
){
this
.
title
=
this
.
title
.
substr
(
0
,
6
)
+
'...'
}
}
uni
.
setNavigationBarTitle
({
title
:
this
.
title
+
' ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
})
uni
.
setNavigationBarColor
({
frontColor
:
'#FFFFFF'
,
backgroundColor
:
'#333333'
,
})
},
//检查已拍照数量
checkDoneCount
:
function
(){
this
.
photoList
=
[
let
pages
=
getCurrentPages
();
{
let
currPage
=
pages
[
pages
.
length
-
1
];
image
:
'https://qn-static.banshouhui.com/selected.png'
,
this
.
done_count
=
currPage
.
data
.
done_count
},
console
.
log
(
'是否清除:'
)
{
//console.log(currPage.data.isClean)
image
:
'https://qn-static.banshouhui.com/close_new.png'
,
if
(
currPage
.
data
.
done_count
==
this
.
image_count
){
},
console
.
log
(
'已拍完 所有数量照片'
)
{
uni
.
showToast
({
image
:
'https://qn-static.banshouhui.com/auth_notice_new.png'
,
icon
:
'none'
,
title
:
'已拍完此项照片'
})
setTimeout
(
function
()
{
uni
.
navigateBack
({
})
},
2000
);
}
else
{
if
(
this
.
done_count
!=
this
.
last_done_count
){
console
.
log
(
'没有拍完 所有数量照片'
)
this
.
last_done_count
=
this
.
done_count
this
.
current_count
=
currPage
.
data
.
done_count
+
1
this
.
current_image
=
this
.
images
[
currPage
.
data
.
done_count
]
console
.
log
(
'没有拍完 所有数量照片 current_count:'
+
this
.
current_count
)
console
.
log
(
'没有拍完 所有数量照片 current_image:'
+
this
.
current_image
)
uni
.
setNavigationBarTitle
({
title
:
this
.
title
+
' ('
+
this
.
current_count
+
'/'
+
this
.
image_count
+
')'
})
}
}
]
this
.
totalNumber
=
this
.
photoList
.
length
}
},
},
//照片预览
//照片预览
imageClick
:
function
(
image
)
{
imageClick
:
function
(
index
)
{
let
currentImg
=
this
.
images
[
index
]
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
[
image
]
urls
:
[
currentImg
],
current
:
index
})
},
changeSwipter
(
index
){
let
txt
=
'走线照片 ('
+
(
index
+
1
)
+
'/'
+
this
.
image_count
+
')'
uni
.
setNavigationBarTitle
({
title
:
txt
})
})
},
},
//拍照 点击
//拍照 点击
takeClick
:
function
()
{
takeClick
:
function
()
{
this
.
isFirst
=
false
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/try'
url
:
'/pages/photo/try'
})
})
},
},
//返回 点击
backClick
:
function
()
{
uni
.
navigateBack
({
})
},
}
}
...
@@ -65,6 +203,12 @@
...
@@ -65,6 +203,12 @@
</
script
>
</
script
>
<
style
>
<
style
>
.wrap
{
width
:
100%
;
height
:
calc
(
100vh
-
600
rpx
);
background-color
:
#333
;
/* padding:0 40rpx; */
}
.backView
{
.backView
{
background-color
:
#FAFAFA
;
background-color
:
#FAFAFA
;
position
:
absolute
;
position
:
absolute
;
...
@@ -78,9 +222,9 @@
...
@@ -78,9 +222,9 @@
}
}
.topView
{
.topView
{
background-color
:
#
000000
;
background-color
:
#
333333
;
width
:
100%
;
width
:
100%
;
height
:
1
5
%
;
height
:
1
2
%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -93,35 +237,36 @@
...
@@ -93,35 +237,36 @@
}
}
.centerBackView
{
.centerBackView
{
background-color
:
#
007AFF
;
background-color
:
#
333333
;
height
:
800
rpx
;
height
:
47.3%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
}
}
.photoImage
{
.photoImage
{
background-color
:
#
4CD964
;
background-color
:
#
333333
;
width
:
750
rpx
;
width
:
750
rpx
;
height
:
800
rpx
;
height
:
568
rpx
;
}
}
.bottomView
{
.bottomView
{
background-color
:
#
000000
;
background-color
:
#
333333
;
width
:
100%
;
width
:
100%
;
height
:
20
%
;
height
:
40.7
%
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column-reverse
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
}
}
.takeView
{
.takeView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
160
rpx
;
width
:
146
rpx
;
height
:
160
rpx
;
height
:
102
rpx
;
border-radius
:
80
rpx
;
border-radius
:
16
rpx
;
margin-bottom
:
50
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -132,4 +277,14 @@
...
@@ -132,4 +277,14 @@
text-align
:
center
;
text-align
:
center
;
}
}
.backIcon
{
background-color
:
#FFFFFF
;
width
:
54
rpx
;
height
:
54
rpx
;
border-radius
:
27
rpx
;
position
:
fixed
;
left
:
60
rpx
;
bottom
:
50
rpx
;
}
</
style
>
</
style
>
take-order/pages/photo/list.vue
View file @
b328ad64
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
{{
topTitle
}}
</text>
<view
class=
"topView"
>
<view
class=
"centerBackView"
>
<view
:class=
"activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' "
@
click=
"topItemClick(ikey,item)"
v-for=
"(item,ikey) in dataList"
:key=
"ikey"
>
<view
class=
"leftView"
>
<text
class=
"topActiveItemTitle"
v-if=
"activeTop == ikey"
>
{{
item
.
type
}}
</text>
<view
class=
"leftItemView"
@
click=
"leftItemClick(item,ikey)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
<text
class=
"topItemTitle"
v-if=
"activeTop != ikey"
>
{{
item
.
type
}}
</text>
<text
class=
"leftItemText"
>
{{
item
.
title
}}
</text>
</view>
</view>
</view>
<view
class=
"rightView"
>
</view>
<view
class=
"rightItemView"
@
click=
"rightItemClick(item,ikey)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<view
class=
"rightView"
>
<template
v-for=
"(item,ikey) in rightList"
>
<view
:class=
"['rightItemView',item.clickable ? 'FAbackColor' : '']"
@
click=
"rightItemClick(item,ikey)"
:key=
"ikey"
>
<view
:class=
" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "
>
<view
:class=
" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "
>
<text
class=
"rightTitle u-m-t-30 u-m-l-30"
>
{{
item
.
title
}}
(
{{
item
.
photoNumber
}}
张)
</text>
<text
:class=
" item.clickable ? 'gray999Color rightTitle u-m-t-30 u-m-l-30' : 'rightTitle u-m-t-30 u-m-l-30' "
>
{{
item
.
name
}}
(
{{
item
.
image_count
}}
张)
</text>
<text
class=
"rightContent u-m-t-
30 u-m-l-30 u-p-b-30"
>
{{
item
.
content
}}
</text>
<text
class=
"rightContent u-m-t-
14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
</view>
</view>
<view
class=
"rightImageView"
v-if=
"item.images"
>
<view
class=
"rightImageView"
v-if=
"item.images"
>
<image
class=
"rightImage"
src=
"
"
mode=
""
></image>
<image
class=
"rightImage"
:src=
"item.images[0]
"
mode=
""
></image>
</view>
</view>
</view>
</view>
</view>
</
template
>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -26,61 +29,117 @@
...
@@ -26,61 +29,117 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
topList
:[],
topTitle
:
''
,
topTitle
:
''
,
activeTop
:
0
,
leftList
:[],
leftList
:[],
rightList
:[],
rightList
:[],
product
:
''
,
product_code
:
''
,
brand
:
''
,
brand_code
:
''
,
dataList
:[],
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
topTitle
=
'充电桩-北汽'
this
.
getLeftData
()
if
(
e
&&
e
.
product
){
this
.
product
=
e
.
product
}
if
(
e
&&
e
.
product_code
){
this
.
product_code
=
e
.
product_code
}
if
(
e
&&
e
.
brand
){
this
.
brand
=
e
.
brand
uni
.
setNavigationBarTitle
({
title
:
this
.
brand
});
}
if
(
e
&&
e
.
brand_code
){
this
.
brand_code
=
e
.
brand_code
}
this
.
topTitle
=
this
.
product
+
'-'
+
this
.
brand
this
.
getListData
()
},
onShow
()
{
console
.
log
(
'onShow 里的rightList:'
)
console
.
log
(
this
.
rightList
)
},
},
methods
:
{
methods
:
{
getLeftData
:
function
(){
getListData
:
function
(){
this
.
leftList
=
[
{
'title'
:
'回单'
,
'id'
:
0
},
console
.
log
(
'getListData:'
)
{
'title'
:
'回单'
,
'id'
:
1
},
console
.
log
(
'product_code'
+
this
.
product_code
)
{
'title'
:
'回单'
,
'id'
:
2
}
console
.
log
(
'brand_code'
+
this
.
brand_code
)
]
this
.
getRightData
()
let
that
=
this
this
.
$u
.
cloudApi
.
getGroupStandard
({
product_code
:
this
.
product_code
,
brand_code
:
this
.
brand_code
}).
then
(
res
=>
{
console
.
log
(
'获取规范标准数据:'
)
console
.
log
(
res
)
if
(
res
.
result
&&
res
.
result
.
length
){
that
.
handleData
(
res
)
}
})
},
},
getRightData
:
function
()
{
handleData
:
function
(
res
){
this
.
rightList
=
[
{
this
.
dataList
=
res
.
result
'title'
:
'电源点照片'
,
'photoNumber'
:
4
,
this
.
dataList
.
forEach
(
item
=>
{
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:[
'asdasdasd.png'
,
'assdasdad.png'
,
'asdsds.png'
]
item
.
list
.
forEach
(
subItem
=>
{
},
subItem
.
isClicked
=
false
{
})
'title'
:
'电源点照片'
,
'photoNumber'
:
4
,
})
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:
null
console
.
log
(
'添加 新字段 后的数组:'
)
},
console
.
log
(
this
.
dataList
)
{
'title'
:
'电源点照片'
,
var
item
=
res
.
result
[
0
]
'photoNumber'
:
4
,
this
.
rightList
=
item
.
list
'content'
:
'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12'
,
'images'
:[
'asdasdasd.png'
,
'assdasdad.png'
,
'asdsds.png'
]
},
]
},
},
//左侧点击
//顶部点击
leftItemClick
:
function
(
item
,
ikey
)
{
topItemClick
:
function
(
ikey
,
item
)
{
this
.
getRightData
()
this
.
activeTop
=
ikey
this
.
rightList
=
item
.
list
},
},
//右侧点击
//右侧点击
rightItemClick
:
function
(
item
,
ikey
)
{
rightItemClick
:
function
(
item
,
ikey
)
{
// for (let i = 0; i
<
this
.
rightList
.
length
;
i
++
)
{
// var subItem = this.rightList[i]
// if(i == ikey){
// subItem.isClicked = true
// }
// }
// item.clickable = true
this
.
$set
(
this
.
rightList
[
ikey
],
'clickable'
,
true
)
var
current_image
=
item
.
images
[
0
]
var
current_count
=
1
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/detail'
url
:
'/pages/photo/detail'
+
'?current_image='
+
current_image
+
'&image_count='
+
item
.
image_count
+
'¤t_count='
+
current_count
+
'&images='
+
JSON
.
stringify
(
item
.
images
)
+
'&title='
+
item
.
name
,
})
})
},
},
...
@@ -136,7 +195,7 @@
...
@@ -136,7 +195,7 @@
.rightView
{
.rightView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
8
0%
;
width
:
10
0%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
@@ -145,6 +204,7 @@
...
@@ -145,6 +204,7 @@
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
border-bottom
:
20
rpx
solid
#F3F3F3
;
border-bottom
:
20
rpx
solid
#F3F3F3
;
}
}
...
@@ -154,8 +214,16 @@
...
@@ -154,8 +214,16 @@
border-left
:
2
rpx
solid
#F3F3F3
;
border-left
:
2
rpx
solid
#F3F3F3
;
}
}
.rightActiveContentView
{
background-color
:
#4CD964
;
display
:
flex
;
flex-direction
:
column
;
border-left
:
2
rpx
solid
#F3F3F3
;
}
.width_50
{
.width_50
{
width
:
50%
;
width
:
480
rpx
;
}
}
.width_100
{
.width_100
{
...
@@ -163,17 +231,19 @@
...
@@ -163,17 +231,19 @@
}
}
.rightTitle
{
.rightTitle
{
font-size
:
28
rpx
;
font-size
:
32
rpx
;
color
:
#4D87EA
;
}
}
.rightContent
{
.rightContent
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
line-height
:
40
rpx
;
}
}
.rightImageView
{
.rightImageView
{
background-color
:
#FFFFFF
;
width
:
300
rpx
;
width
:
50%
;
height
:
320
rpx
;
height
:
240
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -181,10 +251,56 @@
...
@@ -181,10 +251,56 @@
.rightImage
{
.rightImage
{
background-color
:
#F3F3F3
;
background-color
:
#F3F3F3
;
width
:
80%
;
width
:
240
rpx
;
height
:
80%
;
height
:
240
rpx
;
}
.topView
{
background-color
:
#FAFAFA
;
width
:
100%
;
height
:
96
rpx
;
display
:
flex
;
flex-direction
:
row
;
}
}
.topItemView
{
width
:
210
rpx
;
height
:
96
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.whiteBackColor
{
background-color
:
#FFFFFF
;
}
.FAbackColor
{
background-color
:
#FAFAFA
;
}
.topItemTitle
{
font-size
:
32
rpx
;
color
:
#999999
;
padding-left
:
30
rpx
;
}
.topActiveItemTitle
{
font-size
:
32
rpx
;
font-weight
:
bold
;
color
:
#333333
;
padding-left
:
30
rpx
;
}
.greenBackColor
{
background-color
:
#4CD964
;
}
.gray999Color
{
color
:
#999999
;
}
...
...
take-order/pages/photo/preview.vue
View file @
b328ad64
<
template
>
<
template
>
<view>
<image
class=
"pic"
:src=
"images[0]"
mode=
"aspectFill"
@
click=
"showPreviewFn"
></image>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
protocolContent
:
''
protocolContent
:
''
,
images
:[]
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
console
.
log
(
e
,
'e'
)
if
(
e
.
img
){
this
.
images
=
[
e
.
img
]
}
console
.
log
(
this
.
images
,
'this.images'
)
},
},
methods
:
{
methods
:
{
showPreviewFn
(
img
)
{
uni
.
previewImage
({
current
:
0
,
urls
:
this
.
images
});
},
//拨打客服 点击
//拨打客服 点击
phoneCallClick
:
function
(
phone
)
{
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
...
@@ -28,4 +41,9 @@
...
@@ -28,4 +41,9 @@
</
script
>
</
script
>
<
style
>
<
style
>
.pic
{
display
:
block
;
width
:
100%
;
height
:
auto
;
}
</
style
>
</
style
>
take-order/pages/photo/product.vue
View file @
b328ad64
<
template
>
<
template
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<text
class=
"topTitle"
>
选择产品
</text>
<text
class=
"topTitle"
>
选择产品
</text>
<view
class=
""
>
<view
class=
"
u-p-b-48
"
>
<view
class=
"itemView u-m-t-
80
"
v-for=
"(item,ikey) in productList"
:key=
"ikey"
>
<view
class=
"itemView u-m-t-
48"
@
click=
"itemClick(item)
"
v-for=
"(item,ikey) in productList"
:key=
"ikey"
>
<text
class=
"itemTitle"
@
click=
"itemClick(item)"
>
{{
item
.
titl
e
}}
</text>
<text
class=
"itemTitle"
>
{{
item
.
nam
e
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -14,31 +14,60 @@
...
@@ -14,31 +14,60 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
productList
:[]
productList
:[],
product_code
:
''
,
product
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
getProductList
()
this
.
getProductList
()
},
onShareAppMessage
(
res
)
{
let
shareObj
=
{
title
:
''
,
path
:
'/pages/photo/product'
,
imageUrl
:
''
,
success
(){},
fail
(){}
}
return
shareObj
},
},
methods
:
{
methods
:
{
getProductList
:
function
(){
getProductList
:
function
(){
this
.
productList
=
[
{
let
that
=
this
'title'
:
'新风机'
,
'id'
:
0
this
.
$u
.
cloudApi
.
getAllProduct
().
then
(
res
=>
{
},
console
.
log
(
'获取产品数据:'
)
{
console
.
log
(
res
)
'title'
:
'充电桩'
,
if
(
res
.
result
&&
res
.
result
.
data
){
'id'
:
1
that
.
productList
=
res
.
result
.
data
}
}
]
})
},
},
//选择 点击
//选择 点击
itemClick
:
function
(
item
)
{
itemClick
:
function
(
item
)
{
if
(
item
.
code
){
this
.
product_code
=
item
.
code
}
if
(
item
.
name
){
this
.
product
=
item
.
name
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/photo/brand'
url
:
'/pages/photo/brand'
+
'?product_code='
+
this
.
product_code
+
'&product='
+
this
.
product
,
})
})
},
},
...
@@ -62,22 +91,26 @@
...
@@ -62,22 +91,26 @@
}
}
.topTitle
{
.topTitle
{
margin-top
:
80
rpx
;
margin-top
:
192
rpx
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
}
}
.itemView
{
.itemView
{
background-color
:
#
999999
;
background-color
:
#
FFFFFF
;
width
:
400
rpx
;
width
:
548
rpx
;
height
:
80
rpx
;
height
:
96
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
border-style
:
solid
;
box-shadow
:
0px
2px
7px
0px
rgba
(
0
,
0
,
0
,
0.05
);
border-width
:
0
rpx
;
}
}
.itemTitle
{
.itemTitle
{
font-size
:
28
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
}
}
</
style
>
</
style
>
take-order/pages/photo/take.vue
0 → 100644
View file @
b328ad64
This diff is collapsed.
Click to expand it.
take-order/pages/photo/try.vue
View file @
b328ad64
This diff is collapsed.
Click to expand it.
take-order/project.config.json
0 → 100644
View file @
b328ad64
{
"description"
:
"项目配置文件"
,
"packOptions"
:
{
"ignore"
:
[]
},
"setting"
:
{
"urlCheck"
:
true
,
"es6"
:
true
,
"enhance"
:
false
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
"newFeature"
:
false
,
"coverView"
:
true
,
"nodeModules"
:
false
,
"autoAudits"
:
false
,
"showShadowRootInWxmlPanel"
:
true
,
"scopeDataCheck"
:
false
,
"uglifyFileName"
:
false
,
"checkInvalidKey"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
false
,
"useApiHook"
:
true
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
},
"enableEngineNative"
:
false
,
"bundle"
:
false
,
"useIsolateContext"
:
true
,
"useCompilerModule"
:
true
,
"userConfirmedUseCompilerModuleSwitch"
:
false
,
"userConfirmedBundleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.14.1"
,
"appid"
:
"wxd1d6eede324b0465"
,
"projectname"
:
"miniprogram-1"
,
"cloudfunctionTemplateRoot"
:
""
,
"watchOptions"
:
{
"ignore"
:
[]
},
"debugOptions"
:
{
"hidedInDevtools"
:
[]
},
"scripts"
:
{},
"condition"
:
{
"plugin"
:
{
"list"
:
[]
},
"game"
:
{
"list"
:
[]
},
"gamePlugin"
:
{
"list"
:
[]
},
"miniprogram"
:
{
"list"
:
[]
}
}
}
take-order/static/live_mark.png
0 → 100644
View file @
b328ad64
4.52 KB
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