| | |
| | | method: 'POST', |
| | | params: this.loginForm |
| | | }) |
| | | if (res.code === 200) { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.$message.success('登录成功') |
| | | window.sessionStorage.setItem('token', res.data) |
| | | await this.$router.push('/home') |
| | |
| | | </el-button> |
| | | <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">删除 |
| | | </el-button> |
| | | <el-button type="text" size="medium" @click="delTime(scope.row.id)" style="color:#ff0000">修改时间 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </el-table-column> --> |
| | | |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | title="修改时间" |
| | | :visible.sync="dialogVisibleTime" |
| | | width="30%" |
| | | :before-close="handleCloseTime"> |
| | | <el-date-picker v-model="detailsRow.releaseTime" type="datetime" placeholder="选择日期时间" |
| | | :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisibleTime = false">取 消</el-button> |
| | | <el-button type="primary" @click="subTIme">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | name: "Publicity", |
| | | data() { |
| | | return { |
| | | detailsId:null, |
| | | dialogVisibleTime:false, |
| | | fileList: [], |
| | | dialogImageUrl: '', |
| | | dialogVisible: false, |
| | |
| | | addPublicityForm: { |
| | | publicityTitle: '', |
| | | text: '', |
| | | img: [] |
| | | img: [], |
| | | releaseTime:[] |
| | | }, |
| | | //添加弹框 |
| | | addPublicityVisibel: false, |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | handleCloseTime(){ |
| | | this.dialogVisibleTime = false |
| | | }, |
| | | uploadSuccess3(res, file) { |
| | | if (res.code === 200) { |
| | | this.addPublicityForm.img.push({ |
| | |
| | | this.search(); |
| | | }) |
| | | }, |
| | | subTIme(){ |
| | | let obj = { |
| | | id: this.detailsId, |
| | | time:this.detailsRow.releaseTime |
| | | } |
| | | this.$http.get('/api/publicity/changTime?id='+obj.id+'&'+'time='+obj.time).then(res=>{ |
| | | console.log(res) |
| | | let val = res.data |
| | | if (val.code ==200){ |
| | | |
| | | this.dialogVisibleTime =false |
| | | this.init() |
| | | }else { |
| | | this.$message.error(val.msg) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | delTime(e){ |
| | | console.log(e) |
| | | this.getDelial(e) |
| | | this.detailsId = e |
| | | this.dialogVisibleTime =true |
| | | |
| | | }, |
| | | getDelial(val){ |
| | | this.$http.get('/api/publicity/' + val).then(res => { |
| | | this.detailsRow = res.data.data |
| | | this.detailsRow.img = this.detailsRow['photoStr'].split(',').map(item => { |
| | | return { |
| | | name: item, |
| | | url: '/minio/img/' + item, |
| | | uid: this.detailsRow['photoStr'].split(',').length |
| | | } |
| | | }) |
| | | this.fileList = this.detailsRow.img |
| | | }); |
| | | }, |
| | | //发布/下架 |
| | | punlish(val, val2) { |
| | | if (val2 == 0) { |