更新羽声语音h5
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="view-page">
|
||||
<!-- <headerHeight bgColor="#fff" /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'举报'" bgColor="#fff" :emitBack="true" @backEvent="back">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'举报'" bgColor="#fff" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="content">
|
||||
<uni-forms ref="baseForm" :modelValue="formData" label-position="top">
|
||||
@@ -33,9 +33,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
<uni-popup ref="message" type="message">
|
||||
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -57,19 +57,19 @@
|
||||
formData: {
|
||||
content: ""
|
||||
},
|
||||
optionsProps:{
|
||||
|
||||
optionsProps: {
|
||||
|
||||
},
|
||||
array: [],
|
||||
typeList:[],
|
||||
statusBarHeight:0,
|
||||
typeList: [],
|
||||
statusBarHeight: 0,
|
||||
typeIndex: 0,
|
||||
messageText: "",
|
||||
msgType: "success"
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
typeIndex(val){
|
||||
watch: {
|
||||
typeIndex(val) {
|
||||
console.log(val)
|
||||
}
|
||||
},
|
||||
@@ -78,7 +78,8 @@
|
||||
const {
|
||||
id,
|
||||
fromType,
|
||||
fromId,h
|
||||
fromId,
|
||||
h
|
||||
} = options
|
||||
this.optionsProps = {
|
||||
id,
|
||||
@@ -105,34 +106,41 @@
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.closeWeb();
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async getTypeList(){
|
||||
async getTypeList() {
|
||||
http.get('/api/Report/report_type_list', {
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const{code,data} = response
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = response
|
||||
this.typeList = data
|
||||
this.array = data.map(ele => {return ele.type})
|
||||
this.array = data.map(ele => {
|
||||
return ele.type
|
||||
})
|
||||
this.typeIndex = 0
|
||||
})
|
||||
},
|
||||
bindPickerChange({detail}) {
|
||||
bindPickerChange({
|
||||
detail
|
||||
}) {
|
||||
// console.log()
|
||||
this.typeIndex = detail.value
|
||||
},
|
||||
comfirm(){
|
||||
comfirm() {
|
||||
const formData = {
|
||||
type_id:this.typeList[this.typeIndex].id,
|
||||
type_id: this.typeList[this.typeIndex].id,
|
||||
report_type: this.optionsProps.fromType || 1,
|
||||
content:this.formData.content || '',
|
||||
image:this.formData.image,
|
||||
from_id:this.optionsProps.fromId || ""
|
||||
content: this.formData.content || '',
|
||||
image: this.formData.image,
|
||||
from_id: this.optionsProps.fromId || ""
|
||||
}
|
||||
http.post('/api/Report/report', {
|
||||
...formData,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
@@ -145,7 +153,7 @@
|
||||
this.msgType = 'success'
|
||||
this.formData = {
|
||||
content: "",
|
||||
image:"",
|
||||
image: "",
|
||||
}
|
||||
this.$refs.uploadImage.clearImage()
|
||||
} else {
|
||||
@@ -155,9 +163,11 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
successUpload(list){
|
||||
const imageList = list.map(ele => {return ele.tempFilePath})
|
||||
if(imageList && imageList.length) {
|
||||
successUpload(list) {
|
||||
const imageList = list.map(ele => {
|
||||
return ele.tempFilePath
|
||||
})
|
||||
if (imageList && imageList.length) {
|
||||
this.formData.image = imageList.join(',')
|
||||
} else {
|
||||
this.formData.image = ""
|
||||
@@ -192,10 +202,13 @@
|
||||
padding: 21rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.comfirmButton{
|
||||
|
||||
.comfirmButton {
|
||||
width: 600rpx;
|
||||
height: 84rpx;
|
||||
background: #0DFFB9;
|
||||
background: var(--primary-color);
|
||||
font-size: var(--font-button-size);
|
||||
color: var(--font-button-color);
|
||||
border-radius: 106rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user