ConsignmentInfo.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <el-dialog
  3. title="寄售说明"
  4. center
  5. append-to-body
  6. :visible.sync="isShow"
  7. :before-close="handleClose"
  8. @close="closeDialog"
  9. >
  10. <div class="content">
  11. <div class="title">寄售说明</div>
  12. <div class="name" v-for="(item, index) in list" :key="index">
  13. <span>{{ item.title }}</span>
  14. </div>
  15. <div class="border"></div>
  16. <div class="title">寄售价格</div>
  17. <div class="price">
  18. <el-form :model="form" ref="numberValidateForm" label-width="85px" class="demo-ruleForm">
  19. <el-form-item
  20. label="寄售价格(元)"
  21. prop="price"
  22. :rules="[{ required: true, message: '价格不能为空' }]"
  23. >
  24. <el-input
  25. placeholder="请设置寄售价格"
  26. style="width: 300px; margin-top: 20px"
  27. type="number"
  28. v-model="form.price"
  29. autocomplete="off"
  30. ></el-input>
  31. </el-form-item>
  32. <div class="border1"></div>
  33. <div class="title">请输入交易密码,验证信息</div>
  34. <el-form-item prop="password">
  35. <el-input
  36. style="width: 300px; margin: 20px 0 0 100px"
  37. type="number"
  38. v-model="form.password"
  39. placeholder="请输入纯数字交易密码"
  40. autocomplete="off"
  41. ></el-input>
  42. </el-form-item>
  43. </el-form>
  44. <div @click="all('/transaction')" class="password">
  45. <el-link> 忘记密码?</el-link>
  46. </div>
  47. </div>
  48. <div class="sub-btn">
  49. <div @click="Login" class="btn1">确定</div>
  50. <div class="btn2" @click="isShow = false">返回</div>
  51. </div>
  52. </div>
  53. </el-dialog>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. isShow: false,
  60. form: { price: '', password: '' },
  61. list: [
  62. {
  63. title: '1. 作品寄售为单个作品价格'
  64. },
  65. {
  66. title: '2. 用户将会看到加密作品的权益、加密空间的使用情况'
  67. },
  68. {
  69. title: '3. 交易成功后加密作品的点赞数量将会被清除'
  70. },
  71. {
  72. title: '4. 平台会收取作品出售价格的 5% 作为服务费'
  73. },
  74. {
  75. title: '5. 因电子支付通道限制,单笔限额20000元'
  76. }
  77. ]
  78. };
  79. },
  80. computed: {},
  81. methods: {
  82. handleClose() {
  83. this.isShow = false;
  84. },
  85. init() {
  86. this.$emit('getDetail');
  87. },
  88. Login() {
  89. if (this.form.price != '') {
  90. this.$http
  91. .post('/user/verifyTradeCode', {
  92. tradeCode: this.form.password
  93. })
  94. .then(() => {
  95. this.$http
  96. .post('/asset/consignment', {
  97. id: this.$route.query.id,
  98. price: this.form.price
  99. })
  100. .then(res => {
  101. this.$message.success('寄售成功');
  102. this.isShow = false;
  103. setTimeout(() => {
  104. this.init();
  105. }, 1000);
  106. })
  107. .catch(e => {
  108. if (e) {
  109. this.$message(e.error);
  110. }
  111. });
  112. })
  113. .catch(e => {
  114. if (e) {
  115. this.$message('失败点击忘记密码进行修改');
  116. }
  117. });
  118. } else {
  119. this.$message('请输入价格');
  120. }
  121. },
  122. closeDialog() {
  123. this.$emit('close1');
  124. }
  125. }
  126. };
  127. </script>
  128. <style>
  129. input[type='number'] {
  130. -moz-appearance: textfield;
  131. }
  132. input[type='number']::-webkit-inner-spin-button,
  133. input[type='number']::-webkit-outer-spin-button {
  134. -webkit-appearance: none;
  135. margin: 0;
  136. }
  137. input::-webkit-outer-spin-button,
  138. input::-webkit-inner-spin-button {
  139. -webkit-appearance: none !important;
  140. margin: 0;
  141. }
  142. </style>
  143. <style lang="less" scoped>
  144. /deep/ .el-dialog {
  145. width: 680px !important;
  146. height: 734px;
  147. background: #ffffff;
  148. border-radius: 8px;
  149. .el-dialog__title {
  150. font-size: 20px;
  151. font-weight: 500;
  152. color: #292c33;
  153. line-height: 28px;
  154. }
  155. }
  156. /deep/ .el-dialog__body {
  157. padding: 0;
  158. }
  159. /deep/ .el-form-item__label {
  160. width: 200px !important;
  161. margin-top: 20px;
  162. }
  163. /deep/ .el-form-item__error {
  164. left: 102px;
  165. }
  166. .content {
  167. .title {
  168. font-size: 16px;
  169. font-weight: 400;
  170. color: #000000;
  171. line-height: 24px;
  172. padding-left: 20px;
  173. }
  174. .name {
  175. padding-left: 20px;
  176. span {
  177. font-size: 14px;
  178. font-weight: 400;
  179. color: #939599;
  180. line-height: 22px;
  181. }
  182. }
  183. .password {
  184. font-size: 14px;
  185. text-align: right;
  186. font-weight: 400;
  187. color: #939599;
  188. line-height: 24px;
  189. margin-right: 20px;
  190. cursor: pointer;
  191. }
  192. .border1 {
  193. height: 1px;
  194. background: #f5f7fa;
  195. border-radius: 1px;
  196. margin: 30px 20px;
  197. }
  198. .sub-btn {
  199. padding-top: 62px;
  200. display: flex;
  201. justify-content: center;
  202. .btn1 {
  203. width: 130px;
  204. height: 36px;
  205. background: linear-gradient(135deg, @prim 0%, @warn 100%);
  206. border-radius: 4px;
  207. font-size: 13px;
  208. line-height: 36px;
  209. color: #1a1a1a;
  210. cursor: pointer;
  211. text-align: center;
  212. margin-right: 20px;
  213. }
  214. .btn2 {
  215. width: 130px;
  216. height: 36px;
  217. background: #f2f3f5;
  218. border-radius: 4px;
  219. line-height: 36px;
  220. font-size: 13px;
  221. text-align: center;
  222. cursor: pointer;
  223. }
  224. }
  225. }
  226. </style>