1 line
22 KiB
Plaintext
1 line
22 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/my/my.vue?7bd9","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/my/my.vue?eab3","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/my/my.vue?814f","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/my/my.vue?7ef1","uni-app:///pages/tabbar/my/my.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,0F,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;AACuL;AACvL,gBAAgB,2LAAU;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,oMAEN;AACP,KAAK;AACL;AACA,aAAa,wLAEN;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;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACxDA;AAAA;AAAA;AAAA;AAAmsB,CAAgB,krBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsGvtB;AACA,gD,q8BAAA;eACA;AACA;AACA,wBADA;AAEA,wBAFA;AAGA,oBAHA,EADA;;AAMA,MANA,kBAMA;AACA;AACA,0DADA;AAEA,sBAFA,EAEA;AACA,kBAHA,EAGA;AACA,sBAJA,EAIA;AACA,qBALA,EAKA;AACA;AACA,2CADA;AAEA,8CAFA;AAGA,gDAHA;AAIA,6CAJA,CANA;AAWA;AACA;AACA,gGADA;AAEA,iGAFA;AAGA,gGAHA;AAIA,gGAJA;AAKA,gGALA;AAMA,gGANA;AAOA,mGAPA;AAQA,gGARA,CAZA;AAqBA;AACA,qBAtBA,EAsBA;AACA,uBAvBA,EAuBA;AACA,kBAxBA,EAwBA;AACA,gBAzBA,EAyBA;AACA,iBA1BA,EA0BA;AACA,qBA3BA,EA2BA;AACA,qBA5BA,EA4BA;AACA,gBA7BA;AA8BA,iBA9BA,EA8BA;AACA,sBA/BA,EA+BA;AACA,yBAhCA,EAgCA;AACA,wBAjCA,CAiCA;AAjCA;AAmCA,GA1CA;AA2CA,eA3CA,2BA2CA;;AAEA,GA7CA;AA8CA,QA9CA,oBA8CA;;AAEA,GAhDA;AAiDA,QAjDA,kBAiDA,EAjDA,EAiDA;AACA;AACA;AACA;AACA,GArDA;AAsDA,QAtDA,oBAsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OANA;AAOA,KARA,MAQA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAFA,MAEA;AACA;AACA;AACA,GA1EA;AA2EA;AACA;AACA,eAFA,yBAEA;AACA;AACA,oBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,6CADA;AAEA;AACA;AACA,gDADA;AAEA,kDAFA;AAGA,+CAHA;AAIA;AACA;AACA;AACA;AACA;AACA,OAjBA;AAkBA,KAxBA;;AA0BA;AACA,eA3BA,yBA2BA;AACA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA,KAlCA;AAmCA;AACA,iBApCA,2BAoCA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA,OANA,EAMA,GANA;AAOA,KAjDA;AAkDA;AACA,UAnDA,kBAmDA,KAnDA,EAmDA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,0CADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDADA;;AAGA;AACA;AACA;AACA,sCADA;;AAGA;AACA;AACA;AACA,kDADA;;AAGA;AACA;AACA;AACA;AACA;AACA,KAvFA;AAwFA;AACA,YAzFA,sBAyFA;AACA;AACA;AACA;AACA,2BADA;AAEA,6BAFA;AAGA,uCAHA;AAIA,uCAJA;;AAMA;AACA;AACA,6BADA,CACA;AACA,iCAFA,CAEA;AACA,WAHA,MAGA;AACA;AACA;AACA;AACA,SARA;AASA;AACA,KA5GA;;AA8GA;AACA,cA/GA,wBA+GA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KAzHA;;AA2HA;AACA,WA5HA,qBA4HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAnIA;;AAqIA;AACA,aAtIA,uBAsIA;AACA;AACA;AACA;AACA;AACA,iCAFA,CAEA;AACA,gCAHA,CAGA;AACA,WAJA,MAIA;AACA;AACA;AACA,SARA;AASA,OAVA,MAUA;AACA;AACA;;AAEA,KArJA;AAsJA;AACA,cAvJA,wBAuJA;AACA;AACA;AACA,KA1JA;;AA4JA;AACA,eA7JA,uBA6JA,KA7JA,EA6JA;AACA;AACA,gGADA;;AAGA,KAjKA;AAkKA;AACA,YAnKA,oBAmKA,GAnKA,EAmKA;AACA;AACA;AACA,sBADA;;AAGA,OAJA,MAIA;AACA;AACA;AACA;AACA,KA5KA;AA6KA;AACA,YA9KA,oBA8KA,GA9KA,EA8KA;AACA;AACA,mFADA;;AAGA,KAlLA;AAmLA;AACA,iBApLA,2BAoLA;AACA;AACA,KAtLA;AAuLA;AACA,WAxLA,qBAwLA;AACA;AACA,KA1LA,EA3EA,E","file":"pages/tabbar/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/tabbar/my/my.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./my.vue?vue&type=template&id=19e17412&\"\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-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 = \"pages/tabbar/my/my.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!./my.vue?vue&type=template&id=19e17412&\"","var components\ntry {\n components = {\n enterCart: function() {\n return import(\n /* webpackChunkName: \"components/enter-cart/enter-cart\" */ \"@/components/enter-cart/enter-cart.vue\"\n )\n },\n footTab: function() {\n return import(\n /* webpackChunkName: \"components/foot-tab/foot-tab\" */ \"@/components/foot-tab/foot-tab.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 l0 = _vm.__map(_vm.listData, function(item, index) {\n var $orig = _vm.__get_orig(item)\n\n var g0 = _vm.showObj.indexOf(index.toString())\n return {\n $orig: $orig,\n g0: g0\n }\n })\n\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n l0: l0\n }\n }\n )\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!./my.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!./my.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-b150\">\r\n\t\t<status-nav :ifReturn=\"false\" navBarTitle=\"我的\" :marginBottom=\"0\"></status-nav>\r\n\t\t<!-- 头部 -->\r\n\t\t<view class=\"my-herder\">\r\n\t\t\t<!-- 头像 -->\r\n\t\t\t<view class=\"my-portrait\">\r\n\t\t\t\t<view class=\"my-portrait-img\">\r\n\t\t\t\t\t<image :src=\"headPortrait\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"my-vip flex\" v-if=\"businessCode!==''\"><image src=\"/static/public/icon-vip.png\" mode=\"widthFix\"></image></view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 用户名 -->\r\n\t\t\t<view class=\"my-nick-name\">{{nickName}}</view>\r\n\t\t\t<!-- 订单量 -->\r\n\t\t\t<view class=\"my-order flex\">\r\n\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<text v-if=\"item.num < 100\">{{item.num}}</text>\r\n\t\t\t\t\t<text v-if=\"item.num >= 100\">99+</text>\r\n\t\t\t\t\t<view>{{item.title}}</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\">\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=\"left flex\">\r\n\t\t\t\t\t<view class=\"flex\">\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\" :style=\"{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"title\">{{businessCode!==''&&index==1?'会员码':item.titele}}</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"tips\" v-if=\"index==1\">{{businessCode!==''?businessCode:'输入会员码成为会员'}}</view>\r\n\t\t\t\t\t<view class=\"tips\" v-if=\"index==2\">申请成为会员可查看低价</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"right\">\r\n\t\t\t\t\t<view class=\"btn flex\" :class=\"showVip=='true'?'show':''\" v-if=\"index == 6\" @tap.stop=\"changeShowVip\">\r\n\t\t\t\t\t\t<view class=\"circular\"></view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"more\" :style=\"{opacity:index==1&&businessCode!==''?0:1}\" v-else>\r\n\t\t\t\t\t\t<image src=\"/static/public/icon-my-more.png\" mode=\"widthFix\"></image>\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=\"customer-all-bg\" :style=\"{'padding-top':newTop+'px'}\" v-if=\"isCustomer\" @tap.stop=\"closeCustomer\">\r\n\t\t\t<view class=\"customer-txt\">\r\n\t\t\t\t<image :src=\"customerSrc\" mode=\"widthFix\"></image>\r\n\t\t\t\t<text>请保存相册扫码添加客服</text>\r\n\t\t\t\t<view class=\"btn\" @tap.stop=\"saveImg\">保存二维码</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=\"isVip||isChecked\"></view>\r\n\t\t<view class=\"vip-box-bg\" v-if=\"isVip\">\r\n\t\t\t<view class=\"vip-box\">\r\n\t\t\t\t<view class=\"vip-close\" @tap=\"closeEv\"><text>X</text></view>\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\">\r\n\t\t\t\t\t\t<view class=\"tips\">姓名<text>*</text></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\">\r\n\t\t\t\t\t\t<view class=\"tips\">电话<text>*</text></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\t<view class=\"vip-item\">\r\n\t\t\t\t\t\t<view class=\"tips\">邀请人姓名</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"inviteeName\" placeholder=\"请输入邀请人姓名\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"vip-item\">\r\n\t\t\t\t\t\t<view class=\"tips\">邀请人会员码</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"inviteeCode\" 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=\"btn\" @tap=\"submitEv\">提交验证</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 验证会员码 -->\r\n\t\t<view class=\"edit-box-bg\" v-if=\"isChecked\">\r\n\t\t\t<view class=\"edit-box\">\r\n\t\t\t\t<view class=\"edit-close\" @tap=\"closeCheck()\"><text>X</text></view>\r\n\t\t\t\t<view class=\"title\">验证会员码</view>\r\n\t\t\t\t<view class=\"subtitle\">会员码<text>*</text></view>\r\n\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"vipCode\" placeholder=\"请输入会员邀请码\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t<view class=\"btn\" @tap=\"checkCode\">提交验证</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 购物车btn -->\r\n\t\t<enter-cart :bottom=\"150\"></enter-cart>\r\n\t\t<!-- 底部tab -->\r\n\t\t<foot-tab current=\"4\"></foot-tab>\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 enterCart from '@/components/enter-cart/enter-cart.vue';\r\n\timport footTab from '@/components/foot-tab/foot-tab.vue';\r\n\timport {getCartNum,userInfoEv} 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\tenterCart,\r\n\t\t\tfootTab,\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tnewTop:uni.getSystemInfoSync().statusBarHeight + 50,\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\tmyOrder:[\r\n\t\t\t\t\t{title:'全部订单',tag:'all',num:0},\r\n\t\t\t\t\t{title:'已下单',tag:'ordered',num:0},\r\n\t\t\t\t\t{title:'已完成',tag:'completed',num:0},\r\n\t\t\t\t\t{title:'已取消',tag:'closed',num:0},\r\n\t\t\t\t],//订单\r\n\t\t\t\tlistData:[\r\n\t\t\t\t\t{titele:'个人资料',imgSrc:'/static/public/icon-my-01.png',iconWidth:43,iconHeight:43},\r\n\t\t\t\t\t{titele:'会员码输入',imgSrc:'/static/public/icon-my-02.png',iconWidth:41,iconHeight:35},\r\n\t\t\t\t\t{titele:'会员申请',imgSrc:'/static/public/icon-my-03.png',iconWidth:40,iconHeight:40},\r\n\t\t\t\t\t{titele:'我的收藏',imgSrc:'/static/public/icon-my-04.png',iconWidth:49,iconHeight:47},\r\n\t\t\t\t\t{titele:'关于我们',imgSrc:'/static/public/icon-my-05.png',iconWidth:33,iconHeight:31},\r\n\t\t\t\t\t{titele:'免责申明',imgSrc:'/static/public/icon-my-06.png',iconWidth:38,iconHeight:38},\r\n\t\t\t\t\t{titele:'是否显示会员价',imgSrc:'/static/public/icon-my-07.png',iconWidth:39,iconHeight:26},\r\n\t\t\t\t\t{titele:'商家客服',imgSrc:'/static/public/icon-my-08.png',iconWidth:35,iconHeight:37}\r\n\t\t\t\t],//列表数据\r\n\t\t\t\tshowVip:'true', //是否显示会员价\r\n\t\t\t\tisCustomer:false, //商家客服\r\n\t\t\t\tisVip:false, //会员申请弹窗\r\n\t\t\t\tmyName:'', //姓名\r\n\t\t\t\tmyPhone:'', //电话\r\n\t\t\t\tinviteeName:'', //邀请人\r\n\t\t\t\tinviteeCode:'', //会员码\r\n\t\t\t\tflag:true,\r\n\t\t\t\tvipCode:'', //会员码\r\n\t\t\t\tisChecked:false, //验证会员码\r\n\t\t\t\tcacheBusinessId:-1, //商户id\r\n\t\t\t\tshowObj:'0123457', //隐藏Index\r\n\t\t\t}\r\n\t\t},\r\n\t\tonReachBottom() {\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\tonLoad(op) {\r\n\t\t\tif(op.business_id){\r\n\t\t\t\tthis.cacheBusinessId = op.business_id;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tif(this.cacheBusinessId !== -1){\r\n\t\t\t\tthis.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tthis.getUserInfo();\r\n\t\t\t\t\t\tthis.getCustomer();\r\n\t\t\t\t\t\tuserInfoEv();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}else{\r\n\t\t\t\tthis.getUserInfo();\r\n\t\t\t\tthis.getCustomer();\r\n\t\t\t\tuserInfoEv();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(uni.getStorageSync('showVip')){\r\n\t\t\t\tthis.showVip = uni.getStorageSync('showVip');\r\n\t\t\t}else{\r\n\t\t\t\tuni.setStorageSync('showVip','true');\r\n\t\t\t}\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\tuni.setStorageSync('business_id',res.data.business_id);\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.businessCode = res.data.business_code\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.ordered,\r\n\t\t\t\t\t\tthis.myOrder[2].num = newArr.completed,\r\n\t\t\t\t\t\tthis.myOrder[3].num = newArr.closed\r\n\t\t\t\t\t\tif(this.businessCode!==''){\r\n\t\t\t\t\t\t\tthis.showObj='0134567'\r\n\t\t\t\t\t\t}\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\tgetCustomer(){\r\n\t\t\t\tthis.$requst.post('/api/user/business-qr').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.customerSrc = 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\tchangeShowVip(){\r\n\t\t\t\tif(this.showVip=='true'){\r\n\t\t\t\t\tthis.showVip='false';\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.showVip='true';\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\tif(this.showVip=='true'){\r\n\t\t\t\t\t\tuni.setStorageSync('showVip','true');\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tuni.setStorageSync('showVip','false');\r\n\t\t\t\t\t}\r\n\t\t\t\t},200)\r\n\t\t\t},\r\n\t\t\t// 跳转方式\r\n\t\t\ttoMore(index){\r\n\t\t\t\tif(index == 6){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(index == 0){\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\tif(index == 1){\r\n\t\t\t\t\t\tif(this.businessCode == ''){\r\n\t\t\t\t\t\t\tthis.isChecked = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(index == 2){\r\n\t\t\t\t\t\tthis.isVip =true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(index == 3){\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:`/pages/tabbar/news/collection`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(index == 4){\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:`/pagesB/about/about`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(index == 5){\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl:`/pagesB/disclaimers/disclaimers`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(index == 7){\r\n\t\t\t\t\t\tthis.isCustomer = true;\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\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\tname:this.myName,\r\n\t\t\t\t\t\tphone:this.myPhone,\r\n\t\t\t\t\t\tinvite_name:this.inviteeName,\r\n\t\t\t\t\t\tinvite_code:this.inviteeCode,\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$requst.post('/api/user/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\tthis.flag = true;\r\n\t\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\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\tcloseEv(){\r\n\t\t\t\tthis.isVip = false;\r\n\t\t\t\tthis.myName = '';\r\n\t\t\t\tthis.myPhone = '';\r\n\t\t\t\tthis.inviteeName = '';\r\n\t\t\t\tthis.inviteeCode = '';\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\tcheckCode(){\r\n\t\t\t\tif(this.vipCode !== ''){\r\n\t\t\t\t\tthis.$requst.post('/api/user/check-code',{code:this.vipCode}).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.closeCheck(); //清除验证信息\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}else{\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('会员码不能为空');\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\tcloseCheck(){\r\n\t\t\t\tthis.isChecked = false;\r\n\t\t\t\tthis.vipCode = '';\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\t// 选择\r\n\t\t\tchooseEv(obj) {\r\n\t\t\t\tif(obj.url) {\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:obj.url\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 添加微信\r\n\t\t\t\t\tthis.ifWx = true;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 我的订单点击事件\r\n\t\t\tchooseGe(obj){\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:`/pagesA/order-list/order-list?index=${[1,2,3,4][obj.index]}`\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 关闭商家客服\r\n\t\t\tcloseCustomer(){\r\n\t\t\t\tthis.isCustomer = false;\r\n\t\t\t},\r\n\t\t\t// 保存二维码\r\n\t\t\tsaveImg(){\r\n\t\t\t\tthis.$toolAll.tools.saveImg(this.customerSrc);\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":""} |