Эх сурвалжийг харах

添加系统设置字段和验证码样式

zhaoke 3 жил өмнө
parent
commit
0a6341e2d1

+ 3 - 2
src/views/login/identify.vue

@@ -73,9 +73,10 @@ export default {
     drawText (ctx, txt, i) {
       ctx.fillStyle = this.randomColor(50, 160) // 随机生成字体颜色
       ctx.font = this.randomNum(this.fontSizeMin, this.fontSizeMax) + 'px SimHei' // 随机生成字体大小
-      let x = (i + 1) * (this.contentWidth / (this.identifyCode.length + 1))
+      let x = (i + 1) * (this.contentWidth / (this.identifyCode.length + 1) - 2)
       let y = this.randomNum(this.fontSizeMax, this.contentHeight - 5)
-      var deg = this.randomNum(-30, 30)
+      // var deg = this.randomNum(-30, 30)
+      var deg = this.randomNum(-5, 5)
       // 修改坐标原点和旋转角度
       ctx.translate(x, y)
       ctx.rotate(deg * Math.PI / 180)

+ 9 - 0
src/views/systemManagement/index.vue

@@ -117,6 +117,14 @@
               <el-input v-model="FormData.PwdMessage" placeholder="请输入"></el-input>
             </el-form-item>
           </div>
+          <div class="lineStyle"></div>
+        </div>
+        <div class="boxList">
+          <span class="ListName">是否启用简易验证码</span>
+          <div class="riaStyle">
+            <el-radio v-model="FormData.SimpleValidCodeMode" :label="1">是</el-radio>
+            <el-radio v-model="FormData.SimpleValidCodeMode" :label="0">否</el-radio>
+          </div>
           <div class="lineStyle" style="margin-bottom: 70px"></div>
         </div>
       </el-form>
@@ -148,6 +156,7 @@ export default {
         PwdValidtime: 0,
         LoginError: 0,
         PwdMessage: "",
+        SimpleValidCodeMode: 0
       },
       rules: {
         UserIdledays: [