addUser.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="add-user-view">
  3. <view class="flex-row email-input-view">
  4. <input class="email-input-style" type="email" v-model="email" placeholder="请输入被邀人邮箱号" placeholder-style="font-size: 32rpx; font-weight: 400; color: #BAC1D0;">
  5. <img class="clear-btn" src="https://qiniu.bms16.com/Fjpf2YnHUK1_CFf20kKRvjX9YdC3" alt="">
  6. </view>
  7. <view @click="nextFn" class="next-btn" :class="{'next-btn-i':!isEmailFn(email)}">下一步</view>
  8. </view>
  9. </template>
  10. <script>
  11. var config = require('../../common/config_gyq.js');
  12. var http = require('../../common/request.js');
  13. import { isEmail } from '../../utils/util.js';
  14. import { msg } from '../../utils/util.js';
  15. export default {
  16. data() {
  17. return {
  18. email:""
  19. };
  20. }
  21. /**
  22. * 生命周期函数--监听页面加载
  23. */
  24. ,
  25. onLoad: function(options) {
  26. },
  27. methods: {
  28. isEmailFn(str){
  29. return isEmail(str)
  30. },
  31. async nextFn(){
  32. let {data} = await http.postApi(config.API_ACCOUNT_CHECK_SHARE_ACCOUNT_EXIST,{
  33. email:this.email
  34. })
  35. if(data.code == 200){
  36. if(data.data.exist){
  37. uni.navigateTo({
  38. url:`/pages/powerSetting/powerSetting?email=${this.email}&headimg=${data.data.headimg}&nickname=${data.data.nickname}&isSet=1`
  39. })
  40. }else{
  41. msg('该用户不存在!')
  42. }
  43. }else{
  44. msg(data.msg)
  45. }
  46. }
  47. }
  48. };
  49. </script>
  50. <style>
  51. .add-user-view{
  52. background-color: #FFF;
  53. height: 100vh;
  54. padding: 32rpx;
  55. }
  56. .email-input-style{
  57. width: 100%;
  58. padding: 20rpx 60rpx 20rpx 20rpx;
  59. margin-bottom: 20px;
  60. border-radius: 24rpx;
  61. border: 4rpx solid #060809;
  62. font-weight: 400;
  63. font-size: 32rpx;
  64. color: #333;
  65. caret-color: #0A59F7;
  66. }
  67. .email-input-view{
  68. position: relative;
  69. }
  70. .next-btn{
  71. height: 88rpx;
  72. line-height: 88rpx;
  73. font-weight: 600;
  74. font-size: 32rpx;
  75. color: #FFFFFF;
  76. text-align: center;
  77. background: #060809;
  78. border-radius: 44rpx;
  79. }
  80. .next-btn-i{
  81. opacity: 0.2;
  82. }
  83. .clear-btn{
  84. position: absolute;
  85. width: 40rpx;
  86. height: 40rpx;
  87. right: 36rpx;
  88. top: 28rpx;
  89. }
  90. </style>