| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <!--阅读服务协议-->
- <div class="section mobile-step">
- <div class="mobile-agreement">
- <div class="mobile-join_xieyi">
- <div class="article-flag">
- <span @click="chooseTag=1" :class="chooseTag==1?'active':''">优软商城服务条款</span>
- <span @click="chooseTag=2" :class="chooseTag==2?'active':''">优软商城买卖条例</span>
- </div>
- <!--<textarea readonly></textarea>-->
- <div class="text-area">
- <div class="ql-container ql-snow" v-html="article"></div>
- </div>
- <div class="row" style="margin:10px 0 10px 0;">
- <div class="checkbox-inline">
- <input type="checkbox" id="agree" name="agree" value="1" :checked="checkData.checked" @click="onCheck()" style="-webkit-appearance:checkbox">
- 我已阅读并同意<a href="http://www.usoftmall.com/help#/issue/50" target="_blank" style="margin-right: -.1rem">《优软商城服务条款》</a>、<a href="http://www.usoftmall.com/help#/issue/16" target="_blank" style="margin-left: -.26rem">《优软商城买卖条例》</a>
- </div>
- </div>
- <div class="row next-btn step-two-btn" style="padding-top: 0px !important;">
- <button @click="sectionChange(1)" class="btn">上一步</button>
- <button @click="sectionChange(3)" class="btn" :style="!checkData.checked ? 'opacity: 1;':''">同意</button>
- </div>
- </div>
- </div>
- <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
- </div>
- </template>
- <script>
- import { RemindBox } from '~components/mobile/common'
- export default {
- props: ['checkData', 'loginData', 'cacheData'],
- data () {
- return {
- timeoutCount: 0,
- collectResult: '',
- chooseTag: 1,
- article: ''
- }
- },
- watch: {
- chooseTag: function (val) {
- this.getArticle(val === 1 ? 50 : 16)
- }
- },
- mounted () {
- this.getArticle(50)
- },
- methods: {
- sectionChange: function (type) {
- if (!this.checkData.checked && type === 3) {
- this.timeoutCount++
- this.collectResult = '请阅读相关条例'
- // this.$message.error('请阅读相关条例')
- } else {
- this.$emit('sectionEvent', type)
- }
- },
- getArticle: function (num) {
- this.$http.get('/api/help-service/issues/' + num).then(response => {
- this.article = response.data.article
- })
- },
- onCheck: function () {
- this.checkData.checked = !this.checkData.checked
- if (this.loginData.isSelf) {
- this.cacheData.enIsRead = this.checkData.checked
- this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
- } else {
- if (this.checkData.checked) {
- this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
- .then(() => {
- this.$http.get('/user/authentication/reflash')
- .then(() => {
- this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
- this.$store.dispatch('loadUserInfo')
- })
- })
- })
- } else {
- this.$http.post('/basic/enterprise/openVendorSetNotRead/' + this.loginData.enterprise.uu)
- .then(() => {
- this.$http.get('/user/authentication/reflash')
- .then(() => {
- this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
- this.$store.dispatch('loadUserInfo')
- })
- })
- })
- }
- }
- }
- },
- components: {
- RemindBox
- }
- }
- </script>
- <style>
- @import '~assets/scss/help.css';
- .step-two-btn button:first-child{
- background: #fff;
- color: #999;
- border-right: 1px solid #d3d3d3;
- }
- .mobile-join_xieyi .ql-editor span,.mobile-join_xieyi .ql-editor a {
- font-size: 12px;
- line-height: 25px;
- }
- .mobile-join_xieyi .ql-editor br {
- display: none;
- }
- .mobile-join_xieyi .ql-container.ql-snow .ql-editor {
- padding: 0 5px !important;
- }
- /* .join_xieyi .ql-editor p {
- width: 494px;
- margin: 0 auto;
- }*/
- .ql-container.ql-snow {
- border: none;
- }
- .mobile-join_xieyi .ql-editor span, .mobile-join_xieyi .ql-editor a {
- font-size: .24rem;
- }
- .mobile-join_xieyi .ql-editor .ql-size-20 {
- display: block;
- margin: .3rem auto;
- width: fit-content;
- font-size: .28rem;
- }
- .mobile-step .checkbox-inline, .radio-inline {
- padding: 0;
- }
- .mobile-tab-list .checkbox-inline {
- padding-left: .7rem;
- }
- .mobile-step .checkbox-inline input {
- margin: 0;
- position: absolute;
- left: 0.3rem;
- top: 0;
- width: .3rem;
- height: .3rem;
- }
- </style>
|