copy_tips.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="page">
  3. <view class="page-header">
  4. <image :src="photo" :lazy-load="true""></image>
  5. <text class="page-header-title">{{info.name}}</text>
  6. <text>{{info.num}}人</text>
  7. </view>
  8. <view class="page-content">
  9. <view>温馨提示</view>
  10. <view>1.一键复杂新群后,将生成一个新成员相同的群</view>
  11. <view>2.新群的群成员详情设置,群管理等将保留老群设置</view>
  12. <view>3.老群中的优哈通讯机器人无法一键复制到新群</view>
  13. </view>
  14. <view class="page-footer">
  15. <view class="page-footer-info" @tap="change">
  16. <checkbox :checked="info.checked"></checkbox>
  17. <text>解散原本的群</text>
  18. </view>
  19. <view>
  20. <button class="sub-but" style="background-color: #496cb1" @tap="copyQun">确定复制</button>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import _get from '../../common/_get';
  27. import _hook from '../../common/_hook';
  28. import _data from '../../common/_data';
  29. export default {
  30. data() {
  31. return {
  32. info: {
  33. photo: 'https://im.smiaoshen.com/static/photo//group_photo/8E5BCBD1B1AF0322DAB197A54FF9EA6E/90.jpg?_=0.6412025411589806',
  34. num: 1,
  35. name: '',
  36. checked: '1'
  37. },
  38. list_id: '',
  39. main_id: 0
  40. }
  41. },
  42. onShow() {
  43. let _this = this;
  44. _hook.routeSonHook();
  45. _get.getGroupDetail({list_id:this.list_id,jiesan:this.info.checked,main_id:this.main_id},function (res) {
  46. _this.info.num = res.num;
  47. _this.info.name = res.group.name;
  48. _this.info.photo = res.group.photo_path;
  49. });
  50. },
  51. onLoad(options) {
  52. if ('list_id' in options) {
  53. this.list_id = options.list_id
  54. }
  55. if ('main_id' in options) {
  56. this.main_id = options.main_id
  57. }
  58. },
  59. computed:{
  60. photo(){
  61. return this.staticPhoto + this.info.photo + '?_=' + Math.random();
  62. },
  63. staticPhoto(){
  64. return _data.staticPhoto();
  65. },
  66. },
  67. methods: {
  68. change() {
  69. if (this.info.checked) {
  70. this.info.checked = '0';
  71. } else {
  72. this.info.checked = '1';
  73. }
  74. },
  75. copyQun(){
  76. _get.copyNewQun({list_id:this.list_id,jiesan:this.info.checked,main_id:this.main_id},function () {
  77. })
  78. }
  79. }
  80. }
  81. </script>
  82. <style>
  83. .sub-but {
  84. background-color: #496cb1;
  85. color: #ffffff;
  86. width: 200px;
  87. }
  88. page {
  89. background-color: #ffffff;
  90. }
  91. .page {
  92. display: flex;
  93. justify-content: center;
  94. flex-direction: column;
  95. align-items: center;
  96. padding: 20px;
  97. height: 100%;
  98. }
  99. .page-header {
  100. display: flex;
  101. justify-content: center;
  102. align-items: center;
  103. flex-direction: column;
  104. }
  105. .page-header image {
  106. width: 130rpx;
  107. height: 130rpx;
  108. }
  109. .page-header-title {
  110. padding: 25rpx;
  111. }
  112. .page-content {
  113. padding-top: 40px;
  114. }
  115. .page-content view {
  116. padding: 5px;
  117. }
  118. .page-footer-info {
  119. padding: 40px;
  120. }
  121. .page-footer {
  122. display: flex;
  123. justify-content: center;
  124. align-items: center;
  125. flex-direction: column;
  126. }
  127. </style>