meber.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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/vue-i18n.js"></script>
  17. <script src="../../../../script/js/vant-ui.js"></script>
  18. <script src="../../../../script/js/main.js"></script>
  19. <script type="text/javascript" src="../../js/zh.js"></script>
  20. <script type="text/javascript" src="../../js/en.js"></script>
  21. <style media="screen">
  22. .anniu {
  23. display: flex;
  24. padding: 0 .5rem;
  25. }
  26. .anniu>input {
  27. width: 100%;
  28. height: .86rem;
  29. background: linear-gradient(45deg, #005fa3, #00a0ea);
  30. border-radius: 5rem;
  31. color: #fff;
  32. font-size: .31rem;
  33. margin-top: .5rem;
  34. }
  35. .fanliBar .item h4 {
  36. font-size: 0.38rem;
  37. }
  38. .meberHeader .userTouxiang {
  39. width: 1rem;
  40. }
  41. .meberMenu01 .item {
  42. width: 50%
  43. }
  44. .mescroll{
  45. position: relative;;
  46. height: auto; /*如设置bottom:50px,则需height:auto才能生效*/
  47. }
  48. </style>
  49. <title>我的</title>
  50. </head>
  51. <body>
  52. <div id="app">
  53. <div class="view flex col">
  54. <div class="page router fx1 mescroll" id="mescroll">
  55. <div class="meberHeader" style="height: 3.95rem">
  56. <div class="flex jlr" style="padding-top: 1rem;">
  57. <div class="userTouxiang flex col a-center jlr">
  58. <!-- <div class="image"></div> -->
  59. <!-- <p>
  60. 联系人:{{ meterInfo.legalPerson }}
  61. </p> -->
  62. </div>
  63. <div class="shopInfo">
  64. <h2 class="flex a-center">{{ meterInfo.name }}
  65. </h2>
  66. <div class="tag">
  67. {{ meterInfo.street }}
  68. </div>
  69. </div>
  70. <div class="userTouxiang flex col a-center jlr"></div>
  71. <!-- <div class="ewm flex j-center">
  72. <div class="sysIcon"></div>
  73. </div> -->
  74. </div>
  75. <div class="meberHeaderBottom flex a-center j-center">
  76. <div class="item flex a-center j-center">
  77. <!-- 联系人:{{ meterInfo.legalPerson }} -->
  78. {{ $t('mine.meber.region') }}:{{ meterInfo.regioName }}
  79. </div>
  80. <div class="item flex a-center j-left" v-on:click="toastBrand(meterInfo.brandList)">
  81. {{ $t('mine.meber.brand') }}:{{filterBrand(meterInfo.brandList)}}
  82. </div>
  83. </div>
  84. <!-- <div class="meberHeaderBottom flex a-center j-center">
  85. <div class="item flex a-center j-center">
  86. 签约品牌:
  87. </div>
  88. </div> -->
  89. </div>
  90. <div class="fanliBar flex a-center">
  91. <div class="item flex a-center">
  92. <span>{{ $t('mine.meber.limit') }}:</span>
  93. <div class="flex a-end">
  94. <h4>{{ setCredit }}</h4>
  95. <em> {{ $t('mine.meber.tenThousand') }} RMB</em>
  96. </div>
  97. </div>
  98. <div class="fgx"></div>
  99. <div class="item flex a-center">
  100. <span>{{ $t('mine.meber.integral') }}:</span>
  101. <div class="flex a-end">
  102. <h4>{{roleConfig[subRoleName].pages[2].subEle.myIntegral.isShow?meterInfo.integration.allIntegration:"***" }}</h4>
  103. <em>{{ $t('common.ge') }}</em>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="meberMenu01 flex wrap">
  108. <!-- <div class="item flex col a-center j-center">
  109. <b class="i1"></b>
  110. <h4>返利提交</h4>
  111. </div> -->
  112. <!-- <div class="item flex col a-center j-center">
  113. <b class="i3"></b>
  114. <h4>折款查询</h4>
  115. </div> -->
  116. <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')">
  117. <b class="i4"></b>
  118. <h4>{{ $t('mine.meber.myInventory') }}</h4>
  119. </div>
  120. <div v-if="roleConfig[subRoleName].pages[2].subEle.agentList.isShow" class="item flex col a-center j-center" v-on:click="openWin('agentList')">
  121. <b class="i5"></b>
  122. <h4>{{ $t('mine.meber.myStore') }}</h4>
  123. </div>
  124. <!-- <div class="item flex col a-center j-center">
  125. <b class="i6"></b>
  126. <h4>我的积分</h4>
  127. </div> -->
  128. </div>
  129. <div class="meberList">
  130. <div v-if="roleConfig[subRoleName].pages[2].subEle.orderList.isShow" class="item flex a-center jlr" v-on:click="openWin('orderList')">
  131. <h4>{{ $t('mine.meber.storeOrder') }}</h4>
  132. <div class="flex a-center rightIcons">
  133. <span>{{ $t('mine.meber.view') }}</span>
  134. <i class="iconfont icon-right"></i>
  135. </div>
  136. </div>
  137. <!-- <div class="item flex a-center jlr" v-on:click="openWin('backList')">
  138. <h4>核销记录</h4>
  139. <div class="flex a-center rightIcons">
  140. <span>查看</span>
  141. <i class="iconfont icon-right"></i>
  142. </div>
  143. </div> -->
  144. <div class="item flex a-center jlr" v-on:click="checkVersion">
  145. <h4>{{ $t('mine.meber.checkVersion') }}</h4>
  146. <div class="flex a-center rightIcons" style="color:#f00">
  147. {{ version }}
  148. </div>
  149. </div>
  150. <!-- <div class="item flex a-center jlr" v-on:click="openWin('backMoneyList')">
  151. <h4>返利明细</h4>
  152. <div class="flex a-center rightIcons">
  153. <span>查看</span>
  154. <i class="iconfont icon-right"></i>
  155. </div>
  156. </div> -->
  157. <!-- <div class="item flex a-center jlr" v-on:click="openWin('addressList')">
  158. <h4>收货地址管理</h4>
  159. <div class="flex a-center rightIcons">
  160. <i class="iconfont icon-right"></i>
  161. </div>
  162. </div> -->
  163. <!-- <div class="item flex a-center jlr">
  164. <h4>设置</h4>
  165. <div class="flex a-center rightIcons">
  166. <i class="iconfont icon-right"></i>
  167. </div>
  168. </div> -->
  169. </div>
  170. <div class="anniu">
  171. <input type="button" :value="$t('mine.meber.logOut')" v-on:click="logout()">
  172. </div>
  173. </div>
  174. <!-- <van-tabbar v-model="active" fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  175. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  176. <span>{{item.label}}</span>
  177. <template #icon="props">
  178. <img :src="props.active ? item.active : item.inactive" />
  179. </template>
  180. </van-tabbar-item>
  181. </van-tabbar>-->
  182. </div>
  183. </div>
  184. </body>
  185. </html>
  186. <link rel="stylesheet" href="../../../../script/mescroll/mescroll.min.css">
  187. <script type="text/javascript" src="../../../../script/mescroll/mescroll.min.js"></script>
  188. <script type="text/javascript" src="../../../../script/api.js"></script>
  189. <script type="text/javascript" src="../../../../script/httpRequest.js"></script>
  190. <script type="text/javascript" src="../../../../script/vue_plugins.js"></script>
  191. <script type="text/javascript">
  192. apiready = function() {
  193. let langType = $api.getStorage('lang') || 'cn'
  194. const i18n = new VueI18n({
  195. locale: langType,//设置语言
  196. messages: {
  197. en: getEn(),
  198. cn: getCn()
  199. }
  200. })
  201. var roleConfig = $role;
  202. var vm = new Vue({
  203. el: '#app',
  204. i18n,
  205. data: {
  206. active: 3,
  207. footerHeight: 0,
  208. unit: '万元',
  209. icon: [{
  210. label: '首页',
  211. path: '/',
  212. active: "../../../../../image/img/images/tabar_home_active.png",
  213. inactive: "../../../../../image/img/images/tabar_home_inactive.png"
  214. }, {
  215. label: '发现',
  216. path: '/discover',
  217. active: '../../../../../image/img/images/faxian.png',
  218. inactive: '../../../../../image/img/images/faxian.png'
  219. }, {
  220. label: '消息',
  221. path: '/information',
  222. active: '../../../../../image/img/images/xiaoxi.png',
  223. inactive: '../../../../../image/img/images/xiaoxi.png'
  224. }, {
  225. label: '我的',
  226. path: '/meber',
  227. active: '../../../../../image/img/images/wode_active.png',
  228. inactive: '../../../../../image/img/images/wode.png'
  229. }],
  230. meterInfo: {
  231. integration: {}
  232. }, // 经销商详情
  233. subRoleName: "orderPer",
  234. roleConfig: roleConfig
  235. },
  236. computed: {
  237. version: function() {
  238. return this.getVersion();
  239. },
  240. setCredit: function () {
  241. var isShow = this.roleConfig[this.subRoleName].pages[2].subEle.myMoney.isShow;
  242. var str;
  243. if (isShow) {
  244. if (this.meterInfo.credit && this.meterInfo.credit.showCredit) {
  245. if (langType == 'en') {
  246. return str = parseInt( parseInt (this.meterInfo.credit.showCredit) / 1000 )
  247. } else {
  248. return str = parseInt( parseInt (this.meterInfo.credit.showCredit) / 10000 )
  249. }
  250. } else {
  251. return 0
  252. }
  253. } else {
  254. return str = "***"
  255. }
  256. }
  257. },
  258. methods: {
  259. // 获取经销商信息
  260. getMeberInfo: function(mescroll) {
  261. var url = "getMeberInfoU",
  262. _this = this,
  263. data = {
  264. token: $api.getStorage('token'),
  265. url: 'json',
  266. type: 'body'
  267. };
  268. setTimeout(function() {
  269. if (mescroll) {
  270. mescroll.endSuccess();
  271. }
  272. }, 1000);
  273. this.$post(url, data, function(ret) {
  274. if (ret.code == 0) {
  275. _this.meterInfo = ret.data.data == null ? {
  276. integration: {}
  277. } : ret.data.data;
  278. if (mescroll) {
  279. mescroll.endSuccess();
  280. }
  281. }
  282. })
  283. },
  284. openWin: function(src) {
  285. if($role[this.subRoleName].pages[2].subEle[src].isClick){
  286. this.goWin(src, "../home/"+src+"/"+src + '_win.html', '');
  287. }else{
  288. api.toast({
  289. msg: $role[this.subRoleName].pages[2].subEle[src].msg,
  290. });
  291. }
  292. },
  293. toastBrand: function(brands) {
  294. var brandss = this.$t('mine.meber.sellBrand');
  295. // var brandss = '经销品牌';
  296. if (brands) {
  297. for (var i = 0; i < brands.length; i++) {
  298. brandss += brands[i].brand + "|";
  299. }
  300. }
  301. api.toast({
  302. msg: brandss,
  303. duration: 2000,
  304. location: 'middle'
  305. });
  306. },
  307. logout: function() {
  308. $api.clearStorage();
  309. this.goWin("login", "../../../login.html", "");
  310. },
  311. // 检查版本更新
  312. checkVersion: function() {
  313. var _this = this;
  314. this.ifHasPrme('storage', function(ret) {
  315. if (ret == true) {
  316. _this.getNewVersionUrl(function() {
  317. });
  318. }
  319. })
  320. },
  321. filterBrand: function(brands) {
  322. var str = '';
  323. if (brands) {
  324. // var brandss = JSON.stringify(brands);
  325. // alertJson(brands);
  326. for (var i = 0; i < brands.length; i++) {
  327. str += brands[i].brand + "|";
  328. }
  329. if (str != null && str.length > 11) {
  330. str = str.substring(0, 10) + "...";
  331. }
  332. }
  333. return str;
  334. },
  335. initCredit: function(val,val2) {
  336. var str;
  337. if(val2){
  338. str = parseInt((parseInt(val) / 10000))
  339. }else{
  340. str = "***"
  341. }
  342. return str;
  343. }
  344. },
  345. // filters: {
  346. // filterBrand: function(brands) {
  347. // var str = '';
  348. // if (brands) {
  349. // // var brandss = JSON.stringify(brands);
  350. // // alertJson(brands);
  351. // for (var i = 0; i < brands.length; i++) {
  352. // str += brands[i].brand + "|";
  353. // }
  354. // if (str != null && str.length > 11) {
  355. // str = str.substring(0, 10) + "...";
  356. // }
  357. // }
  358. // return str;
  359. // },
  360. // initCredit: function(val,val2) {
  361. // alert(this.unit)
  362. // var str;
  363. // if(val2){
  364. // str = parseInt((parseInt(val) / 10000)) + this.unit
  365. // }else{
  366. // str = "***"
  367. // }
  368. // return str;
  369. // }
  370. // },
  371. mounted: function() {
  372. var _this = this;
  373. this.subRoleName = $api.getStorage('subRoleName');
  374. this.addEvent("refushUser", function() {
  375. _this.getMeberInfo();
  376. })
  377. this.getMeberInfo();
  378. this.configDownAndPull("mescroll", function(mescroll) {
  379. _this.getMeberInfo(mescroll);
  380. }, function() {
  381. }, false);
  382. }
  383. })
  384. }
  385. </script>