addUser.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="add-user-view">
  3. <navBar :name="'添加成员'" left="0"/>
  4. <view class="flex-row email-input-view">
  5. <input class="email-input-style" type="email" v-model="email" placeholder="请输入被邀人邮箱号" placeholder-style="font-size: 32rpx; font-weight: 400; color: #BAC1D0;">
  6. <img 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)}">下一步</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('该用户不存在!')
  43. }
  44. }else{
  45. msg(data.msg)
  46. }
  47. }
  48. }
  49. };
  50. </script>
  51. <style>
  52. .add-user-view{
  53. background-color: #FFF;
  54. height: 100vh;
  55. padding: 32rpx;
  56. /* margin-top: 32rpx; */
  57. }
  58. .email-input-style{
  59. width: 100%;
  60. padding: 20rpx 60rpx 20rpx 20rpx;
  61. margin-bottom: 20px;
  62. border-radius: 24rpx;
  63. border: 4rpx solid #060809;
  64. font-weight: 400;
  65. font-size: 32rpx;
  66. color: #333;
  67. caret-color: #0A59F7;
  68. }
  69. .email-input-view{
  70. position: relative;
  71. }
  72. .next-btn{
  73. height: 88rpx;
  74. line-height: 88rpx;
  75. font-weight: 600;
  76. font-size: 32rpx;
  77. color: #FFFFFF;
  78. text-align: center;
  79. background: #060809;
  80. border-radius: 44rpx;
  81. }
  82. .next-btn-i{
  83. opacity: 0.2;
  84. }
  85. .clear-btn{
  86. position: absolute;
  87. width: 40rpx;
  88. height: 40rpx;
  89. right: 36rpx;
  90. top: 28rpx;
  91. }
  92. </style>