bug
This commit is contained in:
@@ -41,10 +41,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button v-if="user.openId === info.createUserId" @click="remove" class="form-btn form-btn__remove" hover-class="text-hover">删除相册</button>
|
||||||
<button :loading="isLoading" @click="save" class="form-btn" hover-class="text-hover">保存</button>
|
<button :loading="isLoading" @click="save" class="form-btn" hover-class="text-hover">保存</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddAlbum',
|
name: 'AddAlbum',
|
||||||
|
|
||||||
@@ -58,10 +61,15 @@
|
|||||||
watermarkId: '',
|
watermarkId: '',
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
id: '',
|
id: '',
|
||||||
|
info: {},
|
||||||
albumUserList: []
|
albumUserList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
},
|
||||||
|
|
||||||
onLoad (query) {
|
onLoad (query) {
|
||||||
this.id = query.id || ''
|
this.id = query.id || ''
|
||||||
|
|
||||||
@@ -70,7 +78,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
uni.$on('change', e => {
|
uni.$on('change', e => {
|
||||||
console.log(e)
|
|
||||||
if (e.type === 'watermark') {
|
if (e.type === 'watermark') {
|
||||||
this.watermarkId = e.value
|
this.watermarkId = e.value
|
||||||
}
|
}
|
||||||
@@ -92,6 +99,24 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
remove () {
|
||||||
|
this.$confirm('确定删除该相册?').then(() => {
|
||||||
|
this.$http.post(`/api/appalbum/delete?ids=${this.id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$u.toast('删除成功')
|
||||||
|
uni.$emit('update')
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: './AppCountryAlbum'
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getInfo (id) {
|
getInfo (id) {
|
||||||
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -168,6 +193,12 @@
|
|||||||
&:active {
|
&:active {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.form-btn__remove {
|
||||||
|
bottom: 140rpx;
|
||||||
|
background: #FF4466;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|||||||
Reference in New Issue
Block a user