裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
4.3 KiB

  1. <template>
  2. <view class="page">
  3. <navbar title="个人分享" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="content">
  5. <uv-form
  6. ref="form"
  7. :model="form"
  8. :rules="rules"
  9. labelPosition="left"
  10. labelWidth="300rpx"
  11. :labelStyle="{
  12. color: '#1B1B1B',
  13. fontSize: '32rpx',
  14. fontWeight: 'bold',
  15. }"
  16. >
  17. <view class="form-item">
  18. <uv-form-item label="用户ID" prop="id">
  19. <view class="form-item-content">
  20. <template v-if="form.id">
  21. <text>{{ form.id }}</text>
  22. <view style="margin-left: 20rpx;">
  23. <button class="btn-simple" plain @click="$utils.copyText(form.id)">
  24. <uv-icon name="file-text" color="#05D9A2" size="28rpx"></uv-icon>
  25. </button>
  26. </view>
  27. </template>
  28. </view>
  29. </uv-form-item>
  30. </view>
  31. <view class="form-item">
  32. <uv-form-item label="选择封面图" prop="imageUrl">
  33. <view class="form-item-content">
  34. <formUpload v-model="form.imageUrl">
  35. <template v-slot="{ value }">
  36. <view class="flex" style="min-width: 116rpx; height: 45rpx;">
  37. <image
  38. :src="value"
  39. mode="aspectFill"
  40. style="width: 68rpx; height: 68rpx;"
  41. radius="14rpx"
  42. />
  43. <uv-icon style="margin-left: 20rpx" name="arrow-right" color="#000000" size="28rpx"></uv-icon>
  44. </view>
  45. </template>
  46. </formUpload>
  47. </view>
  48. </uv-form-item>
  49. </view>
  50. <view class="form-item">
  51. <uv-form-item label="设置转发次数(次)" prop="times">
  52. <view class="form-item-content">
  53. <formNumberBox v-model="form.times" ></formNumberBox>
  54. </view>
  55. </uv-form-item>
  56. </view>
  57. <view class="form-item">
  58. <uv-form-item label="选择二维码" prop="qrCode">
  59. <view class="form-item-content">
  60. <formUpload v-model="form.qrCode">
  61. <template v-slot="{ value }">
  62. <view class="flex" style="min-width: 93rpx; height: 45rpx;">
  63. <image
  64. :src="value"
  65. mode="aspectFill"
  66. style="width: 45rpx; height: 45rpx;"
  67. radius="14rpx"
  68. />
  69. <uv-icon style="margin-left: 20rpx" name="arrow-right" color="#000000" size="28rpx"></uv-icon>
  70. </view>
  71. </template>
  72. </formUpload>
  73. </view>
  74. </uv-form-item>
  75. </view>
  76. <view class="form-item">
  77. <uv-form-item label="文案描述" prop="description" labelPosition="top">
  78. <view style="margin-top: 32rpx;">
  79. <formTextarea
  80. v-model="form.description"
  81. placeholder="请输入你的文案"
  82. ></formTextarea>
  83. </view>
  84. </uv-form-item>
  85. </view>
  86. </uv-form>
  87. </view>
  88. <button class="button-submit" @click="onSubmit">
  89. 提交审核
  90. </button>
  91. </view>
  92. </template>
  93. <script>
  94. import formNumberBox from '../components/formNumberBox.vue'
  95. import formUpload from '../components/formUpload.vue'
  96. import formTextarea from '../components/formTextarea.vue'
  97. export default {
  98. components: {
  99. formNumberBox,
  100. formUpload,
  101. formTextarea,
  102. },
  103. data() {
  104. return {
  105. form: {
  106. id: null,
  107. imageUrl: null,
  108. times: 10,
  109. qrCode: null,
  110. description: null,
  111. },
  112. rules: {
  113. // todo
  114. },
  115. }
  116. },
  117. methods: {
  118. onSubmit() {
  119. // todo
  120. const params = { ...this.form }
  121. this.$api('submitPersonalSharing', params)
  122. },
  123. }
  124. }
  125. </script>
  126. <style scoped lang="scss">
  127. @import '../styles/pageForm.scss';
  128. .btn-simple {
  129. width: auto;
  130. height: auto;
  131. border: none;
  132. box-shadow: none;
  133. padding: 0;
  134. }
  135. .button-submit {
  136. margin: 0;
  137. position: fixed;
  138. bottom: 138rpx;
  139. left: 20rpx;
  140. width: calc(100% - 40rpx);
  141. height: 90rpx;
  142. }
  143. </style>