xiaofangweibao-applet/unpackage/dist/dev/.sourcemap/mp-weixin/pages/me/userinfo.js.map

1 line
16 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["uni-app:///main.js","webpack:///D:/小程序-消防/pages/me/userinfo.vue?c298","webpack:///D:/小程序-消防/pages/me/userinfo.vue?1e6b","webpack:///D:/小程序-消防/pages/me/userinfo.vue?4afb","webpack:///D:/小程序-消防/pages/me/userinfo.vue?0f96","uni-app:///pages/me/userinfo.vue","webpack:///D:/小程序-消防/pages/me/userinfo.vue?fe75","webpack:///D:/小程序-消防/pages/me/userinfo.vue?27de"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","src","username","userinfo","savepth","onShow","console","methods","chooseaAatar","uploadFile","uni","title","url","fileType","name","filePath","header","success","fail","saveInfo","form","that","setTimeout","delta","icon","duration","cancel"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,iBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqH;AACrH;AAC4D;AACL;AACc;;;AAGrE;AAC8L;AAC9L,gBAAgB,qMAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,mFAAM;AACR,EAAE,4FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,uFAAU;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,6SAEN;AACP,KAAK;AACL;AACA,aAAa,iSAEN;AACP,KAAK;AACL;AACA,aAAa,+TAEN;AACP,KAAK;AACL;AACA,aAAa,uSAEN;AACP,KAAK;AACL;AACA,aAAa,6SAEN;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;;;;;;;;;;;;;;ACrDA;AAAA;AAAA;AAAA;AAA+tB,CAAgB,0uBAAG,EAAC,C;;;;;;;;;;;;;;;;;;AC8BnvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eACA;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACA;IACAC;IACAA;IACA;IACA;EACA;EACAC;IACAC;MACAF;MACA;MACA;IACA;IACAG;MAAA;MACAC;QACAC;MACA;MACAD;QACAE;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QACAC;UAAA;UACA;QACA;QACAC;UACAP;UACA;UACA;UACA;UACAJ;UACA;YACA;UACA;QACA;QACAY;UACA;UACAZ;QACA;MAEA;IACA;IACA;IACAa;MACA;MACA;MACAC;MACAA,+BACAA;MACAV;QACAC;MACA;MACAU;QACAf;QACA;UACAI;UACAY;YACAZ;UACA;UACA;UACAA;YACAa;UACA;QACA;UACAb;YACAc;YACAb;YACAc;UACA;QACA;MACA;IACA;IACA;IACAC;MACAhB;QACAa;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACvHA;AAAA;AAAA;AAAA;AAA82C,CAAgB,yzCAAG,EAAC,C;;;;;;;;;;;ACAl4C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/me/userinfo.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/me/userinfo.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./userinfo.vue?vue&type=template&id=454449a7&\"\nvar renderjs\nimport script from \"./userinfo.vue?vue&type=script&lang=js&\"\nexport * from \"./userinfo.vue?vue&type=script&lang=js&\"\nimport style0 from \"./userinfo.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!C:\\\\Users\\\\admin\\\\Downloads\\\\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 = \"pages/me/userinfo.vue\"\nexport default component.exports","export * from \"-!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./userinfo.vue?vue&type=template&id=454449a7&\"","var components\ntry {\n components = {\n uAvatar: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-avatar/u-avatar\" */ \"@/uni_modules/uview-ui/components/u-avatar/u-avatar.vue\"\n )\n },\n uForm: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-form/u-form\" */ \"@/uni_modules/uview-ui/components/u-form/u-form.vue\"\n )\n },\n uFormItem: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-form-item/u-form-item\" */ \"@/uni_modules/uview-ui/components/u-form-item/u-form-item.vue\"\n )\n },\n uInput: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-input/u-input\" */ \"@/uni_modules/uview-ui/components/u-input/u-input.vue\"\n )\n },\n uButton: function () {\n return import(\n /* webpackChunkName: \"uni_modules/uview-ui/components/u-button/u-button\" */ \"@/uni_modules/uview-ui/components/u-button/u-button.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 \"-!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./userinfo.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./userinfo.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"container\">\n\t\t<view class=\"user-box\">\n\t\t\t<view class=\"avatar-box\">\n\t\t\t\t<button open-type=\"chooseAvatar\" @chooseavatar=\"chooseaAatar\" class=\"clearBtn\">\n\t\t\t\t\t<view class=\"avatar\">\n\t\t\t\t\t\t<u-avatar :src=\"src\" size=\"80\" shape=\"square\"></u-avatar>\n\t\t\t\t\t</view>\n\t\t\t\t</button>\n\t\t\t</view>\n\t\t\t<view class=\"user\">\n\t\t\t\t<u-form labelPosition=\"left\">\n\t\t\t\t\t<u-form-item\n\t\t\t\t\t\tlabel=\"昵称\"\n\t\t\t\t\t\tprop=\"username\"\n\t\t\t\t\t\tborderBottom\n\t\t\t\t\t\tref=\"item1\">\n\t\t\t\t\t\t<u-input v-model=\"username\" placeholder=\"请输入昵称\" border=\"none\"></u-input>\n\t\t\t\t\t</u-form-item>\n\t\t\t\t</u-form>\n\t\t\t</view>\n\t\t</view>\n\t\t<view class=\"btn\">\n\t\t\t<u-button type=\"primary\" text=\"保存\" @click=\"saveInfo\" :customStyle=\"{width:'45%'}\"></u-button>\n\t\t\t<u-button type=\"error\" text=\"取消\" @click=\"cancel\" :customStyle=\"{width:'45%'}\"></u-button>\n\t\t</view>\n\t</view>\n</template>\n\n<script>\n\timport { getConfig,setUserInfo,getUserInfo,getToken} from '@/utils/auth';\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tsrc: '/static/img/avatar.png',\n\t\t\t\tusername:'',\n\t\t\t\tuserinfo:{},\n\t\t\t\tsavepth:'',//真正保存的文件路径\n\t\t\t};\n\t\t},\n\t\tonShow() {\n\t\t\tthis.userinfo = getUserInfo() || {};\n\t\t\tconsole.log(getUserInfo())\n\t\t\tconsole.log(getUserInfo().avatar)\n\t\t\t\tthis.src = getUserInfo().avatar || ''\n\t\t\t\tthis.username = getUserInfo().nickname || ''\n\t\t},\n\t\tmethods:{\n\t\t\tchooseaAatar(e){\n\t\t\t\tconsole.log(e)\n\t\t\t\tthis.src = e.detail.avatarUrl \n\t\t\t\tthis.uploadFile(e.detail.avatarUrl );//选好了就开始上传\n\t\t\t},\n\t\t\tuploadFile(src){\n\t\t\t\tuni.showLoading({\n\t\t\t\t\ttitle:'加载中...'\n\t\t\t\t})\n\t\t\t\tuni.uploadFile({\n\t\t\t\t\turl:getConfig().uploadUrl,//图片上传路径\n\t\t\t\t\tfileType:'image',//图片类型,\n\t\t\t\t\tname:'file',//对应接口的文件名称\n\t\t\t\t\tfilePath:src,\n\t\t\t\t\theader:{//请求头\n\t\t\t\t\t\t\"Content-Type\": \"multipart/form-data\"\n\t\t\t\t\t},\n\t\t\t\t\tsuccess:(res)=>{\n\t\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\t\t//成功的回调\n\t\t\t\t\t\t//一般用于重新获取数据渲染页面\n\t\t\t\t\t\tconst r = JSON.parse(res.data);\n\t\t\t\t\t\tconsole.log(r)\n\t\t\t\t\t\tif(r.code==0){\n\t\t\t\t\t\t\tthis.savepth = r.url\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tfail:(err)=>{\n\t\t\t\t\t//失败的回调\n\t\t\t\t\t\tconsole.log(\"err\",err)\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t})\n\t\t\t},\n\t\t\t//保存数据\n\t\t\tsaveInfo(){\n\t\t\t\tlet that = this\n\t\t\t\tlet form = {};\n\t\t\t\tform.nickName = this.username\n\t\t\t\tform.avatarUrl = this.savepth,\n\t\t\t\tform.openid = getToken()\n\t\t\t\tuni.showLoading({\n\t\t\t\t\ttitle:'保存中...'\n\t\t\t\t})\n\t\t\t\tthat.request('saveUserInfo', form, 'POST').then(res=>{\n\t\t\t\t\tconsole.log(\"wxloginres: \", res)\n\t\t\t\t\tif(res.code==0){\n\t\t\t\t\t\tuni.hideLoading()\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tuni.hideLoading();\n\t\t\t\t\t\t}, 2000);\n\t\t\t\t\t\tsetUserInfo(res.data); //存储最新用户信息\n\t\t\t\t\t\tuni.navigateBack({\n\t\t\t\t\t\t\tdelta:1//返回上一页\n\t\t\t\t\t\t})\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\t\ticon:\"none\",\n\t\t\t\t\t\t\ttitle: \"登录失败,请稍后试试!\",\n\t\t\t\t\t\t\tduration:2000\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t//取消保存\n\t\t\tcancel(){\n\t\t\t\tuni.navigateBack({\n\t\t\t\t\tdelta:1,//返回上一层\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t.user-box{\n\t\twidth: 100%;\n\t\theight: 460rpx;\n\t\tbackground: #fff;\n\t\t.avatar-box{\n\t\t\theight: 260rpx;\n\t\t\t.avatar{\n\t\t\t\twidth: 200rpx;\n\t\t\t\tmargin: 80rpx auto;\n\t\t\t}\n\t\t}\n\t\t.user{\n\t\t\twidth: 90%;\n\t\t\tmargin: 30rpx auto;\n\t\t}\n\t}\n\t.btn{\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\twidth: 90%;\n\t\tmargin: 100rpx auto;\n\t}\n</style>\n\n","import mod from \"-!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./userinfo.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\admin\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./userinfo.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1712626780527\n var cssReload = require(\"C:/Users/admin/Downloads/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":""}