gpc-ui 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpc-ui",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "二小UI",
5
5
  "private": false,
6
6
  "main": "lib/gpc-ui.umd.min.js",
@@ -1,13 +1,10 @@
1
1
  <template>
2
2
  <div class="wrap">
3
- <div class="wrap-head" style="position: relative; width: 100%; top: 10%; padding-right: 10%;">
4
- <slot></slot>
5
- <div style="color: #018a46; font-size: 48px; font-style: oblique; text-align: right;">
6
- 华西绿舍装配式建筑智造系统
7
-
3
+ <div class="wrap-head" style="position: relative; width: 100%; top: 12%; padding-right: 10%;">
4
+ <div style="color: #018a46; font-size: 40px; font-style: unset; text-align: right;">
5
+ {{systemTitle}}
8
6
  </div>
9
- <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">● PCMS</div>
10
-
7
+ <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">●{{subtitle}}</div>
11
8
  </div>
12
9
  <div class="wrap-box">
13
10
  <div class="box-content">
@@ -30,13 +27,15 @@
30
27
  <div>
31
28
  <div class="input-box">
32
29
  <input type="text" placeholder="用户名/手机号" v-model="accountFrom.username">
33
- <i class="iconfont icon-wo"></i>
34
30
  </div>
35
31
  <div class="input-box">
36
32
  <input type="password" placeholder="密码" v-model="accountFrom.password">
37
- <i class="iconfont icon-mima"></i>
33
+ <i class="el-icon-edit"></i>
38
34
  </div>
39
-
35
+ <drag-verify ref="dragVerifyLogin" :width="300" :isPassing.sync="isPassingAccount" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
36
+ handlerIcon="el-icon-d-arrow-right" successIcon="el-icon-circle-check"
37
+ @passcallback="passCallAccountBack">
38
+ </drag-verify>
40
39
  <div class="buttons clearfix">
41
40
  <button type="button" class="btn-login fr button" @click="getAccountLogin">登录</button>
42
41
  </div>
@@ -46,7 +45,6 @@
46
45
  <div>
47
46
  <div class="input-box">
48
47
  <input type="text" placeholder="手机号" v-model="verifyFrom.username">
49
- <i class="iconfont icon-wo"></i>
50
48
  </div>
51
49
  <div class="input-box">
52
50
  <drag-verify ref="dragVerifyLogin" :width="300" :isPassing.sync="isPassingLogin" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
@@ -72,7 +70,6 @@
72
70
  <h3>重置密码</h3>
73
71
  <div class="input-box">
74
72
  <input type="text" placeholder="手机号" v-model="verifyFrom.username">
75
- <i class="iconfont icon-wo"></i>
76
73
  </div>
77
74
  <div class="input-box">
78
75
  <drag-verify ref="dragVerifyRest" :width="320" :isPassing.sync="isPassingRest" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
@@ -92,16 +89,16 @@
92
89
  </div>
93
90
  </div>
94
91
  </div>
95
- <div style="color: red; font-size: 15px; margin-top: 30px; text-align: right;">*本平台为互联网非涉密平台,严禁处理、传输国家秘密、工作秘密。</div>
92
+ <div style="color: red; font-size: 15px; margin-top: 30px; text-align: right;">{{promptTitle}}</div>
96
93
  </div>
97
94
  <div class="wrap-foot">
98
95
  <div class="center_con" style="font-size: 12px;">
99
96
  <div>
100
- <p>主办:四川华西绿舍建筑有限公司 </p>
101
- <p>ICP备案/许可证编号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">蜀ICP备19027284号-1</a> 网站识别码:5101000033
97
+ <p>主办:{{orgTitle}}</p>
98
+ <p>ICP备案/许可证编号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{icpNo}}</a>
102
99
  <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=51019002000801" target="_blank">
103
100
  <img style="width: 20px;" src="https://beian.mps.gov.cn/img/logo01.dd7ff50e.png">
104
- 川公网安备 51019002000801号
101
+ 川公网安备 {{waNo}}
105
102
  </a>
106
103
  </p>
107
104
  </div>
@@ -123,7 +120,30 @@ export default {
123
120
  dragVerify,
124
121
  },
125
122
  props: {
126
- msg: String
123
+ systemTitle : {
124
+ type: String,
125
+ default: ''
126
+ },
127
+ subtitle : {
128
+ type: String,
129
+ default: ''
130
+ },
131
+ promptTitle : {
132
+ type: String,
133
+ default: ''
134
+ },
135
+ orgTitle: {
136
+ type: String,
137
+ default: ''
138
+ },
139
+ icpNo: {
140
+ type: String,
141
+ default: ''
142
+ },
143
+ waNo: {
144
+ type: String,
145
+ default: ''
146
+ },
127
147
  },
128
148
  data() {
129
149
  return {
@@ -134,8 +154,11 @@ export default {
134
154
  // 账号登录
135
155
  accountFrom:{
136
156
  username: '',
157
+ authCode: "",
137
158
  password: ''
138
159
  },
160
+ // 滑块验证 - 验证码登录
161
+ isPassingAccount: false,
139
162
  // 验证码登录
140
163
  verifyFrom:{
141
164
  username: "",
@@ -165,9 +188,32 @@ export default {
165
188
  }
166
189
  },
167
190
  methods: {
191
+ // 获取传入验证码
192
+ getCodeRequest(type, authCode){
193
+ if(type === 'account'){
194
+ this.accountFrom.authCode = authCode
195
+ } else if(type === 'login'){
196
+ this.verifyFrom.authCode = authCode
197
+ } else if(type === 'rest'){
198
+ this.resetFrom.authCode = authCode
199
+ }
200
+ },
168
201
  // 账号登录
169
202
  getAccountLogin(){
170
-
203
+ if(!this.accountFrom.authCode){
204
+ this.$notify.error({message: '请先验证滑块'});
205
+ } else if(!this.accountFrom.username){
206
+ this.$notify.error({message: '请先输入账号或手机号'});
207
+ } else if(!this.accountFrom.password){
208
+ this.$notify.error({message: '请先输入密码'});
209
+ } else {
210
+ this.$emit('applyAccountLoginRequest', this.accountFrom);
211
+ }
212
+ },
213
+ // 账号登录验证
214
+ passCallAccountBack(){
215
+ console.log('passCallAccountBack \'验证通过\'', this.isPassingAccount);
216
+ this.$emit('getCodeRequest', 'account');
171
217
  },
172
218
  // 验证码登录
173
219
  getVerifyCodeLogin(){
@@ -190,6 +236,7 @@ export default {
190
236
  },
191
237
  passCallLoginBack() {
192
238
  console.log('passCallLoginBack \'验证通过\'');
239
+ this.$emit('getCodeRequest', 'code');
193
240
  // this.isPassingLogin = false
194
241
  },
195
242
  resetLogin() {
@@ -216,8 +263,9 @@ export default {
216
263
  }
217
264
  },
218
265
  passCallRestBack() {
219
- console.log('passcallback \'验证通过\'');
266
+ console.log('passCallRestBack \'验证通过\'');
220
267
  // this.isPassingRest = false
268
+ this.$emit('getCodeRequest', 'rest');
221
269
  },
222
270
  resetPw() {
223
271
  this.isPassingRest = false;
@@ -569,7 +617,7 @@ a {
569
617
  }
570
618
 
571
619
  .input-box input:focus + i:after {
572
- width: 320px;
620
+ width: 300px;
573
621
  }
574
622
 
575
623
  .manager-box .button {