chunk-b6e494f4.51061b41.js.map 23 KB

1
  1. {"version":3,"sources":["webpack:///./src/assets/images/alter.png","webpack:///./src/views/user/PersonalData.vue?647b","webpack:///src/views/user/PersonalData.vue","webpack:///./src/views/user/PersonalData.vue?9b3a","webpack:///./src/views/user/PersonalData.vue"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_l","item","index","key","class","uid","userInfo","ref","refInFor","attrs","crop","compress","headers","max-file-size","credentials","inputAccept","inputOfFile","url","on","imageuploaded","src","avatar","__webpack_require__","_e","_s","nickname","phone","click","$event","switchAccounts","directives","name","rawName","value","expression","type","domProps","input","target","composing","$set","disabled","to","user_type","submit","isWeixin","logout","staticRenderFns","PersonalDatavue_type_script_lang_js_","components","VueCoreImageUpload","vue_core_image_upload","data","concat","utils","Authorization","$store","state","app","token","currentAccounts","switchUserInfo","userIndex","watch","$route","n","dispatch","computed","Object","vuex_esm","mounted","getUserInfo","methods","that","length","undefined","$dialog","toast","mes","user","then","_ref","loading","close","expires_time","dayjs_min_default","store","commit","$emit","location","reload","catch","err","cookie","set","wechat","_this","res","i","splice","status","error","msg","_this2","success","$router","go","_this3","confirm","opts","href","origin","console","log","user_PersonalDatavue_type_script_lang_js_","component","componentNormalizer","__webpack_exports__"],"mappings":"iGAAAA,EAAAC,QAAA,ukFCAA,IAAAC,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BC,EAAAJ,EAAAK,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBE,YAAA,iBAA4B,CAAAF,EAAA,OAAYE,YAAA,WAAsB,CAAAF,EAAA,OAAYE,YAAA,SAAoB,CAAAN,EAAAO,GAAA,YAAAH,EAAA,OAA+BE,YAAA,YAAuBN,EAAAQ,GAAAR,EAAA,wBAAAS,EAAAC,GAAkD,OAAAN,EAAA,OAAiBO,IAAAD,EAAAJ,YAAA,oCAAAM,MAAAH,EAAAI,MAAAb,EAAAc,SAAAD,IAAA,SAA0G,CAA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CRag1bM5GWR5YZ64atYZHZm5pkZ49Ub4RnDJTKaaLJtMZKsMc81ev4rwUlEwbUjFR4P/cqsNn542WYXw1HVgesOXLoZJV+bUop0i2qeFZKaihFiNC6JzjgxkrQXn40qUa+bxMfLj9BHyVenB+/iNDNE4Q0EejjofmQz94UH36Zh/TUMA7k85NpqaAMaPzavXHmHhENrYbxOH+12Xopqmow12o9eJXGSsLKjl108wvKiAvU8qgAsJW73vrbooGo8MZCGTB3vGnZUFHUlVwUReNszVVoGyqoGHKy6rISDvkd1+AivJnX5EcccjZUHNmiH+evrxPX6thNS2AKugpyzL2u3LHeNZUQg+zIaEyoaumOnbALA+fgBubpL92QM8KxyjfBhvhUtQfLxBRc8dQvm30r+Xi4+bqyNdhUo8XjFDsIHM/3YYOJ6VtiVQfI0iE8GDVs2wZLBVNw1/etq2ZKQCaxDBneZP3ZLBCy1v8IhzGYomsLoQXL/U0iQZbGxtAq+ok7An9z4oXzZDUHGlLCiawKpfOTLH6ZHpL3Z6GT+8A6t2ChgPT6eTM147YGe8SvLIdKe6yES1VelCZflDxYNCW91VcBuWvvRtalTcPiWEvR+0nbLKcpyyMmS6C/eKF+uqs7yuqAO5oxHrF1FyGlhOxW8KzPrutp3bz32wWFczjax1Ym/bhUBKAlkr/jZKn9JtkT5Z6TbSZ+PJddPc1V5jyM0EYjSCq7asnwV9djqY2lprMLekrv4vb1XENNArX97Svk7LWxFBP4mSCEX65gR93oq+sivonSlhcuk+z6EljL9n3HngTtASJli5voQZGwFzD5Ywb7GE0QklTJFUCcNssmhLXFO0+QnNs2uKtnp03KeOcv4VYABwkIZ9IZVk0gAAAABJRU5ErkJggg==\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"personal-data\"},[_c('div',{staticClass:\"wrapper\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"管理我的账号\")]),_c('div',{staticClass:\"wrapList\"},_vm._l((_vm.switchUserInfo),function(item,index){return _c('div',{key:index,staticClass:\"item acea-row row-between-wrapper\",class:item.uid === _vm.userInfo.uid ? 'on' : ''},[_c('div',{staticClass:\"picTxt acea-row row-between-wrapper\"},[_c('div',{staticClass:\"pictrue\"},[(item.uid === _vm.userInfo.uid)?_c('VueCoreImageUpload',{ref:\"upImg\",refInFor:true,staticClass:\"btn btn-primary\",attrs:{\"crop\":false,\"compress\":\"80\",\"headers\":_vm.headers,\"max-file-size\":5242880,\"credentials\":false,\"inputAccept\":\"image/*\",\"inputOfFile\":\"file\",\"url\":_vm.url},on:{\"imageuploaded\":_vm.imageuploaded}},[_c('div',{staticClass:\"pictrue\"},[_c('img',{attrs:{\"src\":item.avatar}})])]):_c('div',{staticClass:\"pictrue\"},[_c('img',{attrs:{\"src\":item.avatar}})]),(item.uid === _vm.userInfo.uid)?_c('img',{staticClass:\"alter\",attrs:{\"src\":require(\"@assets/images/alter.png\")}}):_vm._e()],1),_c('div',{staticClass:\"text\"},[_c('div',{staticClass:\"name line1\"},[_vm._v(_vm._s(item.nickname))]),_c('div',{staticClass:\"phone\"},[_vm._v(\"绑定手机号:\"+_vm._s(item.phone))])])]),(item.uid === _vm.userInfo.uid)?_c('div',{staticClass:\"currentBnt acea-row row-center-wrapper font-color-green\"},[_vm._v(\"\\n 当前账号\\n \")]):_c('div',{staticClass:\"bnt font-color-green acea-row row-center-wrapper\",on:{\"click\":function($event){return _vm.switchAccounts(index)}}},[_vm._v(\"\\n 使用账号\\n \")])])}),0)]),_c('div',{staticClass:\"list\"},[_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"昵称\")]),_c('div',{staticClass:\"input\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.userInfo.nickname),expression:\"userInfo.nickname\"}],attrs:{\"type\":\"text\"},domProps:{\"value\":(_vm.userInfo.nickname)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.userInfo, \"nickname\", $event.target.value)}}})])]),_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"ID号\")]),_c('div',{staticClass:\"input acea-row row-between-wrapper\"},[_c('input',{staticClass:\"id\",attrs:{\"type\":\"text\",\"disabled\":\"\"},domProps:{\"value\":_vm.userInfo.uid}}),_c('span',{staticClass:\"iconfont icon-suozi\"})])]),(!_vm.userInfo.phone)?_c('div',[_c('router-link',{staticClass:\"item acea-row row-between-wrapper\",attrs:{\"to\":'/user/binding'}},[_c('div',[_vm._v(\"绑定手机号\")]),_c('div',{staticClass:\"input\"},[_vm._v(\"\\n 点击绑定手机号\"),_c('span',{staticClass:\"iconfont icon-xiangyou\"})])])],1):(_vm.userInfo.phone)?_c('div',{staticClass:\"item acea-row row-between-wrapper\"},[_c('div',[_vm._v(\"手机号码\")]),_c('div',{staticClass:\"input acea-row row-between-wrapper\"},[_c('div',{staticClass:\"input acea-row row-between-wrapper\"},[_c('input',{staticClass:\"id\",attrs:{\"type\":\"text\",\"disabled\":\"\"},domProps:{\"value\":_vm.userInfo.phone}}),_c('span',{staticClass:\"iconfont icon-suozi\"})])])]):_vm._e(),(_vm.userInfo.phone && _vm.userInfo.user_type === 'h5')?_c('div',[_c('router-link',{staticClass:\"item acea-row row-between-wrapper\",attrs:{\"to\":'/change_password'}},[_c('div',[_vm._v(\"密码\")]),_c('div',{staticClass:\"input\"},[_vm._v(\"\\n 点击修改密码\"),_c('span',{staticClass:\"iconfont icon-xiangyou\"})])])],1):_vm._e()]),_c('div',{staticClass:\"modifyBnt bg-color-green\",on:{\"click\":_vm.submit}},[_vm._v(\"保存修改\")]),(!_vm.isWeixin)?_c('div',{staticClass:\"logOut cart-color-green acea-row row-center-wrapper\",on:{\"click\":_vm.logout}},[_vm._v(\"\\n 退出登录\\n \")]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"personal-data\">\r\n <div class=\"wrapper\">\r\n <div class=\"title\">管理我的账号</div>\r\n <div class=\"wrapList\">\r\n <div\r\n class=\"item acea-row row-between-wrapper\"\r\n :class=\"item.uid === userInfo.uid ? 'on' : ''\"\r\n v-for=\"(item, index) in switchUserInfo\"\r\n :key=\"index\"\r\n >\r\n <div class=\"picTxt acea-row row-between-wrapper\">\r\n <div class=\"pictrue\">\r\n <VueCoreImageUpload\r\n class=\"btn btn-primary\"\r\n :crop=\"false\"\r\n compress=\"80\"\r\n @imageuploaded=\"imageuploaded\"\r\n :headers=\"headers\"\r\n :max-file-size=\"5242880\"\r\n :credentials=\"false\"\r\n inputAccept=\"image/*\"\r\n inputOfFile=\"file\"\r\n :url=\"url\"\r\n ref=\"upImg\"\r\n v-if=\"item.uid === userInfo.uid\"\r\n >\r\n <div class=\"pictrue\">\r\n <img :src=\"item.avatar\" />\r\n </div>\r\n </VueCoreImageUpload>\r\n <div class=\"pictrue\" v-else>\r\n <img :src=\"item.avatar\" />\r\n </div>\r\n <img\r\n src=\"@assets/images/alter.png\"\r\n class=\"alter\"\r\n v-if=\"item.uid === userInfo.uid\"\r\n />\r\n </div>\r\n <div class=\"text\">\r\n <div class=\"name line1\">{{ item.nickname }}</div>\r\n <div class=\"phone\">绑定手机号:{{ item.phone }}</div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"currentBnt acea-row row-center-wrapper font-color-green\"\r\n v-if=\"item.uid === userInfo.uid\"\r\n >\r\n 当前账号\r\n </div>\r\n <div\r\n class=\"bnt font-color-green acea-row row-center-wrapper\"\r\n v-else\r\n @click=\"switchAccounts(index)\"\r\n >\r\n 使用账号\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"list\">\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>昵称</div>\r\n <div class=\"input\">\r\n <input type=\"text\" v-model=\"userInfo.nickname\" />\r\n </div>\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\">\r\n <div>ID号</div>\r\n <div class=\"input acea-row row-between-wrapper\">\r\n <input type=\"text\" :value=\"userInfo.uid\" disabled class=\"id\" /><span\r\n class=\"iconfont icon-suozi\"\r\n ></span>\r\n </div>\r\n </div>\r\n <div v-if=\"!userInfo.phone\">\r\n <router-link\r\n :to=\"'/user/binding'\"\r\n class=\"item acea-row row-between-wrapper\"\r\n >\r\n <div>绑定手机号</div>\r\n <div class=\"input\">\r\n 点击绑定手机号<span class=\"iconfont icon-xiangyou\"></span>\r\n </div>\r\n </router-link>\r\n </div>\r\n <div class=\"item acea-row row-between-wrapper\" v-else-if=\"userInfo.phone\">\r\n <div>手机号码</div>\r\n <div class=\"input acea-row row-between-wrapper\">\r\n <div class=\"input acea-row row-between-wrapper\">\r\n <input\r\n type=\"text\"\r\n :value=\"userInfo.phone\"\r\n disabled\r\n class=\"id\"\r\n /><span class=\"iconfont icon-suozi\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n <div v-if=\"userInfo.phone && userInfo.user_type === 'h5'\">\r\n <router-link\r\n :to=\"'/change_password'\"\r\n class=\"item acea-row row-between-wrapper\"\r\n >\r\n <div>密码</div>\r\n <div class=\"input\">\r\n 点击修改密码<span class=\"iconfont icon-xiangyou\"></span>\r\n </div>\r\n </router-link>\r\n </div>\r\n </div>\r\n <div class=\"modifyBnt bg-color-green\" @click=\"submit\">保存修改</div>\r\n <div\r\n class=\"logOut cart-color-green acea-row row-center-wrapper\"\r\n @click=\"logout\"\r\n v-if=\"!isWeixin\"\r\n >\r\n 退出登录\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapGetters } from \"vuex\";\r\nimport { trim, VUE_APP_API_URL, isWeixin } from \"@utils\";\r\nimport VueCoreImageUpload from \"vue-core-image-upload\";\r\nimport { postUserEdit, getLogout, switchH5Login, getUser } from \"@api/user\";\r\nimport { clearAuthStatus } from \"@libs/wechat\";\r\nimport cookie from \"@utils/store/cookie\";\r\nimport store from \"@/store\";\r\nimport dayjs from \"dayjs\";\r\n\r\nexport default {\r\n name: \"PersonalData\",\r\n components: {\r\n VueCoreImageUpload\r\n },\r\n data: function() {\r\n return {\r\n url: `${VUE_APP_API_URL}/upload/image`,\r\n headers: {\r\n Authorization: \"Bearer \" + this.$store.state.app.token\r\n },\r\n avatar: \"\",\r\n isWeixin: false,\r\n currentAccounts: 0,\r\n switchUserInfo: [],\r\n userIndex: 0\r\n };\r\n },\r\n watch: {\r\n $route(n) {\r\n if (n.name === \"PersonalData\") this.$store.dispatch(\"USERINFO\", true);\r\n }\r\n },\r\n computed: mapGetters([\"userInfo\"]),\r\n mounted: function() {\r\n this.avatar = this.userInfo.avatar;\r\n this.isWeixin = isWeixin();\r\n this.getUserInfo();\r\n },\r\n methods: {\r\n switchAccounts: function(index) {\r\n let that = this;\r\n this.userIndex = index;\r\n let userInfo = this.switchUserInfo[this.userIndex];\r\n if (this.switchUserInfo.length <= 1) return true;\r\n if (userInfo === undefined)\r\n return this.$dialog.toast({ mes: \"切换的账号不存在\" });\r\n if (userInfo.user_type === \"h5\") {\r\n switchH5Login()\r\n .then(({ data }) => {\r\n that.$dialog.loading.close();\r\n const expires_time = dayjs(data.expires_time);\r\n store.commit(\"LOGIN\", data.token, expires_time);\r\n that.$emit(\"changeswitch\", false);\r\n location.reload();\r\n })\r\n .catch(err => {\r\n that.$dialog.loading.close();\r\n return that.$dialog.toast({ mes: err });\r\n });\r\n } else {\r\n cookie.set(\"loginType\", \"wechat\", 60);\r\n this.$dialog.loading.close();\r\n this.$store.commit(\"LOGOUT\");\r\n clearAuthStatus();\r\n this.$emit(\"changeswitch\", false);\r\n location.reload();\r\n }\r\n },\r\n getUserInfo: function() {\r\n let that = this;\r\n getUser().then(res => {\r\n let switchUserInfo = res.data.switchUserInfo;\r\n for (let i = 0; i < switchUserInfo.length; i++) {\r\n if (switchUserInfo[i].uid == that.userInfo.uid) that.userIndex = i;\r\n if (\r\n !that.isWeixin &&\r\n switchUserInfo[i].user_type != \"h5\" &&\r\n switchUserInfo[i].phone === \"\"\r\n )\r\n switchUserInfo.splice(i, 1);\r\n }\r\n that.$set(this, \"switchUserInfo\", switchUserInfo);\r\n });\r\n },\r\n imageuploaded(res) {\r\n if (res.status !== 200)\r\n return this.$dialog.error(res.msg || \"上传图片失败\");\r\n if (this.switchUserInfo[this.userIndex] === undefined) return;\r\n this.$set(this.switchUserInfo[this.userIndex], \"avatar\", res.data.url);\r\n },\r\n\r\n submit: function() {\r\n let userInfo = this.switchUserInfo[this.userIndex];\r\n postUserEdit({\r\n nickname: trim(this.userInfo.nickname),\r\n avatar: userInfo.avatar\r\n }).then(\r\n res => {\r\n this.$store.dispatch(\"USERINFO\", true);\r\n this.$dialog.success(res.msg);\r\n this.$router.go(-1);\r\n },\r\n error => {\r\n this.$dialog.error(error.msg);\r\n }\r\n );\r\n },\r\n logout: function() {\r\n this.$dialog.confirm({\r\n mes: \"确认退出登录?\",\r\n opts: () => {\r\n getLogout()\r\n .then(res => {\r\n this.$store.commit(\"LOGOUT\");\r\n clearAuthStatus();\r\n location.href = location.origin;\r\n console.log(res);\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n }\r\n });\r\n }\r\n }\r\n};\r\n</script>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalData.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalData.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PersonalData.vue?vue&type=template&id=0eef752b&\"\nimport script from \"./PersonalData.vue?vue&type=script&lang=js&\"\nexport * from \"./PersonalData.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}