index.html 14 KB

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