1 line
23 KiB
Plaintext
1 line
23 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/Lee/mall-laonong/pages/my/my.vue?9040","webpack:///D:/Lee/mall-laonong/pages/my/my.vue?deff","webpack:///D:/Lee/mall-laonong/pages/my/my.vue?aa52","webpack:///D:/Lee/mall-laonong/pages/my/my.vue?a40a","uni-app:///pages/my/my.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,mF,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,WAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAA+G;AAC/G;AACsD;AACL;;;AAGjD;AAC6K;AAC7K,gBAAgB,uLAAU;AAC1B,EAAE,wEAAM;AACR,EAAE,6EAAM;AACR,EAAE,sFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,iFAAU;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,aAAa,4KAEN;AACP;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAipB,CAAgB,8pBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8FrqB;AACA,gD,0SAAA;eACA;AACA;AACA,kBADA,EADA;;AAIA,MAJA,kBAIA;AACA;AACA,2DADA;AAEA,sBAFA,EAEA;AACA,sBAHA,EAGA;AACA,kBAJA,EAIA;AACA,sBALA,EAKA;AACA,qBANA,EAMA;AACA,kBAPA,EAOA;AACA;AACA,kHADA;AAEA,uHAFA;AAGA,oHAHA;AAIA,uHAJA;AAKA,yHALA,CARA;AAcA;AACA;AACA,8FADA;AAEA,8FAFA;AAGA,8FAHA;AAIA,8FAJA;AAKA,8FALA;AAMA,8FANA;AAOA,+FAPA;AAQA,8FARA;AASA,8FATA,CAfA;AAyBA;AACA,kBA1BA,EA0BA;AACA,kBA3BA,EA2BA;AACA,gBA5BA,EA4BA;AACA,iBA7BA,EA6BA;AACA,gBA9BA;AA+BA,iBA/BA,EA+BA;AACA,0BAhCA,EAgCA;AACA,gBAjCA,EAiCA;AACA,qBAlCA,EAkCA;AACA,kBAnCA,EAmCA;AACA,sBApCA;AAqCA,qBArCA,EAqCA;AACA,iBAtCA,EAsCA;AACA,uBAvCA,CAuCA;AAvCA;AAyCA,GA9CA;AA+CA,QA/CA,oBA+CA;;AAEA,GAjDA;AAkDA,QAlDA,oBAkDA;AACA;AACA;AACA;AACA;AACA,GAvDA;AAwDA;AACA;AACA,eAFA,yBAEA;AACA;AACA,oBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCADA;AAEA,qDAFA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OA5BA;AA6BA,KAnCA;AAoCA;AACA,aArCA,uBAqCA;AACA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA,KA5CA;AA6CA;AACA,UA9CA,kBA8CA,KA9CA,EA8CA;AACA;AACA;AACA;AACA,0CADA;;AAGA;AACA,OANA,MAMA;AACA;AACA;AACA;AACA,OAJA,MAIA;AACA;AACA,wCADA;;AAGA,OAJA,MAIA;AACA;AACA,0CADA;;AAGA,OAJA,MAIA;AACA;AACA,0CADA;;AAGA,OAJA,MAIA;AACA;AACA;AACA,oDADA;;AAGA,SAJA,MAIA;AACA;AACA;AACA;;AAEA,OAVA,MAUA;AACA;AACA,sCADA;;AAGA,OAJA,MAIA;AACA;AACA,gDADA;;AAGA,OAJA,MAIA;AACA;AACA,oCADA;;AAGA;AACA,KA5FA;AA6FA;AACA,eA9FA,yBA8FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBADA;;AAGA,WAJA,MAIA;AACA;AACA;AACA,SAXA;;;AAcA,KA7GA;AA8GA;AACA,qBA/GA,6BA+GA,CA/GA,EA+GA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,yBADA;AAEA,+CAFA;;AAIA;AACA;AACA;AACA;AACA;AACA,4CADA;;AAGA,WANA,MAMA;AACA;AACA;AACA,SAVA;;AAYA;AACA,KApIA;AAqIA,qBArIA,6BAqIA,CArIA,EAqIA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,yBADA;AAEA,+CAFA;;AAIA;AACA;AACA;AACA;AACA;AACA,WAJA,MAIA;AACA;AACA;AACA,SARA;;AAUA;AACA,KAxJA;;AA0JA;AACA,YA3JA,sBA2JA;AACA;AACA;AACA;AACA,gCADA;AAEA,8BAFA;;AAIA;AACA;AACA,6BADA,CACA;AACA,iCAFA,CAEA;AACA,WAHA,MAGA;AACA;AACA;AACA;AACA;AACA,WAFA,EAEA,IAFA;AAGA,SAVA;AAWA;AACA,KA9KA;;AAgLA;AACA,cAjLA,wBAiLA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KA3LA;;AA6LA;AACA,UA9LA,kBA8LA,GA9LA,EA8LA;AACA;AACA,gBADA;;AAGA,KAlMA;;AAoMA;AACA,WArMA,qBAqMA;AACA;AACA;AACA;AACA,KAzMA;;AA2MA;AACA,eA5MA,uBA4MA,KA5MA,EA4MA;AACA;AACA,gGADA;;AAGA,KAhNA,EAxDA,E","file":"pages/my/my.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/my/my.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./my.vue?vue&type=template&id=0be17cc6&\"\nvar renderjs\nimport script from \"./my.vue?vue&type=script&lang=js&\"\nexport * from \"./my.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../HbuilderX/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/my/my.vue\"\nexport default component.exports","export * from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./my.vue?vue&type=template&id=0be17cc6&\"","var components\ntry {\n components = {\n tabbar: function() {\n return import(\n /* webpackChunkName: \"components/tabbar/tabbar\" */ \"@/components/tabbar/tabbar.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 var m0 = _vm.isLoading ? parseFloat(_vm.userInfo.balance) : null\n var l0 = _vm.isLoading\n ? _vm.__map(_vm.myOrder, function(item, index) {\n var $orig = _vm.__get_orig(item)\n\n var g0 =\n _vm.orderObj.indexOf(index.toString()) != -1 &&\n _vm.myOrder[index].num > 0\n return {\n $orig: $orig,\n g0: g0\n }\n })\n : null\n var l1 = _vm.isLoading\n ? _vm.__map(_vm.listData, function(item, index) {\n var $orig = _vm.__get_orig(item)\n\n var g1 = _vm.showObj.indexOf(index.toString())\n return {\n $orig: $orig,\n g1: g1\n }\n })\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n m0: m0,\n l0: l0,\n l1: l1\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./my.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./my.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-x170\" v-if=\"isLoading\">\r\n\t\t<view class=\"my-top\">\r\n\t\t\t<view class=\"my-bg\">\r\n\t\t\t\t<image src=\"/static/img/my-bg.jpg\" mode=\"widthFix\"></image>\r\n\t\t\t</view>\r\n\t\t\t<!-- 头部 -->\r\n\t\t\t<view class=\"my-herder pad-zy20 border-box\">\r\n\t\t\t\t<view class=\"my-message color-ff flex\">\r\n\t\t\t\t\t<!-- 头像 -->\r\n\t\t\t\t\t<view class=\"my-portrait radius100\">\r\n\t\t\t\t\t\t<image :src=\"headPortrait\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- 用户名 -->\r\n\t\t\t\t\t<view class=\"my-txt flex\">\r\n\t\t\t\t\t\t<view class=\"my-nickname font36 flex\">\r\n\t\t\t\t\t\t\t<text>{{nickName}}</text>\r\n\t\t\t\t\t\t\t<image :src=\"vip_info.ico\" mode=\"widthFix\" v-if=\"vip_info.ico!=='' && userInfo.is_distributor==0\"></image>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"my-vip-txt font24 background-orange radius25 pad-zy40 mar-s20 flex\">{{userInfo.is_distributor==1?'经销商':vip_info.name}}</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"my-money color-ff flex\">\r\n\t\t\t\t\t<view class=\"item\" @tap=\"goPage('/pagesA/integral/integral')\">\r\n\t\t\t\t\t\t<view class=\"font48\">{{userInfo.score}}</view>\r\n\t\t\t\t\t\t<text class=\"font24\">我的积分</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"item\" @tap=\"goPage('/pagesA/coupon/coupon')\">\r\n\t\t\t\t\t\t<view class=\"font48\">{{userInfo.coupon_count}}</view>\r\n\t\t\t\t\t\t<text class=\"font24\">我的优惠券</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"item\" @tap=\"goPage('/pagesA/recharge/recharge')\">\r\n\t\t\t\t\t\t<view class=\"font48\">{{parseFloat(userInfo.balance)>0?userInfo.balance:0}}</view>\r\n\t\t\t\t\t\t<text class=\"font24\">我的余额</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 订单量 -->\r\n\t\t\t\t<view class=\"my-order background-grey border-box flex\">\r\n\t\t\t\t\t<view class=\"item\" v-for=\"(item,index) in myOrder\" :key=\"index\" @tap=\"changeOrder(index)\">\r\n\t\t\t\t\t\t<view class=\"img flex\">\r\n\t\t\t\t\t\t\t<image :src=\"item.imgSrc\" mode=\"widthFix\" :style=\"{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}\"></image>\r\n\t\t\t\t\t\t\t<view class=\"point radius100 flex\" v-if=\"orderObj.indexOf(index.toString())!=-1 && myOrder[index].num>0\">\r\n\t\t\t\t\t\t\t\t<text class=\"font22 color-ff\">{{myOrder[index].num}}</text>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"txt font24 color-ff\">{{item.title}}</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</view>\r\n\t\t<!-- 其他资料 -->\r\n\t\t<view class=\"my-content pad-all40\">\r\n\t\t\t<view class=\"item flex\" v-for=\"(item,index) in listData\" :key=\"index\" @tap.stop=\"toMore(index)\" v-if=\"showObj.indexOf(index.toString())!=-1\">\r\n\t\t\t\t<view class=\"title flex\">\r\n\t\t\t\t\t<view class=\"img flex\">\r\n\t\t\t\t\t\t<image :src=\"item.imgSrc\" :style=\"{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"title font28\">{{item.titele}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"more\">\r\n\t\t\t\t\t<image src=\"/static/icon/icon-join.png\" mode=\"widthFix\" style=\"width: 14rpx;height: 26rpx;\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<button class=\"get-phone-btn\" open-type=\"getPhoneNumber\" @getphonenumber=\"onGetPhoneNumberA\" v-if=\"index==0&&mobile==''\"></button>\r\n\t\t\t\t<button class=\"get-phone-btn\" open-type=\"getPhoneNumber\" @getphonenumber=\"onGetPhoneNumberB\" v-if=\"index==1&&mobile==''\"></button>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 会员注册 -->\r\n\t\t<view class=\"pull-bg\" style=\"background-color: rgba(0,0,0,.3);\" v-if=\"isVip || isShow\"></view>\r\n\t\t<view class=\"vip-box-bg border-box\" v-if=\"isVip\">\r\n\t\t\t<view class=\"vip-box radius20 background-white font30\">\r\n\t\t\t\t<view class=\"title\">会员注册</view>\r\n\t\t\t\t<view class=\"vip-list\">\r\n\t\t\t\t\t<view class=\"vip-item mar-s20\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">姓名</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"myName\" placeholder=\"请输入姓名\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"vip-item mar-s40\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">电话</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"number\" v-model=\"myPhone\" placeholder=\"请输入电话\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"submit-btn font36 background-orange radius30 mar-s60 flex\" @tap=\"submitEv\">注册会员</view>\r\n\t\t\t\t<view class=\"close-btn\" @tap=\"closeEv\">\r\n\t\t\t\t\t<image src=\"/static/icon/close-btn.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 底部tab -->\r\n\t\t<tabbar current=\"0\" v-if=\"isLoading\"></tabbar>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport tabbar from '@/components/tabbar/tabbar.vue';\r\n\timport {getCartInfo} from '@/jsFile/public-api.js';\r\n\timport {mapState} from 'vuex'//引入mapState\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\ttabbar,\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tstatusHeight:uni.getSystemInfoSync().statusBarHeight,\r\n\t\t\t\tscroolTop:false, //是否显示顶部\r\n\t\t\t\theadPortrait:'', //头像\r\n\t\t\t\tnickName:'', //用户名\r\n\t\t\t\tbusinessCode:'', //是否会员\r\n\t\t\t\tcustomerSrc:'', //商家客服二维码\r\n\t\t\t\tvip_info:{}, //会员信息\r\n\t\t\t\tmyOrder:[\r\n\t\t\t\t\t{title:'全部',tag:'all',imgSrc:'/static/icon/icon-order-01.png',num:0,iconWidth:42,iconHeight:44},\r\n\t\t\t\t\t{title:'待付款',tag:'waiting',imgSrc:'/static/icon/icon-order-02.png',num:0,iconWidth:46,iconHeight:40},\r\n\t\t\t\t\t{title:'已下单',tag:'paid',imgSrc:'/static/icon/icon-order-03.png',num:0,iconWidth:50,iconHeight:44},\r\n\t\t\t\t\t{title:'已发货',tag:'shipped',imgSrc:'/static/icon/icon-order-04.png',num:0,iconWidth:48,iconHeight:42},\r\n\t\t\t\t\t{title:'已完成',tag:'completed',imgSrc:'/static/icon/icon-order-05.png',num:0,iconWidth:49,iconHeight:44}\r\n\t\t\t\t],//订单\r\n\t\t\t\tlistData:[\r\n\t\t\t\t\t{titele:'个人资料',imgSrc:'/static/icon/icon-my-01.png',iconWidth:35,iconHeight:36},\r\n\t\t\t\t\t{titele:'注册会员',imgSrc:'/static/icon/icon-my-02.png',iconWidth:40,iconHeight:34},\r\n\t\t\t\t\t{titele:'地址管理',imgSrc:'/static/icon/icon-my-03.png',iconWidth:32,iconHeight:40},\r\n\t\t\t\t\t{titele:'余额充值',imgSrc:'/static/icon/icon-my-04.png',iconWidth:34,iconHeight:28},\r\n\t\t\t\t\t{titele:'积分管理',imgSrc:'/static/icon/icon-my-05.png',iconWidth:32,iconHeight:30},\r\n\t\t\t\t\t{titele:'分销管理',imgSrc:'/static/icon/icon-my-06.png',iconWidth:35,iconHeight:35},\r\n\t\t\t\t\t{titele:'优惠券管理',imgSrc:'/static/icon/icon-my-07.png',iconWidth:38,iconHeight:27},\r\n\t\t\t\t\t{titele:'免责声明',imgSrc:'/static/icon/icon-my-08.png',iconWidth:40,iconHeight:40},\r\n\t\t\t\t\t{titele:'关于我们',imgSrc:'/static/icon/icon-my-09.png',iconWidth:40,iconHeight:40}\r\n\t\t\t\t],//列表数据\r\n\t\t\t\tvip_level:0,// 是否会员\r\n\t\t\t\tisVip:false, //会员申请弹窗\r\n\t\t\t\tmyName:'', //姓名\r\n\t\t\t\tmyPhone:'', //电话\r\n\t\t\t\tflag:true,\r\n\t\t\t\tvipCode:'', //会员码\r\n\t\t\t\tshowObj:'012345678', //显示列表\r\n\t\t\t\tmobile:'', //联系方式\r\n\t\t\t\torderObj:'123', //订单显示\r\n\t\t\t\tuserInfo:'',//用户信息\r\n\t\t\t\tisLoading:false,\r\n\t\t\t\tshareFlag:true, //是否可分享\r\n\t\t\t\tcodeImg:'', //分销码\r\n\t\t\t\tis_distributor:0, //是否经销商\r\n\t\t\t}\r\n\t\t},\r\n\t\tonHide() {\r\n\t\t\t\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\t// 获取用户信息\r\n\t\t\tthis.getUserInfo();\r\n\t\t\t// 刷新购物车信息\r\n\t\t\tgetCartInfo();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 获取用户信息\r\n\t\t\tgetUserInfo(){\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle:'加载中'\r\n\t\t\t\t});\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.userInfo = res.data;\r\n\t\t\t\t\t\tlet newArr = res.data.order_count;\r\n\t\t\t\t\t\tthis.headPortrait = res.data.headimgurl;\r\n\t\t\t\t\t\tthis.nickName = res.data.nickname;\r\n\t\t\t\t\t\tthis.mobile = res.data.mobile,\r\n\t\t\t\t\t\tthis.myPhone = this.mobile,\r\n\t\t\t\t\t\tthis.businessCode = res.data.business_code;\r\n\t\t\t\t\t\tthis.vip_level = res.data.vip_level;\r\n\t\t\t\t\t\tthis.vip_info = res.data.vip_info;\r\n\t\t\t\t\t\tthis.is_distributor = res.data.is_distributor;\r\n\t\t\t\t\t\tthis.myOrder[0].num = newArr.all;\r\n\t\t\t\t\t\tthis.myOrder[1].num = newArr.waiting;\r\n\t\t\t\t\t\tthis.myOrder[2].num = newArr.paid;\r\n\t\t\t\t\t\tthis.myOrder[3].num = newArr.shipped;\r\n\t\t\t\t\t\tthis.myOrder[4].num = newArr.completed;\r\n\t\t\t\t\t\tif(this.vip_level!==0){\r\n\t\t\t\t\t\t\tthis.showObj='02345678'\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.showObj='012345678'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 获取分销码\r\n\t\t\t\t\t\tthis.getCodeEv();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\tthis.isLoading = true;\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 获取分销码\r\n\t\t\tgetCodeEv(){\r\n\t\t\t\tthis.$requst.post('/api/user/my-distribution-code').then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tconsole.log(res,'分销码');\r\n\t\t\t\t\t\tthis.codeImg = this.$hostHttp + res.data.qr;\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\ttoMore(index){\r\n\t\t\t\tif(index == 0){\r\n\t\t\t\t\tif(this.mobile!==''){\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:`/pagesB/ucenter/ucenter`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(index == 1){\r\n\t\t\t\t\tif(this.vip_level == 0 && this.mobile!==''){\r\n\t\t\t\t\t\tthis.isVip = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(index == 2){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesA/address/address`\r\n\t\t\t\t\t})\r\n\t\t\t\t}else if(index == 3){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesA/recharge/recharge`\r\n\t\t\t\t\t})\r\n\t\t\t\t}else if(index == 4){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesA/integral/integral`\r\n\t\t\t\t\t})\r\n\t\t\t\t}else if(index == 5){\r\n\t\t\t\t\tif(this.is_distributor!==0){\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:`/pagesA/distribution/distribution`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// 调用扫码功能\r\n\t\t\t\t\t\tthis.getScanCode();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(index == 6){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesA/coupon/coupon`\r\n\t\t\t\t\t})\r\n\t\t\t\t}else if(index == 7){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesB/disclaimers/disclaimers`\r\n\t\t\t\t\t})\r\n\t\t\t\t}else if(index == 8){\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:`/pagesB/about/about`\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\tgetScanCode(){\r\n\t\t\t\tuni.scanCode({\r\n\t\t\t\t\tsuccess: (res)=> {\r\n\t\t\t\t\t\tconsole.log(res.path,'扫码成功');\r\n\t\t\t\t\t\tlet path =`/${res.path}`;\r\n\t\t\t\t\t\tif(path.indexOf('/pagesB/distributor/distributor')==0) {\r\n\t\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\t\turl:path\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('请扫正确的二维码');\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\tonGetPhoneNumberA(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\tthis.getUserInfo();\r\n\t\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\t\turl:`/pagesB/ucenter/ucenter`\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg);\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\tonGetPhoneNumberB(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\tthis.getUserInfo();\r\n\t\t\t\t\t\t\tthis.isVip =true;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg);\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\t// 提交会员申请\r\n\t\t\tsubmitEv(){\r\n\t\t\t\tif(this.checkEmpty() && this.flag){\r\n\t\t\t\t\tthis.flag = false;\r\n\t\t\t\t\tlet params = {\r\n\t\t\t\t\t\treal_name:this.myName,\r\n\t\t\t\t\t\tmobile:this.myPhone,\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/user/register-vip',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\tthis.closeEv(); //关闭会员申请\r\n\t\t\t\t\t\t\tthis.getUserInfo(); // 刷新信息\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t},2000)\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\t// 验证表单\r\n\t\t\tcheckEmpty(){\r\n\t\t\t\tlet result = false;\r\n\t\t\t\tif(!this.myName) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请填写姓名');\r\n\t\t\t\t} else if(this.$toolAll.tools.isPhone(this.myPhone)) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请正确填写联系电话');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t}\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 去对应页面\r\n\t\t\tgoPage(url){\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:url\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\tcloseEv(){\r\n\t\t\t\tthis.isVip = false;\r\n\t\t\t\tthis.myName = '';\r\n\t\t\t\tthis.flag = true;\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 跳转订单管理\r\n\t\t\tchangeOrder(index){\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:`/pagesA/order/order?tag=${this.myOrder[index].tag}&index=${index}`\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":""} |