You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
huazhiyu/unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/sign.js.map

1 lines
14 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?a605","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?811d","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?3cd2","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?9840","uni-app:///pages/home/sign.vue","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?8cfc","webpack:////Users/seep/Documents/liuqingProject/hezhiying/pages/home/sign.vue?c5d9"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","title","penColor","penSize","picurl","landscape","openSmooth","methods","base64toBlob","mime","bstr","n","u8arr","type","onClick","success","uni","url","filePath","name","header","token","formData","console","setTimeout","fail","saveSignPic","sign_image"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,aAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC7H;AACwD;AACL;AACsC;;;AAGzF;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,0EAAM;AACR,EAAE,2FAAM;AACR,EAAE,oGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,+FAAU;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,aAAa,iVAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAk0B,CAAgB,kyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;ACmBt1B;AACA;;;;;;;;;;;;;;;;;;;;AACA,gBAAgB,mBAAO,CAAC,qBAAY;AAApC,eACA;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAC;MACA;QAAAC;QACAC;QAAAC;QAAAC;MAEA;QACAA;MACA;MACA;QAAAC;MAAA;IACA;IACAC;MAAA;MACA;QACA;QACA;MACA;MACA;QACA;UACAC;YAEA;cACAC;cACA;YACA;YACA;YACAA;cACAC;cACAC;cACAC;cACAC;gBACAC;cACA;cACAC,WACA;cACAP;gBACAQ;gBACA;kBACAC;oBACA;kBAEA;gBACA;kBACAR;gBAEA;cACA;cACAS;gBACAF;cACA;YACA;UACA;QACA;QACA;MACA;MACA,6BACA;IACA;IAEAG;MACAH;MACA;QAAAI;MAAA;QACAJ;QACA;UACAP;YACAC;UACA;QACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAyjD,CAAgB,y7CAAG,EAAC,C;;;;;;;;;;;ACA7kD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/home/sign.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/home/sign.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./sign.vue?vue&type=template&id=33a8fb78&scoped=true&\"\nvar renderjs\nimport script from \"./sign.vue?vue&type=script&lang=js&\"\nexport * from \"./sign.vue?vue&type=script&lang=js&\"\nimport style0 from \"./sign.vue?vue&type=style&index=0&id=33a8fb78&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/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 \"33a8fb78\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/home/sign.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./sign.vue?vue&type=template&id=33a8fb78&scoped=true&\"","var components\ntry {\n components = {\n lSignature: function () {\n return import(\n /* webpackChunkName: \"uni_modules/lime-signature/components/l-signature/l-signature\" */ \"@/uni_modules/lime-signature/components/l-signature/l-signature.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\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 \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./sign.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./sign.vue?vue&type=script&lang=js&\"","<template>\n<view class=\"sign\">\n\t<view style=\"width: 100vw; height: 100vh;\">\n\t\t<l-signature disableScroll backgroundColor=\"#ddd\" \n\t\tref=\"signatureRef\" \n\t\t:penColor=\"penColor\" \n\t\t:penSize=\"penSize\" \n\t\t:landscape=\"true\"\n\t\t:openSmooth=\"openSmooth\" ></l-signature>\n\t</view>\n\t<view class=\"btn\">\n\t\t<button @click=\"onClick('clear')\">清空</button>\n\t\t<button @click=\"onClick('undo')\">撤消</button>\n\t\t<button @click=\"onClick('save')\">保存</button>\n\t</view>\n</view>\n</template>\n\n<script>\n\timport {getToken} from '@/common/auth.js'\nimport {updateUserInfo} from '@/common/api.js'\nvar base64Img = require('base64-img');\nexport default{\n\tdata(){\n\t\treturn{\n\t\t\ttitle: 'Hello',\n\t\t\tpenColor: '#000000',\n\t\t\tpenSize: 5,\n\t\t\tpicurl: '',\n\t\t\tlandscape:true,\n\t\t\topenSmooth: false\n\t\t}\n\t},\n\tmethods: {\n\t\tbase64toBlob(dataurl) {\n\t\t var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],\n\t\t bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);\n\t\t \n\t\t\twhile (n--) {\n\t\t u8arr[n] = bstr.charCodeAt(n);\n\t\t }\n\t\t return new Blob([u8arr], { type: mime });\n\t\t},\n\t\tonClick(type) {\n\t\t\t if(type == 'openSmooth') {\n\t\t\t\t this.openSmooth = !this.openSmooth\n\t\t\t\t return\n\t\t\t }\n\t\t\tif (type == 'save') {\n\t\t\t\tthis.$refs.signatureRef.canvasToTempFilePath({\n\t\t\t\t\tsuccess: (res) => {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(res.isEmpty){\n\t\t\t\t\t\t\tuni.$u.toast(\"请签名\")\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar path = URL.createObjectURL(this.base64toBlob(res.tempFilePath))\n\t\t\t\t\t\tuni.uploadFile({\n\t\t\t\t\t\t\turl: this.baseUrl+'api/common/upload', \n\t\t\t\t\t\t\tfilePath: path,\n\t\t\t\t\t\t\tname: 'file',\n\t\t\t\t\t\t\theader:{\n\t\t\t\t\t\t\t\ttoken:getToken()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tformData: {\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsuccess: (res) => {\n\t\t\t\t\t\t\t\tconsole.log(JSON.parse(res.data),\"00\")\n\t\t\t\t\t\t\t\tif(JSON.parse(res.data).code==1){\n\t\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\t\tthis.saveSignPic(JSON.parse(res.data).data.url)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}, 1000)\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tuni.$u.toast(JSON.parse(res.data).msg)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfail: (res) => {\n\t\t\t\t\t\t\t\tconsole.log(res,\"rrr\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.$refs.signatureRef)\n\t\t\t\tthis.$refs.signatureRef[type]()\n\t\t},\n\t\t\n\t\tsaveSignPic(picurl){\n\t\t\tconsole.log(picurl)\n\t\t\tupdateUserInfo({sign_image:picurl}).then(res=>{\n\t\t\t\tconsole.log(res,\"ooooo\")\n\t\t\t\tif(res.code==1){\n\t\t\t\t\tuni.switchTab({\n\t\t\t\t\t\turl:\"/pages/qianggou/qianggou\"\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.sign{\n height:calc(100vh);\n overflow: hidden;\n .btn{\n\t // transform: rotate(90deg);\n\t display: flex;\n\t position: fixed;\n\t bottom:10px;\n\t width:100%;\n\t button{\n\t\t flex:1;\n\t\t margin:0 10rpx;\n\t\t background-color: $base;\n\t\t color:#fff;\n\t\t font-size: 28rpx;\n\t }\n }\n}\n</style>","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./sign.vue?vue&type=style&index=0&id=33a8fb78&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./sign.vue?vue&type=style&index=0&id=33a8fb78&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1697873049760\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/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":""}