index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  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. <link rel="stylesheet" type="text/css" href="css/countdown.css"/>
  15. <script src="js/vue.js"></script>
  16. <script src="js/vant-ui.js"></script>
  17. <script src="js/main.js"></script>
  18. <script src="js/countdown.js"></script>
  19. <title></title>
  20. </head>
  21. <style>
  22. .menu .item p {
  23. font-size: 0.26rem;
  24. }
  25. .line1 {
  26. width: 300px;
  27. overflow: hidden;
  28. text-overflow: ellipsis;
  29. text-align: center;
  30. white-space: nowrap;
  31. }
  32. #mescroll {
  33. overflow-y: scroll !important;
  34. }
  35. [v-cloak] {
  36. display: none;
  37. }
  38. .bktitle{
  39. width: calc(100% - 33px);
  40. margin: 0 auto .2rem auto;
  41. font-size:0.35rem;
  42. display:flex;
  43. flex-direction: row;
  44. align-items: flex-end;
  45. justify-content: space-between;
  46. }
  47. .bktitle .title{
  48. display:flex;
  49. flex-direction: row;
  50. align-items: flex-end;
  51. }
  52. .bktitle .times{
  53. display: flex;
  54. align-items: center;
  55. font-size:0.3rem;
  56. flex-direction: row;
  57. }
  58. .bktitle .times .dd, .hh,.mm,.ss{
  59. background-color: black;
  60. color: #ffffff
  61. }
  62. .banner2{
  63. width: 100%;
  64. overflow: hidden;
  65. padding: 0px 0.15rem;
  66. height: 4rem;
  67. background: url(../luntai/image/bg.png) no-repeat;
  68. background-size: 100% 4rem;
  69. }
  70. .goodsbar{
  71. margin-bottom: .2rem;
  72. }
  73. .goodsbar .item {
  74. width: 30%;
  75. margin-left: .2rem;
  76. margin-top: .2rem;
  77. }
  78. </style>
  79. <body>
  80. <div id="app">
  81. <!-- <div class="header flex a-center j-center" id="aui-header" style="height: 1.5rem;font-size: 0.4rem">
  82. <p class="line1">{{ storeName }}</p>
  83. </div> -->
  84. <div class="view flex col" style="overflow-y:scroll" style="background: #3773ED;">
  85. <div class="page router fx1" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
  86. <div class="banner2" id="mymain">
  87. <div class="homeTipbox flex a-center" v-if="messageList.length">
  88. <div class="labaInfos">
  89. <van-swipe style="height: .35rem;" :autoplay="3000" :show-indicators="false" vertical>
  90. <van-swipe-item v-for="(item,index) in messageList" :key="index">
  91. <!-- <div><span>{{messageList[index].msgContent}}</span></div> -->
  92. <div v-cloak>
  93. <div class="labelInfos-tip"><span class="labelInfos-tip-dot"></span><span
  94. class="labelInfos-tip-text">{{messageList[index].msgContent}}</span></div>
  95. </div>
  96. <!-- <div><span>{{index >= messageList.length ? messageList[0].msgContent : messageList[index+1].msgContent}}</span></div> -->
  97. </van-swipe-item>
  98. </van-swipe>
  99. </div>
  100. </div>
  101. <div class="shopHomebar flex a-center j-center">
  102. <div class="item flex a-center j-center col" v-on:click="scanInto(1)">
  103. <img src="image/scan_in.png" alt="" style="width:2rem;height:0.58rem ">
  104. </div>
  105. <div class="item flex a-center j-center col" v-on:click="scanInto(2)">
  106. <img src="image/scan_out.png" alt="" style="width:2rem;height:0.58rem ">
  107. </div>
  108. </div>
  109. </div>
  110. <div class="meberMenu" style="background-color: #ffffff; z-index: 10000; margin-top: -.7rem; position: relative;padding-top: .2rem">
  111. <div class="meberMenu-container">
  112. <div class="item flex col a-center j-center" v-on:click="getStoreNet">
  113. <b class="i9"></b>
  114. <h4>线上订货</h4>
  115. </div>
  116. <div class="item flex col a-center j-center" v-on:click="openWin('kucunchaxun')">
  117. <b class="i10"></b>
  118. <h4>经销商库存</h4>
  119. </div>
  120. <div class="item flex col a-center j-center" v-on:click="openWin('baodan')">
  121. <b class="i11"></b>
  122. <h4>我的参保</h4>
  123. </div>
  124. <div class="item flex col a-center j-center" v-on:click="openWin('propaganda');setMainid1()">
  125. <b class="i12"></b>
  126. <h4>月度政策</h4>
  127. </div>
  128. <div class="item flex col a-center j-center" v-on:click="verifyBusiness">
  129. <b class="i13"></b>
  130. <h4>积分商城</h4>
  131. </div>
  132. <div class="item flex col a-center j-center" v-on:click="goCount()">
  133. <b class="i14"></b>
  134. <h4>轮毂计算</h4>
  135. </div>
  136. <div class="item flex col a-center j-center" v-on:click="openWin('kucunMy')">
  137. <b class="i15"></b>
  138. <h4>我的库存</h4>
  139. </div>
  140. <div class="item flex col a-center j-center" v-on:click="lipeiList">
  141. <b class="i16"></b>
  142. <h4>轮胎保</h4>
  143. </div>
  144. </div>
  145. </div>
  146. <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="margin:.2rem;border-radius: 0.25rem ">
  147. <van-swipe-item @click="handleSee" v-if="!piclist.length"
  148. ><img src="image/banner.png">
  149. </van-swipe-item>
  150. <van-swipe-item @click="handleSee" v-else v-for="(item,index) in piclist" :key="index"><img
  151. :src="item.imgPath">
  152. </van-swipe-item>
  153. </van-swipe>
  154. <div class="bktitle">
  155. <div class="title"> <img src="image/bk_icon.png" style="height: .42rem;width: .35rem;margin-right: .15rem"> 爆款促销
  156. </div>
  157. <div class="times">
  158. </div>
  159. </div>
  160. <div class="goodsbar flex a-center j-center" style="height: auto ;">
  161. <div style="display: flex;flex-wrap: wrap; width: 100%">
  162. <div class="item flex col a-center j-center" style="position: relative; background: url(image/cart_goods.png) no-repeat center; background-size:100% 100%; " >
  163. <!-- <img src="image/cart_goods.png" alt="" > -->
  164. <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem;">
  165. </div>
  166. <div class="item flex col a-center j-center" style="position: relative">
  167. <img src="image/cart_goods.png" alt="">
  168. <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
  169. </div>
  170. <div class="item flex col a-center j-center" style="position: relative">
  171. <img src="image/cart_goods.png" alt="">
  172. <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
  173. </div>
  174. <div class="item flex col a-center j-center" style="position: relative">
  175. <img src="image/cart_goods.png" alt="">
  176. <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <!-- <van-tabbar fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  182. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  183. <span>{{item.label}}</span>
  184. <template #icon="props">
  185. <img :src="props.active ? item.active : item.inactive" />
  186. </template>
  187. </van-tabbar-item>
  188. </van-tabbar>-->
  189. </div>
  190. </div>
  191. </body>
  192. </html>
  193. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  194. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  195. <script type="text/javascript" src="../script/api.js"></script>
  196. <script type="text/javascript" src="../script/httpRequest.js"></script>
  197. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  198. <script type="text/javascript">
  199. apiready = function () {
  200. var mymain = $api.byId('mymain');
  201. $api.fixStatusBar(mymain);
  202. // var header = $api.byId('aui-header');
  203. // $api.fixStatusBar(header);
  204. // var headerPos = $api.offset(header);
  205. // if (api.systemType == 'android') {
  206. // $api.css($api.byId('app'), 'padding-top:20px');
  207. // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
  208. // }else{
  209. // $api.css($api.byId('app'), 'padding-top:20px');
  210. // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
  211. // }
  212. new Vue({
  213. el: '#app',
  214. data: {
  215. footerHeight: 0,
  216. codeScan: '', // 扫码
  217. storeName: '',
  218. messageList: [],
  219. storeBrand: [],
  220. piclist:[
  221. { "imgPath":"image/slider1.png"}
  222. ]
  223. },
  224. methods: {
  225. // 初始化方法
  226. init: function () {
  227. this.userId = $api.getStorage('loginid');
  228. this.scanCode = api.require('FNScanner');
  229. this.storeId = $api.getStorage('userid');
  230. this.getAgentInfo();
  231. this.getbannerLists();
  232. var _this = this;
  233. this.addEvent("startLogin", function () {
  234. _this.userId = $api.getStorage('loginid');
  235. _this.storeId = $api.getStorage('userid');
  236. _this.getAgentInfo();
  237. _this.getbannerLists();
  238. _this.getMessageList();
  239. })
  240. this.getMessageList();
  241. // 开启下拉刷新
  242. if (api.systemType == 'android') {
  243. this.initApush('p' + this.storeId);
  244. // this.configDownAndPull("mescroll", function(mescroll) {
  245. // _this.getAgentInfo(mescroll);
  246. // }, function() {
  247. //
  248. // }, false);
  249. }
  250. // this.ifHasPrme('notification')
  251. },
  252. // 跳转页面
  253. setMainid1: function () {
  254. $api.setStorage("mainId", 3163);
  255. },
  256. setMainid2: function () {
  257. $api.setStorage("mainId", 7459);
  258. },
  259. openWin: function (src) {
  260. this.goWin(src, src + '_win.html', '');
  261. },
  262. goCount: function () {
  263. this.goWin('tire_count', 'tire_count.html');
  264. },
  265. // 扫码出入库
  266. scanInto: function (type) {
  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. var src = type == 1 ? 'saomaruku' : 'saomachuku';
  281. this.goWin(src, src + '_win.html', '');
  282. },
  283. tishi: function () {
  284. api.toast({
  285. msg: "此功能正在升级维护,暂时关闭,敬请期待!"
  286. });
  287. },
  288. getStoreNet: function () {
  289. if (this.agentInfo.status == 3) {
  290. api.confirm({
  291. title: '系统提示',
  292. msg: '门店已冻结,请找相关业务经理解冻!',
  293. buttons: ['确定', '激活']
  294. }, function (ret, err) {
  295. var index = ret.buttonIndex;
  296. if(index==2){
  297. _this.goWin("activation", "activation_win.html", "");
  298. }
  299. });
  300. return;
  301. }
  302. this.goWin("getStoreNet", "getStoreNet_win.html", {})
  303. },
  304. verifyBusiness: function () {
  305. var data = {
  306. "storeId": this.storeId,
  307. "url": "json",
  308. "type": "body"
  309. },
  310. _this = this,
  311. url = "verifyBusiness";
  312. if (this.agentInfo.status == 3) {
  313. api.confirm({
  314. title: '系统提示',
  315. msg: '门店已冻结,请找相关业务经理解冻!',
  316. buttons: ['确定', '激活']
  317. }, function (ret, err) {
  318. var index = ret.buttonIndex;
  319. if(index==2){
  320. _this.goWin("activation", "activation_win.html", "");
  321. }
  322. });
  323. return;
  324. }
  325. this.$postuser(url, data, function (ret) {
  326. if (ret.code == 0 && ret.data) {
  327. _this.goWin("license_body", "license_body.html", {
  328. licenseUrl: ret.data.licenseUrl,
  329. companyName: ret.data.wordsResultQuery.company.words,
  330. userName: ret.data.wordsResultQuery.company.words,
  331. legalPerson: ret.data.wordsResultQuery.person.words,
  332. })
  333. return
  334. }
  335. if (ret.code == 0) {
  336. _this.goWin("integral", "integral_win.html", {})
  337. }
  338. if (ret.code == 500) {
  339. if (ret.msg == "营业执照不清晰或非营业执照,请重新上传" || ret.msg == "图片识别失败请重试") {
  340. api.alert({
  341. title: '温馨提示',
  342. msg: "为了使您能够正常使用积分商城,请您上传清晰的营业执照,以便更好地为您服务。",
  343. }, function (ret, err) {
  344. if (ret) {
  345. _this.goWin("license_body", "license_body.html", {
  346. licenseUrl: "",
  347. companyName: "",
  348. userName: "",
  349. legalPerson: "",
  350. })
  351. }
  352. });
  353. }
  354. return
  355. }
  356. })
  357. },
  358. // 扫码轮胎二维码
  359. lipeiList: function () {
  360. var _this = this;
  361. if (this.agentInfo.status == 3) {
  362. api.confirm({
  363. title: '系统提示',
  364. msg: '门店已冻结,请找相关业务经理解冻!',
  365. buttons: ['确定', '激活']
  366. }, function (ret, err) {
  367. var index = ret.buttonIndex;
  368. if(index==2){
  369. _this.goWin("activation", "activation_win.html", "");
  370. }
  371. });
  372. return;
  373. }
  374. // this.goWin('settlementInfo', 'settlementInfo_win.html', {
  375. // code: '10000351'
  376. // });
  377. // return;
  378. this.ifHasPrme('camera', function (ret) {
  379. if (ret == true) {
  380. _this.scan(_this.scanCode, function (ret) {
  381. if (ret) {
  382. _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  383. code: ret
  384. });
  385. }
  386. })
  387. // _this.scanCode.scan(function(ret, err) {
  388. // if (ret.status) { // ret.code
  389. // if (ret.code) {
  390. // _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  391. // code: ret.code
  392. // });
  393. // }
  394. // }
  395. // });
  396. }
  397. })
  398. },
  399. // 获取用户详情
  400. getAgentInfo: function (mescroll) {
  401. var _this = this,
  402. url = "getAgentInfoU",
  403. data = {
  404. "loginId": this.userId,
  405. "appVersion": parseFloat(api.appVersion),
  406. "mobileSystem": api.systemType,
  407. "type": 'body',
  408. "url": 'json'
  409. }
  410. if (this.userId == null) { // 个人不存在
  411. $api.clearStorage();
  412. _this.goWin("login", "login.html", "");
  413. }
  414. this.$postuser(url, data, function (ret) {
  415. if (ret.code == 0) {
  416. $api.setStorage("status", ret.data.status);
  417. if (ret.data.status == 5) {
  418. api.alert({
  419. title: '系统提示',
  420. msg: '门店账号无效!',
  421. }, function (ret, err) {
  422. if (ret) {
  423. $api.clearStorage();
  424. _this.goWin("login", "login.html", "");
  425. }
  426. });
  427. }
  428. $api.setStorage('brand', ret.data.bizStoreBrandDto[0].brandName);
  429. $api.setStorage("storeName", ret.data.storeName);
  430. _this.storeName = ret.data.storeName;
  431. _this.agentInfo = ret.data
  432. if (_this.agentInfo.saveAppMessage != 1) {
  433. _this.inMobileMessage();
  434. }
  435. if (mescroll) {
  436. mescroll.endSuccess()
  437. }
  438. }
  439. });
  440. },
  441. inMobileMessage: function () {
  442. var data = {
  443. "storePhone": this.agentInfo.storePhone,
  444. "storeId": this.storeId,
  445. "mobileSystem": api.systemType,
  446. "systemVersion": api.systemVersion,
  447. "appVersion": parseFloat(api.appVersion),
  448. "mobileModel": api.deviceModel,
  449. "deviceName": api.deviceName,
  450. "url": "json",
  451. "type": "body",
  452. },
  453. url = "MobileMessage",
  454. _this = this;
  455. this.$post(url, data, function (ret) {
  456. })
  457. },
  458. // 获取跑马灯链接
  459. getMessageList: function () {
  460. var data = {
  461. "url": "json",
  462. "type": "body",
  463. "contentType": 1,
  464. },
  465. _this = this;
  466. this.$post('getMessageList', data, function (ret) {
  467. _this.messageList = ret.list;
  468. })
  469. },
  470. getbannerLists: function (mescroll) {
  471. var data = {
  472. "storeId": this.storeId,
  473. "url": "json",
  474. "type": "body",
  475. }
  476. _this = this,
  477. setTimeout(function () {
  478. if (mescroll) {
  479. mescroll.endSuccess();
  480. }
  481. }, 1000);
  482. this.$post("getbannerLists", data, function (ret) {
  483. if (ret.code == 0) {
  484. _this.storeBrand = ret.storeBrand;
  485. //console.log(JSON.stringify(ret.storeBrand));
  486. if (mescroll) {
  487. mescroll.endSuccess();
  488. }
  489. }
  490. });
  491. },
  492. handleSee: function () {
  493. this.goWin("promotion", "promotion_win.html", "");
  494. // $api.setStorage("mainId", 7459);
  495. // var _this = this;
  496. // var dateTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
  497. // api.ajax({
  498. // url: 'http://b2bcnapi.sailuntire.com/allstell/app/sailun/appNewsCount/save',
  499. // method: 'post',
  500. // headers: {
  501. // "Content-type": "application/json"
  502. // },
  503. // data: {
  504. // "body": {
  505. // "account": _this.storeId,
  506. // "appType": "1",
  507. // "id": 0,
  508. // "showTime": dateTime,
  509. // "tapTime": dateTime
  510. // }
  511. // }
  512. // }, function (ret, err) {
  513. // var obj = {
  514. // dateTime: dateTime
  515. // };
  516. // _this.goWin("news_win", "./news_win.html", obj);
  517. // // 不做提示
  518. // });
  519. },
  520. downTime:function(){
  521. var o = {
  522. el : 'time',
  523. st : 0,
  524. ed : 5400000,
  525. dd:"dd",
  526. hh: 'hh',
  527. mm: 'mm',
  528. ss: 'ss',
  529. ms: 'ms'
  530. }
  531. var d = new countdown(o);
  532. d.downsElement();
  533. }
  534. },
  535. mounted: function () {
  536. this.init();
  537. var _this = this;
  538. this.ifHasPrme('storage', function (ret) {
  539. if (ret == true) {
  540. _this.getNewVersionUrl(function () {
  541. });
  542. }
  543. })
  544. }
  545. })
  546. }
  547. </script>