picyan.js.map
10.6 KB
{"version":3,"sources":["webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?aa7f","webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?1305","webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?0ffd","webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?b745","uni-app:///components/picyan/picyan.vue","webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?bcf4","webpack:///G:/项目/program/zhongmianprogram/components/picyan/picyan.vue?c582"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;AACc;;;AAGnE;AACqK;AACrK,gBAAgB,+KAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAgmB,CAAgB,0nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACOpnB;AACA,gBADA;AAEA;AACA;AACA;AACA,kBADA,EACA;AACA,eAFA,EADA,EAHA;;;;AAUA,MAVA,kBAUA;AACA;AACA,gBADA,EACA,UADA;;AAGA,GAdA;AAeA;AACA;AACA;AACA,GAlBA;AAmBA;AACA,WADA,qBACA;AACA;AACA,KAHA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDADA,CACA;AACA,mCAFA,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBADA;AAEA,iBAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAtCA;AAuCA;AACA;AACA;AACA;AACA;AACA,KA5CA;AA6CA;AACA;AACA,KA/CA;;AAiDA;AACA;AACA,KAnDA,EAnBA,E;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAkmC,CAAgB,4kCAAG,EAAC,C;;;;;;;;;;;ACAtnC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/picyan/picyan.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./picyan.vue?vue&type=template&id=03d368c4&\"\nvar renderjs\nimport script from \"./picyan.vue?vue&type=script&lang=js&\"\nexport * from \"./picyan.vue?vue&type=script&lang=js&\"\nimport style0 from \"./picyan.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/picyan/picyan.vue\"\nexport default component.exports","export * from \"-!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./picyan.vue?vue&type=template&id=03d368c4&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./picyan.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./picyan.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"canvas-img-code\">\r\n\t\t<canvas :style=\"{width:width+'px',height:height+'px'}\" canvas-id=\"imgcanvas\" @error=\"canvasIdErrorCallback\" @click=\"refresh\"></canvas>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n\tname: \"picyan\",\r\n\t\t//属性\r\n\t\tprops: {\r\n\t\t\tpicname: {\r\n\t\t\t\ttype: String,//属性类型\r\n\t\t\t\tvalue: \"\"\r\n\t\t\t},\r\n\t\t\t\r\n\t\t},\r\n\tdata(){\r\n\t\treturn {\r\n\t\t\twidth:120,height:35\r\n\t\t}\r\n\t},\r\n\tmounted:function(){\r\n\t\tvar _self=this;\r\n\t\t_self.init();\r\n\t},\r\n methods: {\r\n\t\trefresh(){\r\n\t\t\tthis.init()\r\n\t\t},\r\n\t\tinit:function(){\r\n\t\t\tconsole.log('start');\r\n\t\t\tvar context = uni.createCanvasContext('imgcanvas',this),w=this.width,h=this.height;\r\n\t\t\t context.setFillStyle(\"white\");\r\n\t\t\t context.setLineWidth(5);\t\t\t\r\n\t\t\t context.fillRect(0, 0, w, h);\r\n\t\t\t // var pool=[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"I\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"S\",\"Y\",\"Z\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\"],str='';\r\n\t\t\tvar pool=[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\"],str='';\r\n\t\t\tfor(var i=0;i<4;i++){\r\n\t\t\t\tvar c=pool[this.rn(0,pool.length-1)];//随机的字\r\n\t\t\t\tvar deg=this.rn(-30,30);//字体的旋转角度\r\n\t\t\t\tcontext.setFontSize(18);\r\n\t\t\t\tcontext.setTextBaseline(\"top\");\r\n\t\t\t\tcontext.setFillStyle(this.rc(80,150));\r\n\t\t\t\tcontext.save();\r\n\t\t\t\tcontext.translate(30*i+15,parseInt(h/1.5));\r\n\t\t\t\tcontext.rotate(deg*Math.PI/180);\r\n\t\t\t\tcontext.fillText(c,-15+5,-15);\r\n\t\t\t\tcontext.restore();\r\n\t\t\t\tstr+=c;\r\n\t\t\t\tthis.$emit(\"picname\",str)\r\n\t\t\t}\r\n\t\t\tuni.setStorage({\r\n\t\t\t\tkey:'imgcode',\r\n\t\t\t\tdata:str,\r\n\t\t\t});\r\n\t\t\tfor(var i=0;i<40;i++){\r\n\t\t\t\tcontext.beginPath();\r\n\t\t\t\tcontext.arc(this.rn(0,w),this.rn(0,h),1,0,2*Math.PI);\r\n\t\t\t\tcontext.closePath();\r\n\t\t\t\tcontext.setFillStyle(this.rc(150,200));\r\n\t\t\t\tcontext.fill();\r\n\t\t\t}\r\n\t\t\t context.draw();\t\t\tconsole.log('end');\r\n\t\t},\r\n\t\trc:function(min,max){\r\n var r=this.rn(min,max);\r\n\t\t\tvar g=this.rn(min,max);\r\n\t\t\tvar b=this.rn(min,max);\r\n\t\t\treturn \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\r\n\t\t},\r\n\t\trn:function(max,min){\r\n\t\t\t return parseInt(Math.random()*(max-min))+min;\r\n\t\t},\r\n\t\t\r\n canvasIdErrorCallback: function (e) {\r\n console.error(e.detail.errMsg)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\tcanvas{\r\n\t\theight:50rpx;\r\n\t}\r\n\t.canvas-img-code{display: inline-block}\r\n</style>","import mod from \"-!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./picyan.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./picyan.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1598425141554\n var cssReload = require(\"F:/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}