123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <script src="js/vue.js"></script>
- <script src="js/vant-ui.js"></script>
- <script src="js/main.js"></script>
- <title></title>
- </head>
- <style>
- .menu .item p {
- font-size: 0.26rem;
- }
- .line1 {
- width: 300px;
- overflow: hidden;
- text-overflow: ellipsis;
- text-align: center;
- white-space: nowrap;
- }
- #mescroll {
- overflow-y: scroll !important;
- }
- [v-cloak] {
- display: none;
- }
- </style>
- <body>
- <div id="app">
- <!-- <div class="header flex a-center j-center" id="aui-header" style="height: 1.5rem;font-size: 0.4rem">
- <p class="line1">{{ storeName }}</p>
- </div> -->
- <div class="view flex col" style="overflow-y:scroll" style="background: #3773ED;">
- <div class="page router fx1" :style="{'padding-bottom':footerHeight+'px'}" id="mescroll">
- <div class="banner" id="mymain">
- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
- <van-swipe-item v-if="!storeBrand.length"><img src="image/banner.png"></van-swipe-item>
- <van-swipe-item v-else v-for="(item,index) in storeBrand" :key="index"><img :src="item.imgPath">
- </van-swipe-item>
- </van-swipe>
- </div>
- <div class="homeTipbox flex a-center" v-if="messageList.length">
- <div class="laba"><i>消息中心</i></div>
- <div class="labaInfos">
- <van-swipe style="height: 1rem;" :autoplay="3000" :show-indicators="false" vertical>
- <van-swipe-item v-for="(item,index) in messageList" :key="index">
- <!-- <div><span>{{messageList[index].msgContent}}</span></div> -->
- <div v-cloak>
- <div class="labelInfos-tip"><span class="labelInfos-tip-dot"></span><span
- class="labelInfos-tip-text">{{messageList[index].msgContent}}</span></div>
- <div class="labelInfos-tip"><span class="labelInfos-tip-dot"></span><span
- class="labelInfos-tip-text">{{index==messageList.length-1?messageList[0].msgContent:messageList[index+1].msgContent}}</span>
- </div>
- </div>
- <!-- <div><span>{{index >= messageList.length ? messageList[0].msgContent : messageList[index+1].msgContent}}</span></div> -->
- </van-swipe-item>
- </van-swipe>
- </div>
- </div>
- <div class="shopHomebar flex a-center j-center">
- <div class="item flex a-center j-center col" v-on:click="scanInto(1)">
- <img src="image/scan_in.png" alt="">
- </div>
- <div class="item flex a-center j-center col" v-on:click="scanInto(2)">
- <img src="image/scan_out.png" alt="">
- </div>
- <!-- <div class="item flex a-center j-center col">
- <b class="icon i3"></b>
- <p>
- 切换店铺
- </p>
- </div>-->
- </div>
- <div class="menu flex">
- <div class="item flex col a-center j-center" v-on:click="getStoreNet">
- <b class="i1"></b>
- <p style="font-size : 0.26rem">
- 线上订货
- </p>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('kucunchaxun')">
- <b class="i2"></b>
- <p>
- 经销商库存
- </p>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('baodan')">
- <b class="i3"></b>
- <p>
- 我的参保
- </p>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('propaganda');setMainid1()">
- <b class="i4"></b>
- <p>
- 月度政策
- </p>
- </div>
- </div>
- <!-- <div class="workField flex a-center">
- <div class="sup"></div>
- <h4>快速工作栏</h4>
- </div> -->
- <div class="workFieldContainer flex jlr wrap">
- <div class="item"><img src="image/quick_integral_market.png" v-on:click="verifyBusiness">
- </div>
- <!-- <div class="item"><img src="image/quick_integral_market.png" v-on:click="tishi">
- </div> -->
- <div class="item"><img src="image/lungu.png" v-on:click="goCount()">
- </div>
- <div class="item"><img src="image/quick_my_stock.png" v-on:click="openWin('kucunMy')">
- </div>
- <div class="item"><img src="image/quick_tire_insure.png" v-on:click="lipeiList">
- </div>
- <div class="banner-bottom"> <img src="image/banner_bottom.png"></div>
- </div>
- <!-- <div class="workField flex a-center">
- <div class="case"><img src="img/images/work.png">
- </div>
- <h4>安装案例</h4>
- </div> -->
- <!-- <div class="anzhuangCase flex jlr wrap">
- <div class="item flex col">
- <img src="img/images/img05-21.png">
- <div class="anzhuangCaseInfos flex jlr a-center">
- <div class="left">
- <h4>丰田霸道安装赛轮SV12</h4>
- <div class="flex a-center">
- <div class="touxiang"></div>
- 丰田霸道
- </div>
- </div>
- <div class="dianzan"></div>
- </div>
- </div>
- <div class="item flex col">
- <img src="img/images/img05-21.png">
- <div class="anzhuangCaseInfos flex jlr a-center">
- <div class="left">
- <h4>丰田霸道安装赛轮SV12</h4>
- <div class="flex a-center">
- <div class="touxiang"></div>
- 丰田霸道
- </div>
- </div>
- <div class="dianzan"></div>
- </div>
- </div>
- </div> -->
- <!-- <div class="pipei flex a-center j-center">
- <b></b> 查找适配轮胎 <i class="iconfont icon-you"></i>
- </div> -->
- </div>
- <!-- <van-tabbar fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
- <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
- <span>{{item.label}}</span>
- <template #icon="props">
- <img :src="props.active ? item.active : item.inactive" />
- </template>
- </van-tabbar-item>
- </van-tabbar>-->
- </div>
- </div>
- </body>
- </html>
- <link rel="stylesheet" href="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript" src="../script/httpRequest.js"></script>
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function () {
- var mymain = $api.byId('mymain');
- $api.fixStatusBar(mymain);
- // var header = $api.byId('aui-header');
- // $api.fixStatusBar(header);
- // var headerPos = $api.offset(header);
- // if (api.systemType == 'android') {
- // $api.css($api.byId('app'), 'padding-top:20px');
- // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
- // }else{
- // $api.css($api.byId('app'), 'padding-top:20px');
- // $api.css($api.byId('content'), 'margin-top:' + (headerPos.h - 20) + 'px');
- // }
- new Vue({
- el: '#app',
- data: {
- footerHeight: 0,
- codeScan: '', // 扫码
- storeName: '',
- messageList: [],
- storeBrand: [],
- },
- methods: {
- // 初始化方法
- init: function () {
- this.userId = $api.getStorage('loginid');
- this.scanCode = api.require('FNScanner');
- this.storeId = $api.getStorage('userid');
- this.getAgentInfo();
- this.getbannerLists();
- var _this = this;
- this.addEvent("startLogin", function () {
- _this.userId = $api.getStorage('loginid');
- _this.storeId = $api.getStorage('userid');
- _this.getAgentInfo();
- _this.getbannerLists();
- _this.getMessageList();
- })
- this.getMessageList();
- // 开启下拉刷新
- if (api.systemType == 'android') {
- this.initApush('p' + this.storeId);
- // this.configDownAndPull("mescroll", function(mescroll) {
- // _this.getAgentInfo(mescroll);
- // }, function() {
- //
- // }, false);
- }
- // this.ifHasPrme('notification')
- },
- // 跳转页面
- setMainid1: function () {
- $api.setStorage("mainId", 3163);
- },
- setMainid2: function () {
- $api.setStorage("mainId", 7459);
- },
- openWin: function (src) {
- this.goWin(src, src + '_win.html', '');
- },
- goCount: function () {
- this.goWin('tire_count', 'tire_count.html');
- },
- // 扫码出入库
- scanInto: function (type) {
- if (this.agentInfo.status == 3) {
- api.confirm({
- title: '系统提示',
- msg: '门店已冻结,请找相关业务经理解冻!',
- buttons: ['确定', '激活']
- }, function (ret, err) {
- var index = ret.buttonIndex;
- if(index==2){
- _this.goWin("activation", "activation_win.html", "");
- }
- });
- return;
- }
- var src = type == 1 ? 'saomaruku' : 'saomachuku';
- this.goWin(src, src + '_win.html', '');
- },
- tishi: function () {
- api.toast({
- msg: "此功能正在升级维护,暂时关闭,敬请期待!"
- });
- },
- getStoreNet: function () {
- if (this.agentInfo.status == 3) {
- api.confirm({
- title: '系统提示',
- msg: '门店已冻结,请找相关业务经理解冻!',
- buttons: ['确定', '激活']
- }, function (ret, err) {
- var index = ret.buttonIndex;
- if(index==2){
- _this.goWin("activation", "activation_win.html", "");
- }
- });
- return;
- }
- this.goWin("getStoreNet", "getStoreNet_win.html", {})
- },
- verifyBusiness: function () {
- var data = {
- "storeId": this.storeId,
- "url": "json",
- "type": "body"
- },
- _this = this,
- url = "verifyBusiness";
- if (this.agentInfo.status == 3) {
- api.confirm({
- title: '系统提示',
- msg: '门店已冻结,请找相关业务经理解冻!',
- buttons: ['确定', '激活']
- }, function (ret, err) {
- var index = ret.buttonIndex;
- if(index==2){
- _this.goWin("activation", "activation_win.html", "");
- }
- });
- return;
- }
- this.$postuser(url, data, function (ret) {
- if (ret.code == 0 && ret.data) {
- _this.goWin("license_body", "license_body.html", {
- licenseUrl: ret.data.licenseUrl,
- companyName: ret.data.wordsResultQuery.company.words,
- userName: ret.data.wordsResultQuery.company.words,
- legalPerson: ret.data.wordsResultQuery.person.words,
- })
- return
- }
- if (ret.code == 0) {
- _this.goWin("integral", "integral_win.html", {})
- }
- if (ret.code == 500) {
- if (ret.msg == "营业执照不清晰或非营业执照,请重新上传" || ret.msg == "图片识别失败请重试") {
- api.alert({
- title: '温馨提示',
- msg: "为了使您能够正常使用积分商城,请您上传清晰的营业执照,以便更好地为您服务。",
- }, function (ret, err) {
- if (ret) {
- _this.goWin("license_body", "license_body.html", {
- licenseUrl: "",
- companyName: "",
- userName: "",
- legalPerson: "",
- })
- }
- });
- }
- return
- }
- })
- },
- // 扫码轮胎二维码
- lipeiList: function () {
- var _this = this;
- if (this.agentInfo.status == 3) {
- api.confirm({
- title: '系统提示',
- msg: '门店已冻结,请找相关业务经理解冻!',
- buttons: ['确定', '激活']
- }, function (ret, err) {
- var index = ret.buttonIndex;
- if(index==2){
- _this.goWin("activation", "activation_win.html", "");
- }
- });
- return;
- }
- // this.goWin('settlementInfo', 'settlementInfo_win.html', {
- // code: '10000351'
- // });
- // return;
- this.ifHasPrme('camera', function (ret) {
- if (ret == true) {
- _this.scan(_this.scanCode, function (ret) {
- if (ret) {
- _this.goWin('settlementInfo', 'settlementInfo_win.html', {
- code: ret
- });
- }
- })
- // _this.scanCode.scan(function(ret, err) {
- // if (ret.status) { // ret.code
- // if (ret.code) {
- // _this.goWin('settlementInfo', 'settlementInfo_win.html', {
- // code: ret.code
- // });
- // }
- // }
- // });
- }
- })
- },
- // 获取用户详情
- getAgentInfo: function (mescroll) {
- var _this = this,
- url = "getAgentInfoU",
- data = {
- "loginId": this.userId,
- "appVersion": parseFloat(api.appVersion),
- "mobileSystem": api.systemType,
- "type": 'body',
- "url": 'json'
- }
- if (this.userId == null) { // 个人不存在
- $api.clearStorage();
- _this.goWin("login", "login.html", "");
- }
- this.$postuser(url, data, function (ret) {
- if (ret.code == 0) {
- $api.setStorage("status", ret.data.status);
- if (ret.data.status == 3) {
- api.confirm({
- title: '系统提示',
- msg: '门店已冻结,请找相关业务经理解冻!',
- buttons: ['确定', '激活']
- }, function (ret, err) {
- var index = ret.buttonIndex;
- if(index==2){
- _this.goWin("activation", "activation_win.html", "");
- }
- });
- // api.alert({
- // title: '系统提示',
- // msg: '门店已冻结,请找相关业务经理解冻1!',
- // }, function (ret, err) {
- // });
- } else if (ret.data.status == 5) {
- api.alert({
- title: '系统提示',
- msg: '门店账号无效!',
- }, function (ret, err) {
- if (ret) {
- $api.clearStorage();
- _this.goWin("login", "login.html", "");
- }
- });
- }
- $api.setStorage('brand', ret.data.bizStoreBrandDto[0].brandName);
- $api.setStorage("storeName", ret.data.storeName);
- _this.storeName = ret.data.storeName;
- _this.agentInfo = ret.data
- if (_this.agentInfo.saveAppMessage != 1) {
- _this.inMobileMessage();
- }
- if (mescroll) {
- mescroll.endSuccess()
- }
- }
- });
- },
- inMobileMessage: function () {
- var data = {
- "storePhone": this.agentInfo.storePhone,
- "storeId": this.storeId,
- "mobileSystem": api.systemType,
- "systemVersion": api.systemVersion,
- "appVersion": parseFloat(api.appVersion),
- "mobileModel": api.deviceModel,
- "deviceName": api.deviceName,
- "url": "json",
- "type": "body",
- },
- url = "MobileMessage",
- _this = this;
- this.$post(url, data, function (ret) {
- })
- },
- // 获取跑马灯链接
- getMessageList: function () {
- var data = {
- "url": "json",
- "type": "body",
- "contentType": 1,
- },
- _this = this;
- this.$post('getMessageList', data, function (ret) {
- _this.messageList = ret.list;
- })
- },
- getbannerLists: function (mescroll) {
- var data = {
- "storeId": this.storeId,
- "url": "json",
- "type": "body",
- }
- _this = this,
- setTimeout(function () {
- if (mescroll) {
- mescroll.endSuccess();
- }
- }, 1000);
- this.$post("getbannerLists", data, function (ret) {
- if (ret.code == 0) {
- _this.storeBrand = ret.storeBrand;
- if (mescroll) {
- mescroll.endSuccess();
- }
- }
- });
- },
- },
- mounted: function () {
- this.init();
- var _this = this;
- this.ifHasPrme('storage', function (ret) {
- if (ret == true) {
- _this.getNewVersionUrl(function () {
- });
- }
- })
- }
- })
- }
- </script>
|