wxLogin.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <template>
  2. <view>
  3. <view v-show="auth">
  4. <resume-auth @authSubmit="loginBack"></resume-auth>
  5. </view>
  6. <view class="wrap" v-show="!auth">
  7. <my-common :login="false" ref="common"></my-common>
  8. <view class="wxLogin-logo">
  9. <u-image width="150" height="150" src="/static/img/logo.png"></u-image>
  10. <p>荆开就业在线</p>
  11. </view>
  12. <view class="wxLogin-btn" v-show="tab==0">
  13. <u-button type="success" shape="circle" @click="login">微信登录</u-button>
  14. </view>
  15. <view class="content" v-show="tab==1">
  16. <input class="u-border-bottom login-input" type="number" v-model="tel" placeholder="请输入手机号" />
  17. <button @click="login2" :style="[inputStyle]" class="getCaptcha">获取短信验证码</button>
  18. <view class="tips">未注册的手机号验证后自动创建账号</view>
  19. </view>
  20. <view class="content" v-show="tab==2">
  21. <view class="login-input">
  22. <input type="text" v-model="tel" placeholder="请输入账号\手机号" />
  23. </view>
  24. <view class="login-input">
  25. <input type="password" v-model="password" placeholder="请输入密码" />
  26. </view>
  27. <button @click="login3" :style="[inputStyle]" class="getCaptcha">登录</button>
  28. </view>
  29. <view class="key-input" v-show="tab==4">
  30. <view class="title">输入验证码</view>
  31. <view class="tips">验证码已发送至 +{{showphone(tel)}}</view>
  32. <u-message-input :focus="true" :value="value" @finish="finish" mode="bottomLine" :maxlength="maxlength"></u-message-input>
  33. <view class="captcha">
  34. <text :class="{ noCaptcha: show }" @tap="noCaptcha">收不到验证码点这里</text>
  35. <text :class="{ regain: !show }">{{ sendMsgSecond }}秒后重新获取验证码</text>
  36. <text :class="{ error: error }">验证码错误,请重新输入</text>
  37. <u-button shape="circle" size="medium" @click="tab=0">返回</u-button>
  38. </view>
  39. </view>
  40. <view class="wxLogin-foot" v-show="tab!=4">
  41. <view class="wxLogin-foot-btn">
  42. <u-button shape="circle" v-show="tab!=0" @click="tab=0">微信登录</u-button>
  43. <u-button shape="circle" v-show="tab!=1&&form=='job'" @click="tab=1">手机登录</u-button>
  44. <u-button shape="circle" v-show="tab!=2" @click="tab=2">密码登录</u-button>
  45. </view>
  46. <view class="wxLogin-foot-text">
  47. <u-checkbox-group>
  48. <u-checkbox v-model="readme"><view class="u-flex"><p>我已阅读并同意</p><span>《用户协议》《隐私政策》</span></view></u-checkbox>
  49. </u-checkbox-group>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import api from '@/pages/login/index.js'
  57. export default api;
  58. </script>
  59. <style scoped lang="scss">
  60. .wxLogin-logo{
  61. margin: 200rpx auto 0;
  62. display: flex;
  63. flex-direction: column;
  64. align-items: center;
  65. p{
  66. font-size: 40rpx;
  67. margin-top: 20rpx;
  68. }
  69. }
  70. .wxLogin-btn{
  71. margin: 100rpx 40rpx;
  72. }
  73. .wxLogin-foot{
  74. position: fixed;
  75. left: 0;
  76. right: 0;
  77. bottom: 0;
  78. .wxLogin-foot-btn{
  79. display: flex;
  80. justify-content: space-between;
  81. padding: 0 40rpx;
  82. *{
  83. margin: 0;
  84. width:280rpx;
  85. }
  86. }
  87. .wxLogin-foot-text{
  88. margin-top: 40rpx;
  89. padding: 20rpx 40rpx;
  90. span{
  91. color:#2295FF;
  92. }
  93. }
  94. }
  95. </style>
  96. <style lang="scss" scoped>
  97. .wxLogin-logo{
  98. margin: 100rpx auto 100rpx;
  99. display: flex;
  100. flex-direction: column;
  101. align-items: center;
  102. p{
  103. font-size: 40rpx;
  104. margin-top: 20rpx;
  105. }
  106. }
  107. .login-input{
  108. margin: 40rpx 0;
  109. border-bottom: 1px solid #F7F7F7;
  110. }
  111. .wrap {
  112. font-size: 28rpx;
  113. .content {
  114. width: 600rpx;
  115. margin: 80rpx auto 0;
  116. .title {
  117. text-align: left;
  118. font-size: 60rpx;
  119. font-weight: 500;
  120. margin-bottom: 100rpx;
  121. }
  122. input {
  123. text-align: left;
  124. margin-bottom: 10rpx;
  125. padding-bottom: 6rpx;
  126. }
  127. .tips {
  128. color: $u-type-info;
  129. margin-bottom: 60rpx;
  130. margin-top: 8rpx;
  131. text-align: center;
  132. }
  133. .getCaptcha {
  134. background-color: rgb(231, 243, 254);
  135. color: $u-tips-color;
  136. border: none;
  137. font-size: 30rpx;
  138. padding: 12rpx 0;
  139. margin: 30rpx 0;
  140. &::after {
  141. border: none;
  142. }
  143. }
  144. .alternative {
  145. color: $u-tips-color;
  146. display: flex;
  147. justify-content: space-between;
  148. margin-top: 30rpx;
  149. }
  150. }
  151. .buttom {
  152. .loginType {
  153. display: flex;
  154. padding: 350rpx 150rpx 150rpx 150rpx;
  155. justify-content:space-between;
  156. .item {
  157. display: flex;
  158. flex-direction: column;
  159. align-items: center;
  160. color: $u-content-color;
  161. font-size: 28rpx;
  162. }
  163. }
  164. .hint {
  165. padding: 20rpx 40rpx;
  166. font-size: 20rpx;
  167. color: $u-tips-color;
  168. .link {
  169. color: $u-type-warning;
  170. }
  171. }
  172. }
  173. }
  174. .wxLogin-foot{
  175. position: fixed;
  176. left: 0;
  177. right: 0;
  178. bottom: 0;
  179. .wxLogin-foot-btn{
  180. display: flex;
  181. justify-content: space-between;
  182. padding: 0 40rpx;
  183. *{
  184. margin: 0;
  185. width:280rpx;
  186. }
  187. }
  188. .wxLogin-foot-text{
  189. margin-top: 40rpx;
  190. padding: 20rpx 40rpx;
  191. span{
  192. color:#2295FF;
  193. }
  194. }
  195. }
  196. </style>
  197. <style lang="scss" scoped>
  198. .wxLogin-logo{
  199. margin: 100rpx auto 100rpx;
  200. display: flex;
  201. flex-direction: column;
  202. align-items: center;
  203. p{
  204. font-size: 40rpx;
  205. margin-top: 20rpx;
  206. }
  207. }
  208. .login-input{
  209. margin: 40rpx 0;
  210. border-bottom: 1px solid #F7F7F7;
  211. }
  212. .wrap {
  213. font-size: 28rpx;
  214. .content {
  215. width: 600rpx;
  216. margin: 80rpx auto 0;
  217. .title {
  218. text-align: left;
  219. font-size: 60rpx;
  220. font-weight: 500;
  221. margin-bottom: 100rpx;
  222. }
  223. input {
  224. text-align: left;
  225. margin-bottom: 10rpx;
  226. padding-bottom: 6rpx;
  227. }
  228. .tips {
  229. color: $u-type-info;
  230. margin-bottom: 60rpx;
  231. margin-top: 8rpx;
  232. text-align: center;
  233. }
  234. .getCaptcha {
  235. background-color: rgb(231, 243, 254);
  236. color: $u-tips-color;
  237. border: none;
  238. font-size: 30rpx;
  239. padding: 12rpx 0;
  240. margin: 30rpx 0;
  241. &::after {
  242. border: none;
  243. }
  244. }
  245. .alternative {
  246. color: $u-tips-color;
  247. display: flex;
  248. justify-content: space-between;
  249. margin-top: 30rpx;
  250. }
  251. }
  252. .buttom {
  253. .loginType {
  254. display: flex;
  255. padding: 350rpx 150rpx 150rpx 150rpx;
  256. justify-content:space-between;
  257. .item {
  258. display: flex;
  259. flex-direction: column;
  260. align-items: center;
  261. color: $u-content-color;
  262. font-size: 28rpx;
  263. }
  264. }
  265. .hint {
  266. padding: 20rpx 40rpx;
  267. font-size: 20rpx;
  268. color: $u-tips-color;
  269. .link {
  270. color: $u-type-warning;
  271. }
  272. }
  273. }
  274. }
  275. .wxLogin-foot{
  276. position: fixed;
  277. left: 0;
  278. right: 0;
  279. bottom: 0;
  280. .wxLogin-foot-btn{
  281. display: flex;
  282. justify-content: space-between;
  283. padding: 0 40rpx;
  284. *{
  285. margin: 0;
  286. width:280rpx;
  287. }
  288. }
  289. .wxLogin-foot-text{
  290. margin-top: 40rpx;
  291. padding: 20rpx 40rpx;
  292. span{
  293. color:#2295FF;
  294. }
  295. }
  296. }
  297. </style>
  298. <style lang="scss" scoped>
  299. .wxLogin-logo{
  300. margin: 100rpx auto 100rpx;
  301. display: flex;
  302. flex-direction: column;
  303. align-items: center;
  304. p{
  305. font-size: 40rpx;
  306. margin-top: 20rpx;
  307. }
  308. }
  309. .wrap {
  310. padding: 80rpx;
  311. }
  312. .box {
  313. margin: 30rpx 0;
  314. font-size: 30rpx;
  315. color: 555;
  316. }
  317. .key-input {
  318. padding: 30rpx 0;
  319. text {
  320. display: none;
  321. }
  322. .error {
  323. display: block;
  324. color: red;
  325. font-size: 30rpx;
  326. margin: 20rpx 0;
  327. }
  328. }
  329. .title {
  330. font-size: 50rpx;
  331. color: #333;
  332. text-align: center;
  333. }
  334. .key-input .tips {
  335. font-size: 30rpx;
  336. color: #333;
  337. margin-top: 20rpx;
  338. margin-bottom: 60rpx;
  339. text-align: center;
  340. color:#999;
  341. }
  342. .captcha {
  343. color: $u-type-warning;
  344. font-size: 30rpx;
  345. margin-top: 40rpx;
  346. text-align: center;
  347. .noCaptcha {
  348. display: block;
  349. }
  350. .regain {
  351. display: block;
  352. }
  353. }
  354. </style>