Huaghty 5 éve
szülő
commit
8cc9250c17
6 módosított fájl, 32 hozzáadás és 11 törlés
  1. 2 1
      package.json
  2. 1 1
      scripts/config.js
  3. 6 6
      scripts/webpack/dev.js
  4. 12 2
      src/actions/getChainList.js
  5. 5 0
      src/components/app.vue
  6. 6 1
      src/index.js

+ 2 - 1
package.json

@@ -53,6 +53,7 @@
     "axios": "^0.19.0",
     "iview": "^3.5.3",
     "v-viewer": "^1.4.2",
-    "vue-reverse": "^1.0.37"
+    "vue-reverse": "^1.0.37",
+    "vue-clipboard2": "^0.3.1"
   }
 }

+ 1 - 1
scripts/config.js

@@ -9,7 +9,7 @@ module.exports = {
     env: {
       NODE_ENV: '"dev"',
       API_URL: {
-        default: '"http://192.168.23.111:9900"',
+        default: '"https://api.uptoyo.com/trace"',
       },
     },
   },

+ 6 - 6
scripts/webpack/dev.js

@@ -61,12 +61,12 @@ module.exports = {
         test: /\.(html)$/i,
         loader: 'html-loader',
       },
-      {
-        test: /\.js$/,
-        enforce: 'pre',
-        exclude: /node_modules/,
-        loader: 'eslint-loader',
-      },
+      // {
+      //   test: /\.js$/,
+      //   enforce: 'pre',
+      //   exclude: /node_modules/,
+      //   loader: 'eslint-loader',
+      // },
       {
         test: /\.js$/,
         exclude: /node_modules/,

+ 12 - 2
src/actions/getChainList.js

@@ -1,5 +1,5 @@
-
-export default function getChainList (payload) {
+import VueClipboard from 'vue-clipboard2'
+export default function getChainList(payload) {
   return new Promise((resolve, reject) => {
     const filters = [
       {
@@ -97,6 +97,15 @@ export default function getChainList (payload) {
           }, row.trans_id)
         },
       },
+      {
+        title: '二维码地址',
+        key: 'block_time',
+        align: 'center',
+        render: (h, { row }) => {
+            return h('p', 'http://uptoyo.com/' + row.serialize)
+          
+        },
+      },
       {
         nodeType: 'image',
         payload: {
@@ -146,3 +155,4 @@ export default function getChainList (payload) {
     )
   })
 }
+

+ 5 - 0
src/components/app.vue

@@ -5,5 +5,10 @@
 <script>
 export default {
   name: 'app',
+  created() {
+    this.$root.eventHub.$on('COPY', yourData => {
+      handle(yourData)
+    })
+  }
 }
 </script>

+ 6 - 1
src/index.js

@@ -6,7 +6,8 @@ import Viewer from 'v-viewer'
 import 'iview/dist/styles/iview.css'
 import 'vue-reverse/dist/reverse.css'
 import 'viewerjs/dist/viewer.css'
-
+import VueClipboard from 'vue-clipboard2'
+Vue.use(VueClipboard)
 import './plugins'
 import allActions from './actions'
 import './assets/styles/main.scss'
@@ -16,7 +17,11 @@ Vue.use(iView)
 Vue.use(Viewer)
 Vue.use(Reverse, { allActions })
 
+
 new Vue({
   router,
   render: h => h(App),
+  data: {
+    eventHub: new Vue()
+  }
 }).$mount('#root')