lsw 1 سال پیش
والد
کامیت
68328d3fdb
2فایلهای تغییر یافته به همراه47 افزوده شده و 36 حذف شده
  1. 1 1
      admin-ui/src/App.vue
  2. 46 35
      admin-ui/src/components/qr.vue

+ 1 - 1
admin-ui/src/App.vue

@@ -21,7 +21,7 @@ export default {
 /**挂载iconfont字体图标*/
 @font-face {
   font-family: 'iconfont';
-  src: url('https://at.alicdn.com/t/c/font_4507607_hm22relzejc.ttf?t=1713333144935') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_4507607_65hrfnip6ym.ttf?t=1713404333569') format('truetype');
   /* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 46 - 35
admin-ui/src/components/qr.vue

@@ -1,45 +1,56 @@
 <template>
-	<div>
-
-	</div>
+  <div class="cmain">
+    <div class="ewm">
+      <div id="qrcode"></div>
+    </div>
+  </div>
 </template>
 
 <script>
 import QRCode from 'qrcodejs2';
 export default {
-	props: {
-		item: {
-			type: Object,
-			default: {}
-		},
-		fixed_number: {
-			type: Array,
-			default: () => [6, 4.5]
-		}
-	},
-	data() {
-		return {
-			open: false,
-			visible: false, //是否显示cropper
-		};
-	},
-	methods: {
-		editCropper(data) {
-			this.open = true;
-			this.visible = true;
-			this.options.img = data;
-		},
-		// 向左旋转
-		rotateLeft() {
-			this.$refs.cropper.rotateLeft();
-		},
-		// 向右旋转
-		rotateRight() {
-			this.$refs.cropper.rotateRight();
-		},
-	}
+  data() {
+    return {
+      company: {}
+    };
+  },
+  props: {
+    param: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    },
+    layerid: {
+      type: String
+    }
+  },
+  mounted() {
+    this.ajax({ url: '/work/company/index' }).then((response) => {
+      this.company = response.data;
+      this.$nextTick(() => {
+        this.qrCode();
+      });
+    });
+  },
+  methods: {
+    qrCode() {
+      document.getElementById('qrcode').innerHTML = '';
+      new QRCode('qrcode', {
+        width: 250,
+        height: 250,
+        text: '' + this.company.id
+      });
+    }
+  }
 };
 </script>
 <style lang="scss">
-
+.ewm {
+  text-align: center;
+  padding-top: 15px;
+  img {
+    margin: 0 auto;
+  }
+}
 </style>