意见反馈增加图片上传

This commit is contained in:
唐明明
2022-06-13 17:38:35 +08:00
parent 05bc9cc449
commit 63c5a7e701
11 changed files with 1812 additions and 1575 deletions

View File

@@ -2,7 +2,7 @@
"name" : "共力生态",
"appid" : "__UNI__DE7B0E6",
"description" : "共力生态",
"versionName" : "1.0.24",
"versionName" : "1.0.25",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */

View File

@@ -12,7 +12,19 @@
</view>
</view>
<view class="feedback-block">
<view class="feedback-title">问题说明<text>*</text></view>
<view class="feedback-title">上传应用截图({{feedbackImg.length}}/8)</view>
<view class="feedback-sbutitle">上传出现问题的应用图片长按图片可删除</view>
<view class="feedback-imgs">
<view class="feedback-imgs-item" v-for="(item, index) in feedbackImg" :key="index" @longpress="removeImg(index)">
<image :src="item.showPath" mode="aspectFill"></image>
</view>
<view class="feedback-imgs-item" @click="onFeedbackUpd" v-if="feedbackImg.length < 8">
<image :src="require('@/static/user/feedback-upd.png')" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="feedback-block">
<view class="feedback-title">问题说明</view>
<view class="feedback-sbutitle">请对您所遇到的问题进行尽可能详细的描述</view>
<view class="feedback-textarea">
<textarea maxlength="200" v-model="description" />
@@ -32,13 +44,15 @@
<script>
import { feedbacks } from '@/apis/interfaces/versions'
import { uploads } from '@/apis/interfaces/uploading.js'
export default {
data() {
return {
radioValue : "页面闪退",
description: "",
mobile : "",
systemInfo : {}
systemInfo : {},
feedbackImg: []
}
},
onLoad(){
@@ -69,18 +83,15 @@
this.radioValue = e
},
subFeedback(){
if(this.description === ''){
uni.showToast({
title: '问题说明不能为空',
icon : 'none'
let pictures = this.feedbackImg.map(val => {
return val.path
})
return
}
feedbacks({
type : this.radioValue,
description : this.description,
mobile : this.mobile,
...this.systemInfo
...this.systemInfo,
pictures
}).then(res => {
uni.showModal({
title : '提示',
@@ -97,6 +108,51 @@
icon : 'none'
})
})
},
// 上传图片
onFeedbackUpd(){
uni.chooseImage({
count : 8 - this.feedbackImg.length,
sizeType : ['compressed'],
sourceType : ['album'],
success : chooseRes => {
let { tempFiles } = chooseRes
let paths = tempFiles.map(val => {
return {
uri : val.path,
name: 'file' + val.size
}
})
uni.showLoading({
title: '上传中...'
})
uploads(paths).then(res => {
uni.hideLoading()
let feedbackImg = res.path.map((val, index) => {
return {
path : val,
showPath: res.url[index]
}
})
this.feedbackImg = this.feedbackImg.concat(feedbackImg)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none',
})
})
},
fail : err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}
})
},
// 删除图片
removeImg(index){
this.feedbackImg.splice(index, 1)
}
}
}
@@ -136,6 +192,26 @@
background: #34CE98;
color: white;
}
.feedback-imgs{
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin: 10rpx -10rpx 0;
}
.feedback-imgs-item{
position: relative;
width: calc(25% - 20rpx);
padding-top: calc(25% - 20rpx);
margin: 20rpx 10rpx 0 10rpx;
}
.feedback-imgs-item image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border:solid 1rpx #f8f8f8;
}
.feedback-sbutitle{
font-size: 28rpx;
padding-top: 10rpx;

View File

@@ -229,8 +229,16 @@
}
},
onHide() {
try{
clearInterval(account)
this.$refs.countDown.pause();
}catch(err){
uni.showToast({
title: err,
icon : 'none'
})
}
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2158,7 +2158,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 气泡漂浮 */\n.number-float[data-v-5c2ab254]{\n\t-webkit-animation: 4s octfloat-data-v-5c2ab254 infinite;\n\t animation: 4s octfloat-data-v-5c2ab254 infinite;\n}\n@-webkit-keyframes octfloat-data-v-5c2ab254{\n0%{\n\t\tmargin-top: 0;\n}\n50%{\n\t\tmargin-top: 15rpx;\n}\n100%{\n\t\tmargin-top: 0;\n}\n}\n@keyframes octfloat-data-v-5c2ab254{\n0%{\n\t\tmargin-top: 0;\n}\n50%{\n\t\tmargin-top: 15rpx;\n}\n100%{\n\t\tmargin-top: 0;\n}\n}\n", ""]);
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 气泡漂浮 */\n.number-float[data-v-5c2ab254]{\n\t-webkit-animation: 4s octfloat-data-v-5c2ab254 infinite;\n\t animation: 4s octfloat-data-v-5c2ab254 infinite;\n}\n@-webkit-keyframes octfloat-data-v-5c2ab254{\n0%{\n\t\tmargin-top: 0;\n}\n50%{\n\t\tmargin-top: 15rpx;\n}\n100%{\n\t\tmargin-top: 0;\n}\n}\n@keyframes octfloat-data-v-5c2ab254{\n0%{\n\t\tmargin-top: 0;\n}\n50%{\n\t\tmargin-top: 15rpx;\n}\n100%{\n\t\tmargin-top: 0;\n}\n}\n", ""]);
// Exports
module.exports = exports;
@@ -24349,35 +24349,104 @@ var render = function() {
_c(
"uni-view",
{ staticClass: _vm._$g(11, "sc"), attrs: { _i: 11 } },
[_vm._v("上传应用截图(" + _vm._$g(11, "t0-0") + "/8)")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(12, "sc"), attrs: { _i: 12 } },
[_vm._v("上传出现问题的应用图片;长按图片可删除")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(13, "sc"), attrs: { _i: 13 } },
[
_vm._v("问题说明"),
_c("v-uni-text", { attrs: { _i: 12 } }, [_vm._v("*")])
_vm._l(_vm._$g(14, "f"), function(item, index, $20, $30) {
return _c(
"uni-view",
{
key: item,
staticClass: _vm._$g("14-" + $30, "sc"),
attrs: { _i: "14-" + $30 },
on: {
longpress: function($event) {
return _vm.$handleViewEvent($event)
}
}
},
[
_c("v-uni-image", {
attrs: {
src: _vm._$g("15-" + $30, "a-src"),
mode: "aspectFill",
_i: "15-" + $30
}
})
],
1
)
}),
_vm._$g(16, "i")
? _c(
"uni-view",
{
staticClass: _vm._$g(16, "sc"),
attrs: { _i: 16 },
on: {
click: function($event) {
return _vm.$handleViewEvent($event)
}
}
},
[
_c("v-uni-image", {
attrs: {
src: _vm._$g(17, "a-src"),
mode: "aspectFill",
_i: 17
}
})
],
1
)
: _vm._e()
],
2
)
],
1
),
_c(
"uni-view",
{ staticClass: _vm._$g(13, "sc"), attrs: { _i: 13 } },
{ staticClass: _vm._$g(18, "sc"), attrs: { _i: 18 } },
[
_c(
"uni-view",
{ staticClass: _vm._$g(19, "sc"), attrs: { _i: 19 } },
[_vm._v("问题说明")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(20, "sc"), attrs: { _i: 20 } },
[_vm._v("请对您所遇到的问题进行尽可能详细的描述")]
),
_c(
"uni-view",
{ staticClass: _vm._$g(14, "sc"), attrs: { _i: 14 } },
{ staticClass: _vm._$g(21, "sc"), attrs: { _i: 21 } },
[
_c("v-uni-textarea", {
attrs: { maxlength: "200", _i: 15 },
attrs: { maxlength: "200", _i: 22 },
model: {
value: _vm._$g(15, "v-model"),
value: _vm._$g(22, "v-model"),
callback: function($$v) {
_vm.$handleVModelEvent(15, $$v)
_vm.$handleVModelEvent(22, $$v)
},
expression: "description"
}
}),
_c(
"uni-view",
{ staticClass: _vm._$g(16, "sc"), attrs: { _i: 16 } },
[_vm._v(_vm._$g(16, "t0-0") + "/200")]
{ staticClass: _vm._$g(23, "sc"), attrs: { _i: 23 } },
[_vm._v(_vm._$g(23, "t0-0") + "/200")]
)
],
1
@@ -24387,25 +24456,25 @@ var render = function() {
),
_c(
"uni-view",
{ staticClass: _vm._$g(17, "sc"), attrs: { _i: 17 } },
{ staticClass: _vm._$g(24, "sc"), attrs: { _i: 24 } },
[
_c(
"uni-view",
{ staticClass: _vm._$g(18, "sc"), attrs: { _i: 18 } },
{ staticClass: _vm._$g(25, "sc"), attrs: { _i: 25 } },
[_vm._v("联系方式")]
),
_c("v-uni-input", {
staticClass: _vm._$g(19, "sc"),
staticClass: _vm._$g(26, "sc"),
attrs: {
type: "number",
maxlength: "11",
placeholder: "输入手机号码",
_i: 19
_i: 26
},
model: {
value: _vm._$g(19, "v-model"),
value: _vm._$g(26, "v-model"),
callback: function($$v) {
_vm.$handleVModelEvent(19, $$v)
_vm.$handleVModelEvent(26, $$v)
},
expression: "mobile"
}
@@ -24415,12 +24484,12 @@ var render = function() {
),
_c(
"uni-view",
{ staticClass: _vm._$g(20, "sc"), attrs: { _i: 20 } },
{ staticClass: _vm._$g(27, "sc"), attrs: { _i: 27 } },
[
_c(
"v-uni-button",
{
attrs: { type: "default", _i: 21 },
attrs: { type: "default", _i: 28 },
on: {
click: function($event) {
return _vm.$handleViewEvent($event)
@@ -24524,7 +24593,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, "\n.feedback-block[data-v-811b1f14]{\n\tpadding: 30rpx;\n\tborder-top: solid 20rpx #F8F8F8;\n}\n.feedback-title[data-v-811b1f14]{\n\tfont-size: 34rpx;\n\tfont-weight: bold;\n\tline-height: 40rpx;\n}\n.feedback-title uni-text[data-v-811b1f14]{\n\tcolor: #e6576b;\n\tpadding-left: 5rpx;\n}\n.feedback-radiobox[data-v-811b1f14]{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tmargin: 20rpx -10rpx 0;\n}\n.feedback-radiobox-item[data-v-811b1f14]{\n\tposition: relative;\n\twidth: calc(33.33% - 20rpx);\n\tdisplay: inline-block;\n\tmargin: 10rpx;\n\tbackground: #F8F8F8;\n\ttext-align: center;\n\tline-height: 70rpx;\n\tborder-radius: 30rpx;\n\tfont-size: 30rpx;\n}\n.feedback-radiobox-item.show[data-v-811b1f14]{\n\tbackground: #34CE98;\n\tcolor: white;\n}\n.feedback-sbutitle[data-v-811b1f14]{\n\tfont-size: 28rpx;\n\tpadding-top: 10rpx;\n\tcolor: gray;\n}\n.feedback-textarea[data-v-811b1f14]{\n\tbackground: #F8F8F8;\n\tborder-radius: 20rpx;\n\tpadding: 20rpx;\n\tmargin-top: 20rpx;\n}\n.feedback-textarea uni-textarea[data-v-811b1f14]{\n\twidth: 100%;\n\theight: 200rpx;\n\tfont-size: 32rpx;\n}\n.feedback-textarea-size[data-v-811b1f14]{\n\ttext-align: right;\n\tfont-size: 28rpx;\n\tcolor: gray;\n}\n.feedback-input[data-v-811b1f14]{\n\tbackground: #F8F8F8;\n\tborder-radius: 20rpx;\n\theight: 90rpx;\n\tline-height: 90rpx;\n\tmargin-top: 20rpx;\n\tfont-size: 32rpx;\n\tpadding: 0 20rpx;\n}\n.btn[data-v-811b1f14]{\n\tpadding: 30rpx;\n}\n.btn uni-button[data-v-811b1f14]{\n\theight: 90rpx;\n\tline-height: 90rpx;\n\tborder-radius: 45rpx;\n\tbackground: #34CE98;\n\tfont-size: 34rpx;\n\tfont-weight: bold;\n\tcolor: white;\n\tborder: none;\n\tpadding: 0;\n}\n.btn uni-button[data-v-811b1f14]:after{\n\tdisplay: none;\n}\n", ""]);
exports.push([module.i, "\n.feedback-block[data-v-811b1f14]{\n\tpadding: 30rpx;\n\tborder-top: solid 20rpx #F8F8F8;\n}\n.feedback-title[data-v-811b1f14]{\n\tfont-size: 34rpx;\n\tfont-weight: bold;\n\tline-height: 40rpx;\n}\n.feedback-title uni-text[data-v-811b1f14]{\n\tcolor: #e6576b;\n\tpadding-left: 5rpx;\n}\n.feedback-radiobox[data-v-811b1f14]{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tmargin: 20rpx -10rpx 0;\n}\n.feedback-radiobox-item[data-v-811b1f14]{\n\tposition: relative;\n\twidth: calc(33.33% - 20rpx);\n\tdisplay: inline-block;\n\tmargin: 10rpx;\n\tbackground: #F8F8F8;\n\ttext-align: center;\n\tline-height: 70rpx;\n\tborder-radius: 30rpx;\n\tfont-size: 30rpx;\n}\n.feedback-radiobox-item.show[data-v-811b1f14]{\n\tbackground: #34CE98;\n\tcolor: white;\n}\n.feedback-imgs[data-v-811b1f14]{\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tmargin: 10rpx -10rpx 0;\n}\n.feedback-imgs-item[data-v-811b1f14]{\n\tposition: relative;\n\twidth: calc(25% - 20rpx);\n\tpadding-top: calc(25% - 20rpx);\n\tmargin: 20rpx 10rpx 0 10rpx;\n}\n.feedback-imgs-item uni-image[data-v-811b1f14]{\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tborder:solid 1rpx #f8f8f8;\n}\n.feedback-sbutitle[data-v-811b1f14]{\n\tfont-size: 28rpx;\n\tpadding-top: 10rpx;\n\tcolor: gray;\n}\n.feedback-textarea[data-v-811b1f14]{\n\tbackground: #F8F8F8;\n\tborder-radius: 20rpx;\n\tpadding: 20rpx;\n\tmargin-top: 20rpx;\n}\n.feedback-textarea uni-textarea[data-v-811b1f14]{\n\twidth: 100%;\n\theight: 200rpx;\n\tfont-size: 32rpx;\n}\n.feedback-textarea-size[data-v-811b1f14]{\n\ttext-align: right;\n\tfont-size: 28rpx;\n\tcolor: gray;\n}\n.feedback-input[data-v-811b1f14]{\n\tbackground: #F8F8F8;\n\tborder-radius: 20rpx;\n\theight: 90rpx;\n\tline-height: 90rpx;\n\tmargin-top: 20rpx;\n\tfont-size: 32rpx;\n\tpadding: 0 20rpx;\n}\n.btn[data-v-811b1f14]{\n\tpadding: 30rpx;\n}\n.btn uni-button[data-v-811b1f14]{\n\theight: 90rpx;\n\tline-height: 90rpx;\n\tborder-radius: 45rpx;\n\tbackground: #34CE98;\n\tfont-size: 34rpx;\n\tfont-weight: bold;\n\tcolor: white;\n\tborder: none;\n\tpadding: 0;\n}\n.btn uni-button[data-v-811b1f14]:after{\n\tdisplay: none;\n}\n", ""]);
// Exports
module.exports = exports;

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB