addUser.vue 2.1 KB

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