Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-h5-agreement
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.foundation.frontend
pica-h5-agreement
提交
63425095
提交
63425095
编写于
11月 20, 2019
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组件获取协议页面域名
上级
4c4c2032
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
29 行增加
和
4 行删除
+29
-4
README.md
README.md
+22
-1
agreement.vue
src/agreement.vue
+7
-3
未找到文件。
README.md
浏览文件 @
63425095
...
...
@@ -11,14 +11,28 @@ Vue.use(PicaH5Agreement);
```
html
// template need popup
<van-popup
v-model=
"
show
"
>
<van-popup
v-model=
"
isShowAgreement"
:close-on-click-overlay=
"false
"
>
<pica-h5-agreement
:close=
"true"
:base-url=
"baseUrl"
:agreement-token=
"agreementToken"
:agreement-page-url=
"agreementPageUrl"
@
sign-agreement=
"signAgreement"
/>
</van-popup>
```
```
javascript
// 代码
export
default
{
methods
:
{
signAgreement
()
{
this
.
isShowAgreement
=
false
;
}
}
}
```
###### 2. options
...
...
@@ -26,9 +40,16 @@ Vue.use(PicaH5Agreement);
| --------- | ---------------------- | -------- | -------- |
| baseUrl | 接口域名 | string | 空 |
| close | 是否显示 close 符号 | boolean | false |
| agreementToken | 需要传的token | string | '' |
| agreementPageUrl | 需要传的协议页面的地址域名 | string | '' |
| signAgreement | 同意协议后的回调 | function | () => {} |
> baseUrl:
> dev : http://dev-sc.yunqueyi.com
> test1: http://test1-sc.yunqueyi.com
> uat: http://uat-sc.yunqueyi.com
> agreementPageUrl:
> dev : https://dev-scale.yunqueyi.com
> test1: https://test1-scale.yunqueyi.com
> uat: https://uat-scale.yunqueyi.com
src/agreement.vue
浏览文件 @
63425095
...
...
@@ -22,6 +22,10 @@ export default {
type
:
String
,
default
:
''
},
agreementPageUrl
:
{
type
:
String
,
default
:
''
},
close
:
{
type
:
Boolean
,
default
:
false
...
...
@@ -33,7 +37,7 @@ export default {
}
},
created
()
{
},
methods
:
{
readAndAgree
()
{
...
...
@@ -48,8 +52,8 @@ export default {
}
})
},
gotoAgreement
()
{
window
.
location
.
href
=
'http://10.177.10.217:8080/loginAgreement'
;
gotoAgreement
()
{
//https://dev-scale.yunqueyi.com/hypertensionscale
window
.
location
.
href
=
`
${
this
.
agreementPageUrl
}
/loginAgreement?token=
${
this
.
agreementToken
}
&pageUrl=
${
window
.
location
.
href
}
`
;
}
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录