Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
f91cca28
Commit
f91cca28
authored
Jul 30, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加banner图片裁切功能
parent
0947b843
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
21 deletions
+116
-21
addproof.png
src/assets/addproof.png
+0
-0
Index.vue
src/views/proof/Index.vue
+8
-1
AddBanner.vue
src/views/proof/components/AddBanner.vue
+27
-13
AddBaseinfo.vue
src/views/proof/components/AddBaseinfo.vue
+72
-0
Recharge.vue
src/views/userCenter/Recharge.vue
+8
-6
RechargeRecord.vue
src/views/userCenter/RechargeRecord.vue
+1
-1
No files found.
src/assets/addproof.png
0 → 100644
View file @
f91cca28
2.38 KB
src/views/proof/Index.vue
View file @
f91cca28
<
template
>
<
template
>
<div
class=
"proof-list"
>
<div
class=
"proof-list"
>
<van-image
src=
"@/assets/addproof.png"
width=
"50px"
fit=
"contain"
class=
"add-proof"
></van-image>
<header>
<header>
<span
style=
"font-size:18px;font-weight:500;"
>
存证列表
</span>
<span
style=
"font-size:18px;font-weight:500;"
>
存证列表
</span>
<div
@
click=
"showFilterPicker = true"
>
<div
@
click=
"showFilterPicker = true"
>
<common-svg
name=
"shaixuan"
></common-svg>
<common-svg
name=
"shaixuan"
></common-svg>
<span>
筛选
</span>
<span>
筛选
</span>
</div>
</div>
</header>
</header>
<van-list
<van-list
v-model=
"loading"
v-model=
"loading"
...
@@ -328,11 +329,17 @@ export default class Index extends Vue {
...
@@ -328,11 +329,17 @@ export default class Index extends Vue {
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.proof-list
{
.proof-list
{
position
:
relative
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
11px
14px
;
padding
:
11px
14px
;
background
:
#F9FBFF
;
background
:
#F9FBFF
;
margin-bottom
:
$tabHeight
;
margin-bottom
:
$tabHeight
;
}
}
.add-proof
{
position
:
fixed
;
right
:
20px
;
bottom
:
60px
;
}
header
{
header
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
...
src/views/proof/components/AddBanner.vue
View file @
f91cca28
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
position=
"bottom"
position=
"bottom"
:close-on-click-overlay=
"false"
:close-on-click-overlay=
"false"
:style=
"
{height: '100%'}">
:style=
"
{height: '100%'}">
<label>
<input
type=
"file"
name=
"img"
@
change=
"change"
id=
"input123"
style=
"display:none;"
>
<input
type=
"file"
name=
"img"
@
change=
"change"
style=
"display:none;"
>
<h5-cropper
:option=
"option"
hide-input
@
getFile=
"getFile"
ref=
"cropper"
></h5-cropper>
<label
for=
"input123"
>
<div
class=
"add"
>
<div
class=
"add"
>
<common-svg
name=
"Droptheelements"
width=
"33px"
height=
"33px"
></common-svg>
<common-svg
name=
"Droptheelements"
width=
"33px"
height=
"33px"
></common-svg>
<div
style=
"color:#EBEBEB;font-size: 14px;"
>
增加Banner图
</div>
<div
style=
"color:#EBEBEB;font-size: 14px;"
>
增加Banner图
</div>
...
@@ -24,10 +25,12 @@
...
@@ -24,10 +25,12 @@
/>
/>
</div>
</div>
</div>
</div>
<div>
1、最多可添加四张banner图
<ul
style=
"text-align:left;padding:12px;color:#818181;font-size:12px;"
>
2、建议350(宽)x140(高)的比例
<li>
1、最多可添加四张banner图
</li>
3、最大限制2M
<li>
2、建议350(宽)x140(高)的比例
</li>
4、文件类型:PNG/JPG/GIF(无动态化)
</div>
<li>
3、最大限制2M
</li>
<li>
4、文件类型:PNG/JPG/GIF(无动态化)
</li>
</ul>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<div
class=
"left"
@
click=
"save"
>
仅保存
</div>
<div
class=
"left"
@
click=
"save"
>
仅保存
</div>
<div
class=
"right"
@
click=
"saveAndChain"
>
保存并上链
</div>
<div
class=
"right"
@
click=
"saveAndChain"
>
保存并上链
</div>
...
@@ -37,6 +40,7 @@
...
@@ -37,6 +40,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Watch
,
Vue
,
Emit
}
from
'vue-property-decorator'
;
import
{
Component
,
Prop
,
Watch
,
Vue
,
Emit
}
from
'vue-property-decorator'
;
import
{
Button
,
Field
,
Popup
,
Image
}
from
'vant'
;
import
{
Button
,
Field
,
Popup
,
Image
}
from
'vant'
;
import
H5Cropper
from
'vue-cropper-h5'
;
import
{
Getter
}
from
'vuex-class'
;
import
{
Getter
}
from
'vuex-class'
;
import
{
TemplateDataItem
}
from
'@/const/interface'
;
import
{
TemplateDataItem
}
from
'@/const/interface'
;
import
{
Route
}
from
'vue-router'
;
import
{
Route
}
from
'vue-router'
;
...
@@ -46,6 +50,7 @@ import { Route } from 'vue-router';
...
@@ -46,6 +50,7 @@ import { Route } from 'vue-router';
[
Field
.
name
]:
Field
,
[
Field
.
name
]:
Field
,
[
Popup
.
name
]:
Popup
,
[
Popup
.
name
]:
Popup
,
[
Image
.
name
]:
Image
,
[
Image
.
name
]:
Image
,
H5Cropper
,
},
},
})
})
export
default
class
AddBanner
extends
Vue
{
export
default
class
AddBanner
extends
Vue
{
...
@@ -55,7 +60,9 @@ export default class AddBanner extends Vue {
...
@@ -55,7 +60,9 @@ export default class AddBanner extends Vue {
private
banners
!
:
string
[];
private
banners
!
:
string
[];
private
imgs
:
any
[]
=
[];
private
imgs
:
any
[]
=
[];
private
show
:
boolean
=
true
;
private
show
:
boolean
=
true
;
private
option
:
any
=
{};
private
option
:
any
=
{
fixedNumber
:
[
35
,
14
],
};
@
Watch
(
'banners'
,
{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'banners'
,
{
immediate
:
true
,
deep
:
true
})
private
async
onChange
(
newVal
:
[],
oldVal
:
[])
{
private
async
onChange
(
newVal
:
[],
oldVal
:
[])
{
if
(
newVal
.
length
<=
0
)
{
if
(
newVal
.
length
<=
0
)
{
...
@@ -69,14 +76,18 @@ export default class AddBanner extends Vue {
...
@@ -69,14 +76,18 @@ export default class AddBanner extends Vue {
private
del
(
index
:
number
)
{
private
del
(
index
:
number
)
{
this
.
imgs
.
splice
(
index
,
1
);
this
.
imgs
.
splice
(
index
,
1
);
}
}
private
change
(
e
:
any
)
{
private
getFile
(
file
:
any
)
{
const
input
=
e
.
target
;
this
.
$api
.
file
.
upload
(
file
).
then
((
res
:
any
)
=>
{
const
files
=
input
.
files
;
if
(
files
&&
files
[
0
])
{
this
.
$api
.
file
.
upload
(
files
[
0
]).
then
((
res
:
any
)
=>
{
this
.
imgs
.
push
(
res
);
this
.
imgs
.
push
(
res
);
});
});
}
private
change
(
e
:
any
)
{
if
(
this
.
imgs
.
length
>=
4
)
{
this
.
$toast
(
"最多上传4张banner图"
);
return
;
}
}
(
this
.
$refs
.
cropper
as
any
).
loadFile
(
e
.
target
.
files
[
0
]);
e
.
target
.
value
=
''
;
}
}
get
hashs
()
{
get
hashs
()
{
return
this
.
imgs
.
map
(
(
img
:
any
)
=>
img
.
hash
);
return
this
.
imgs
.
map
(
(
img
:
any
)
=>
img
.
hash
);
...
@@ -93,6 +104,9 @@ export default class AddBanner extends Vue {
...
@@ -93,6 +104,9 @@ export default class AddBanner extends Vue {
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.addBanner
{
.addBanner
{
.upbtn
{
height
:
0
;
}
.add
{
.add
{
position
:relative
;
position
:relative
;
display
:
flex
;
display
:
flex
;
...
...
src/views/proof/components/AddBaseinfo.vue
0 → 100644
View file @
f91cca28
<
template
>
<van-popup
class=
"add-baseinfo"
v-model=
"show"
position=
"bottom"
:close-on-click-overlay=
"false"
:style=
"
{height: '80%'}">
<van-field
v-model=
"proofName"
></van-field>
</van-popup>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Watch
,
Vue
,
Emit
}
from
'vue-property-decorator'
;
import
{
Button
,
Field
,
Popup
,
Image
}
from
'vant'
;
import
{
Getter
}
from
'vuex-class'
;
import
{
TemplateDataItem
}
from
'@/const/interface'
;
import
{
Route
}
from
'vue-router'
;
@
Component
({
components
:
{
[
Button
.
name
]:
Button
,
[
Field
.
name
]:
Field
,
[
Popup
.
name
]:
Popup
,
[
Image
.
name
]:
Image
,
},
})
export
default
class
AddBaseinfo
extends
Vue
{
private
proofName
:
string
=
''
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
.addBanner
{
.add
{
position
:relative
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
height
:
170px
;
text-align
:
center
;
background
:
#353535
;
color
:
#FFFFFF
;
}
.preview
{
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
70px
);
gap
:
10px
;
padding
:
17px
;
}
.btn-group
{
.left
,
.right
{
flex
:
auto
;
}
.left
{
width
:
160px
;
height
:
40px
;
line-height
:
40px
;
border-radius
:
4px
;
border
:
1px
solid
rgba
(
238
,
238
,
238
,
1
);
}
.right
{
margin-left
:
10px
;
width
:
160px
;
height
:
40px
;
line-height
:
40px
;
background
:linear-gradient
(
360deg
,
rgba
(
93
,
123
,
246
,
1
)
0
%
,
rgba
(
108
,
122
,
254
,
1
)
100
%
)
;
box-shadow
:
0px
2px
10px
0px
rgba
(
63
,
121
,
254
,
0
.4
);
border-radius
:
4px
;
color
:
#FFFFFF
;
}
}
}
</
style
>
\ No newline at end of file
src/views/userCenter/Recharge.vue
View file @
f91cca28
...
@@ -48,12 +48,14 @@
...
@@ -48,12 +48,14 @@
</p>
</p>
</section>
</section>
<section
class=
"confirm-recharge"
v-if=
"confirm"
>
<section
class=
"confirm-recharge"
v-if=
"confirm"
>
<div
class=
"box"
>
<div
class=
"box"
style=
"text-align:center;"
>
<div>
确认付款
</div>
<div
style=
"color:#353535;font-size:20px;"
>
确认付款
</div>
<div>
{{price}}
</div>
<div
style=
"color:#353535;font-size: 40px;"
>
{{price}}
</div>
<div>
{{chainTimes}}
</div>
<div
style=
"color:#B6B7B9;font-size: 16px;"
>
{{chainTimes}}
</div>
<div>
微信支付
</div>
<div>
{{method === 0? '支付宝支付': '微信支付'}}
</div>
<a
:href=
"payUrl"
>
立即充值
</a>
<a
:href=
"payUrl"
style=
"background:linear-gradient(180deg,rgba(70,103,250,1) 0%,rgba(91,119,244,1) 100%);
box-shadow:0px 2px 15px 0px rgba(63,121,254,0.42);width:200px;height:40px;line-height:40px;
border-radius:4px;"
>
立即充值
</a>
</div>
</div>
</section>
</section>
</div>
</div>
...
...
src/views/userCenter/RechargeRecord.vue
View file @
f91cca28
<
template
>
<
template
>
<div
class=
"recharge-record"
>
<div
class=
"recharge-record"
>
<p>
充值记录
</p>
<p
style=
"font-weight:500;"
>
充值记录
</p>
<ul>
<ul>
<li
class=
"item"
v-for=
"
{id, name, chain_times, pay_time} in recordList" :key="id">
<li
class=
"item"
v-for=
"
{id, name, chain_times, pay_time} in recordList" :key="id">
<div>
{{
name
}}
</div>
<div>
{{
name
}}
</div>
...
...
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