meber.html 8.8 KB

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