开放平台
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

180 linhas
4.0 KiB

  1. <template>
  2. <div class="setApp">
  3. <div class="setApp-box">
  4. <span>您最多可以创建10个应用,如需创建更多应用,请</span
  5. ><span style="color: #1890ff; cursor: pointer">联系客服</span>
  6. </div>
  7. <div class="setApp-body">
  8. <div class="body-title">创建应用</div>
  9. <el-form
  10. class="setApp-content"
  11. :model="ruleForm"
  12. :rules="rules"
  13. ref="ruleForm"
  14. >
  15. <el-form-item label="应用名称" prop="name">
  16. <el-input
  17. v-model="ruleForm.name"
  18. placeholder="请输入应用的名称"
  19. ></el-input>
  20. <div class="content-color">
  21. 您的站点,APP等名称,也可自定义,供您进行用途识别
  22. </div>
  23. </el-form-item>
  24. <el-form-item label="应用类型" prop="name">
  25. <div class="formItem">
  26. <el-checkbox
  27. v-for="(item, index) in appType"
  28. :key="index"
  29. v-model="item.state"
  30. >{{ item.name }}</el-checkbox
  31. >
  32. </div>
  33. </el-form-item>
  34. <el-form-item label="应用描述">
  35. <el-input
  36. class="textarea"
  37. type="textarea"
  38. placeholder="请输入应用的名称"
  39. v-model="ruleForm.textarea"
  40. show-word-limit
  41. >
  42. </el-input>
  43. </el-form-item>
  44. <el-form-item label="网站URL">
  45. <el-input
  46. type="text"
  47. placeholder="请输入网站URL"
  48. v-model="ruleForm.textarea"
  49. show-word-limit
  50. >
  51. </el-input>
  52. <div class="content-color">
  53. 您的应用访问地址或者下载地址,请以http(s)开头
  54. </div>
  55. </el-form-item>
  56. <el-form-item label="应用图标">
  57. <el-upload
  58. class="upload-demo"
  59. drag
  60. action="https://jsonplaceholder.typicode.com/posts/"
  61. multiple
  62. >
  63. <i class="el-icon-upload"></i>
  64. <div class="el-upload__text">上传文件</div>
  65. </el-upload>
  66. </el-form-item>
  67. <div style="margin-top:40px">
  68. <el-button style="width: 100%" type="primary">立即创建</el-button>
  69. </div>
  70. </el-form>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. export default {
  76. data() {
  77. return {
  78. appType: [
  79. {
  80. name: "电脑版网站",
  81. id: 1,
  82. state: false,
  83. },
  84. {
  85. name: "H5移动网站",
  86. id: 2,
  87. state: false,
  88. },
  89. {
  90. name: "iOS客户端",
  91. id: 3,
  92. state: false,
  93. },
  94. {
  95. name: "Android客户端",
  96. id: 4,
  97. state: false,
  98. },
  99. {
  100. name: "微信小程序",
  101. id: 5,
  102. state: false,
  103. },
  104. {
  105. name: "其他",
  106. id: 6,
  107. state: false,
  108. },
  109. ],
  110. ruleForm: {
  111. name: "",
  112. textarea: "",
  113. },
  114. rules: {
  115. name: [
  116. { required: true, message: "请输入活动名称", trigger: "blur" },
  117. { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
  118. ],
  119. },
  120. };
  121. },
  122. };
  123. </script>
  124. <style lang="scss" scoped>
  125. .setApp-box {
  126. width: 1200px;
  127. height: 56px;
  128. background: #fffcec;
  129. border-radius: 14px;
  130. border: 1px solid #feeebb;
  131. text-align: center;
  132. line-height: 56px;
  133. color: #6a3904;
  134. font-size: 14px;
  135. margin-bottom: 20px;
  136. }
  137. .setApp-body {
  138. width: 1200px;
  139. min-height: 806px;
  140. background: #ffffff;
  141. border-radius: 14px;
  142. padding: 20px;
  143. box-sizing: border-box;
  144. .body-title {
  145. color: #333333;
  146. font-size: 20px;
  147. padding-left: 12px;
  148. height: 20px;
  149. line-height: 20px;
  150. border-left: #1890ff 4px solid;
  151. }
  152. }
  153. .setApp-content {
  154. width: 435px;
  155. margin: 0 auto;
  156. .content-color {
  157. color: #999999;
  158. font-size: 12px;
  159. line-height: 26px;
  160. }
  161. .formItem {
  162. clear: both;
  163. }
  164. .textarea {
  165. height: 150px;
  166. }
  167. }
  168. </style>