index.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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. },
  230. // 跳转页面
  231. setMainid1: function () {
  232. $api.setStorage("mainId", 3163);
  233. },
  234. setMainid2: function () {
  235. $api.setStorage("mainId", 7459);
  236. },
  237. openWin: function (src) {
  238. this.goWin(src, src + '_win.html', '');
  239. },
  240. goCount: function () {
  241. this.goWin('tire_count', 'tire_count.html');
  242. },
  243. // 扫码出入库
  244. scanInto: function (type) {
  245. if (this.agentInfo.status == 3) {
  246. api.confirm({
  247. title: '系统提示',
  248. msg: '门店已冻结,请找相关业务经理解冻!',
  249. buttons: ['确定', '激活']
  250. }, function (ret, err) {
  251. var index = ret.buttonIndex;
  252. if(index==2){
  253. _this.goWin("activation", "activation_win.html", "");
  254. }
  255. });
  256. return;
  257. }
  258. var src = type == 1 ? 'saomaruku' : 'saomachuku';
  259. this.goWin(src, src + '_win.html', '');
  260. },
  261. tishi: function () {
  262. api.toast({
  263. msg: "此功能正在升级维护,暂时关闭,敬请期待!"
  264. });
  265. },
  266. getStoreNet: function () {
  267. if (this.agentInfo.status == 3) {
  268. api.confirm({
  269. title: '系统提示',
  270. msg: '门店已冻结,请找相关业务经理解冻!',
  271. buttons: ['确定', '激活']
  272. }, function (ret, err) {
  273. var index = ret.buttonIndex;
  274. if(index==2){
  275. _this.goWin("activation", "activation_win.html", "");
  276. }
  277. });
  278. return;
  279. }
  280. this.goWin("getStoreNet", "getStoreNet_win.html", {})
  281. },
  282. verifyBusiness: function () {
  283. var data = {
  284. "storeId": this.storeId,
  285. "url": "json",
  286. "type": "body"
  287. },
  288. _this = this,
  289. url = "verifyBusiness";
  290. if (this.agentInfo.status == 3) {
  291. api.confirm({
  292. title: '系统提示',
  293. msg: '门店已冻结,请找相关业务经理解冻!',
  294. buttons: ['确定', '激活']
  295. }, function (ret, err) {
  296. var index = ret.buttonIndex;
  297. if(index==2){
  298. _this.goWin("activation", "activation_win.html", "");
  299. }
  300. });
  301. return;
  302. }
  303. this.$postuser(url, data, function (ret) {
  304. if (ret.code == 0 && ret.data) {
  305. _this.goWin("license_body", "license_body.html", {
  306. licenseUrl: ret.data.licenseUrl,
  307. companyName: ret.data.wordsResultQuery.company.words,
  308. userName: ret.data.wordsResultQuery.company.words,
  309. legalPerson: ret.data.wordsResultQuery.person.words,
  310. })
  311. return
  312. }
  313. if (ret.code == 0) {
  314. _this.goWin("integral", "integral_win.html", {})
  315. }
  316. if (ret.code == 500) {
  317. if (ret.msg == "营业执照不清晰或非营业执照,请重新上传" || ret.msg == "图片识别失败请重试") {
  318. api.alert({
  319. title: '温馨提示',
  320. msg: "为了使您能够正常使用积分商城,请您上传清晰的营业执照,以便更好地为您服务。",
  321. }, function (ret, err) {
  322. if (ret) {
  323. _this.goWin("license_body", "license_body.html", {
  324. licenseUrl: "",
  325. companyName: "",
  326. userName: "",
  327. legalPerson: "",
  328. })
  329. }
  330. });
  331. }
  332. return
  333. }
  334. })
  335. },
  336. // 扫码轮胎二维码
  337. lipeiList: function () {
  338. var _this = this;
  339. if (this.agentInfo.status == 3) {
  340. api.confirm({
  341. title: '系统提示',
  342. msg: '门店已冻结,请找相关业务经理解冻!',
  343. buttons: ['确定', '激活']
  344. }, function (ret, err) {
  345. var index = ret.buttonIndex;
  346. if(index==2){
  347. _this.goWin("activation", "activation_win.html", "");
  348. }
  349. });
  350. return;
  351. }
  352. // this.goWin('settlementInfo', 'settlementInfo_win.html', {
  353. // code: '10000351'
  354. // });
  355. // return;
  356. this.ifHasPrme('camera', function (ret) {
  357. if (ret == true) {
  358. _this.scan(_this.scanCode, function (ret) {
  359. if (ret) {
  360. _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  361. code: ret
  362. });
  363. }
  364. })
  365. // _this.scanCode.scan(function(ret, err) {
  366. // if (ret.status) { // ret.code
  367. // if (ret.code) {
  368. // _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  369. // code: ret.code
  370. // });
  371. // }
  372. // }
  373. // });
  374. }
  375. })
  376. },
  377. // 获取用户详情
  378. getAgentInfo: function (mescroll) {
  379. var _this = this,
  380. url = "getAgentInfoU",
  381. data = {
  382. "loginId": this.userId,
  383. "appVersion": parseFloat(api.appVersion),
  384. "mobileSystem": api.systemType,
  385. "type": 'body',
  386. "url": 'json'
  387. }
  388. if (this.userId == null) { // 个人不存在
  389. $api.clearStorage();
  390. _this.goWin("login", "login.html", "");
  391. }
  392. this.$postuser(url, data, function (ret) {
  393. if (ret.code == 0) {
  394. $api.setStorage("status", ret.data.status);
  395. if (ret.data.status == 3) {
  396. api.confirm({
  397. title: '系统提示',
  398. msg: '门店已冻结,请找相关业务经理解冻!',
  399. buttons: ['确定', '激活']
  400. }, function (ret, err) {
  401. var index = ret.buttonIndex;
  402. if(index==2){
  403. _this.goWin("activation", "activation_win.html", "");
  404. }
  405. });
  406. // api.alert({
  407. // title: '系统提示',
  408. // msg: '门店已冻结,请找相关业务经理解冻1!',
  409. // }, function (ret, err) {
  410. // });
  411. } else if (ret.data.status == 5) {
  412. api.alert({
  413. title: '系统提示',
  414. msg: '门店账号无效!',
  415. }, function (ret, err) {
  416. if (ret) {
  417. $api.clearStorage();
  418. _this.goWin("login", "login.html", "");
  419. }
  420. });
  421. }
  422. $api.setStorage('brand', ret.data.bizStoreBrandDto[0].brandName);
  423. $api.setStorage("storeName", ret.data.storeName);
  424. _this.storeName = ret.data.storeName;
  425. _this.agentInfo = ret.data
  426. if (_this.agentInfo.saveAppMessage != 1) {
  427. _this.inMobileMessage();
  428. }
  429. if (mescroll) {
  430. mescroll.endSuccess()
  431. }
  432. }
  433. });
  434. },
  435. inMobileMessage: function () {
  436. var data = {
  437. "storePhone": this.agentInfo.storePhone,
  438. "storeId": this.storeId,
  439. "mobileSystem": api.systemType,
  440. "systemVersion": api.systemVersion,
  441. "appVersion": parseFloat(api.appVersion),
  442. "mobileModel": api.deviceModel,
  443. "deviceName": api.deviceName,
  444. "url": "json",
  445. "type": "body",
  446. },
  447. url = "MobileMessage",
  448. _this = this;
  449. this.$post(url, data, function (ret) {
  450. })
  451. },
  452. // 获取跑马灯链接
  453. getMessageList: function () {
  454. var data = {
  455. "url": "json",
  456. "type": "body",
  457. "contentType": 1,
  458. },
  459. _this = this;
  460. this.$post('getMessageList', data, function (ret) {
  461. _this.messageList = ret.list;
  462. })
  463. },
  464. getbannerLists: function (mescroll) {
  465. var data = {
  466. "storeId": this.storeId,
  467. "url": "json",
  468. "type": "body",
  469. }
  470. _this = this,
  471. setTimeout(function () {
  472. if (mescroll) {
  473. mescroll.endSuccess();
  474. }
  475. }, 1000);
  476. this.$post("getbannerLists", data, function (ret) {
  477. if (ret.code == 0) {
  478. _this.storeBrand = ret.storeBrand;
  479. if (mescroll) {
  480. mescroll.endSuccess();
  481. }
  482. }
  483. });
  484. },
  485. },
  486. mounted: function () {
  487. this.init();
  488. var _this = this;
  489. this.ifHasPrme('storage', function (ret) {
  490. if (ret == true) {
  491. _this.getNewVersionUrl(function () {
  492. });
  493. }
  494. })
  495. }
  496. })
  497. }
  498. </script>