StepSecond.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <!--阅读服务协议-->
  3. <div class="section">
  4. <div class="agreement">
  5. <div class="join_xieyi">
  6. <div class="article-flag">
  7. <span @click="chooseTag=1" :class="chooseTag==1?'active':''">优软商城服务条款</span>
  8. <span @click="chooseTag=2" :class="chooseTag==2?'active':''">优软商城买卖条例</span>
  9. </div>
  10. <!--<textarea readonly></textarea>-->
  11. <div class="text-area">
  12. <div class="ql-container ql-snow" v-html="article"></div>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="row" style="margin-left: 30px; text-align: center;">
  17. <label class="checkbox-inline">
  18. <input type="checkbox" id="agree" name="agree" value="1" :checked="checkData.checked" @click="checkData.checked = !checkData.checked" >
  19. 我已阅读并同意<a href="http://www.usoftmall.com/help#/issue/50" target="_blank">
  20. 《优软商城服务条款》</a>、<a href="http://www.usoftmall.com/help#/issue/16" target="_blank">
  21. 《优软商城买卖条例》</a>
  22. </label>
  23. </div>
  24. <div class="row next-btn step-two-btn" style="margin-top: 20px">
  25. <button @click="sectionChange(1)" class="btn">上一步</button>
  26. <button @click="sectionChange(3)" class="btn" :style="!checkData.checked ? 'opacity: .65;':''">下一步</button>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. props: ['checkData', 'loginData', 'cacheData'],
  33. data () {
  34. return {
  35. chooseTag: 1,
  36. article: ''
  37. }
  38. },
  39. watch: {
  40. chooseTag: function (val) {
  41. this.getArticle(val === 1 ? 21 : 16)
  42. }
  43. },
  44. mounted () {
  45. this.getArticle(21)
  46. },
  47. methods: {
  48. sectionChange: function (type) {
  49. if (type === 3) {
  50. if (this.checkData.checked) {
  51. if (this.loginData.isSelf) {
  52. this.cacheData.enIsRead = this.checkData.checked
  53. this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
  54. } else {
  55. this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
  56. .then(() => {
  57. this.$store.dispatch('loadUserInfo')
  58. })
  59. }
  60. this.$emit('sectionEvent', type)
  61. } else {
  62. this.$message.error('请阅读并勾选服务条款')
  63. }
  64. } else {
  65. this.$emit('sectionEvent', type)
  66. }
  67. },
  68. getArticle: function (num) {
  69. this.$http.get('/api/help-service/issues/' + num).then(response => {
  70. this.article = response.data.article
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style>
  77. @import '~assets/scss/help.css';
  78. .step-two-btn button:first-child{
  79. background: #fff;
  80. color: #5078cb;
  81. border: 1px solid #5078cb;
  82. }
  83. .join_xieyi .ql-editor {
  84. padding-left: 30px;
  85. }
  86. .join_xieyi .ql-editor span,.join_xieyi .ql-editor a {
  87. font-size: 10px;
  88. }
  89. .join_xieyi .ql-editor br {
  90. display: none;
  91. }
  92. </style>