123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584 |
- <!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" />
- <link rel="stylesheet" type="text/css" href="css/countdown.css"/>
- <script src="js/vue.js"></script>
- <script src="js/vant-ui.js"></script>
-
- <script src="js/main.js"></script>
- <script src="js/countdown.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;
- }
- .bktitle{
- width: calc(100% - 33px);
- margin: 0 auto .2rem auto;
- font-size:0.35rem;
- display:flex;
- flex-direction: row;
- align-items: flex-end;
- justify-content: space-between;
- }
- .bktitle .title{
- display:flex;
- flex-direction: row;
-
- align-items: flex-end;
- }
- .bktitle .times{
- display: flex;
- align-items: center;
- font-size:0.3rem;
- flex-direction: row;
- }
- .bktitle .times .dd, .hh,.mm,.ss{
- background-color: black;
- color: #ffffff
- }
- .banner2{
- width: 100%;
- overflow: hidden;
- padding: 0px 0.15rem;
- height: 4rem;
- background: url(../luntai/image/bg.png) no-repeat;
- background-size: 100% 4rem;
-
- }
- .goodsbar{
-
-
-
- margin-bottom: .2rem;
- }
- .goodsbar .item {
- width: 30%;
- margin-left: .2rem;
- margin-top: .2rem;
-
-
- }
- </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="banner2" id="mymain">
- <div class="homeTipbox flex a-center" v-if="messageList.length">
- <div class="labaInfos">
- <van-swipe style="height: .35rem;" :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>
- <!-- <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="" style="width:2rem;height:0.58rem ">
- </div>
- <div class="item flex a-center j-center col" v-on:click="scanInto(2)">
- <img src="image/scan_out.png" alt="" style="width:2rem;height:0.58rem ">
- </div>
-
- </div>
-
- </div>
-
- <div class="meberMenu" style="background-color: #ffffff; z-index: 10000; margin-top: -.7rem; position: relative;padding-top: .2rem">
- <div class="meberMenu-container">
- <div class="item flex col a-center j-center" v-on:click="getStoreNet">
- <b class="i9"></b>
- <h4>线上订货</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('kucunchaxun')">
- <b class="i10"></b>
- <h4>经销商库存</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('baodan')">
- <b class="i11"></b>
- <h4>我的参保</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('propaganda');setMainid1()">
- <b class="i12"></b>
- <h4>月度政策</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="verifyBusiness">
- <b class="i13"></b>
- <h4>积分商城</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="goCount()">
- <b class="i14"></b>
- <h4>轮毂计算</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="openWin('kucunMy')">
- <b class="i15"></b>
- <h4>我的库存</h4>
- </div>
- <div class="item flex col a-center j-center" v-on:click="lipeiList">
- <b class="i16"></b>
- <h4>轮胎保</h4>
- </div>
- </div>
- </div>
-
- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="margin:.2rem;border-radius: 0.25rem ">
- <van-swipe-item @click="handleSee" v-if="!piclist.length"
- ><img src="image/banner.png">
- </van-swipe-item>
- <van-swipe-item @click="handleSee" v-else v-for="(item,index) in piclist" :key="index"><img
- :src="item.imgPath">
- </van-swipe-item>
- </van-swipe>
-
-
- <div class="bktitle">
- <div class="title"> <img src="image/bk_icon.png" style="height: .42rem;width: .35rem;margin-right: .15rem"> 爆款促销
- </div>
- <div class="times">
-
-
- </div>
- </div>
-
-
- <div class="goodsbar flex a-center j-center" style="height: auto ;">
- <div style="display: flex;flex-wrap: wrap; width: 100%">
- <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%; " >
- <!-- <img src="image/cart_goods.png" alt="" > -->
- <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem;">
-
- </div>
- <div class="item flex col a-center j-center" style="position: relative">
- <img src="image/cart_goods.png" alt="">
- <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
- </div>
- <div class="item flex col a-center j-center" style="position: relative">
- <img src="image/cart_goods.png" alt="">
- <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
- </div>
- <div class="item flex col a-center j-center" style="position: relative">
- <img src="image/cart_goods.png" alt="">
- <img src="image/price.png" style="position: absolute;bottom: 0rem;left:0rem; ">
- </div>
- </div>
-
- </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: [],
- piclist:[
- { "imgPath":"image/slider1.png"}
- ]
- },
- 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 == 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;
- //console.log(JSON.stringify(ret.storeBrand));
- if (mescroll) {
- mescroll.endSuccess();
- }
- }
- });
- },
- handleSee: function () {
- this.goWin("promotion", "promotion_win.html", "");
- // $api.setStorage("mainId", 7459);
- // var _this = this;
- // var dateTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
- // api.ajax({
- // url: 'http://b2bcnapi.sailuntire.com/allstell/app/sailun/appNewsCount/save',
- // method: 'post',
- // headers: {
- // "Content-type": "application/json"
- // },
- // data: {
- // "body": {
- // "account": _this.storeId,
- // "appType": "1",
- // "id": 0,
- // "showTime": dateTime,
- // "tapTime": dateTime
- // }
- // }
- // }, function (ret, err) {
- // var obj = {
- // dateTime: dateTime
- // };
- // _this.goWin("news_win", "./news_win.html", obj);
- // // 不做提示
- // });
- },
- downTime:function(){
- var o = {
- el : 'time',
- st : 0,
- ed : 5400000,
- dd:"dd",
- hh: 'hh',
- mm: 'mm',
- ss: 'ss',
- ms: 'ms'
- }
- var d = new countdown(o);
- d.downsElement();
- }
- },
- mounted: function () {
- this.init();
-
- var _this = this;
- this.ifHasPrme('storage', function (ret) {
- if (ret == true) {
- _this.getNewVersionUrl(function () {
- });
- }
- })
- }
- })
- }
- </script>
|