diff --git a/project/fengdu/AppOutSource/AppArchives/components/Add.vue b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
index c96ae51f..15a01444 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/Add.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/Add.vue
@@ -185,9 +185,27 @@ export default {
created() {
this.form.areaId = this.$store.state.user.info.areaId
this.$dict.load('sex', 'operatorType')
+
+ if(this.params.id){
+ this.getDetail(this.params);
+ }
},
methods: {
+ async getDetail({id}){
+ try {
+ const {code,data} = await this.instance.post('/app/appshoparchives/queryDetailById',null,{
+ params:{
+ id
+ }
+ })
+ if(code===0){
+ this.form = {...data}
+ }
+ }catch (e) {
+ console.error(e)
+ }
+ },
async handleSelectGrid() {
try {
this.dialog = true
diff --git a/project/fengdu/AppOutSource/AppArchives/components/Detail.vue b/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
index 46e66202..a0bc2bb3 100644
--- a/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
+++ b/project/fengdu/AppOutSource/AppArchives/components/Detail.vue
@@ -7,35 +7,35 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
@@ -55,107 +55,31 @@ export default {
data() {
return {
- info: {},
form: {
- auditDesc: '',
- auditStatus: ''
+
},
- eventForm: {
- files: null,
- images: [],
- videos: [],
- content: '',
- applyIntegral: ''
- },
- isShowEvent: false,
- isShow: false
}
},
created() {
- this.getInfo()
+ this.getDetail()
},
methods: {
- getInfo() {
- this.instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.params.id}`).then(res => {
- if (res.code == 0) {
- if (res.data) {
- this.info = {
- ...res.data,
- files: res.data.files.map(v => {
- return {
- ...v,
- postfix: v.postfix.toLowerCase()
- }
- })
- }
-
- if (res.data.status === '0') {
- this.eventForm.files = res.data.files
- this.eventForm.content = res.data.content
- this.eventForm.applyIntegral = res.data.applyIntegral
- }
- this.info.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png', 'JPG', 'JPEG', 'PNG'].includes(e.postfix.split('.')[1])))
- this.info.videos = res.data.files.filter(e => (['mp4', 'MP4', 'MOV'].includes(e.postfix.split('.')[1])))
+ async getDetail() {
+ try {
+ const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
+ params: {
+ id: this.parmas.id
}
+ })
+ if(code===0){
+ this.form = {...data}
}
- })
- },
-
- showEvent() {
- this.eventForm.files = null
- this.eventForm.content = this.info.content
- this.eventForm.applyIntegral = this.info.applyIntegral
- this.eventForm.images = this.info.images
- this.eventForm.videos = this.info.videos
- this.isShowEvent = true
- },
-
- onClose() {
- this.form.auditDesc = ''
- this.form.auditStatus = ''
- },
-
- onEventConfirm() {
- if ((this.eventForm.images.length + this.eventForm.videos.length) > 9) {
- return this.$message.error('图片和视频不得超过9个')
- } else {
- this.eventForm.files = [...this.eventForm.images, ...this.eventForm.videos]
+ } catch (e) {
+ console.error(e)
}
- this.$refs.eventForm.validate((valid) => {
- if (valid) {
- this.instance.post(`/app/appintegraluserapply/updateByGirdMember`, {
- ...this.eventForm,
- id: this.params.id,
- }).then(res => {
- if (res.code == 0) {
- this.$message.success('编辑成功!')
- this.isShowEvent = false
- this.getInfo()
- }
- })
- }
- })
},
-
- onConfirm() {
- this.$refs.form.validate((valid) => {
- if (valid) {
- this.instance.post(`/app/appintegraluserapply/auditById`, {
- ...this.form,
- id: this.params.id
- }).then(res => {
- if (res.code == 0) {
- this.$message.success('审核成功!')
- this.isShow = false
- this.getInfo()
- }
- })
- }
- })
- },
-
cancel() {
this.$emit('change', {
type: 'List',