Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bd13d3c8
authored
Jun 18, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
f8a73771
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
20 deletions
api/module/systemApi.js
components/ToolBox.vue
pages/equity/detail/detail.vue
pages/equity/index.vue
api/module/systemApi.js
View file @
bd13d3c
...
...
@@ -10,10 +10,10 @@ const configModule = 'app-tape'
const
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
;
/**获取mock数据 */
const
getMockData
=
async
()
=>
{
const
getMockData
=
async
(
immediate
=
false
)
=>
{
const
MOCKDATA
=
uni
.
$storage
.
get
(
'mock_data'
)
try
{
if
(
MOCKDATA
&&
Date
.
now
()
-
MOCKDATA
.
createTime
<
5
*
60
e3
)
{
if
(
!
immediate
&&
MOCKDATA
&&
Date
.
now
()
-
MOCKDATA
.
createTime
<
5
*
60
e3
)
{
return
Promise
.
resolve
(
MOCKDATA
);
}
else
{
if
(
!
serverConfig
.
mockRequestCount
)
{
...
...
components/ToolBox.vue
View file @
bd13d3c
...
...
@@ -15,7 +15,7 @@
>
文件夹
</view>
<template
v-for=
"(i,index) in data"
>
<view
:class=
"['item',
{active: i
.id
== id} ]"
:class=
"['item',
{active: i
[idKey]
== id} ]"
:key="index"
@click="jump(i)"
>
...
...
@@ -60,7 +60,11 @@ export default {
type
:
String
,
data
:
Array
,
id
:
[
String
,
Number
],
showPayBtn
:
Boolean
showPayBtn
:
Boolean
,
idKey
:
{
type
:
String
,
default
:
'id'
}
},
data
()
{
return
{
...
...
pages/equity/detail/detail.vue
View file @
bd13d3c
...
...
@@ -45,7 +45,7 @@
<
template
v-if=
"type != 'preview'"
>
<tool-box
ref=
"toolRef"
:data=
"
media
"
:data=
"
toolList
"
:type=
"type"
@
choose=
"choose"
@
finish=
"open"
...
...
@@ -60,9 +60,7 @@
<view
:class=
"['sprite-icon', `$
{!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]">
</view>
</view>
</
template
>
<pay-pop
ref=
"pay"
></pay-pop>
<pay-pop
ref=
"pay"
></pay-pop>
<finish-step
ref=
"stepRef"
@
submit=
"done"
...
...
@@ -92,7 +90,8 @@ export default {
type
:
{
type
:
String
,
default
:
'preview'
}
},
toolList
:
Array
},
data
()
{
return
{
...
...
pages/equity/index.vue
View file @
bd13d3c
...
...
@@ -19,11 +19,17 @@
:style=
"i.style"
@
click=
"toDetail(i)"
>
<image
class=
"item-img"
:src=
"i.thumbnail"
mode=
"scaleToFill"
/>
<template
v-if=
"i.showTitle"
>
<view
class=
"item-text flex"
>
{{
i
.
title
}}
</view>
</
template
>
<
template
v-else
>
<image
class=
"item-img"
:src=
"i.thumbnail"
mode=
"scaleToFill"
@
error=
"errorImg(index)"
/>
</
template
>
</view>
</template>
</view>
...
...
@@ -32,6 +38,7 @@
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:toolList=
"toolList"
@
back=
"back"
@
done=
"done"
ref=
"detail"
...
...
@@ -55,6 +62,7 @@ export default {
data
()
{
return
{
moduleList
:
[],
toolList
:
[],
id
:
""
,
type
:
""
,
chooseItem
:
{},
...
...
@@ -111,8 +119,7 @@ export default {
},
// 查询素材
async
getSoure
()
{
let
moduleList
=
await
uni
.
$api
.
commonApi
.
findSoureList
();
//
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
moduleList
.
map
((
e
,
index
)
=>
{
if
(
index
==
3
)
e
.
class
=
'vertical'
else
if
(
index
==
2
)
e
.
class
=
'square'
...
...
@@ -126,9 +133,14 @@ export default {
6
:
'display:none;'
}[
index
]
}
e
.
showTitle
=
false
});
console
.
log
(
moduleList
)
this
.
moduleList
=
moduleList
;
this
.
moduleList
=
moduleList
this
.
toolList
=
toolList
},
errorImg
(
index
)
{
this
.
moduleList
[
index
].
showTitle
=
true
},
async
start
()
{
const
result
=
await
this
.
$permision
.
requestAndroidPermission
(
...
...
@@ -234,8 +246,8 @@ export default {
<
style
scoped
lang=
"scss"
>
.module-box
{
padding-top
:
44
rpx
;
&::after{
content
:
''
;
&::after
{
content
:
""
;
display
:
block
;
clear
:
both
;
}
...
...
@@ -243,12 +255,19 @@ export default {
float
:
left
;
border-radius
:
48
rpx
;
overflow
:
hidden
;
margin
:
0
48
rpx
48
rpx
0
;
margin
:
0
48
rpx
48
rpx
0
;
&-img
{
width
:
100%
;
height
:
100%
;
vertical-align
:
top
;
}
&
-text
{
width
:
100%
;
height
:
100%
;
background
:
#999
;
justify-content
:
center
;
color
:
#fff
;
}
}
.landscape
{
height
:
312
rpx
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment