Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Culm
pica-professional-exam
提交
2d1abd01
提交
2d1abd01
编写于
7月 15, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
样式优化等
上级
998313ab
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
192 行增加
和
12 行删除
+192
-12
change-card copy.vue
src/components/cme/change-card copy.vue
+183
-0
change-card.vue
src/components/cme/change-card.vue
+8
-11
merge-detail.vue
src/views/merge-detail.vue
+1
-1
未找到文件。
src/components/cme/change-card copy.vue
0 → 100644
浏览文件 @
2d1abd01
<
template
>
<van-popup
v-model=
"isShow"
@
click-overlay=
"cancle"
position=
"bottom"
>
<section
class=
"bind-cart-wrapper"
>
<article
class=
"title"
>
<span>
激活详情
</span>
<img
@
click=
"cancle"
src=
"../../images/cme/close.png"
/>
</article>
<article
class=
"tip"
>
<div
class=
"left"
>
<img
src=
"../../images/cme/phrase2/info.png"
/>
<span>
激活码用于学习课程,您可以从订单详情或您的实体卡查看激活码。激活码一旦使用,不可退回。
</span>
</div>
</article>
<section
class=
"input-wrapper"
>
<article
class=
"code-new"
>
<!--
<van-field
maxlength=
"26"
v-model=
"activationCode"
label=
"激活码"
placeholder=
"请输入激活码"
/>
-->
<!--
<span>
激活码
</span>
<input
type=
"text"
maxlength=
"26"
v-model=
"activationCode"
placeholder=
"请输入激活码"
>
-->
</article>
<span
class=
"error"
>
{{
errorMsg
}}
</span>
<img
v-show=
"!!activationCode"
@
click=
"clear"
src=
"../../images/cme/phrase2/close.png"
/>
</section>
<article
class=
"bottom"
>
<van-button
@
click=
"confirm"
size=
"large"
round
color=
"#449284"
>
确认激活
</van-button>
</article>
</section>
</van-popup>
</
template
>
<
script
>
export
default
{
props
:
{
isShow
:
{
type
:
Boolean
,
default
:
true
},
changeErrorMsg
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
activationCode
:
''
,
errorMsg
:
''
};
},
//
watch
:
{
activationCode
(
val
)
{
if
(
!
val
)
{
this
.
errorMsg
=
'请输入激活码'
;
}
else
{
this
.
errorMsg
=
''
;
}
this
.
$nextTick
(()
=>
{
this
.
activationCode
=
val
.
replace
(
/
\s
/g
,
''
).
replace
(
/.....
(?!
$
)
/g
,
'$& '
);
});
},
changeErrorMsg
(
val
)
{
if
(
val
)
{
this
.
errorMsg
=
val
;
}
},
isShow
(
val
)
{
this
.
activationCode
=
''
;
this
.
errorMsg
=
''
;
}
},
methods
:
{
cancle
()
{
this
.
$emit
(
"cancle"
);
},
confirm
()
{
if
(
!
this
.
activationCode
)
{
this
.
errorMsg
=
'请输入激活码'
;
return
;
};
if
(
this
.
activationCode
.
length
!=
23
)
{
this
.
errorMsg
=
'请输入正确的激活码'
;
return
;
}
let
aCode
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
activationCode
));
aCode
=
aCode
.
replace
(
/
\s
/g
,
''
);
this
.
$emit
(
"confirm"
,
aCode
);
},
clear
()
{
this
.
activationCode
=
''
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"../../style/mixin"
;
.bind-cart-wrapper
{
width
:
100%
;
display
:
flex
;
line-height
:
1
;
padding
:
px2rem
(
10px
)
px2rem
(
15px
);
display
:
flex
;
flex-direction
:
column
;
background
:
rgba
(
255
,
255
,
255
,
1
);
// box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
.title
{
display
:
flex
;
flex-direction
:
row
;
font-size
:
18px
;
font-weight
:
700
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
margin-top
:
px2rem
(
20px
);
img
{
position
:
relative
;
top
:
0
;
right
:
px2rem
(
-120px
);
width
:
px2rem
(
12px
);
height
:
px2rem
(
12px
);
}
}
.tip
{
display
:
flex
;
margin-top
:
px2rem
(
40px
);
.left
{
display
:
flex
;
line-height
:
1
.2
;
font-size
:
px2rem
(
12px
);
img
{
position
:
relative
;
top
:
px2rem
(
1px
);
width
:
px2rem
(
12px
);
height
:
px2rem
(
12px
);
// margin: px2rem(2px) px2rem(4px) 0 px2rem(1px);
}
span
{
margin-left
:
px2rem
(
4px
);
}
color
:
#979899
;
}
}
.input-wrapper
{
position
:
relative
;
.code
{
display
:
flex
;
flex-direction
:
column
;
padding
:
px2rem
(
20px
)
0
;
padding-top
:
0
;
}
.error
{
position
:
absolute
;
top
:
px2rem
(
66px
);
left
:
px2rem
(
56px
);
display
:
inline-block
;
color
:
red
;
font-size
:
px2rem
(
12px
);
}
img
{
position
:
absolute
;
top
:
px2rem
(
33px
);
right
:
px2rem
(
12px
);
width
:
px2rem
(
15px
);
height
:
px2rem
(
15px
);
}
}
.bottom
{
display
:
flex
;
margin-bottom
:
px2rem
(
40px
);
}
}
</
style
>
\ No newline at end of file
src/components/cme/change-card.vue
浏览文件 @
2d1abd01
...
@@ -17,14 +17,8 @@
...
@@ -17,14 +17,8 @@
</article>
</article>
<section
class=
"input-wrapper"
>
<section
class=
"input-wrapper"
>
<article
class=
"code"
>
<article
class=
"code"
>
<van-field
<span>
激活码
</span>
maxlength=
"26"
<input
type=
"text"
maxlength=
"26"
v-model=
"activationCode"
placeholder=
"请输入激活码"
>
v-model=
"activationCode"
label=
"激活码"
placeholder=
"请输入激活码"
/>
<!--
<span>
激活码
</span>
<input
type=
"text"
maxlength=
"26"
v-model=
"activationCode"
placeholder=
"请输入激活码"
>
-->
</article>
</article>
<span
class=
"error"
>
{{
errorMsg
}}
</span>
<span
class=
"error"
>
{{
errorMsg
}}
</span>
<img
v-show=
"!!activationCode"
@
click=
"clear"
src=
"../../images/cme/phrase2/close.png"
/>
<img
v-show=
"!!activationCode"
@
click=
"clear"
src=
"../../images/cme/phrase2/close.png"
/>
...
@@ -154,9 +148,12 @@ export default {
...
@@ -154,9 +148,12 @@ export default {
position
:
relative
;
position
:
relative
;
.code
{
.code
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
row
;
padding
:
px2rem
(
20px
)
0
;
height
:
px2rem
(
60px
);
padding-top
:
0
;
line-height
:
px2rem
(
60px
);
font-size
:
px2rem
(
14px
);
// padding: px2rem(20px) 0;
// padding-top: 0;
}
}
.error
{
.error
{
position
:
absolute
;
position
:
absolute
;
...
...
src/views/merge-detail.vue
浏览文件 @
2d1abd01
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<!--去激活-->
<!--去激活-->
<ChangeCard
<ChangeCard
:changeErrorMsg=
"changeCardErrorMsg"
:changeErrorMsg=
"changeCardErrorMsg"
:isShow=
"showChangeCard"
:isShow=
"
!
showChangeCard"
@
cancle=
"cancleChangeCard"
@
cancle=
"cancleChangeCard"
@
confirm=
"changeCardAction"
>
@
confirm=
"changeCardAction"
>
</ChangeCard>
</ChangeCard>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录