purchase.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <div class="purchase-page">
  3. <div class="j-main exchange_main">
  4. <div class="docs_infor">
  5. <div class="docs_left">
  6. <img src="" class="docs_img" alt="">
  7. </div>
  8. <div class="docs_right">
  9. <div class="docs_title ellipsis-2">
  10. 优化招投标市场营商环境与国企采购人主体责任、采购与招标优化招投标市场营商环境与国企采购人主体责任、采购与招标
  11. </div>
  12. <div class="docs_other">
  13. <div class="docs_auther">贡献者:张三</div>
  14. <div class="docs_download">
  15. <span>2020次下载</span> | 共18页 | 220K
  16. </div>
  17. <div class="docs_money"><span class="docs_num">500</span> 剑鱼币</div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="docs_phone">
  22. <van-cell-group>
  23. <van-field v-model="value" label="手机号码" placeholder="请输入手机号码" />
  24. </van-cell-group>
  25. </div>
  26. </div>
  27. <div class="j-footer exchange_footer">
  28. <div class="readly">
  29. <van-checkbox v-model="checked" checked-color="#2ABED1" >我已阅读,理解并接受<a href="javascript:;" class="clause" @click="clause()">《剑鱼伙伴服务条款》</a></van-checkbox>
  30. </div>
  31. <div class="apply_footer">
  32. <button class="apply_button" :disabled="!this.checked" @click="exchange()">确定兑换</button>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script lang="ts">
  38. import { Component, Vue } from 'vue-property-decorator'
  39. import { Checkbox, CheckboxGroup, Toast } from 'vant'
  40. import { mapActions, mapMutations } from 'vuex'
  41. @Component({
  42. name: 'purchase-page',
  43. components: {
  44. [Checkbox.name]: Checkbox,
  45. [CheckboxGroup.name]: CheckboxGroup
  46. },
  47. methods: {
  48. ...mapMutations({
  49. saveLogout: 'logout/setLogout'
  50. }),
  51. ...mapActions({
  52. sureLogout: 'logout/sureLogout'
  53. })
  54. }
  55. })
  56. export default class extends Vue {
  57. protected sureLogout!: any
  58. protected saveLogout!: any
  59. checked = false
  60. exchange () {
  61. this.sureLogout().then((data: any) => {
  62. console.log(data)
  63. const res = data.data
  64. if (res.status === 0) {
  65. Toast('注销失败')
  66. } else if (res.status === 1) {
  67. this.saveLogout({
  68. commission: res.commission,
  69. sales: res.sales,
  70. status: res.status
  71. })
  72. this.$router.replace('/logoutsuccess')
  73. } else {
  74. Toast('注销失败')
  75. }
  76. })
  77. }
  78. // 剑鱼标讯服务条款
  79. clause () {
  80. this.$router.push('/readme')
  81. }
  82. }
  83. </script>
  84. <style lang="scss">
  85. .purchase-page{
  86. box-sizing: border-box;
  87. background: #fff;
  88. .exchange_main{
  89. padding: 0 16px;
  90. .docs_infor{
  91. display: flex;
  92. justify-content: space-between;
  93. align-items: flex-start;
  94. padding: 20px 0;
  95. .docs_left{
  96. width: 100px;
  97. height: 124px;
  98. border-radius: 4px;
  99. border: 1px solid #000000;
  100. .docs_img{
  101. width: 100%;
  102. height: 100%;
  103. }
  104. }
  105. .docs_right{
  106. flex: 1;
  107. margin-left: 16px;
  108. .docs_title{
  109. color: #171826;
  110. font-weight: bold;
  111. font-size: 14px;
  112. line-height: 20px;
  113. letter-spacing: 0px;
  114. text-align: left;
  115. }
  116. .docs_other{
  117. margin-top: 22px;
  118. color: #9B9CA3;
  119. font-weight: medium;
  120. font-size: 12px;
  121. line-height: 18px;
  122. letter-spacing: 0px;
  123. text-align: left;
  124. .docs_download{
  125. line-height: 18px;
  126. }
  127. .docs_money{
  128. margin-top: 2px;
  129. line-height: 24px;
  130. .docs_num{
  131. font-size: 16px;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. .docs_phone {
  138. padding: 15px 0;
  139. width: 100%;
  140. }
  141. }
  142. .exchange_footer{
  143. padding: 0 16px;
  144. height: 98px;
  145. .apply_footer {
  146. display: flex;
  147. align-items: center;
  148. justify-content: center;
  149. height: 46px;
  150. padding: 8px 0 12px;
  151. background: rgba(255, 255, 255, 0.96);
  152. }
  153. .apply_button {
  154. width: 100%;
  155. height: 46px;
  156. border-radius: 8px;
  157. background: #2abed1;
  158. font-size: 18px;
  159. color: #f7f9fa;
  160. }
  161. .readly{
  162. display:flex;
  163. align-items:center;
  164. height:32px;
  165. font-size: 12px;
  166. color: #5F5E64;
  167. .clause{
  168. color:#2ABED1;
  169. }
  170. .van-checkbox__icon{
  171. font-size:18px;
  172. }
  173. }
  174. }
  175. }
  176. </style>