| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>title</title>
- <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
- <link rel="stylesheet" href="../../css/common.css"/>
- <link rel="stylesheet" href="../../css/login.css"/>
- <link rel="stylesheet" href="../../css/html.css"/>
- <style>
- body {
- }
- .zc_btn {
- text-align: center;
- margin-top: 10px;
- color: #374782;
- }
- .zmq-form {
- top: 42%;
- position: absolute;
- box-sizing: border-box;
- width : 90%;
- left: 5%;
- }
- </style>
- </head>
- <body>
- <div id="app">
- <!--<div id="login"></div>-->
- <img src="../../image/zy_logo.png" style="width: 60%;height: 40px;margin-left: 20%;margin-top: 30%"/>
- <div>
- <form class="zmq-form" action="">
- <div class="userName zmq-input-parent">
- <img src="../../image/drawable-xhdpi/11.png" class="zmq-input-img"/>
- <input class="zmq-input" type="text" name="clientId" placeholder="请输入用户名" required v-model = "clientId" />
- </div>
- <div class="passWord zmq-input-parent">
- <img src="../../image/drawable-xhdpi/pass.png" class="zmq-input-img"/>
- <input class="zmq-input" type="password" name="password" placeholder="请输入密码" required v-model="password" />
- </div>
- <div class="choose_box">
- <!--<div>
- <input type="checkbox" checked="checked" name="checkbox"/>
- <em> 记住密码 </em>
- </div>-->
- <a href="javascript:void(0)" class="zmq-text-msg zmq-text-font-09"></a>
- </div>
- <div class="zmq-btn zmq-btn-img" v-on:click="login">
- 登 录
- </div>
- <!--<div class="zmq-text-font-09 zmq-text-right" v-on:click="goRegize">
- 还没有账号?<em class="zmq-text-msg">我要注册</em>
- </div>-->
- </form>
- <!--<div class="other_login">
- <div class="other"></div>
- <span>其他方式登录</span>
- <div class="other"></div>
- </div>
- <div class="other_choose">
- <a href=""> <img src="../../image/qq.png" alt=""/> </a>
- <a href=""> <img src="../../image/wx.png" alt=""/> </a>
- <a href=""> <img src="../../image/wb.png" alt=""/> </a>
- </div>-->
- </div>
- </div>
- </body>
- <script type="text/javascript" src="../../script/api.js"></script>
- <script type="text/javascript" src="../../script/vue.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() {
- new Vue({
- el : '#app',
- data : {
- // 输入的用户名和密码
- clientId : '1000275', // 用户名
- password : '000000', // 用户密码
- loginUrl : 'loginUrl',
- bodyH : '', // 屏幕高度
- },
- methods : {
- // 注册成功,跳转登录
- login : function() {
- var _this = this;
- // setTimeout(function() {
- // _this.sendEvent("openFrameGroup", "");
- // }, 500);
- if (this.userCode == "") {
- this.showToast("请输入用户名");
- return;
- }
- if (this.userPassword == "") {
- this.showToast("用户密码不能为空");
- return;
- }
- var data = {
- clientId : this.clientId,
- password : this.password,
- authCode : '',
- url : 'json',
- type : 'body'
- }
- this.$post(this.loginUrl, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.showToast("登录成功");
- // 将loginid 保存到本地
- $api.setStorage("loginid", ret.data.data.kunnr);
- $api.setStorage("agentCode", ret.data.data.kunnr);
- $api.setStorage("agentName", ret.data.data.name);
- $api.setStorage("token",ret.data.data.token);
- $api.setStorage("kunnr",ret.data.data.kunnr);
- // 初始化极光推送
- // _this.initApush(ret.data.loginName);
- setTimeout(function() {
- _this.sendEvent("openFrameGroup", "");
- }, 500);
- }
- })
- },
- // 跳转注册页面
- goRegize : function() {
- this.goWin("regize_win", "regize_win.html", "");
- }
- },
- mounted : function() {
- var index = 0, _this = this;
- this.bodyH = document.documentElement.clientHeight;
- api.addEventListener({
- name : 'keyback'
- }, function(ret, err) {
- api.closeWidget({
- id : 'A6016069865772', //这里是应用id
- retData : {
- name : 'closeWidget'
- },
- animation : {
- type : 'flip',
- subType : 'from_bottom',
- duration : 500
- }
- });
- });
- }
- })
- };
- </script>
- </html>
|