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.
 
 
 

1 lines
13 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?0682","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?767f","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?bff2","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?fc06","uni-app:///pages/user/setting/user.vue","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?ba7c","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/setting/user.vue?b7c4"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","computed","data","gender","genderdata","onLoad","methods","logout","url","client_id","success","DateChange","Gender","Avatar","formSubmit","name","checkType","checkRule","errorMsg"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,aAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiH;AACjH;AACwD;AACL;AACa;;;AAGhE;AACwK;AACxK,gBAAgB,+KAAU;AAC1B,EAAE,0EAAM;AACR,EAAE,+EAAM;AACR,EAAE,wFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mFAAU;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,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AAA0nB,CAAgB,wnBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;ACsD9oB;AACA;AAAA;AAAA;AAAA,eACA;EACAC,4BACA,8BACA;EACAC;IACA;MACAC;MACAC;IACA;EACA;EACAC;IACA;IACA;IACA;EACA;EACAC;IACAC;MAAA;MACA;QACAC;QACAN;UACAO;QACA;QACAC;UACA;UACA;UACA;QACA;MACA;IACA;IACAC;MACA;IACA;IACAC;MACA;QACA;QACA;MACA;QACA;QACA;MACA;IACA;IACAC;MACA;IACA;IACAC;MAAA;MACA;;MAEA,YACA;QAAAC;QAAAC;QAAAC;QAAAC;MAAA,GACA;QAAAH;QAAAC;QAAAC;QAAAC;MAAA,EACA;MACA;MACA;MACA;MACA;MACA;QACA;UACAV;UACAN;UACAQ;YACA;YACA;YACA;YACA;UACA;QACA;MACA;QACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;AC/HA;AAAA;AAAA;AAAA;AAAu5B,CAAgB,i3BAAG,EAAC,C;;;;;;;;;;;ACA36B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/setting/user.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/user/setting/user.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./user.vue?vue&type=template&id=db36b476&\"\nvar renderjs\nimport script from \"./user.vue?vue&type=script&lang=js&\"\nexport * from \"./user.vue?vue&type=script&lang=js&\"\nimport style0 from \"./user.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../k/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/user/setting/user.vue\"\nexport default component.exports","export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./user.vue?vue&type=template&id=db36b476&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.$wanlshop.oss(_vm.user.avatar, 52, 52, 2, \"avatar\")\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./user.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./user.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<view class=\"edgeInsetTop\"></view>\r\n\t\t<form @submit=\"formSubmit\">\r\n\t\t\t<view class=\"cu-list menu solid-bottom\">\r\n\t\t\t\t<view class=\"cu-item arrow\" style=\"min-height:150rpx;\" @tap=\"Avatar\">\r\n\t\t\t\t\t<view class=\"content\">\r\n\t\t\t\t\t\t<text style=\"font-size: 30rpx;\">头像</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"action\">\r\n\t\t\t\t\t\t<view class=\"cu-avatar round lg\" :style=\"{backgroundImage: 'url('+ $wanlshop.oss(user.avatar, 52, 52, 2, 'avatar') +')'}\" ></view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"cu-form-group\">\r\n\t\t\t\t<view class=\"title\">昵称</view>\r\n\t\t\t\t<input placeholder=\"请输入昵称\" name=\"nickname\" :value=\"user.nickname\"></input>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"cu-form-group\">\r\n\t\t\t\t<view class=\"title\">用户名</view>\r\n\t\t\t\t<input placeholder=\"请输入用户名\" name=\"username\" :value=\"user.username\"></input>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"cu-form-group\">\r\n\t\t\t\t<view class=\"title\">个性签名</view>\r\n\t\t\t\t<input placeholder=\"请输入个性签名\" name=\"bio\" :value=\"user.bio\"></input>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"cu-form-group\">\r\n\t\t\t\t<view class=\"title\">性别</view>\r\n\t\t\t\t<view style=\"display: none;\">\r\n\t\t\t\t\t<input name=\"gender\" :value=\"genderdata\" disabled></input> \r\n\t\t\t\t</view>\r\n\t\t\t\t<switch class='switch-sex' @change=\"Gender\" :class=\"gender?'checked':''\" :checked=\"gender?true:false\"></switch>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"cu-form-group\">\r\n\t\t\t\t<view class=\"title\">日期选择</view>\r\n\t\t\t\t<picker mode=\"date\" :value=\"user.birthday || '1992-08-23'\" @change=\"DateChange\">\r\n\t\t\t\t\t<view style=\"display: none;\">\r\n\t\t\t\t\t\t<input name=\"birthday\" :value=\"user.birthday\" disabled></input>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"picker\">\r\n\t\t\t\t\t\t{{user.birthday || '1992-08-23'}}\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</picker>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"padding-bj flex flex-direction\">\r\n\t\t\t\t<button form-type=\"submit\" class=\"cu-btn wanl-bg-redorange margin-tb lg\">保存</button>\r\n\t\t\t\t<button class=\"cu-btn line-red lg\" @tap=\"logout()\">退出登录</button>\r\n\t\t\t</view>\r\n\t\t</form>\r\n\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport graceChecker from '@/common/graceChecker';\r\n\timport { mapState } from 'vuex';\r\n\texport default {\r\n\t\tcomputed: {\r\n\t\t\t...mapState(['user'])\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tgender: true,\r\n\t\t\t\tgenderdata: 0 \r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\t//中央总线重新赋值Data\r\n\t\t\tthis.gender = this.$store.state.user.gender == 0 ? true : false;\r\n\t\t\tthis.genderdata = this.$store.state.user.gender;\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tlogout() {\r\n\t\t\t\tthis.$api.get({\r\n\t\t\t\t\turl: '/wanlshop/user/logout',\r\n\t\t\t\t\tdata: {\r\n\t\t\t\t\t\tclient_id: uni.getStorageSync(\"wanlshop:chat_client_id\")?uni.getStorageSync(\"wanlshop:chat_client_id\") : null\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\tthis.$store.dispatch('user/logout');\r\n\t\t\t\t\t\tthis.$wanlshop.msg('退出成功');\r\n\t\t\t\t\t\tthis.$wanlshop.back(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tDateChange(e) {\r\n\t\t\t\tthis.$store.state.user.birthday = e.detail.value\r\n\t\t\t},\r\n\t\t\tGender(e) {\r\n\t\t\t\tif(e.detail.value == true){\r\n\t\t\t\t\tthis.gender = true;\r\n\t\t\t\t\tthis.genderdata = 0;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.gender = false;\r\n\t\t\t\t\tthis.genderdata = 1;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tAvatar(){\r\n\t\t\t\tthis.$wanlshop.to('/pages/user/portrait/portrait');\r\n\t\t\t},\r\n\t\t\tformSubmit: function(e) {\r\n\t\t\t\t//定义表单规则\r\n\t\t\t\t\r\n\t\t\t\tlet rule = [\r\n\t\t\t\t\t{name: 'username', checkType: 'string', checkRule: '3,32', errorMsg: '用户名,至少3-32字符'},\r\n\t\t\t\t\t{name: 'nickname', checkType: 'string', checkRule: '3,32', errorMsg: '昵称,至少3-32字符'}\r\n\t\t\t\t];\r\n\t\t\t\t//进行表单检查\r\n\t\t\t\tlet formData = e.detail.value;\r\n\t\t\t\tlet checkRes = graceChecker.check(formData, rule);\r\n\t\t\t\t// ..检查是否注册-没注册跳转注册\r\n\t\t\t\tif (checkRes) {\r\n\t\t\t\t\tthis.$api.post({\r\n\t\t\t\t\t\turl: '/wanlshop/user/profile', \r\n\t\t\t\t\t\tdata: formData,\r\n\t\t\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t\t\t// 保存用户信息\r\n\t\t\t\t\t\t\tthis.$store.commit('user/setUserInfo', formData);\r\n\t\t\t\t\t\t\t// 提示\r\n\t\t\t\t\t\t\tthis.$wanlshop.msg('保存成功');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.$wanlshop.msg(graceChecker.error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t.cu-form-group .title {\r\n\t\tmin-width: calc(4em + 15px);\r\n\t}\r\n</style>\r\n","import mod from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./user.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./user.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1699839784035\n var cssReload = require(\"C:/Users/liudan/Desktop/k/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":""}