meber.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="../../../../css/css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="../../../../css/css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="../../../../css/css/main.css" />
  14. <script src="https://b2bcnfile.sailuntire.com/upload/outerstyle/agentCommon/PCR/js/pcr_role_config.js" charset="utf-8"></script>
  15. <script src="../../../../script/js/vue.js"></script>
  16. <script src="../../../../script/js/vant-ui.js"></script>
  17. <script src="../../../../script/js/main.js"></script>
  18. <style media="screen">
  19. .anniu {
  20. display: flex;
  21. }
  22. .anniu>input {
  23. width: 100%;
  24. height: .86rem;
  25. background: rgba(0, 160, 234, 1);
  26. border-radius: 5rem;
  27. color: #fff;
  28. font-size: .31rem;
  29. margin-top: .5rem;
  30. }
  31. .fanliBar .item h4 {
  32. font-size: 0.38rem;
  33. }
  34. .meberHeader .userTouxiang {
  35. width: 1rem;
  36. }
  37. .meberMenu01 .item {
  38. width: 50%
  39. }
  40. </style>
  41. <title>我的</title>
  42. </head>
  43. <body>
  44. <div id="app">
  45. <div class="view flex col">
  46. <div class="page router fx1" id="mescroll">
  47. <div class="meberHeader" style="height: 3.95rem">
  48. <div class="flex jlr" style="padding-top: 1rem;">
  49. <div class="userTouxiang flex col a-center jlr">
  50. <!-- <div class="image"></div> -->
  51. <!-- <p>
  52. 联系人:{{ meterInfo.legalPerson }}
  53. </p> -->
  54. </div>
  55. <div class="shopInfo">
  56. <h2 class="flex a-center">{{ meterInfo.name }}
  57. </h2>
  58. <div class="tag">
  59. {{ meterInfo.street }}
  60. </div>
  61. </div>
  62. <div class="userTouxiang flex col a-center jlr"></div>
  63. <!-- <div class="ewm flex j-center">
  64. <div class="sysIcon"></div>
  65. </div> -->
  66. </div>
  67. <div class="meberHeaderBottom flex a-center j-center">
  68. <div class="item flex a-center j-center">
  69. <!-- 联系人:{{ meterInfo.legalPerson }} -->
  70. 区域:{{ meterInfo.regioName }}
  71. </div>
  72. <div class="item flex a-center j-left" v-on:click="toastBrand(meterInfo.brandList)">
  73. 品牌:{{meterInfo.brandList|filterBrand}}
  74. </div>
  75. </div>
  76. <!-- <div class="meberHeaderBottom flex a-center j-center">
  77. <div class="item flex a-center j-center">
  78. 签约品牌:
  79. </div>
  80. </div> -->
  81. </div>
  82. <div class="fanliBar flex a-center">
  83. <div class="item flex a-center">
  84. <span>额度:</span>
  85. <div class="flex a-end">
  86. <h4>{{( meterInfo.credit ? meterInfo.credit.showCredit : 0 ) | initCredit(roleConfig[subRoleName].pages[2].subEle.myMoney.isShow)}}</h4>
  87. <em>RMB</em>
  88. </div>
  89. </div>
  90. <div class="fgx"></div>
  91. <div class="item flex a-center">
  92. <span>积分:</span>
  93. <div class="flex a-end">
  94. <h4>{{roleConfig[subRoleName].pages[2].subEle.myIntegral.isShow?meterInfo.integration.allIntegration:"***" }}</h4>
  95. <em>个</em>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="meberMenu01 flex wrap">
  100. <!-- <div class="item flex col a-center j-center">
  101. <b class="i1"></b>
  102. <h4>返利提交</h4>
  103. </div> -->
  104. <!-- <div class="item flex col a-center j-center">
  105. <b class="i3"></b>
  106. <h4>折款查询</h4>
  107. </div> -->
  108. <div v-if="roleConfig[subRoleName].pages[2].subEle.agent_storage.isShow" class="item flex col a-center j-center" v-on:click="openWin('agent_storage')">
  109. <b class="i4"></b>
  110. <h4>我的库存</h4>
  111. </div>
  112. <div v-if="roleConfig[subRoleName].pages[2].subEle.agentList.isShow" class="item flex col a-center j-center" v-on:click="openWin('agentList')">
  113. <b class="i5"></b>
  114. <h4>我的门店</h4>
  115. </div>
  116. <!-- <div class="item flex col a-center j-center">
  117. <b class="i6"></b>
  118. <h4>我的积分</h4>
  119. </div> -->
  120. </div>
  121. <div class="meberList">
  122. <div v-if="roleConfig[subRoleName].pages[2].subEle.orderList.isShow" class="item flex a-center jlr" v-on:click="openWin('orderList')">
  123. <h4>门店订单</h4>
  124. <div class="flex a-center rightIcons">
  125. <span>查看</span>
  126. <i class="iconfont icon-right"></i>
  127. </div>
  128. </div>
  129. <!-- <div class="item flex a-center jlr" v-on:click="openWin('backList')">
  130. <h4>核销记录</h4>
  131. <div class="flex a-center rightIcons">
  132. <span>查看</span>
  133. <i class="iconfont icon-right"></i>
  134. </div>
  135. </div> -->
  136. <div class="item flex a-center jlr" v-on:click="checkVersion">
  137. <h4>版本检测</h4>
  138. <div class="flex a-center rightIcons" style="color:#f00">
  139. {{ version }}
  140. </div>
  141. </div>
  142. <!-- <div class="item flex a-center jlr" v-on:click="openWin('backMoneyList')">
  143. <h4>返利明细</h4>
  144. <div class="flex a-center rightIcons">
  145. <span>查看</span>
  146. <i class="iconfont icon-right"></i>
  147. </div>
  148. </div> -->
  149. <!-- <div class="item flex a-center jlr" v-on:click="openWin('addressList')">
  150. <h4>收货地址管理</h4>
  151. <div class="flex a-center rightIcons">
  152. <i class="iconfont icon-right"></i>
  153. </div>
  154. </div> -->
  155. <!-- <div class="item flex a-center jlr">
  156. <h4>设置</h4>
  157. <div class="flex a-center rightIcons">
  158. <i class="iconfont icon-right"></i>
  159. </div>
  160. </div> -->
  161. </div>
  162. <div class="anniu">
  163. <input type="button" value="注销登录" v-on:click="logout()">
  164. </div>
  165. </div>
  166. <!-- <van-tabbar v-model="active" fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  167. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  168. <span>{{item.label}}</span>
  169. <template #icon="props">
  170. <img :src="props.active ? item.active : item.inactive" />
  171. </template>
  172. </van-tabbar-item>
  173. </van-tabbar>-->
  174. </div>
  175. </div>
  176. </body>
  177. </html>
  178. <link rel="stylesheet" href="../../../../script/mescroll/mescroll.min.css">
  179. <script type="text/javascript" src="../../../../script/mescroll/mescroll.min.js"></script>
  180. <script type="text/javascript" src="../../../../script/api.js"></script>
  181. <script type="text/javascript" src="../../../../script/httpRequest.js"></script>
  182. <script type="text/javascript" src="../../../../script/vue_plugins.js"></script>
  183. <script type="text/javascript">
  184. apiready = function() {
  185. var roleConfig = $role;
  186. new Vue({
  187. el: '#app',
  188. data: {
  189. active: 3,
  190. footerHeight: 0,
  191. icon: [{
  192. label: '首页',
  193. path: '/',
  194. active: "../../../../../image/img/images/tabar_home_active.png",
  195. inactive: "../../../../../image/img/images/tabar_home_inactive.png"
  196. }, {
  197. label: '发现',
  198. path: '/discover',
  199. active: '../../../../../image/img/images/faxian.png',
  200. inactive: '../../../../../image/img/images/faxian.png'
  201. }, {
  202. label: '消息',
  203. path: '/information',
  204. active: '../../../../../image/img/images/xiaoxi.png',
  205. inactive: '../../../../../image/img/images/xiaoxi.png'
  206. }, {
  207. label: '我的',
  208. path: '/meber',
  209. active: '../../../../../image/img/images/wode_active.png',
  210. inactive: '../../../../../image/img/images/wode.png'
  211. }],
  212. meterInfo: {
  213. integration: {}
  214. }, // 经销商详情
  215. subRoleName: "orderPer",
  216. roleConfig: roleConfig
  217. },
  218. computed: {
  219. version: function() {
  220. return this.getVersion();
  221. }
  222. },
  223. methods: {
  224. // 获取经销商信息
  225. getMeberInfo: function(mescroll) {
  226. var url = "getMeberInfoU",
  227. _this = this,
  228. data = {
  229. token: $api.getStorage('token'),
  230. url: 'json',
  231. type: 'body'
  232. };
  233. setTimeout(function() {
  234. if (mescroll) {
  235. mescroll.endSuccess();
  236. }
  237. }, 1000);
  238. this.$post(url, data, function(ret) {
  239. if (ret.code == 0) {
  240. _this.meterInfo = ret.data.data == null ? {
  241. integration: {}
  242. } : ret.data.data;
  243. if (mescroll) {
  244. mescroll.endSuccess();
  245. }
  246. }
  247. })
  248. },
  249. openWin: function(src) {
  250. if($role[this.subRoleName].pages[2].subEle[src].isClick){
  251. this.goWin(src, "../home/"+src+"/"+src + '_win.html', '');
  252. }else{
  253. api.toast({
  254. msg: $role[this.subRoleName].pages[2].subEle[src].msg,
  255. });
  256. }
  257. },
  258. toastBrand: function(brands) {
  259. var brandss = "经销品牌:";
  260. if (brands) {
  261. for (var i = 0; i < brands.length; i++) {
  262. brandss += brands[i].brand + "|";
  263. }
  264. }
  265. api.toast({
  266. msg: brandss,
  267. duration: 2000,
  268. location: 'middle'
  269. });
  270. },
  271. logout: function() {
  272. $api.clearStorage();
  273. this.goWin("login", "../../../login.html", "");
  274. },
  275. // 检查版本更新
  276. checkVersion: function() {
  277. var _this = this;
  278. this.ifHasPrme('storage', function(ret) {
  279. if (ret == true) {
  280. _this.getNewVersionUrl(function() {
  281. });
  282. }
  283. })
  284. }
  285. },
  286. filters: {
  287. filterBrand: function(brands) {
  288. var str = '';
  289. if (brands) {
  290. // var brandss = JSON.stringify(brands);
  291. // alertJson(brands);
  292. for (var i = 0; i < brands.length; i++) {
  293. str += brands[i].brand + "|";
  294. }
  295. if (str != null && str.length > 11) {
  296. str = str.substring(0, 10) + "...";
  297. }
  298. }
  299. return str;
  300. },
  301. initCredit: function(val,val2) {
  302. var str;
  303. if(val2){
  304. str = parseInt((parseInt(val) / 10000)) + '万元'
  305. }else{
  306. str = "***"
  307. }
  308. return str;
  309. }
  310. },
  311. mounted: function() {
  312. var _this = this;
  313. this.subRoleName = $api.getStorage('subRoleName');
  314. this.addEvent("refushUser", function() {
  315. _this.getMeberInfo();
  316. })
  317. this.getMeberInfo();
  318. this.configDownAndPull("mescroll", function(mescroll) {
  319. _this.getMeberInfo(mescroll);
  320. }, function() {
  321. }, false);
  322. }
  323. })
  324. }
  325. </script>