1003610196_edit.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <html>
  2. <head>
  3. <style>
  4. .body {
  5. background: url(/imgs/universe.mobile.jpg) right bottom;
  6. background-size: cover;
  7. }
  8. .content-wrap {
  9. width: 86%;
  10. margin: 0 auto;
  11. }
  12. .logo {
  13. text-align: center;
  14. margin: 13% 0;
  15. }
  16. .login-form-item {
  17. box-sizing: border-box;
  18. width: 100%;
  19. height: 80px;
  20. margin-bottom: 20px;
  21. position: relative;
  22. }
  23. .login-form-item input {
  24. box-sizing: border-box;
  25. display: inline-block;
  26. width: 100%;
  27. height: 100%;
  28. padding: 0 60px;
  29. font-size: 20px;
  30. background-color: #f0f1f5;
  31. border: none;
  32. border-radius: 50px;
  33. overflow: hidden;
  34. text-align: center;
  35. }
  36. ::-webkit-input-placeholder {
  37. /* WebKit browsers */
  38. color: #a6a9b7;
  39. font-size: 18px;
  40. }
  41. ::-moz-placeholder {
  42. /* Mozilla Firefox 19+ */
  43. color: #a6a9b7;
  44. font-size: 18px;
  45. }
  46. :-ms-input-placeholder {
  47. /* Internet Explorer 10+ */
  48. color: #a6a9b7;
  49. font-size: 18px;
  50. }
  51. input:-webkit-autofill,
  52. textarea:-webkit-autofill,
  53. select:-webkit-autofill {
  54. background-color: #f0f1f5;
  55. background-image: none;
  56. transition: background-color 50000s ease-in-out 0s;
  57. /*背景色透明 生效时长 过渡效果 启用时延迟的时间*/
  58. }
  59. .login-form-item img {
  60. position: absolute;
  61. top: 50%;
  62. right: 26px;
  63. transform: translateY(-50%);
  64. width: 20px;
  65. }
  66. .login-form-item .login-password-left {
  67. left: 26px;
  68. }
  69. .login-btn {
  70. width: 80px;
  71. height: 80px;
  72. line-height: 80px;
  73. border-radius: 50%;
  74. background-color: #e5e7ef;
  75. text-align: center;
  76. margin: 20px auto;
  77. }
  78. .login-btn-active {
  79. background-image: linear-gradient(to right, #01c2fb, #3796fe);
  80. }
  81. .login-btn img {
  82. width: 26px;
  83. vertical-align: middle;
  84. }
  85. .login-error {
  86. color: #ee0a24;
  87. text-align: center;
  88. font-size: 18px;
  89. }
  90. .login-error i {
  91. font-size: 30px;
  92. vertical-align: middle;
  93. }
  94. .login-WeChat {
  95. background-color: #07c160;
  96. color: #fff;
  97. text-align: center;
  98. height: 60px;
  99. line-height: 60px;
  100. border-radius: 40px;
  101. font-size: 18px;
  102. margin-top: 55px;
  103. }
  104. .login-WeChat i {
  105. vertical-align: middle;
  106. font-size: 30px;
  107. }
  108. #wxLoginLoading {
  109. width: 100%;
  110. min-height: 300px;
  111. text-align: center;
  112. margin-top: 20%;
  113. }
  114. #wxLoginLoading .icon-bindingWechat {
  115. font-size: 100px;
  116. color: #fff;
  117. padding: 12px;
  118. background-color: #50d678;
  119. border-radius: 20px;
  120. box-shadow: 1px 1px 30px #50d678
  121. }
  122. </style>
  123. <title>登录 - ${curWebSiteObj.seoTitle}</title>
  124. </head>
  125. <body class="body" style="background-color: #fff;">
  126. <div id="space-content" v-cloak>
  127. <div class="content-wrap">
  128. <div v-show="isShowLogin">
  129. <div class="logo">
  130. <van-image width="100%" height="100" fit="contain" src="${curWebSiteObj.whiteLogoFile}"></van-image>
  131. </div>
  132. <div class="login-form">
  133. <div class="login-form-item login-user">
  134. <input id="uname" type="text" placeholder="输入账号" v-model="userVal" @input="userValInput">
  135. </div>
  136. <div class="login-form-item login-password">
  137. <img :src="eyeSrc" alt="" class="login-password-left" v-show="isShowIcon"
  138. @click="closeEyeClick">
  139. <input id="upwd" :type="inputType" placeholder="输入密码" v-model="passwordVal"
  140. @input="passwordInput">
  141. <img src="/apps/space/images/mobile/login/close.png" alt="" v-show="isShowIcon"
  142. @click="clearClick">
  143. </div>
  144. <div style="min-height:36px">
  145. <div class="login-error" v-if="isShowMsg">
  146. <i class="spaceicon icon-failed2"></i>
  147. <span>
  148. {{msg}}
  149. </span>
  150. </div>
  151. </div>
  152. <!-- 账号、密码都有就加上login-btn-active类名,否则不加 -->
  153. <div class="login-btn" :class="{'login-btn-active':userVal.length>0}" @click="login">
  154. <img src="/apps/space/images/mobile/login/arrowsRight.png" alt="">
  155. </div>
  156. <!-- 微信登录按钮 -->
  157. <div class="login-form-item login-WeChat" @click="wxLogin" v-if="isWxClientFlag">
  158. <i class="spaceicon icon-wechat1"></i>
  159. <span>微信登录</span>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <script>
  166. if (window.top != window.self) {
  167. top.location.href = "/console";
  168. }
  169. </script>
  170. <script>
  171. space.vue = new Vue({
  172. el: "#space-content",
  173. data: function () {
  174. return {
  175. userVal: "",
  176. passwordVal: "",
  177. isShowIcon: false,
  178. isShowLogin: false,
  179. eyeSrc: "/apps/space/images/mobile/login/closeEye.png",
  180. inputType: "password",
  181. isWxClientFlag: false,
  182. msg: '${appmsg}',
  183. isShowMsg: false,
  184. }
  185. },
  186. methods: {
  187. hiddenMsg: function () {
  188. if (this.isShowMsg) {
  189. this.isShowMsg = !this.isShowMsg;
  190. }
  191. },
  192. userValInput: function () {
  193. this.hiddenMsg();
  194. },
  195. passwordInput: function () {
  196. var len = this.passwordVal.length;
  197. if (len > 0) {
  198. this.isShowIcon = true;
  199. } else {
  200. this.isShowIcon = false;
  201. }
  202. this.hiddenMsg();
  203. },
  204. clearClick: function () {
  205. this.passwordVal = "";
  206. this.isShowIcon = false;
  207. this.hiddenMsg();
  208. },
  209. closeEyeClick: function () {
  210. if (this.inputType == "password") {
  211. this.eyeSrc = "/apps/space/images/mobile/login/openEye.png";
  212. this.inputType = "text";
  213. } else {
  214. this.eyeSrc = "/apps/space/images/mobile/login/closeEye.png";
  215. this.inputType = "password";
  216. }
  217. },
  218. isWxClient: function () {
  219. var ua = window.navigator.userAgent.toLowerCase();
  220. if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  221. return true;
  222. } else {
  223. return false;
  224. }
  225. },
  226. login: function () {
  227. var _this = this;
  228. if (space.utils.isNull(_this.userVal)) {
  229. $("#uname").focus();
  230. return;
  231. }
  232. if (space.utils.isNull(_this.passwordVal)) {
  233. $("#upwd").focus();
  234. return;
  235. }
  236. space.utils.ajax({
  237. type: "post",
  238. url: '@service{ name:`sys.login` }@',
  239. dataType: 'json',
  240. data: {
  241. uname: _this.userVal,
  242. upwd: _this.passwordVal
  243. },
  244. callback: function (data) {
  245. if (data.code == 'success') {
  246. if (data.data.resultCode == 1000) {
  247. _this.msg = data.data.msg;
  248. _this.isShowMsg = true;
  249. } else if (data.data.resultCode == 1010) {
  250. top.location.href = "/apps/workbench/";
  251. }
  252. }
  253. }
  254. });
  255. },
  256. wxLogin: function () {
  257. location.href = "/apps/wxlogin/?sid=${sid}";
  258. }
  259. },
  260. mounted: function () {
  261. this.isShowMsg = space.utils.notNull(this.msg);
  262. this.isWxClientFlag = this.isWxClient();
  263. if (!this.isWxClientFlag) {
  264. this.isShowLogin = true;
  265. }
  266. var sid = '${sid}';
  267. if (space.utils.notNull(sid)) {
  268. this.wxLogin();
  269. return;
  270. }
  271. // 特殊处理,由于需要进行支付,所以默认要进行授权
  272. var appCode = "${appcode}";
  273. if (space.utils.isNull(appCode)) {
  274. appCode = "null";
  275. }
  276. if (this.isWxClientFlag) {
  277. if (appCode == "null") {
  278. location.href = '/apps/wxauth/';
  279. } else if (appCode == "ok") {
  280. this.isShowLogin = true;
  281. } else if (appCode == 'appFail') {
  282. this.isShowLogin = true;
  283. } else if (appCode == "fail") {
  284. space.message.warning("${appmsg}");
  285. }
  286. }
  287. }
  288. })
  289. </script>
  290. </body>
  291. </html>