index.html 16 KB

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