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
967e44e1
Commit
967e44e1
authored
May 17, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:update
scope:self-support body:删除云开发相关代码
parent
4be9741b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
436 additions
and
632 deletions
+436
-632
cloud_rules.js
src/common/api/cloud_rules.js
+0
-58
index.js
src/common/api/index.js
+0
-5
http.api.js
src/common/http.api.js
+1
-7
index.vue
src/pages/photo/index.vue
+221
-231
list.vue
src/pages/photo/list.vue
+0
-32
preview.vue
src/pages/photo/preview.vue
+214
-261
setting.vue
src/pages/photo/setting.vue
+0
-38
No files found.
src/common/api/cloud_rules.js
deleted
100644 → 0
View file @
4be9741b
const
db
=
uniCloud
.
database
({
spaceId
:
'tcb-nikbzhlwnpd5n913e1c5e-50f4bbo'
})
let
cloudRulesApiFun
=
function
(
vm
){
/* 查询所有产品 废弃*/
let
getAllProduct
=
async
()
=>
await
db
.
collection
(
"product"
).
get
();
/* 查询产品下的品牌 {product_code:"P0001"} 废弃*/
let
getBrand
=
async
(
params
=
{})
=>
await
db
.
collection
(
"brand"
).
where
(
params
).
get
();
/* 查询规范项目 {product_code:"P0001"} 废弃*/
let
getstandard
=
async
(
params
=
{})
=>
await
db
.
collection
(
"standard"
).
where
(
params
).
get
();
/* 查询分组规范项目 废弃*/
let
getGroupStandard
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'getGroupStandard'
,
data
:
params
});
/* 查询类别数据 */
let
getClassifyDictionary
=
async
()
=>
await
db
.
collection
(
"dictionary"
).
where
({
"type"
:
"classify"
}).
get
()
/* 查询有数据的系统 或者 品牌 数据 {"classify_id":"","system_id":"","field":"system_id|brand_id"}*/
let
getRelationDictionary
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'getRelationDictionary'
,
data
:
params
});
let
getRelationDictionaryV2
=
async
()
=>
await
uniCloud
.
callFunction
({
name
:
'getRelationDictionaryV2'
});
/* 查询规范 根据 分类、系统、品牌 {"token":"", "classify_id":"","system_id":"","brand_id":""} */
let
getGroupStandardV2
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'getGroupStandardV2'
,
data
:
params
});
/* 保存图片 {"token":"", "standardId":"", "url":""} */
let
saveImage
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'saveImage'
,
data
:
params
});
/* 获取用户水印,首次返回默认水印 {"token":"", "systemId":""} */
let
getUserWatermark
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'getUserWatermark'
,
data
:
params
});
/* 保存用户水印配置 {"token":"", "watermark": getUserWatemark返回的数据} */
let
saveUserWatermark
=
async
(
params
=
{})
=>
await
uniCloud
.
callFunction
({
name
:
'saveUserWatermark'
,
data
:
params
});
const
rulesApi
=
{
getAllProduct
,
getBrand
,
getstandard
,
getGroupStandard
,
// 新接口
getClassifyDictionary
,
getRelationDictionary
,
getRelationDictionaryV2
,
getGroupStandardV2
,
saveImage
,
getUserWatermark
,
saveUserWatermark
}
return
rulesApi
}
module
.
exports
=
{
cloudRulesApiFun
}
\ No newline at end of file
src/common/api/index.js
View file @
967e44e1
import
{
cloudRulesApiFun
}
from
"@/common/api/cloud_rules.js"
import
{
commonApiFun
}
from
'@/common/api/common.js'
;
...
...
@@ -14,7 +11,6 @@ import {certApiFun} from"@/common/api/cert.js"
let
apiFun
=
function
(
vm
)
{
let
commonApi
=
commonApiFun
(
vm
);
let
settledApi
=
settledApiFun
(
vm
)
let
cloudApi
=
cloudRulesApiFun
(
vm
)
let
learnApi
=
learnApiFun
(
vm
)
let
assessmentApi
=
assessmentApiFun
(
vm
)
let
orderApi
=
orderApiFun
(
vm
)
...
...
@@ -22,7 +18,6 @@ let apiFun = function(vm) {
let
apiUrl
=
{
...
commonApi
,
...
settledApi
,
...
cloudApi
,
...
learnApi
,
...
orderApi
,
...
assessmentApi
,
...
...
src/common/http.api.js
View file @
967e44e1
import
{
apiFun
}
from
'@/common/api/index.js'
;
import
{
cloudRulesApiFun
}
from
"@/common/api/cloud_rules.js"
const
install
=
(
Vue
,
vm
)
=>
{
let
apiUrls
=
apiFun
(
vm
)
...
...
@@ -9,10 +7,6 @@ const install = (Vue, vm) => {
vm
.
$u
.
api
=
{
...
apiUrls
,
};
let
cloudRules
=
cloudRulesApiFun
(
vm
)
vm
.
$u
.
cloudApi
=
{
...
cloudRules
}
}
export
default
{
...
...
src/pages/photo/index.vue
View file @
967e44e1
This diff is collapsed.
Click to expand it.
src/pages/photo/list.vue
View file @
967e44e1
...
...
@@ -144,27 +144,6 @@
}
},
methods
:
{
getListData
:
function
()
{
this
.
loading
=
true
let
that
=
this
this
.
$u
.
cloudApi
.
getGroupStandardV2
({
'token'
:
this
.
vuex_token
,
'classify_id'
:
this
.
classifyId
,
'system_id'
:
this
.
systemId
,
'brand_id'
:
this
.
brandId
}).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
&&
res
.
result
)
{
if
(
res
.
result
.
error_code
)
{
uni
.
showToast
({
title
:
res
.
result
.
error_msg
})
}
else
{
that
.
handleData
(
res
.
result
)
}
}
})
},
getListDataNew
()
{
this
.
loading
=
true
let
self
=
this
...
...
@@ -251,17 +230,6 @@
url
:
'/pages/photo/take'
})
},
// 清除图片
handleClickSure
:
function
()
{
this
.
$u
.
cloudApi
.
cleanImage
({
'token'
:
this
.
vuex_token
,
}).
then
(
res
=>
{
this
.
isPopShow
=
false
if
(
res
&&
res
.
result
)
{
this
.
getListData
()
}
})
},
take
(
item
,
ikey
)
{
this
.
currentItemDate
=
item
...
...
src/pages/photo/preview.vue
View file @
967e44e1
This diff is collapsed.
Click to expand it.
src/pages/photo/setting.vue
View file @
967e44e1
...
...
@@ -122,46 +122,8 @@
const
globalData
=
getApp
().
globalData
this
.
icon_close_new
=
globalData
.
icon_close_new
this
.
systemId
=
globalData
.
photo
.
product
.
systemId
this
.
getItemList
()
},
methods
:
{
getItemList
:
function
()
{
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this
.
loading
=
true
this
.
$u
.
cloudApi
.
getUserWatermark
({
'token'
:
this
.
vuex_token
,
'system_id'
:
this
.
systemId
}).
then
(
res
=>
{
if
(
res
&&
res
.
result
)
{
if
(
res
.
result
.
error_code
){
uni
.
showToast
({
title
:
res
.
result
.
error_msg
})
}
else
{
this
.
result
=
res
.
result
}
}
else
{
uni
.
showToast
({
title
:
'网络异常'
})
}
this
.
loading
=
false
})
},
saveUserWatermark
:
function
()
{
this
.
loading
=
true
this
.
$u
.
cloudApi
.
saveUserWatermark
({
'token'
:
this
.
vuex_token
,
'watermark'
:
this
.
result
}).
then
(
res
=>
{
if
(
res
.
result
.
code
==
true
)
{
const
photo
=
getApp
().
globalData
.
photo
photo
.
waterSetting
=
this
.
result
}
else
{
uni
.
showToast
({
title
:
res
.
result
.
msg
})
}
this
.
loading
=
false
})
},
//保存原图 开关
handleOrigineChange
:
function
(
e
)
{
this
.
result
[
'hasOrigin'
]
=
!
this
.
result
[
'hasOrigin'
]
...
...
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