luban-mall/unpackage/dist/dev/.sourcemap/mp-weixin/pagesB/ucenter/ucenter.js.map

1 line
14 KiB
Plaintext

{"version":3,"sources":["uni-app:///main.js","webpack:///D:/鲁班家具小程序/luban-mall/pagesB/ucenter/ucenter.vue?705f","webpack:///D:/鲁班家具小程序/luban-mall/pagesB/ucenter/ucenter.vue?007a","webpack:///D:/鲁班家具小程序/luban-mall/pagesB/ucenter/ucenter.vue?f6aa","webpack:///D:/鲁班家具小程序/luban-mall/pagesB/ucenter/ucenter.vue?a6dc","uni-app:///pagesB/ucenter/ucenter.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,oG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,gBAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;;;AAGtD;AACoL;AACpL,gBAAgB,2LAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;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;AAAyrB,CAAgB,urBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmE7sB;AACA,gD,uUAAA;eACA;AACA;AACA,wBADA,EADA;;AAIA,MAJA,kBAIA;AACA;AACA,oBADA,EACA;AACA,kBAFA,EAEA;AACA,sBAHA,EAGA;AACA,kBAJA,EAIA;AACA,gBALA,EAKA;AACA,cANA,EAMA;AACA,iBAPA,EAOA;AACA,mBARA,EAQA;AACA,eATA,EASA;AACA,kBAVA,EAUA;AACA,aAXA,EAWA;AACA,eAZA,EAYA;AACA,mBAbA;AAcA,qBAdA,EAcA;AACA,iBAfA,CAeA;AAfA;AAiBA,GAtBA;AAuBA,cAvBA;;;AA0BA,QA1BA,kBA0BA,EA1BA,EA0BA;AACA;AACA,GA5BA;AA6BA,QA7BA,oBA6BA;AACA,GA9BA;AA+BA;AACA;AACA,eAFA,yBAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAZA;AAaA,KAjBA;;AAmBA;AACA,YApBA,oBAoBA,IApBA,EAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KArDA;AAsDA;AACA,cAvDA,sBAuDA,KAvDA,EAuDA,KAvDA,EAuDA;AACA;AACA;AACA;AACA,sBADA;AAEA,sBAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SATA;AAUA,OAfA,MAeA;AACA;AACA;AACA;AACA;;AAEA,KA9EA;;AAgFA;AACA,aAjFA,uBAiFA;AACA;AACA;AACA;AACA;AACA;AACA,KAvFA;AAwFA;AACA,oBAzFA,4BAyFA,CAzFA,EAyFA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,yBADA;AAEA,+CAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,SANA;;AAQA;AACA,KA1GA;AA2GA;AACA,iBA5GA,2BA4GA;AACA;AACA,gBADA,EACA;AACA,uCAFA,EAEA;AACA;AACA;AACA;AACA,SANA;;AAQA,KArHA;AAsHA;AACA,aAvHA,uBAuHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAPA;AAQA,KAjIA,EA/BA,E","file":"pagesB/ucenter/ucenter.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesB/ucenter/ucenter.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./ucenter.vue?vue&type=template&id=3c85db02&\"\nvar renderjs\nimport script from \"./ucenter.vue?vue&type=script&lang=js&\"\nexport * from \"./ucenter.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../HBuilderX-app开发版/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 = \"pagesB/ucenter/ucenter.vue\"\nexport default component.exports","export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ucenter.vue?vue&type=template&id=3c85db02&\"","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 \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ucenter.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ucenter.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view :class=\"editRealName&editMobile&editArea&editAddress?'':'pad-b150'\">\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"个人中心\" :marginBottom=\"0\"></status-nav>\r\n\t\t<view class=\"ucenter\">\r\n\t\t\t<view class=\"item flex\">\r\n\t\t\t\t<view class=\"title\">头像</view>\r\n\t\t\t\t<view class=\"img\" @tap=\"changeHeadImg\">\r\n\t\t\t\t\t<image :src=\"headImgUrl\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\">\r\n\t\t\t\t<view class=\"title\">昵称</view>\r\n\t\t\t\t<view class=\"msg\">{{nickName}}</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\" @tap=\"openEdit('real_name')\">\r\n\t\t\t\t<view class=\"title\">真实姓名</view>\r\n\t\t\t\t<input class=\"msg\" type=\"text\" v-model=\"realName\" disabled=\"true\">\r\n\t\t\t\t<view class=\"more\">\r\n\t\t\t\t\t<image src=\"/static/public/icon-my-more.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\" style=\"position: relative;\">\r\n\t\t\t\t<view class=\"title\">联系电话</view>\r\n\t\t\t\t<input class=\"msg\" type=\"number\" v-model=\"mobile\" disabled=\"true\">\r\n\t\t\t\t<view class=\"more\">\r\n\t\t\t\t\t<image src=\"/static/public/icon-my-more.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<button class=\"get-phone-btn\" open-type=\"getPhoneNumber\" @getphonenumber=\"onGetPhoneNumber\"></button>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\" @tap=\"openEdit('area')\">\r\n\t\t\t\t<view class=\"title\">联系地址</view>\r\n\t\t\t\t<input class=\"msg\" type=\"text\" v-model=\"area\" disabled=\"true\">\r\n\t\t\t\t<view class=\"more\">\r\n\t\t\t\t\t<image src=\"/static/public/icon-my-more.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\" @tap=\"openEdit('address')\">\r\n\t\t\t\t<view class=\"title\">详细地址</view>\r\n\t\t\t\t<input class=\"msg\" type=\"text\" v-model=\"address\" disabled=\"true\">\r\n\t\t\t\t<view class=\"more\">\r\n\t\t\t\t\t<image src=\"/static/public/icon-my-more.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item flex\" v-if=\"businessCode!==''\">\r\n\t\t\t\t<view class=\"title\">会员码</view>\r\n\t\t\t\t<view class=\"msg\">{{businessCode}}</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 修改弹窗 -->\r\n\t\t<view class=\"pull-all-bg\" v-show=\"isOpen\" @tap=\"closeEdit\"></view>\r\n\t\t<view class=\"edit-box-bg\"v-if=\"isOpen\">\r\n\t\t\t<view class=\"edit-box\">\r\n\t\t\t\t<view class=\"title\">{{title}}</view>\r\n\t\t\t\t<view class=\"subtitle\">{{subtitle}}</view>\r\n\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"msg\" :placeholder=\"placeholder\" placeholder-color=\"#c9c9c9\" v-if=\"type=='input'\">\r\n\t\t\t\t<textarea class=\"textarea\" v-model=\"msg\" :placeholder=\"placeholder\" placeholder-color=\"#c9c9c9\" v-if=\"type=='textarea'\"></textarea>\r\n\t\t\t\t<view class=\"edit-btns\">\r\n\t\t\t\t\t<view class=\"btn\" @tap=\"closeEdit\">取消</view>\r\n\t\t\t\t\t<view class=\"btn\" @tap=\"submitEdit(field,msg)\">确认</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport statusNav from '@/components/status-navs/status-nav';\r\n\timport {getCartNum} from '@/jsFile/public-api.js';\r\n\timport { mapState } from 'vuex'//引入mapState\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tstatusNav\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\theadImgUrl:'', //头像链接\r\n\t\t\t\tnickName:'', //昵称\r\n\t\t\t\tbusinessCode:'', //会员码\r\n\t\t\t\trealName:'',//真实姓名\r\n\t\t\t\tmobile:'',//电话\r\n\t\t\t\tarea:'',//联系地址\r\n\t\t\t\taddress:'',//详细地址\r\n\t\t\t\tisOpen:false, //是否显示\r\n\t\t\t\ttitle:'', //标题\r\n\t\t\t\tsubtitle:'', //副标题\r\n\t\t\t\tmsg:'', //修改内容\r\n\t\t\t\tfield:'', //修改位置\r\n\t\t\t\ttype:'input',\r\n\t\t\t\tplaceholder:'', //默认信息\r\n\t\t\t\theadImg:'', //缓存头像链接\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed:{\r\n\t\t\t\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tthis.getUserData();\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 获取用户信息\r\n\t\t\tgetUserData(){\r\n\t\t\t\tuni.showLoading();\r\n\t\t\t\tthis.$requst.get('/api/user/info').then(res=>{\r\n\t\t\t\t\tconsole.log(res,'用户信息')\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.headImgUrl = res.data.headimgurl;\r\n\t\t\t\t\t\tthis.nickName = res.data.nickname;\r\n\t\t\t\t\t\tthis.businessCode = res.data.business_code;\r\n\t\t\t\t\t\tthis.realName= res.data.real_name;\r\n\t\t\t\t\t\tthis.mobile= res.data.mobile;\r\n\t\t\t\t\t\tthis.area= res.data.area;\r\n\t\t\t\t\t\tthis.address= res.data.address;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 选择修改信息\r\n\t\t\topenEdit(type){\r\n\t\t\t\tif(type == 'real_name'){\r\n\t\t\t\t\tthis.title = '姓名';\r\n\t\t\t\t\tthis.subtitle = '姓名';\r\n\t\t\t\t\tthis.placeholder = this.realName;\r\n\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\tthis.type='input';\r\n\t\t\t\t\tthis.field = 'real_name';\r\n\t\t\t\t}\r\n\t\t\t\tif(type == 'mobile'){\r\n\t\t\t\t\tthis.title = '电话';\r\n\t\t\t\t\tthis.subtitle = '电话';\r\n\t\t\t\t\tthis.placeholder = this.mobile;\r\n\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\tthis.type='input';\r\n\t\t\t\t\tthis.field = 'mobile';\r\n\t\t\t\t}\r\n\t\t\t\tif(type == 'area'){\r\n\t\t\t\t\tthis.title = '联系地址';\r\n\t\t\t\t\tthis.subtitle = '联系地址';\r\n\t\t\t\t\tthis.placeholder = this.area;\r\n\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\tthis.type='input';\r\n\t\t\t\t\tthis.field = 'area';\r\n\t\t\t\t}\r\n\t\t\t\tif(type == 'address'){\r\n\t\t\t\t\tthis.title = '详细地址';\r\n\t\t\t\t\tthis.subtitle = '详细地址';\r\n\t\t\t\t\tthis.placeholder = this.address;\r\n\t\t\t\t\tthis.isOpen = true;\r\n\t\t\t\t\tthis.type='textarea';\r\n\t\t\t\t\tthis.field = 'address';\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 提交修改\r\n\t\t\tsubmitEdit(field,value){\r\n\t\t\t\tuni.showLoading();\r\n\t\t\t\tif(field!==''&&value!==''){\r\n\t\t\t\t\tlet params={\r\n\t\t\t\t\t\tfield:field,\r\n\t\t\t\t\t\tvalue:value\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/user/update-info',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('修改成功');\r\n\t\t\t\t\t\t\t// 关闭弹窗\r\n\t\t\t\t\t\t\tthis.closeEdit();\r\n\t\t\t\t\t\t\t// 刷新用户信息\r\n\t\t\t\t\t\t\tthis.getUserData();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\t})\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('您没有更改信息');\r\n\t\t\t\t\t// 关闭弹窗\r\n\t\t\t\t\tthis.closeEdit();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 关闭弹窗\r\n\t\t\tcloseEdit(){\r\n\t\t\t\tthis.title = '';\r\n\t\t\t\tthis.subtitle = '';\r\n\t\t\t\tthis.msg='';\r\n\t\t\t\tthis.isOpen = false;\r\n\t\t\t\tthis.type=''\r\n\t\t\t},\r\n\t\t\t// 获取授权信息\r\n\t\t\tonGetPhoneNumber(e){ \r\n\t\t\t\tif(e.detail.errMsg==\"getPhoneNumber:fail user deny\"){ //用户决绝授权 \r\n\t\t\t\t\tthis.$toolAll.tools.showToast('您已拒绝授权');\r\n\t\t\t\t}else{ //允许授权 \r\n\t\t\t\t\tlet params={\r\n\t\t\t\t\t\tiv:e.detail.iv,\r\n\t\t\t\t\t\tencryptedData:e.detail.encryptedData\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/user/bind-phone',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('绑定成功');\r\n\t\t\t\t\t\t\t// 刷新用户信息\r\n\t\t\t\t\t\t\tthis.getUserData();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t},\r\n\t\t\t// 选择图片\r\n\t\t\tchangeHeadImg(){\r\n\t\t\t\tuni.chooseImage({\r\n\t\t\t\t\tcount: 1, //默认9\r\n\t\t\t\t\tsourceType: ['album','camera'], //从相册选择\r\n\t\t\t\t\tsuccess: (res)=> {\r\n\t\t\t\t\t\tthis.headImg = res.tempFilePaths[0];\r\n\t\t\t\t\t\tthis.uploadImg();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 上传图片\r\n\t\t\tuploadImg(){\r\n\t\t\t\tuni.showLoading();\r\n\t\t\t\tthis.$requst.upload('/api/file/upload/image',{path:this.headImg}).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tthis.headImgUrl = this.$hostHttp+res.data.src;\r\n\t\t\t\t\t\t// 修改信息\r\n\t\t\t\t\t\tthis.submitEdit('headimgurl',this.headImgUrl);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\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\r\n</style>\r\n"],"sourceRoot":""}