index.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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. <title></title>
  18. </head>
  19. <style>
  20. .menu .item p {
  21. font-size: 0.26rem;
  22. }
  23. .line1 {
  24. width: 300px;
  25. overflow: hidden;
  26. text-overflow: ellipsis;
  27. text-align: center;
  28. white-space: nowrap;
  29. }
  30. #mescroll {
  31. overflow-y: scroll !important;
  32. }
  33. [v-cloak] {
  34. display: none;
  35. }
  36. </style>
  37. <body>
  38. <div id="app">
  39. <!-- <div class="header flex a-center j-center" id="aui-header" style="height: 1.5rem;font-size: 0.4rem">
  40. <p class="line1">{{ storeName }}</p>
  41. </div> -->
  42. <div class="view flex col" style="overflow-y:scroll" style="background: #3773ED;">
  43. <div class="page router fx1" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
  44. <div class="banner" id="mymain">
  45. <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  46. <van-swipe-item v-if="!storeBrand.length"><img src="image/banner.png"></van-swipe-item>
  47. <van-swipe-item v-else v-for="(item,index) in storeBrand" :key="index"><img :src="item.imgPath">
  48. </van-swipe-item>
  49. </van-swipe>
  50. </div>
  51. <div class="homeTipbox flex a-center" v-if="messageList.length">
  52. <div class="laba"><i>消息中心</i></div>
  53. <div class="labaInfos">
  54. <van-swipe style="height: 1rem;" :autoplay="3000" :show-indicators="false" vertical>
  55. <van-swipe-item v-for="(item,index) in messageList" :key="index">
  56. <!-- <div><span>{{messageList[index].msgContent}}</span></div> -->
  57. <div v-cloak>
  58. <div class="labelInfos-tip"><span class="labelInfos-tip-dot"></span><span
  59. class="labelInfos-tip-text">{{messageList[index].msgContent}}</span></div>
  60. <div class="labelInfos-tip"><span class="labelInfos-tip-dot"></span><span
  61. class="labelInfos-tip-text">{{index==messageList.length-1?messageList[0].msgContent:messageList[index+1].msgContent}}</span>
  62. </div>
  63. </div>
  64. <!-- <div><span>{{index >= messageList.length ? messageList[0].msgContent : messageList[index+1].msgContent}}</span></div> -->
  65. </van-swipe-item>
  66. </van-swipe>
  67. </div>
  68. </div>
  69. <div class="shopHomebar flex a-center j-center">
  70. <div class="item flex a-center j-center col" v-on:click="scanInto(1)">
  71. <img src="image/scan_in.png" alt="">
  72. </div>
  73. <div class="item flex a-center j-center col" v-on:click="scanInto(2)">
  74. <img src="image/scan_out.png" alt="">
  75. </div>
  76. <!-- <div class="item flex a-center j-center col">
  77. <b class="icon i3"></b>
  78. <p>
  79. 切换店铺
  80. </p>
  81. </div>-->
  82. </div>
  83. <div class="menu flex">
  84. <div class="item flex col a-center j-center" v-on:click="getStoreNet">
  85. <b class="i1"></b>
  86. <p style="font-size : 0.26rem">
  87. 线上订货
  88. </p>
  89. </div>
  90. <div class="item flex col a-center j-center" v-on:click="openWin('kucunchaxun')">
  91. <b class="i2"></b>
  92. <p>
  93. 经销商库存
  94. </p>
  95. </div>
  96. <div class="item flex col a-center j-center" v-on:click="openWin('baodan')">
  97. <b class="i3"></b>
  98. <p>
  99. 我的参保
  100. </p>
  101. </div>
  102. <div class="item flex col a-center j-center" v-on:click="openWin('propaganda');setMainid1()">
  103. <b class="i4"></b>
  104. <p>
  105. 月度政策
  106. </p>
  107. </div>
  108. </div>
  109. <!-- <div class="workField flex a-center">
  110. <div class="sup"></div>
  111. <h4>快速工作栏</h4>
  112. </div> -->
  113. <div class="workFieldContainer flex jlr wrap">
  114. <div class="item"><img src="image/quick_integral_market.png" v-on:click="verifyBusiness">
  115. </div>
  116. <!-- <div class="item"><img src="image/quick_integral_market.png" v-on:click="tishi">
  117. </div> -->
  118. <div class="item"><img src="image/lungu.png" v-on:click="goCount()">
  119. </div>
  120. <div class="item"><img src="image/quick_my_stock.png" v-on:click="openWin('kucunMy')">
  121. </div>
  122. <div class="item"><img src="image/quick_tire_insure.png" v-on:click="lipeiList">
  123. </div>
  124. <div class="banner-bottom"> <img src="image/banner_bottom.png"></div>
  125. </div>
  126. <!-- <div class="workField flex a-center">
  127. <div class="case"><img src="img/images/work.png">
  128. </div>
  129. <h4>安装案例</h4>
  130. </div> -->
  131. <!-- <div class="anzhuangCase flex jlr wrap">
  132. <div class="item flex col">
  133. <img src="img/images/img05-21.png">
  134. <div class="anzhuangCaseInfos flex jlr a-center">
  135. <div class="left">
  136. <h4>丰田霸道安装赛轮SV12</h4>
  137. <div class="flex a-center">
  138. <div class="touxiang"></div>
  139. 丰田霸道
  140. </div>
  141. </div>
  142. <div class="dianzan"></div>
  143. </div>
  144. </div>
  145. <div class="item flex col">
  146. <img src="img/images/img05-21.png">
  147. <div class="anzhuangCaseInfos flex jlr a-center">
  148. <div class="left">
  149. <h4>丰田霸道安装赛轮SV12</h4>
  150. <div class="flex a-center">
  151. <div class="touxiang"></div>
  152. 丰田霸道
  153. </div>
  154. </div>
  155. <div class="dianzan"></div>
  156. </div>
  157. </div>
  158. </div> -->
  159. <!-- <div class="pipei flex a-center j-center">
  160. <b></b> 查找适配轮胎 <i class="iconfont icon-you"></i>
  161. </div> -->
  162. </div>
  163. <!-- <van-tabbar fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  164. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  165. <span>{{item.label}}</span>
  166. <template #icon="props">
  167. <img :src="props.active ? item.active : item.inactive" />
  168. </template>
  169. </van-tabbar-item>
  170. </van-tabbar>-->
  171. </div>
  172. </div>
  173. </body>
  174. </html>
  175. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  176. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  177. <script type="text/javascript" src="../script/api.js"></script>
  178. <script type="text/javascript" src="../script/httpRequest.js"></script>
  179. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  180. <script type="text/javascript">
  181. apiready = function () {
  182. var mymain = $api.byId('mymain');
  183. $api.fixStatusBar(mymain);
  184. // var header = $api.byId('aui-header');
  185. // $api.fixStatusBar(header);
  186. // var headerPos = $api.offset(header);
  187. // if (api.systemType == 'android') {
  188. // $api.css($api.byId('app'), 'padding-top:20px');
  189. // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
  190. // }else{
  191. // $api.css($api.byId('app'), 'padding-top:20px');
  192. // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
  193. // }
  194. new Vue({
  195. el: '#app',
  196. data: {
  197. footerHeight: 0,
  198. codeScan: '', // 扫码
  199. storeName: '',
  200. messageList: [],
  201. storeBrand: [],
  202. },
  203. methods: {
  204. // 初始化方法
  205. init: function () {
  206. this.userId = $api.getStorage('loginid');
  207. this.scanCode = api.require('FNScanner');
  208. this.storeId = $api.getStorage('userid');
  209. this.getAgentInfo();
  210. this.getbannerLists();
  211. var _this = this;
  212. this.addEvent("startLogin", function () {
  213. _this.userId = $api.getStorage('loginid');
  214. _this.storeId = $api.getStorage('userid');
  215. _this.getAgentInfo();
  216. _this.getbannerLists();
  217. _this.getMessageList();
  218. })
  219. this.getMessageList();
  220. // 开启下拉刷新
  221. if (api.systemType == 'android') {
  222. this.initApush('p' + this.storeId);
  223. // this.configDownAndPull("mescroll", function(mescroll) {
  224. // _this.getAgentInfo(mescroll);
  225. // }, function() {
  226. //
  227. // }, false);
  228. }
  229. // this.ifHasPrme('notification')
  230. },
  231. // 跳转页面
  232. setMainid1: function () {
  233. $api.setStorage("mainId", 3163);
  234. },
  235. setMainid2: function () {
  236. $api.setStorage("mainId", 7459);
  237. },
  238. openWin: function (src) {
  239. this.goWin(src, src + '_win.html', '');
  240. },
  241. goCount: function () {
  242. this.goWin('tire_count', 'tire_count.html');
  243. },
  244. // 扫码出入库
  245. scanInto: function (type) {
  246. if (this.agentInfo.status == 3) {
  247. api.confirm({
  248. title: '系统提示',
  249. msg: '门店已冻结,请找相关业务经理解冻!',
  250. buttons: ['确定', '激活']
  251. }, function (ret, err) {
  252. var index = ret.buttonIndex;
  253. if(index==2){
  254. _this.goWin("activation", "activation_win.html", "");
  255. }
  256. });
  257. return;
  258. }
  259. var src = type == 1 ? 'saomaruku' : 'saomachuku';
  260. this.goWin(src, src + '_win.html', '');
  261. },
  262. tishi: function () {
  263. api.toast({
  264. msg: "此功能正在升级维护,暂时关闭,敬请期待!"
  265. });
  266. },
  267. getStoreNet: function () {
  268. if (this.agentInfo.status == 3) {
  269. api.confirm({
  270. title: '系统提示',
  271. msg: '门店已冻结,请找相关业务经理解冻!',
  272. buttons: ['确定', '激活']
  273. }, function (ret, err) {
  274. var index = ret.buttonIndex;
  275. if(index==2){
  276. _this.goWin("activation", "activation_win.html", "");
  277. }
  278. });
  279. return;
  280. }
  281. this.goWin("getStoreNet", "getStoreNet_win.html", {})
  282. },
  283. verifyBusiness: function () {
  284. var data = {
  285. "storeId": this.storeId,
  286. "url": "json",
  287. "type": "body"
  288. },
  289. _this = this,
  290. url = "verifyBusiness";
  291. if (this.agentInfo.status == 3) {
  292. api.confirm({
  293. title: '系统提示',
  294. msg: '门店已冻结,请找相关业务经理解冻!',
  295. buttons: ['确定', '激活']
  296. }, function (ret, err) {
  297. var index = ret.buttonIndex;
  298. if(index==2){
  299. _this.goWin("activation", "activation_win.html", "");
  300. }
  301. });
  302. return;
  303. }
  304. this.$postuser(url, data, function (ret) {
  305. if (ret.code == 0 && ret.data) {
  306. _this.goWin("license_body", "license_body.html", {
  307. licenseUrl: ret.data.licenseUrl,
  308. companyName: ret.data.wordsResultQuery.company.words,
  309. userName: ret.data.wordsResultQuery.company.words,
  310. legalPerson: ret.data.wordsResultQuery.person.words,
  311. })
  312. return
  313. }
  314. if (ret.code == 0) {
  315. _this.goWin("integral", "integral_win.html", {})
  316. }
  317. if (ret.code == 500) {
  318. if (ret.msg == "营业执照不清晰或非营业执照,请重新上传" || ret.msg == "图片识别失败请重试") {
  319. api.alert({
  320. title: '温馨提示',
  321. msg: "为了使您能够正常使用积分商城,请您上传清晰的营业执照,以便更好地为您服务。",
  322. }, function (ret, err) {
  323. if (ret) {
  324. _this.goWin("license_body", "license_body.html", {
  325. licenseUrl: "",
  326. companyName: "",
  327. userName: "",
  328. legalPerson: "",
  329. })
  330. }
  331. });
  332. }
  333. return
  334. }
  335. })
  336. },
  337. // 扫码轮胎二维码
  338. lipeiList: function () {
  339. var _this = this;
  340. if (this.agentInfo.status == 3) {
  341. api.confirm({
  342. title: '系统提示',
  343. msg: '门店已冻结,请找相关业务经理解冻!',
  344. buttons: ['确定', '激活']
  345. }, function (ret, err) {
  346. var index = ret.buttonIndex;
  347. if(index==2){
  348. _this.goWin("activation", "activation_win.html", "");
  349. }
  350. });
  351. return;
  352. }
  353. // this.goWin('settlementInfo', 'settlementInfo_win.html', {
  354. // code: '10000351'
  355. // });
  356. // return;
  357. this.ifHasPrme('camera', function (ret) {
  358. if (ret == true) {
  359. _this.scan(_this.scanCode, function (ret) {
  360. if (ret) {
  361. _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  362. code: ret
  363. });
  364. }
  365. })
  366. // _this.scanCode.scan(function(ret, err) {
  367. // if (ret.status) { // ret.code
  368. // if (ret.code) {
  369. // _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  370. // code: ret.code
  371. // });
  372. // }
  373. // }
  374. // });
  375. }
  376. })
  377. },
  378. // 获取用户详情
  379. getAgentInfo: function (mescroll) {
  380. var _this = this,
  381. url = "getAgentInfoU",
  382. data = {
  383. "loginId": this.userId,
  384. "appVersion": parseFloat(api.appVersion),
  385. "mobileSystem": api.systemType,
  386. "type": 'body',
  387. "url": 'json'
  388. }
  389. if (this.userId == null) { // 个人不存在
  390. $api.clearStorage();
  391. _this.goWin("login", "login.html", "");
  392. }
  393. this.$postuser(url, data, function (ret) {
  394. if (ret.code == 0) {
  395. $api.setStorage("status", ret.data.status);
  396. if (ret.data.status == 3) {
  397. api.confirm({
  398. title: '系统提示',
  399. msg: '门店已冻结,请找相关业务经理解冻!',
  400. buttons: ['确定', '激活']
  401. }, function (ret, err) {
  402. var index = ret.buttonIndex;
  403. if(index==2){
  404. _this.goWin("activation", "activation_win.html", "");
  405. }
  406. });
  407. // api.alert({
  408. // title: '系统提示',
  409. // msg: '门店已冻结,请找相关业务经理解冻1!',
  410. // }, function (ret, err) {
  411. // });
  412. } else if (ret.data.status == 5) {
  413. api.alert({
  414. title: '系统提示',
  415. msg: '门店账号无效!',
  416. }, function (ret, err) {
  417. if (ret) {
  418. $api.clearStorage();
  419. _this.goWin("login", "login.html", "");
  420. }
  421. });
  422. }
  423. $api.setStorage('brand', ret.data.bizStoreBrandDto[0].brandName);
  424. $api.setStorage("storeName", ret.data.storeName);
  425. _this.storeName = ret.data.storeName;
  426. _this.agentInfo = ret.data
  427. if (_this.agentInfo.saveAppMessage != 1) {
  428. _this.inMobileMessage();
  429. }
  430. if (mescroll) {
  431. mescroll.endSuccess()
  432. }
  433. }
  434. });
  435. },
  436. inMobileMessage: function () {
  437. var data = {
  438. "storePhone": this.agentInfo.storePhone,
  439. "storeId": this.storeId,
  440. "mobileSystem": api.systemType,
  441. "systemVersion": api.systemVersion,
  442. "appVersion": parseFloat(api.appVersion),
  443. "mobileModel": api.deviceModel,
  444. "deviceName": api.deviceName,
  445. "url": "json",
  446. "type": "body",
  447. },
  448. url = "MobileMessage",
  449. _this = this;
  450. this.$post(url, data, function (ret) {
  451. })
  452. },
  453. // 获取跑马灯链接
  454. getMessageList: function () {
  455. var data = {
  456. "url": "json",
  457. "type": "body",
  458. "contentType": 1,
  459. },
  460. _this = this;
  461. this.$post('getMessageList', data, function (ret) {
  462. _this.messageList = ret.list;
  463. })
  464. },
  465. getbannerLists: function (mescroll) {
  466. var data = {
  467. "storeId": this.storeId,
  468. "url": "json",
  469. "type": "body",
  470. }
  471. _this = this,
  472. setTimeout(function () {
  473. if (mescroll) {
  474. mescroll.endSuccess();
  475. }
  476. }, 1000);
  477. this.$post("getbannerLists", data, function (ret) {
  478. if (ret.code == 0) {
  479. _this.storeBrand = ret.storeBrand;
  480. if (mescroll) {
  481. mescroll.endSuccess();
  482. }
  483. }
  484. });
  485. },
  486. },
  487. mounted: function () {
  488. this.init();
  489. var _this = this;
  490. this.ifHasPrme('storage', function (ret) {
  491. if (ret == true) {
  492. _this.getNewVersionUrl(function () {
  493. });
  494. }
  495. })
  496. }
  497. })
  498. }
  499. </script>