gpc-ui 0.1.13 → 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.13",
3
+ "version": "0.1.14",
4
4
  "description": "二小UI",
5
5
  "private": false,
6
6
  "main": "lib/gpc-ui.umd.min.js",
@@ -2,9 +2,9 @@
2
2
  <div class="wrap">
3
3
  <div class="wrap-head" style="position: relative; width: 100%; top: 12%; padding-right: 10%;">
4
4
  <div style="color: #018a46; font-size: 40px; font-style: unset; text-align: right;">
5
- 华西绿舍装配式建筑智造系统
5
+ {{systemTitle}}
6
6
  </div>
7
- <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">● PCMS</div>
7
+ <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">●{{subtitle}}</div>
8
8
  </div>
9
9
  <div class="wrap-box">
10
10
  <div class="box-content">
@@ -27,13 +27,15 @@
27
27
  <div>
28
28
  <div class="input-box">
29
29
  <input type="text" placeholder="用户名/手机号" v-model="accountFrom.username">
30
- <i class="iconfont icon-wo"></i>
31
30
  </div>
32
31
  <div class="input-box">
33
32
  <input type="password" placeholder="密码" v-model="accountFrom.password">
34
- <i class="iconfont icon-mima"></i>
33
+ <i class="el-icon-edit"></i>
35
34
  </div>
36
-
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>
37
39
  <div class="buttons clearfix">
38
40
  <button type="button" class="btn-login fr button" @click="getAccountLogin">登录</button>
39
41
  </div>
@@ -43,7 +45,6 @@
43
45
  <div>
44
46
  <div class="input-box">
45
47
  <input type="text" placeholder="手机号" v-model="verifyFrom.username">
46
- <i class="iconfont icon-wo"></i>
47
48
  </div>
48
49
  <div class="input-box">
49
50
  <drag-verify ref="dragVerifyLogin" :width="300" :isPassing.sync="isPassingLogin" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
@@ -69,7 +70,6 @@
69
70
  <h3>重置密码</h3>
70
71
  <div class="input-box">
71
72
  <input type="text" placeholder="手机号" v-model="verifyFrom.username">
72
- <i class="iconfont icon-wo"></i>
73
73
  </div>
74
74
  <div class="input-box">
75
75
  <drag-verify ref="dragVerifyRest" :width="320" :isPassing.sync="isPassingRest" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
@@ -89,16 +89,16 @@
89
89
  </div>
90
90
  </div>
91
91
  </div>
92
- <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>
93
93
  </div>
94
94
  <div class="wrap-foot">
95
95
  <div class="center_con" style="font-size: 12px;">
96
96
  <div>
97
- <p>主办:四川华西绿舍建筑有限公司 </p>
98
- <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>
99
99
  <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=51019002000801" target="_blank">
100
100
  <img style="width: 20px;" src="https://beian.mps.gov.cn/img/logo01.dd7ff50e.png">
101
- 川公网安备 51019002000801号
101
+ 川公网安备 {{waNo}}
102
102
  </a>
103
103
  </p>
104
104
  </div>
@@ -120,7 +120,30 @@ export default {
120
120
  dragVerify,
121
121
  },
122
122
  props: {
123
- 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
+ },
124
147
  },
125
148
  data() {
126
149
  return {
@@ -131,8 +154,11 @@ export default {
131
154
  // 账号登录
132
155
  accountFrom:{
133
156
  username: '',
157
+ authCode: "",
134
158
  password: ''
135
159
  },
160
+ // 滑块验证 - 验证码登录
161
+ isPassingAccount: false,
136
162
  // 验证码登录
137
163
  verifyFrom:{
138
164
  username: "",
@@ -162,9 +188,32 @@ export default {
162
188
  }
163
189
  },
164
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
+ },
165
201
  // 账号登录
166
202
  getAccountLogin(){
167
-
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');
168
217
  },
169
218
  // 验证码登录
170
219
  getVerifyCodeLogin(){
@@ -187,6 +236,7 @@ export default {
187
236
  },
188
237
  passCallLoginBack() {
189
238
  console.log('passCallLoginBack \'验证通过\'');
239
+ this.$emit('getCodeRequest', 'code');
190
240
  // this.isPassingLogin = false
191
241
  },
192
242
  resetLogin() {
@@ -213,8 +263,9 @@ export default {
213
263
  }
214
264
  },
215
265
  passCallRestBack() {
216
- console.log('passcallback \'验证通过\'');
266
+ console.log('passCallRestBack \'验证通过\'');
217
267
  // this.isPassingRest = false
268
+ this.$emit('getCodeRequest', 'rest');
218
269
  },
219
270
  resetPw() {
220
271
  this.isPassingRest = false;
@@ -566,7 +617,7 @@ a {
566
617
  }
567
618
 
568
619
  .input-box input:focus + i:after {
569
- width: 320px;
620
+ width: 300px;
570
621
  }
571
622
 
572
623
  .manager-box .button {