| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-rich-text');
- ?>
- <style>
- .my-img {
- height: 50px;
- border: 1px solid #d7dae2;
- border-radius: 2px;
- margin-top: 10px;
- background-color: #e2e2e2;
- overflow: hidden;
- }
- .form-body {
- justify-content: center;
- }
- .form-body .el-form {
- margin-top: 10px;
- }
- .currency-width {
- width: 300px;
- }
- .currency-width .el-input__inner {
- height: 35px;
- line-height: 35px;
- border-radius: 8px;
- }
- .isAppend .el-input__inner {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- }
- .form-body .currency-width .el-input-group__append {
- width: 80px;
- background-color: #2E9FFF;
- color: #fff;
- padding: 0;
- line-height: 35px;
- height: 35px;
- text-align: center;
- border-radius: 8px;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- border: 0;
- }
- .preview {
- height: 75px;
- line-height: 75px;
- text-align: center;
- width: 200px;
- background-color: #F7F7F7;
- color: #BBBBBB;
- margin-top: 10px;
- font-size: 12px;
- }
- .qr-title:first-of-type {
- margin-top: 0;
- }
- .qr-title {
- color: #BBBBBB;
- font-size: 13px;
- margin-top: 10px;
- }
- .line {
- border: none;
- border-bottom: 1px solid #e2e2e2;
- margin: 40px 0;
- }
- .title {
- margin-bottom: 20px;
- }
- .submit-btn {
- height: 32px;
- width: 65px;
- line-height: 32px;
- text-align: center;
- border-radius: 16px;
- padding: 0;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" v-loading="loading" style="min-width: 1000px;">
- <div style="margin-bottom: 20px">签到规则</div>
- <div class='form-body' ref="body">
- <el-form label-position="left" label-width="150px" :model="form" ref="form">
- <el-form-item label="签到规则">
- <com-rich-text style="width: 750px" :simple-attachment="true" v-model="form.rule"></com-rich-text>
- </el-form-item>
- <!-- 分割线 -->
- <!-- <hr :style="line" class="line"> -->
- <el-form-item>
- <el-button class="submit-btn" type="primary" @click="submit" :loading="submitLoading">保存</el-button>
- </el-form-item>
- </el-form>
- </div>
- </el-card>
- </div>
- <script>
- new Vue({
- el: '#app',
- data() {
- return {
- loading: false,
- submitLoading: false,
- rule:'',
- line: {
- width: '450px',
- marginLeft: '-150px'
- },
- form: {
- rule: '',
- },
- params: {
- r: 'sign-in/default/agreement'
- },
- };
- },
- created() {
- this.loadData();
- this.$nextTick(function () {
- this.line.width = this.$refs.body.clientWidth + 'px';
- this.line.marginLeft = -(this.$refs.body.clientWidth - 450) / 2 + 'px';
- })
- },
- methods: {
- loadData() {
- this.loading = true;
- this.$request({
- params: {
- r: 'sign-in/default/agreement',
- },
- }).then(e => {
- console.log(e);
- this.loading = false;
- if (e.data.code === 0) {
- if (e.data.data.centent) {
- this.form.rule = e.data.data.centent;
- }
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- submit() {
- this.submitLoading = true;
- this.$request({
- params: {
- r: 'sign-in/default/agreement',
- },
- method: 'post',
- data: {
- setting: this.form.rule,
- },
- }).then(e => {
- this.submitLoading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- updateSuccess(e) {
- this.$message.success('上传成功')
- }
- }
- });
- </script>
|