index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <div class="wechat-view">
  3. <div class="header-view">
  4. <div class="hearder-kuang">
  5. <div class="header-img">
  6. <img src="/images/mobile/@2x/wechat/header-img.png"/>
  7. </div>
  8. </div>
  9. <div class="header-name">
  10. 这是一个名字
  11. </div>
  12. <img src="/images/mobile/@2x/wechat/headerbg.png" class="headerbg"/>
  13. </div>
  14. <div class="middle-view">
  15. <ul>
  16. <li class="telphone">
  17. <input placeholder="请输入手机号" type="tel" maxlength="11" @blur="telphoneBlur" v-model="telphoneNum"/>
  18. </li>
  19. <li class="info">
  20. <div v-show="telerror">
  21. 请输入正确的手机号码
  22. </div>
  23. </li>
  24. <li class="password">
  25. <input placeholder="请输入密码" type="password" v-model="passwordNum"/>
  26. </li>
  27. </ul>
  28. <div class="loginBtn" @click="login">确定绑定已有账号登录</div>
  29. <div class="register">还没有优软账号,直接<span @click="resgiter">创建新账号</span></div>
  30. <nuxt-link :to="'/'" class="mobile_footer company" tag="div">
  31. <div class="hr"></div>
  32. <img src="/images/mobile/@2x/wechat/logo.png" alt="">
  33. <div class="hr right"></div>
  34. <!--<p>此页面由深圳市优软商城科技有限公司提供</p>-->
  35. <!--<nuxt-link :to="'/'">www.usoftmall.com</nuxt-link>-->
  36. <!-- <a href="https://www.usoftmall.com">www.usoftmall.com</a> -->
  37. </nuxt-link>
  38. </div>
  39. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  40. </div>
  41. </template>
  42. <script>
  43. import { RemindBox } from '~components/mobile/common'
  44. export default {
  45. name: 'wechatView',
  46. layout: 'mobileNoHeader',
  47. middleware: 'authenticated',
  48. data() {
  49. return {
  50. collectResult: '',
  51. timeoutCount: 0,
  52. telerror: false,
  53. telphoneNum: '',
  54. passwordNum: ''
  55. }
  56. },
  57. methods: {
  58. telphoneBlur() {
  59. this.telerror = false
  60. if (!/^1[3|5|7|8]\d{9}$/.test(this.telphoneNum)) {
  61. this.telerror = true
  62. }
  63. },
  64. login() {
  65. if (this.telerror === true) {
  66. return false
  67. }
  68. this.$http.post('', {}).then(res => {
  69. })
  70. },
  71. resgiter() {
  72. this.$http.get('/register/page').then(response => {
  73. if (response.data) {
  74. window.location.href = response.data.content
  75. }
  76. })
  77. }
  78. },
  79. components: {
  80. RemindBox
  81. }
  82. }
  83. </script>
  84. <style scoped lang="scss">
  85. .wechat-view {
  86. position: fixed;
  87. z-index: 999;
  88. width: 100%;
  89. left: 0;
  90. right: 0;
  91. top: 0;
  92. bottom: 0;
  93. background: #fff;
  94. .header-view {
  95. background: #376ef3;
  96. height: 4.26rem;
  97. width: 100%;
  98. position: relative;
  99. padding-top: 0.56rem;
  100. .hearder-kuang {
  101. background: rgba(0, 0, 0, 0.18);
  102. width: 1.86rem;
  103. height: 1.86rem;
  104. border-radius: 50%;
  105. margin: 0 auto;
  106. overflow: hidden;
  107. position: relative;
  108. .header-img {
  109. background: #fff;
  110. width: 1.6rem;
  111. height: 1.6rem;
  112. border-radius: 50%;
  113. overflow: hidden;
  114. text-align: center;
  115. position: absolute;
  116. left: 50%;
  117. top: 50%;
  118. transform: translate3d(-50%, -50%, 0);
  119. img {
  120. width: 1.6rem;
  121. height: 1.6rem;
  122. border-radius: 50%;
  123. vertical-align: center;
  124. }
  125. }
  126. }
  127. .header-name {
  128. font-size: 0.3rem;
  129. color: #fff;
  130. text-align: center;
  131. margin-top: 0.24rem;
  132. }
  133. .headerbg {
  134. position: absolute;
  135. width: 100%;
  136. height: 0.88rem;
  137. bottom: 0px;
  138. left: 0px;
  139. }
  140. }
  141. .middle-view {
  142. padding: 0 0.71rem;
  143. margin-top: 0.56rem;
  144. ul li {
  145. padding-bottom: 0.1rem;
  146. min-height: 0.4rem;
  147. &.info {
  148. color: #3872f4;
  149. font-size: 0.24rem;
  150. margin-left: 0.64rem;
  151. margin-top: 0.2rem;
  152. margin-bottom: 0.2rem;
  153. }
  154. input {
  155. margin-left: 0.34rem;
  156. color: #aaa;
  157. font-size: 0.3rem;
  158. height: 0.5rem;
  159. line-height: 0.5rem;
  160. border: 0;
  161. display: inline-block;
  162. vertical-align: top;
  163. }
  164. &.telphone {
  165. border-bottom: 1px solid #eee;
  166. &::before {
  167. background: url('/images/mobile/@2x/wechat/tel_icon.png');
  168. content: ' ';
  169. width: 0.28rem;
  170. height: 0.5rem;
  171. display: inline-block;
  172. background-size: 100% 100%;
  173. vertical-align: top;
  174. }
  175. input {
  176. margin-left: 0.4rem;
  177. }
  178. }
  179. &.password {
  180. border-bottom: 1px solid #eee;
  181. &::before {
  182. background: url('/images/mobile/@2x/wechat/pass_icon.png');
  183. content: ' ';
  184. width: 0.34rem;
  185. height: 0.42rem;
  186. display: inline-block;
  187. background-size: 100% 100%;
  188. vertical-align: top;
  189. }
  190. }
  191. }
  192. .loginBtn {
  193. width: 5.8rem;
  194. height: 0.9rem;
  195. line-height: 0.9rem;
  196. text-align: center;
  197. font-size: 0.3rem;
  198. color: #fff;
  199. background: #376ef3;
  200. border-radius: 5px;
  201. margin: 1.29rem auto 0;
  202. }
  203. .register {
  204. width: 5.8rem;
  205. text-align: left;
  206. font-size: 0.24rem;
  207. color: #999;
  208. margin: 0.25rem auto 0;
  209. span {
  210. color: #0076ff;
  211. font-size: 0.24rem;
  212. text-align: center;
  213. border: 1px solid #0076ff;
  214. border-radius: 5px;
  215. height:0.44rem;
  216. width: 1.48rem;
  217. margin-left: 0.2rem;
  218. }
  219. }
  220. .company {
  221. margin-top: 1.51rem;
  222. position: relative;
  223. text-align: center;
  224. img {
  225. width: 1.78rem;
  226. height: 0.39rem;
  227. margin-top: 0.24rem;
  228. }
  229. p {
  230. font-size: 0.21rem;
  231. color: #aaa;
  232. margin: 0.13rem 0 0 0;
  233. }
  234. a {
  235. margin-top: 0.12rem;
  236. font-size: 0.18rem;
  237. color: #bbb;
  238. }
  239. .hr {
  240. width: 1.62rem;
  241. height: 0.02rem;
  242. background: #e3e3e3;
  243. position: absolute;
  244. left: 0.3rem;
  245. top: 0.45rem;
  246. &.right {
  247. right: 0.3rem;
  248. left: auto;
  249. }
  250. }
  251. }
  252. }
  253. }
  254. </style>