This commit is contained in:
@fawn-nine
2024-08-23 18:10:27 +08:00
parent 497ab89dae
commit 57d5beaa72
11 changed files with 746 additions and 297 deletions

View File

@@ -68,7 +68,8 @@
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import { parse } from 'qs';
import $http from '@/config/requestConfig.js';
import permission from "@/js_sdk/wa-permission/permission.js"
import {
mapState,
@@ -87,6 +88,7 @@
content: '', // 描述
img: '', //图片
type: undefined, // 反馈类型
sort:undefined
},
range:[
{ value: '0', text: "班内作业",name:"班内作业"},
@@ -123,13 +125,15 @@
},
pageType: '',
pageName:''
pageName:''
};
},
//第一次加载
onLoad(e) {
console.log('收到的值', e);
if(e.sort){
this.form.sort = e.sort+''
}
this.pageType = e.type
this.form.classId = e.classId
this.form.type = e.type
@@ -269,7 +273,21 @@
this.form.img = _list.join(',')
}else{
this.form.img = ''
}
}
var newSort = undefined
console.log('this.sort',this.form.sort);
if(this.form.sort != undefined) {
console.log('this.sort',this.form.sort);
var oldsort = this.form.sort.split('')
if(oldsort[oldsort.length-1] == '9'){
oldsort.push('0')
}else{
console.log('符合');
oldsort[oldsort.length-1] = ( parseInt(oldsort[oldsort.length-1]) + 1) + ''
}
newSort = oldsort.join('')
}
// console.log('this.sort',newSort);
var _url = ""
this.form.id ? _url = "common/class/editClassTask" : _url = "common/class/addClassTask"
$http.request({
@@ -282,7 +300,8 @@
"display": this.form.display, //0不展示1展示
"title": this.form.title,
"content": this.form.content,
"img": this.form.img
"img": this.form.img,
"sort": newSort
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'