index11.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. </style>
  24. <body>
  25. <div id="app" v-cloak>
  26. <div class="header flex a-center j-center" id="aui-header" style="height: 1.5rem;font-size: 0.4rem">
  27. {{ storeName }}
  28. </div>
  29. <div class="view flex col" style="margin-top:50px;padding-bottom:1rem;">
  30. <div class="page router fx1" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
  31. <div class="shopHomebar flex a-center j-center">
  32. <div class="item flex a-center j-center col" v-on:click="scanInto(1)">
  33. <b class="icon i1"></b>
  34. <p>
  35. 扫描入库
  36. </p>
  37. </div>
  38. <div class="item flex a-center j-center col" v-on:click="scanInto(2)">
  39. <b class="icon i2"></b>
  40. <p>
  41. 扫描出库
  42. </p>
  43. </div>
  44. <!-- <div class="item flex a-center j-center col">
  45. <b class="icon i3"></b>
  46. <p>
  47. 切换店铺
  48. </p>
  49. </div>-->
  50. </div>
  51. <div class="banner">
  52. <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  53. <van-swipe-item><img src="image/banner1.png">
  54. </van-swipe-item>
  55. </van-swipe>
  56. </div>
  57. <div class="homeTipbox flex a-center">
  58. <div class="laba"></div>
  59. <div class="labaInfos">
  60. <!-- 文字滚动跑马灯 -->
  61. <van-swipe style="height: .35rem;" :autoplay="3000" :show-indicators="false" vertical >
  62. <van-swipe-item v-for="(item,index) in messageList" :key="index">{{item.msgContent}}</van-swipe-item>
  63. </van-swipe>
  64. </div>
  65. </div>
  66. <div class="menu flex">
  67. <div class="item flex col a-center j-center" v-on:click="openWin('getStoreNet')">
  68. <b class="i1"></b>
  69. <p style="font-size : 0.26rem">
  70. 线上订货
  71. </p>
  72. </div>
  73. <div class="item flex col a-center j-center" v-on:click="openWin('kucunchaxun')">
  74. <b class="i2"></b>
  75. <p>
  76. 经销商库存
  77. </p>
  78. </div>
  79. <div class="item flex col a-center j-center" v-on:click="openWin('baodan')">
  80. <b class="i3"></b>
  81. <p>
  82. 我的参保
  83. </p>
  84. </div>
  85. <div class="item flex col a-center j-center" v-on:click="openWin('propaganda');setMainid1()">
  86. <b class="i4"></b>
  87. <p>
  88. 月度政策
  89. </p>
  90. </div>
  91. </div>
  92. <div class="workField flex a-center">
  93. <div class="sup"></div>
  94. <h4>快速工作栏</h4>
  95. </div>
  96. <div class="workFieldContainer flex jlr wrap">
  97. <div class="item"><img src="image/jifen.png">
  98. </div>
  99. <div class="item"><img src="image/111.png" v-on:click="openWin('Promotions');setMainid2()">
  100. </div>
  101. <div class="item"><img src="image/myku.png" v-on:click="openWin('kucunMy')">
  102. </div>
  103. <div class="item"><img src="img/images/img04.png" v-on:click="lipeiList">
  104. </div>
  105. <img src="image/banner2.png" style="height : 3rem">
  106. </div>
  107. <!-- <div class="workField flex a-center">
  108. <div class="case"><img src="img/images/work.png">
  109. </div>
  110. <h4>安装案例</h4>
  111. </div> -->
  112. <!-- <div class="anzhuangCase flex jlr wrap">
  113. <div class="item flex col">
  114. <img src="img/images/img05-21.png">
  115. <div class="anzhuangCaseInfos flex jlr a-center">
  116. <div class="left">
  117. <h4>丰田霸道安装赛轮SV12</h4>
  118. <div class="flex a-center">
  119. <div class="touxiang"></div>
  120. 丰田霸道
  121. </div>
  122. </div>
  123. <div class="dianzan"></div>
  124. </div>
  125. </div>
  126. <div class="item flex col">
  127. <img src="img/images/img05-21.png">
  128. <div class="anzhuangCaseInfos flex jlr a-center">
  129. <div class="left">
  130. <h4>丰田霸道安装赛轮SV12</h4>
  131. <div class="flex a-center">
  132. <div class="touxiang"></div>
  133. 丰田霸道
  134. </div>
  135. </div>
  136. <div class="dianzan"></div>
  137. </div>
  138. </div>
  139. </div> -->
  140. <!-- <div class="pipei flex a-center j-center">
  141. <b></b> 查找适配轮胎 <i class="iconfont icon-you"></i>
  142. </div> -->
  143. </div>
  144. <!-- <van-tabbar fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
  145. <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
  146. <span>{{item.label}}</span>
  147. <template #icon="props">
  148. <img :src="props.active ? item.active : item.inactive" />
  149. </template>
  150. </van-tabbar-item>
  151. </van-tabbar>-->
  152. </div>
  153. </div>
  154. </body>
  155. </html>
  156. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  157. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  158. <script type="text/javascript" src="../script/api.js"></script>
  159. <script type="text/javascript" src="../script/httpRequest.js"></script>
  160. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  161. <script type="text/javascript">
  162. apiready = function() {
  163. var header = $api.byId('aui-header');
  164. $api.fixStatusBar(header);
  165. var headerPos = $api.offset(header);
  166. if (api.systemType == 'android') {
  167. $api.css($api.byId('app'), 'padding-top:20px');
  168. $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
  169. }
  170. new Vue({
  171. el: '#app',
  172. data: {
  173. footerHeight: 0,
  174. codeScan: '', // 扫码
  175. storeName: '',
  176. messageList:[]
  177. },
  178. methods: {
  179. // 初始化方法
  180. init: function() {
  181. this.userId = $api.getStorage('loginid');
  182. this.scanCode = api.require('codeScan');
  183. this.getAgentInfo();
  184. var _this = this;
  185. this.addEvent("startLogin", function() {
  186. _this.userId = $api.getStorage('loginid');
  187. _this.getAgentInfo();
  188. })
  189. // 开启下拉刷新
  190. this.configDownAndPull("mescroll", function(mescroll) {
  191. _this.getAgentInfo(mescroll);
  192. }, function() {
  193. }, false);
  194. this.getMessageList();
  195. },
  196. // 跳转页面
  197. setMainid1: function(){
  198. $api.setStorage("mainId", 3163);
  199. },
  200. setMainid2: function(){
  201. $api.setStorage("mainId", 7459);
  202. },
  203. openWin: function(src) {
  204. this.goWin(src, src + '_win.html', '');
  205. },
  206. // 扫码出入库
  207. scanInto: function(type) {
  208. var src = type == 1 ? 'saomaruku' : 'saomachuku';
  209. this.goWin(src, src + '_win.html', '');
  210. },
  211. // 扫码轮胎二维码
  212. lipeiList: function() {
  213. var _this = this;
  214. this.ifHasPrme('camera',function(ret) {
  215. if (ret == true) {
  216. _this.scanCode.scan(function(ret, err) {
  217. if (ret.status) { // ret.code
  218. if (ret.code) {
  219. _this.goWin('settlementInfo', 'settlementInfo_win.html', {
  220. code: ret.code
  221. });
  222. }
  223. }
  224. });
  225. }
  226. })
  227. },
  228. //获取跑马灯list数据
  229. getMessageList: function() {
  230. var data = {
  231. "url": "json",
  232. "type": "body",
  233. "contentType": 1,
  234. },
  235. _this = this;
  236. this.$post('getMessageList', data, function(ret) {
  237. _this.messageList = ret.list;
  238. })
  239. },
  240. // 获取用户详情
  241. getAgentInfo: function(mescroll) {
  242. var _this = this,
  243. url = "getAgentInfoU",
  244. data = {
  245. loginId: this.userId,
  246. "type": 'body',
  247. "url": 'json'
  248. }
  249. setTimeout(function(){
  250. if (mescroll) {
  251. mescroll.endSuccess();
  252. }
  253. },1000);
  254. this.$post(url, data, function(ret) {
  255. if (ret.code == 0) {
  256. $api.setStorage("storeName", ret.data.storeName);
  257. _this.storeName = ret.data.storeName;
  258. if (mescroll) {
  259. mescroll.endSuccess();
  260. }
  261. }
  262. });
  263. },
  264. },
  265. mounted: function() {
  266. this.init();
  267. }
  268. })
  269. }
  270. </script>