123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534 |
- <!DOCTYPE html>
- <html lang="zh-cn">
- <head>
- <meta charset="UTF-8">
- <title>Title</title>
- <link rel="stylesheet" href="../css/reset.css">
- <script src="../js/flexible.js"></script>
- <script src="../js/api.js"></script>
- <script src="../js/checkLanguage.js"></script>
- <style>
- html{
- background-color: #f2f2f2;
- font-family: "Adobe 黑体 Std R";
- }
- html,body,main{
- height: 100%;
- }
- #header {
- height: 1.17rem;
- line-height: 1.17rem;
- color: #fdfbfb;
- position: relative;
- /*box-sizing: content-box;*/
- }
- .headerBG{
- width: 100%;
- height: 1.17rem;
- position: absolute;
- left: 0;
- top: 0;
- z-index: -1;
- }
- #backBtn {
- width: 1.2rem;
- height: 1.17rem;
- text-align: center;
- font-size: .64rem;
- position: absolute;
- left: 0;
- bottom: 0;
- }
- #backBtn img{
- display: inline-block;
- width: 50%;
- height: 40%;
- }
- .headTit {
- text-align: center;
- height: 1.17rem;
- font-size: .48rem;
- font-weight: normal;
- }
- .headGN {
- position: absolute;
- right: 0;
- bottom: 0;
- }
- .headGN li {
- display: none;
- width: 1.2rem;
- height: 1.17rem;
- font-size: .38rem;
- }
- .headGN li.active {
- display: block;
- }
- main{
- overflow-x: hidden;
- overflow-y: auto;
- }
- main>div{
- background-color: #fff;
- padding: 0 .33rem;
- border-top: 1px solid #eee;
- border-bottom: 1px solid #eee;
- }
- .shopData{
- height: 2.12rem;
- }
- .shopData>div{
- height: 100%;
- }
- .shopImg{
- width: 1.34rem;
- height: 1.34rem;
- padding: .38rem 0 .38rem 0;
- margin-right: .26rem;
- }
- .shopNameDiv{
- padding: .52rem 0 .4rem;
- }
- .shopNameDiv>p{
- height: .5rem;
- }
- .shopNameDiv>p:first-of-type{
- margin-bottom: .14rem;
- }
- .shopName{
- font-size: .4rem;
- color: #3d3d3d;
- }
- .companyName{
- font-size: .34rem;
- color: #f7941d;
- }
- .guarantee{
- display: inline-block;
- width: .42rem;
- height: .44rem;
- margin-left: .21rem;
- margin-right: .1rem;
- vertical-align: sub;
- }
- .isGuarantee,.isPartner{
- color: #818181;
- font-size: .26rem;
- }
- .partner{
- display: inline-block;
- width: .56rem;
- height: .42rem;
- margin-left: .21rem;
- margin-right: .1rem;
- vertical-align: sub;
- }
- .h3{
- height: 1.14rem;
- line-height: 1.14rem;
- font-size: .37rem;
- font-weight: 300;
- font-family: "Adobe 黑体 Std R";
- color: #3d3d3d;
- padding: 0 .33rem;
- }
- .noCircuit{
- height: 2.89rem;
- line-height: 2.89rem;
- text-align: center;
- font-size: .37rem;
- background-color: #fff;
- color: #3d3d3d;
- }
- .tjlxAddBtn,.qblxAddBtn{
- height: 1.08rem;
- line-height: 1.08rem;
- margin-top: .15rem;
- }
- .addLXIcon{
- display: inline-block;
- width: .48rem;
- height: .48rem;
- margin-right: .14rem;
- vertical-align: sub;
- }
- .addText{
- font-size: .4rem;
- font-weight: 300;
- font-family: "Adobe 黑体 Std R";
- }
- .jt{
- display: inline-block;
- width: .2rem;
- height: .33rem;
- }
- .qblx,.tjlx{
- padding: 0;
- background-color: #efefef;
- }
- .qblx>.Circuit:first-of-type,.tjlx>.Circuit:first-of-type{
- margin-top: 0;
- }
- .Circuit{
- padding: .25rem .33rem;
- background-color: #fff;
- margin-top: .25rem;
- }
- .Circuit>div:first-of-type{
- width: 70%;
- }
- .Circuit>div:last-of-type{
- width: 29%;
- text-align: right;
- }
- .originIcon{
- display: inline-block;
- width: .32rem;
- height: .32rem;
- margin-right: .08rem;
- margin-left: -.04rem;
- vertical-align: middle;
- }
- .terminusIconIcon{
- display: inline-block;
- width: .26rem;
- height: .34rem;
- margin-right: .13rem;
- vertical-align: middle;
- }
- .originTxt,.terminusIconTxt{
- color: #3d3d3d;
- font-size: .32rem;
- }
- .yl span{
- color: #f7941d;
- font-size: .32rem;
- /*font-family: "Myriad Pro";*/
- margin:0 .32rem .2rem 0;
- letter-spacing: .5px;
- }
- .jg,.yxq{
- color: #818181;
- font-size: .32rem;
- }
- .yxq{
- letter-spacing: 1px;
- }
- .origin,.terminusIcon,.jg{
- margin-bottom: .2rem;
- }
- .transportation{
- display: inline-block;
- width: .64rem;
- height: .64rem;
- margin:0 .18rem .26rem 0;
- }
- .voyage{
- color: #13c1cc;
- font-size: .3rem;
- margin-bottom: .2rem;
- }
- .ydBtn{
- margin-bottom: .3rem;
- }
- .ydBtn,.xqBtn{
- display: inline-block;
- width: 1.85rem;
- height: .62rem;
- line-height: .62rem;
- color: #fff;
- font-size: .3rem;
- text-align: center;
- border-radius: .5rem;
- margin-right: -.12rem;
- }
- .orange-btn {
- background-image: linear-gradient(50deg, #f7841d, #fcb316); }
- .hid{
- display: none;
- }
- </style>
- </head>
- <body class="flex-wrap flex-column">
- <div id="header">
- <img src="../images/headerBG.jpg" alt=" " class="headerBG">
- <i id="backBtn"><img src="../images/backBtn.png" alt=""></i>
- <h3 class="headTit"></h3>
- <ul class="headGN">
- <!--<li class="active"><i>设置</i></li>-->
- </ul>
- </div>
- <main class="flex-con">
- <div class="shopData clearFix">
- <div class="shopImg left"><img src="../images/shopImg.jpg" alt=""></div>
- <div class="left shopNameDiv">
- <p><span class="shopName con1"></span><span class="isGuarantee"><i class="guarantee"><img src="../images/guarantee1.png" alt=""></i><span class="guaranteeTxt con2"></span></span><span class="isPartner"><i class="partner"><img src="../images/partner1.png" alt=""></i><span class="partnerTxt con3"></span></span></p>
- <p><span class="companyName" id="companyName"></span></p>
- </div>
- </div>
- <h3 class="h3" id="h3"></h3>
- <div class="tjlx" id="evaluation"></div>
- <!--<div class="tjlxAddBtn"><i class="addLXIcon"><img src="../images/addLX.png" alt=""></i><span class="addText">添加推荐</span><i class="right jt"><img src="../images/addJT.png" alt=""></i></div>-->
- <!--<h3 class="h3">全部线路</h3>
- <div class="qblx">
- <div class="Circuit clearFix">
- <div class="left">
- <div class="origin"><span class="originIcon"><img src="../images/origin.png" alt=""></span><span class="originTxt">北京首都国际机场·中国</span></div>
- <div class="terminusIcon"><span class="terminusIconIcon"><img src="../images/terminusIcon.png" alt=""></span><span class="terminusIconTxt">汉堡机场·德国</span></div>
- <div class="yl clearFix"><span class="left">USD/2362/20GP</span><span class="left">USD/4162/40GP</span><span class="left">USD/4162/40HQ</span></div>
- <div class="jg">截关: 二/四/五</div>
- <div class="yxq">有效期: 2017-1-1</div>
- </div>
- <div class="right">
- <div class="transportation"><img src="../images/aircraft.png" alt=""></div>
- <div class="voyage">航程4天</div>
- <div class="ydBtn"><img src="../images/shopBook.png" alt=""></div>
- <div class="xqBtn"><img src="../images/detail.png" alt=""></div>
- </div>
- </div>
- <div class="noCircuit hid">你尚未发布任何运价</div>-->
- </div>
- <div class="qblxAddBtn"><i class="addLXIcon"><img src="../images/addLX.png" alt=""></i><span class="addText btn1"></span><i class="right jt"><img src="../images/addJT.png" alt=""></i></div>
- </main>
- <script type="text/javascript">
- try {
- var text=languages.myShop;
- $api.dom(".headTit").innerText=text.tit;
- $api.dom(".con1").innerText=text.con1;
- $api.dom(".con2").innerText=text.con2;
- $api.dom(".con3").innerText=text.con3;
- $api.dom("#h3").innerText=text.h3;
- $api.dom(".btn1").innerText=text.btn1;
- }catch (e){
- alert(languages.all.list5)
- }
- </script>
- <script src="../js/doT.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/publicData.js"></script>
- <script src="../js/jquery-3.1.0.min.js"></script>
- <script id="evaluationtmpl" type="text/x-dot-template">
- {{ for(var prop in it['data']) { }}
- <div class="Circuit clearFix">
- <div class="left">
- <div class="origin"><span class="originIcon"><img src="../images/origin.png" alt=""></span><span class="originTxt">{{= it['data'][prop]["pol_country"] }}·{{= it['data'][prop]["pol_name"] }}</span></div>
- <div class="terminusIcon"><span class="terminusIconIcon"><img src="../images/terminusIcon.png" alt=""></span><span class="terminusIconTxt">{{= it['data'][prop]["pod_country"] }}·{{= it['data'][prop]["pod_name"] }}</span></div>
- <div class="yl clearFix">
- {{ for(var i in it['data'][prop]["money"]) { }}
- <span class="left">
- {{= it['data'][prop]["money"][i]["code"] }}{{= it['data'][prop]["money"][i]["price"] }}/{{= it['data'][prop]["money"][i]["theCode"] }}
- </span>
- {{ } }}
- </div>
- <div class="jg">{{=it['languages']['list1']}}: {{= it['data'][prop]['detail']["dateOfEndGate"] }}</div>
- <div class="yxq">{{=it['languages']['list2']}}: {{= it['data'][prop]['detail']["dateTo"] }}</div>
- </div>
- <div class="right">
- {{? it['data'][prop]["nameCn"] =="海运" }}
- <div class="transportation"><img src="../images/ship.png" alt=""></div>
- {{?? it['data'][prop]["nameCn"] =="空运"}}
- <div class="transportation"><img src="../images/aircraft.png" alt=""></div>
- {{?? it['data'][prop]["nameCn"] =="铁路"}}
- <div class="transportation"><img src="../images/train.png" alt=""></div>
- {{?? it['data'][prop]["nameCn"] =="集卡"}}
- <div class="transportation"><img src="../images/trucks.png" alt=""></div>
- {{?? it['data'][prop]["nameCn"] =="联运"}}
- <div class="transportation"><img src="../images/traffic.png" alt=""></div>
- {{?}}
- <div class="voyage">{{=it['languages']['list3']}}{{ if(it['data'][prop]['detail']["timeSpendDay"]){ }}{{= it['data'][prop]['detail']["timeSpendDay"] }}{{=it['languages']['list4']}}{{ } }}{{ if(it['data'][prop]['detail']["timeSpendHour"]){ }}{{= it['data'][prop]['detail']["timeSpendHour"] }}{{=it['languages']['list5']}}{{ } }}</div>
- <div class="ydBtn TJ orange-btn" rel='{{= it["data"][prop]["id"] }}'>{{=it['languages']['btn2']}}</div>
- <div class="xqBtn XG orange-btn" rel='{{= it["data"][prop]["id"] }}'>{{=it['languages']['btn3']}}</div>
- </div>
- </div>
- {{ } }}
- </script>
- <script>
- apiready=function () {
- api.showProgress({
- title: languages.all.list21+'...',
- text: languages.all.list25+'...',
- modal: false
- });
- var backBtn=$api.dom("#backBtn"),qblxAddBtn=$api.dom(".qblxAddBtn"),companyName=$api.dom("#companyName"),isGuarantee=$api.dom(".isGuarantee"),
- isPartner=$api.dom(".isPartner"),partner=$api.dom(".partner"),guaranteeTxt=$api.dom(".guaranteeTxt"),partnerTxt=$api.dom(".partnerTxt");
- var service=$api.getStorage("serviceStatus");
- var userInfo=$api.getStorage("user"),bl=false;
- if(service['assurance']=="1"){
- $api.dom(isGuarantee,'img').src="../images/guarantee2.png";
- guaranteeTxt.innerText="";
- }
- if(service['partner']=="1"){
- $api.dom(isGuarantee,'img').src="../images/guarantee2.png";
- guaranteeTxt.innerText="";
- }
- if(userInfo['company'].length){
- for(var i in userInfo['company']){
- if(bl) continue;
- if(userInfo['company'][i]['isVerify']==1){
- companyName.innerText=userInfo['company'][i]['companyName'];
- bl=true;
- }else {
- companyName.innerText=userInfo['company'][i]['companyName'];
- }
- }
- }else {
- $api.dom("#companyName").innerText=languages.all.list4;
- }
- var issueArr=["issuePutaway","issueAudit","issueSoldOut","issueNotPass"];
- getdata();
- qblxAddBtn.onclick=function () {
- api.execScript({
- name: 'root',
- script: 'toFrame(1);'
- });
- setTimeout(function () {
- api.execScript({
- name: 'root',
- script: 'toContentFrame('+0+',"'+issueArr[0]+'");'
- });
- setTimeout(function () {
- api.closeToWin({
- name: 'root'
- });
- },200)
- },300)
- }
- isGuarantee.onclick=function () {
- api.openWin({
- name: "paidService",
- url: 'paidService.html',
- reload:true,
- pageParam: {index: 1,winName:"myShop"}
- });
- }
- isPartner.onclick=function () {
- api.openWin({
- name: "paidService",
- url: 'paidService.html',
- reload:true,
- pageParam: {index: 2,winName:"myShop"}
- });
- }
- function getdata() {
- api.ajax({
- url: pageUrl + "shop/my_shop",
- method: 'get',
- timeout: 30,
- dataType: 'json',
- returnAll: false,
- headers: {
- "Content-Type": "application/json"
- },
- data: {
- values: {
- id:$api.getStorage("user").id
- }
- }
- }, function(ret, err) {
- api.hideProgress();
- console.log(JSON.stringify(ret))
- if(ret.data=="未获得资源"||ret==""){
- $("#evaluation").html('<div class="noCircuit">'+languages.myShop.remind2+'</div>');
- return;
- }
- var dataEval = ret;
- dataEval.languages=languages.myShop;
- var evalText = doT.template($("#evaluationtmpl").text());
- $("#evaluation").html(evalText(dataEval));
- setTJ();
- toXG();
- })
- }
- backBtn.onclick=function () {
- toBack();
- }
- api.addEventListener({
- name:'keyback'
- },function(ret, err){
- toBack()
- });
- function toBack() {
- api.closeToWin({
- name: 'root'
- });
- }
- function setTJ() {
- var evaluation=$api.dom("#evaluation"),TJS=$api.domAll(evaluation,".TJ"),isClick=false;
- for(var num=0,len=TJS.length;num<len;num++){
- !function (i) {
- TJS[i].onclick=function () {
- if(isClick) return;
- isClick=true;
- api.showProgress({
- title: languages.all.list21+'...',
- text: languages.all.list25+'...',
- modal: true
- });
- var id=this.getAttribute("rel"),isTop=0,that=this;
- api.ajax({
- url: pageUrl+'Price/set_top',
- method: 'post',
- timeout: 30,
- dataType: 'json',
- returnAll: false,
- data: {
- values: {
- id: id,
- isbegTop:isTop
- }
- }
- }, function (ret, err) {
- var txt="";
- isClick=false;
- api.hideProgress();
- if(ret.status=="200"){
- getdata();
- api.execScript({
- name: 'root',
- frameName:'issuePutaway',
- script: ' getData(true,1);;'
- });
- api.toast({
- msg: languages.myShop.remind1,
- duration: 2000,
- location: 'bottom'
- });
- }else {
- api.toast({
- msg: languages.all.list48,
- duration: 2000,
- location: 'bottom'
- });
- }
- });
- }
- }(num)
- }
- }
- function toXG() {
- var evaluation=$api.dom("#evaluation"),XJS=$api.domAll(evaluation,".XG");
- for(var num=0,len=XJS.length;num<len;num++){
- !function (i) {
- XJS[i].onclick=function () {
- var id=this.getAttribute("rel"),that=this;
- api.openWin({
- name: 'issueDetails',
- url: 'issueDetails.html',
- pageParam: {id: id,isXG:false}
- });
- }
- }(num)
- }
- }
- }
- </script>
- </body>
- </html>
|