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
a2d58854
Commit
a2d58854
authored
Mar 24, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口调试
parent
a69beaee
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
446 additions
and
431 deletions
+446
-431
detail.vue
take-order/pages/photo/detail.vue
+2
-2
list.vue
take-order/pages/photo/list.vue
+352
-356
product.vue
take-order/pages/photo/product.vue
+70
-73
package-lock.json
...d-tcb/cloudfunctions/getGroupStandardV2/package-lock.json
+11
-0
package-lock.json
...r/uniCloud-tcb/cloudfunctions/saveImage/package-lock.json
+11
-0
No files found.
take-order/pages/photo/detail.vue
View file @
a2d58854
...
...
@@ -100,11 +100,11 @@
}
if
(
e
&&
e
.
current_count
){
this
.
done_count
=
e
.
current_count
this
.
done_count
=
Math
.
max
(
e
.
current_count
-
1
,
0
)
}
if
(
e
&&
e
.
current_count
){
this
.
current_count
=
Math
.
max
(
e
.
current_count
-
1
,
0
)
this
.
current_count
=
e
.
current_count
}
if
(
e
&&
e
.
images
){
...
...
take-order/pages/photo/list.vue
View file @
a2d58854
This diff is collapsed.
Click to expand it.
take-order/pages/photo/product.vue
View file @
a2d58854
...
...
@@ -3,9 +3,10 @@
<view
class=
"ph-pr-arr"
v-for=
"(dataItem, index) in list"
:key=
"index"
>
<template
v-if=
"dataItem.data.length > 0"
>
<view
class=
"topTitle"
><text>
{{
dataItem
.
title
}}
</text></view>
<view
class=
"ph-pr-content"
>
<view
:class=
"param[item.type + '_code'] === item.code ? 'select-item-view' : 'item-view'"
@
click=
"itemClick(item)"
v-for=
"(item,ikey) in dataItem.data"
:key=
"item.code"
>
<view
class=
"ph-pr-content"
>
<view
v-for=
"(item,ikey) in dataItem.data"
:class=
"param[dataItem.type] === item._id ? 'select-item-view' : 'item-view'"
@
click=
"itemClick(dataItem.type, item)"
:key=
"item._id"
>
<text
class=
"itemTitle"
>
{{
item
.
name
}}
</text>
</view>
</view>
...
...
@@ -20,32 +21,33 @@
export
default
{
data
()
{
return
{
product
List
:
[],
sysList
:
[],
classify
List
:
[],
sys
tem
List
:
[],
brandList
:
[],
product_code
:
''
,
product
:
''
,
param
:
{
brand_code
:
''
,
brand
:
''
,
product_code
:
''
,
product
:
''
classifyId
:
''
,
systemId
:
''
,
brandId
:
''
,
},
selectedAll
:
false
,
brandName
:
''
,
selectedAll
:
false
,
}
},
computed
:
{
list
()
{
return
[{
title
:
'请选择类别'
,
data
:
this
.
productList
type
:
'classifyId'
,
data
:
this
.
classifyList
},
{
title
:
'请选择系统'
,
data
:
this
.
sysList
type
:
'systemId'
,
data
:
this
.
systemList
},
{
title
:
'请选择品牌'
,
type
:
'brandId'
,
data
:
this
.
brandList
}
]
...
...
@@ -53,7 +55,7 @@
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'选择产品页'
)
this
.
get
Product
List
()
this
.
get
classify
List
()
},
onShareAppMessage
(
res
)
{
...
...
@@ -68,89 +70,84 @@
},
methods
:
{
get
Product
List
:
function
()
{
get
classify
List
:
function
()
{
let
that
=
this
this
.
$u
.
cloudApi
.
get
AllProduct
().
then
(
res
=>
{
this
.
$u
.
cloudApi
.
get
ClassifyDictionary
().
then
(
res
=>
{
console
.
log
(
'获取产品数据:'
)
console
.
log
(
res
)
if
(
res
.
result
&&
res
.
result
.
data
)
{
that
.
productList
=
res
.
result
.
data
that
.
classifyList
=
res
.
result
.
data
that
.
param
.
classifyId
=
that
.
classifyList
[
0
].
_id
that
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
that
.
param
.
classifyId
,
"field"
:
"system_id"
}).
then
(
res1
=>
{
that
.
systemList
=
res1
.
result
})
}
})
},
//选择 点击
itemClick
:
function
(
item
)
{
switch
(
item
.
type
)
{
case
'product'
:
this
.
initSelect
()
this
.
param
.
product_code
=
item
.
code
this
.
param
.
product
=
item
.
name
this
.
$u
.
cloudApi
.
getBrand
({
product_code
:
this
.
param
.
product_code
itemClick
:
function
(
type
,
item
)
{
switch
(
type
)
{
case
'classifyId'
:
this
.
param
=
{
classifyId
:
item
.
_id
,
systemId
:
''
,
brandId
:
''
}
this
.
selectedAll
=
false
this
.
systemList
=
[]
this
.
brandList
=
[]
this
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
this
.
param
.
classifyId
,
"field"
:
"system_id"
}).
then
(
res
=>
{
this
.
systemList
=
res
.
result
})
break
case
'systemId'
:
this
.
param
=
{
classifyId
:
this
.
param
.
classifyId
,
systemId
:
item
.
_id
,
brandId
:
''
}
this
.
selectedAll
=
false
this
.
brandList
=
[]
this
.
$u
.
cloudApi
.
getRelationDictionary
({
"classify_id"
:
this
.
param
.
classifyId
,
"system_id"
:
this
.
param
.
systemId
,
"field"
:
"brand_id"
}).
then
(
res
=>
{
console
.
log
(
'获取品牌数据:'
,
res
)
if
(
res
.
result
.
data
)
{
res
.
result
.
data
.
filter
((
value
)
=>
{
value
.
type
=
'brand'
})
this
.
brandList
=
res
.
result
.
data
this
.
changeSelectedAll
()
}
this
.
brandList
=
res
.
result
})
break
case
'brandId'
:
this
.
param
.
brandId
=
item
.
_id
this
.
selectedAll
=
true
this
.
brandName
=
item
.
name
break
default
:
this
.
param
.
brand_code
=
item
.
code
this
.
param
.
brand
=
item
.
name
this
.
changeSelectedAll
()
break
}
// uni.navigateTo({
// url: '/pages/photo/brand' +
// '?product_code=' + this.param.product_code +
// '&product=' + this.param.product,
// })
},
// 点击下一步
handleClick
()
{
uni
.
navigateTo
({
url
:
'/pages/photo/list'
+
'?brand
_code='
+
this
.
param
.
brand_code
+
'&brand='
+
this
.
param
.
brand
+
'&
product_code='
+
this
.
param
.
product_code
+
'&
product='
+
this
.
param
.
product
,
'?brand
Id='
+
this
.
param
.
brandId
+
'&brand='
+
this
.
brandName
+
'&
classifyId='
+
this
.
param
.
systemId
+
'&
systemId='
+
this
.
param
.
systemId
,
})
},
// 修改下一步按钮是否可以点击
changeSelectedAll
()
{
for
(
var
item
in
this
.
param
)
{
if
(
!
this
.
param
[
item
])
{
this
.
selectedAll
=
false
return
}
}
this
.
selectedAll
=
true
},
// 初始化选择
initSelect
()
{
this
.
param
=
{
brand_code
:
''
,
brand
:
''
,
product_code
:
''
,
product
:
''
}
this
.
brandList
=
[]
this
.
selectedAll
=
false
}
}
}
...
...
take-order/uniCloud-tcb/cloudfunctions/getGroupStandardV2/package-lock.json
0 → 100644
View file @
a2d58854
{
"name"
:
"getGroupStandardV2"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
"user-common"
:
{
"version"
:
"file:../common/user-common"
}
}
}
take-order/uniCloud-tcb/cloudfunctions/saveImage/package-lock.json
0 → 100644
View file @
a2d58854
{
"name"
:
"saveImage"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
"user-common"
:
{
"version"
:
"file:../common/user-common"
}
}
}
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