feat(feedback): 实现反馈表单提交功能并清空表单数据

在反馈页面中,新增了表单提交功能,用户提交反馈后,表单数据将被清空。同时,处理了提交成功和失败的场景,并显示相应的提示信息。
This commit is contained in:
8vd8
2025-05-06 14:04:50 +08:00
parent 1f264393b9
commit 28c61385da
8 changed files with 402 additions and 339 deletions
+332 -299
View File
@@ -1,300 +1,333 @@
<template> <template>
<view class="feedback-container"> <view class="feedback-container">
<!-- 问题类型选择 --> <!-- 问题类型选择 -->
<view class="type-section"> <view class="type-section">
<view class="section-title">问题类型</view> <view class="section-title">问题类型</view>
<view class="type-grid"> <view class="type-grid">
<view <view
v-for="(type, index) in types" v-for="(type, index) in types"
:key="index" :key="index"
class="type-item" class="type-item"
:class="{ active: selectedType === index }" :class="{ active: selectedType === index }"
@click="selectType(index)" @click="selectType(index)"
> >
{{ type }} {{ type }}
</view> </view>
</view> </view>
</view> </view>
<!-- 问题描述 --> <!-- 问题描述 -->
<view class="description-section"> <view class="description-section">
<view class="section-title">问题描述</view> <view class="section-title">问题描述</view>
<textarea <textarea
class="description-input" class="description-input"
v-model="description" v-model="description"
placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决"
maxlength="500" maxlength="500"
/> />
<view class="word-count">{{ description.length }}/500</view> <view class="word-count">{{ description.length }}/500</view>
</view> </view>
<!-- 图片上传 --> <!-- 图片上传 -->
<view class="upload-section"> <view class="upload-section">
<view class="section-title">图片上传选填</view> <view class="section-title">图片上传选填</view>
<view class="upload-grid"> <view class="upload-grid">
<view <view
class="upload-item" class="upload-item"
v-for="(img, index) in images" v-for="(img, index) in images"
:key="index" :key="index"
> >
<image :src="img" mode="aspectFill" /> <image :src="img" mode="aspectFill" />
<view class="delete-btn" @click="deleteImage(index)">×</view> <view class="delete-btn" @click="deleteImage(index)">×</view>
</view> </view>
<view class="upload-btn" @click="chooseImage" v-if="images.length < 3"> <view class="upload-btn" @click="chooseImage" v-if="images.length < 3">
<text class="plus">+</text> <text class="plus">+</text>
<text class="tip">上传图片</text> <text class="tip">上传图片</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 联系方式 --> <!-- 联系方式 -->
<view class="contact-section"> <view class="contact-section">
<view class="section-title">联系方式</view> <view class="section-title">联系方式</view>
<input <input
class="contact-input" class="contact-input"
v-model="contact" v-model="contact"
placeholder="请留下您的手机号,方便我们联系您" placeholder="请留下您的手机号,方便我们联系您"
type="number" type="number"
maxlength="11" maxlength="11"
/> />
</view> </view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="submit-section"> <view class="submit-section">
<button class="submit-btn" @click="submitFeedback">提交反馈</button> <button class="submit-btn" @click="submitFeedback">提交反馈</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
types: ['设备故障', '收费问题', '使用建议', '其他'], types: ['设备故障', '收费问题', '使用建议', '其他'],
selectedType: -1, selectedType: -1,
description: '', description: '',
images: [], images: [],
contact: '' contact: ''
} }
}, },
methods: { methods: {
selectType(index) { selectType(index) {
this.selectedType = index this.selectedType = index
}, },
chooseImage() { chooseImage() {
uni.chooseImage({ uni.chooseImage({
count: 3 - this.images.length, count: 3 - this.images.length,
success: (res) => { success: (res) => {
this.images = [...this.images, ...res.tempFilePaths] this.images = [...this.images, ...res.tempFilePaths]
} }
}) })
}, },
deleteImage(index) { deleteImage(index) {
this.images.splice(index, 1) this.images.splice(index, 1)
}, },
submitFeedback() { submitFeedback() {
if (this.selectedType === -1) { if (this.selectedType === -1) {
uni.showToast({ uni.showToast({
title: '请选择问题类型', title: '请选择问题类型',
icon: 'none' icon: 'none'
}) })
return return
} }
if (!this.description.trim()) { if (!this.description.trim()) {
uni.showToast({ uni.showToast({
title: '请描述您的问题', title: '请描述您的问题',
icon: 'none' icon: 'none'
}) })
return return
} }
if (!this.contact) { if (!this.contact) {
uni.showToast({ uni.showToast({
title: '请留下联系方式', title: '请留下联系方式',
icon: 'none' icon: 'none'
}) })
return return
} }
// TODO: 提交反馈 // 构建反馈数据
uni.showToast({ const feedbackData = {
title: '提交成功', type: this.types[this.selectedType],
icon: 'success' content: this.description,
}) phone: this.contact,
} images: this.images
} }
}
</script> // 调用提交接口
uni.request({
<style lang="scss" scoped> url: '/app/feedback/add',
.feedback-container { method: 'POST',
min-height: 100vh; data: feedbackData,
background: #f8f8f8; success: (res) => {
padding: 30rpx; if (res.statusCode === 200) {
uni.showToast({
.section-title { title: '提交成功',
font-size: 30rpx; icon: 'success'
color: #333; })
font-weight: 500; // 清空表单
margin-bottom: 20rpx; this.selectedType = -1
} this.description = ''
this.contact = ''
.type-section { this.images = []
background: #fff; } else {
border-radius: 20rpx; uni.showToast({
padding: 30rpx; title: '提交失败',
margin-bottom: 20rpx; icon: 'none'
})
.type-grid { }
display: flex; },
flex-wrap: wrap; fail: () => {
margin: 0 -10rpx; uni.showToast({
title: '提交失败',
.type-item { icon: 'none'
width: calc(50% - 20rpx); })
margin: 10rpx; }
height: 80rpx; })
display: flex; }
align-items: center; }
justify-content: center; }
background: #f5f5f5; </script>
border-radius: 10rpx;
font-size: 28rpx; <style lang="scss" scoped>
color: #666; .feedback-container {
transition: all 0.3s; min-height: 100vh;
background: #f8f8f8;
&.active { padding: 30rpx;
background: #E3F2FD;
color: #1976D2; .section-title {
} font-size: 30rpx;
} color: #333;
} font-weight: 500;
} margin-bottom: 20rpx;
}
.description-section {
background: #fff; .type-section {
border-radius: 20rpx; background: #fff;
padding: 30rpx; border-radius: 20rpx;
margin-bottom: 20rpx; padding: 30rpx;
margin-bottom: 20rpx;
.description-input {
width: 100%; .type-grid {
height: 240rpx; display: flex;
background: #f8f8f8; flex-wrap: wrap;
border-radius: 10rpx; margin: 0 -10rpx;
padding: 20rpx;
font-size: 28rpx; .type-item {
color: #333; width: calc(50% - 20rpx);
box-sizing: border-box; margin: 10rpx;
} height: 80rpx;
display: flex;
.word-count { align-items: center;
text-align: right; justify-content: center;
font-size: 24rpx; background: #f5f5f5;
color: #999; border-radius: 10rpx;
margin-top: 10rpx; font-size: 28rpx;
} color: #666;
} transition: all 0.3s;
.upload-section { &.active {
background: #fff; background: #E3F2FD;
border-radius: 20rpx; color: #1976D2;
padding: 30rpx; }
margin-bottom: 20rpx; }
}
.upload-grid { }
display: flex;
flex-wrap: wrap; .description-section {
background: #fff;
.upload-item { border-radius: 20rpx;
width: 200rpx; padding: 30rpx;
height: 200rpx; margin-bottom: 20rpx;
margin-right: 20rpx;
margin-bottom: 20rpx; .description-input {
position: relative; width: 100%;
height: 240rpx;
image { background: #f8f8f8;
width: 100%; border-radius: 10rpx;
height: 100%; padding: 20rpx;
border-radius: 10rpx; font-size: 28rpx;
} color: #333;
box-sizing: border-box;
.delete-btn { }
position: absolute;
right: -10rpx; .word-count {
top: -10rpx; text-align: right;
width: 40rpx; font-size: 24rpx;
height: 40rpx; color: #999;
background: rgba(0,0,0,0.5); margin-top: 10rpx;
color: #fff; }
border-radius: 50%; }
display: flex;
align-items: center; .upload-section {
justify-content: center; background: #fff;
font-size: 32rpx; border-radius: 20rpx;
} padding: 30rpx;
} margin-bottom: 20rpx;
.upload-btn { .upload-grid {
width: 200rpx; display: flex;
height: 200rpx; flex-wrap: wrap;
background: #f5f5f5;
border-radius: 10rpx; .upload-item {
display: flex; width: 200rpx;
flex-direction: column; height: 200rpx;
align-items: center; margin-right: 20rpx;
justify-content: center; margin-bottom: 20rpx;
color: #999; position: relative;
.plus { image {
font-size: 60rpx; width: 100%;
line-height: 1; height: 100%;
margin-bottom: 10rpx; border-radius: 10rpx;
} }
.tip { .delete-btn {
font-size: 24rpx; position: absolute;
} right: -10rpx;
} top: -10rpx;
} width: 40rpx;
} height: 40rpx;
background: rgba(0,0,0,0.5);
.contact-section { color: #fff;
background: #fff; border-radius: 50%;
border-radius: 20rpx; display: flex;
padding: 30rpx; align-items: center;
margin-bottom: 40rpx; justify-content: center;
font-size: 32rpx;
.contact-input { }
width: 100%; }
height: 80rpx;
background: #f8f8f8; .upload-btn {
border-radius: 10rpx; width: 200rpx;
padding: 0 20rpx; height: 200rpx;
font-size: 28rpx; background: #f5f5f5;
color: #333; border-radius: 10rpx;
box-sizing: border-box; display: flex;
} flex-direction: column;
} align-items: center;
justify-content: center;
.submit-section { color: #999;
padding: 0 40rpx;
.plus {
.submit-btn { font-size: 60rpx;
width: 100%; line-height: 1;
height: 88rpx; margin-bottom: 10rpx;
background: #1976D2; }
color: #fff;
border-radius: 44rpx; .tip {
font-size: 32rpx; font-size: 24rpx;
font-weight: 500; }
display: flex; }
align-items: center; }
justify-content: center; }
&:active { .contact-section {
transform: scale(0.98); background: #fff;
} border-radius: 20rpx;
} padding: 30rpx;
} margin-bottom: 40rpx;
}
.contact-input {
width: 100%;
height: 80rpx;
background: #f8f8f8;
border-radius: 10rpx;
padding: 0 20rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
}
}
.submit-section {
padding: 0 40rpx;
.submit-btn {
width: 100%;
height: 88rpx;
background: #1976D2;
color: #fff;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
&:active {
transform: scale(0.98);
}
}
}
}
</style> </style>
+1 -1
View File
@@ -31,7 +31,7 @@
<!-- 费用信息 --> <!-- 费用信息 -->
<view class="price-card"> <view class="price-card">
<view class="card-title">费用信息</view> <view class="card-title">费用信息</view>
<view class="price-item"> <view class="pric 为了回馈他家新近三月公共努力公司决定五一假期22月1号减少,你喜欢这种什么嘿Siri换一个换一个App吃幼儿园那他那e-item">
<text class="label">押金</text> <text class="label">押金</text>
<text class="value">{{ orderInfo.deposit || '99.00' }}</text> <text class="value">{{ orderInfo.deposit || '99.00' }}</text>
</view> </view>
+4 -4
View File
@@ -1,13 +1,13 @@
{ {
"hash": "eecc45c6", "hash": "1aab2153",
"configHash": "e4fbd916", "configHash": "d5af41b4",
"lockfileHash": "78df9316", "lockfileHash": "78df9316",
"browserHash": "8d847c28", "browserHash": "506545f1",
"optimized": { "optimized": {
"uview-ui": { "uview-ui": {
"src": "../../../../../node_modules/uview-ui/index.js", "src": "../../../../../node_modules/uview-ui/index.js",
"file": "uview-ui.js", "file": "uview-ui.js",
"fileHash": "b095c49f", "fileHash": "4f573264",
"needsInterop": false "needsInterop": false
} }
}, },
+28 -28
View File
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
mod mod
)); ));
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/mixin/mixin.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/mixin/mixin.js
var require_mixin = __commonJS({ var require_mixin = __commonJS({
"C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/mixin/mixin.js"(exports, module) { "../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/mixin/mixin.js"(exports, module) {
module.exports = { module.exports = {
data() { data() {
return {}; return {};
@@ -82,10 +82,10 @@ var require_mixin = __commonJS({
} }
}); });
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/index.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/index.js
var import_mixin = __toESM(require_mixin()); var import_mixin = __toESM(require_mixin());
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/deepClone.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/deepClone.js
function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) { function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) {
if (obj === null || typeof obj !== "object") if (obj === null || typeof obj !== "object")
return obj; return obj;
@@ -116,7 +116,7 @@ function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) {
} }
var deepClone_default = deepClone; var deepClone_default = deepClone;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/deepMerge.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/deepMerge.js
function deepMerge(target = {}, source = {}) { function deepMerge(target = {}, source = {}) {
target = deepClone_default(target); target = deepClone_default(target);
if (typeof target !== "object" || target === null || typeof source !== "object" || source === null) if (typeof target !== "object" || target === null || typeof source !== "object" || source === null)
@@ -145,7 +145,7 @@ function deepMerge(target = {}, source = {}) {
} }
var deepMerge_default = deepMerge; var deepMerge_default = deepMerge;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/test.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/test.js
function email(value) { function email(value) {
return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value); return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
} }
@@ -290,7 +290,7 @@ var test_default = {
code code
}; };
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/request/index.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/request/index.js
var Request = class { var Request = class {
// 设置全局默认配置 // 设置全局默认配置
setConfig(customConfig) { setConfig(customConfig) {
@@ -424,7 +424,7 @@ var Request = class {
}; };
var request_default = new Request(); var request_default = new Request();
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/queryParams.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/queryParams.js
function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
let prefix = isPrefix ? "?" : ""; let prefix = isPrefix ? "?" : "";
let _result = []; let _result = [];
@@ -472,7 +472,7 @@ function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
} }
var queryParams_default = queryParams; var queryParams_default = queryParams;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/route.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/route.js
var Router = class { var Router = class {
constructor() { constructor() {
this.config = { this.config = {
@@ -571,7 +571,7 @@ var Router = class {
}; };
var route_default = new Router().route; var route_default = new Router().route;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/timeFormat.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/timeFormat.js
if (!String.prototype.padStart) { if (!String.prototype.padStart) {
String.prototype.padStart = function(maxLength, fillString = " ") { String.prototype.padStart = function(maxLength, fillString = " ") {
if (Object.prototype.toString.call(fillString) !== "[object String]") if (Object.prototype.toString.call(fillString) !== "[object String]")
@@ -625,7 +625,7 @@ function timeFormat(dateTime = null, fmt = "yyyy-mm-dd") {
} }
var timeFormat_default = timeFormat; var timeFormat_default = timeFormat;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/timeFrom.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/timeFrom.js
function timeFrom(dateTime = null, format = "yyyy-mm-dd") { function timeFrom(dateTime = null, format = "yyyy-mm-dd") {
if (!dateTime) if (!dateTime)
dateTime = Number(/* @__PURE__ */ new Date()); dateTime = Number(/* @__PURE__ */ new Date());
@@ -662,7 +662,7 @@ function timeFrom(dateTime = null, format = "yyyy-mm-dd") {
} }
var timeFrom_default = timeFrom; var timeFrom_default = timeFrom;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/colorGradient.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/colorGradient.js
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
let startRGB = hexToRgb(startColor, false); let startRGB = hexToRgb(startColor, false);
let startR = startRGB[0]; let startR = startRGB[0];
@@ -770,7 +770,7 @@ var colorGradient_default = {
colorToRgba colorToRgba
}; };
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/guid.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/guid.js
function guid(len = 32, firstU = true, radix = null) { function guid(len = 32, firstU = true, radix = null) {
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
let uuid = []; let uuid = [];
@@ -798,7 +798,7 @@ function guid(len = 32, firstU = true, radix = null) {
} }
var guid_default = guid; var guid_default = guid;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/color.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/color.js
var color = { var color = {
primary: "#2979ff", primary: "#2979ff",
primaryDark: "#2b85e4", primaryDark: "#2b85e4",
@@ -829,7 +829,7 @@ var color = {
}; };
var color_default = color; var color_default = color;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/type2icon.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/type2icon.js
function type2icon(type = "success", fill = false) { function type2icon(type = "success", fill = false) {
if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1) if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
type = "success"; type = "success";
@@ -859,19 +859,19 @@ function type2icon(type = "success", fill = false) {
} }
var type2icon_default = type2icon; var type2icon_default = type2icon;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/randomArray.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/randomArray.js
function randomArray(array2 = []) { function randomArray(array2 = []) {
return array2.sort(() => Math.random() - 0.5); return array2.sort(() => Math.random() - 0.5);
} }
var randomArray_default = randomArray; var randomArray_default = randomArray;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/addUnit.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/addUnit.js
function addUnit(value = "auto", unit = "rpx") { function addUnit(value = "auto", unit = "rpx") {
value = String(value); value = String(value);
return test_default.number(value) ? `${value}${unit}` : value; return test_default.number(value) ? `${value}${unit}` : value;
} }
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/random.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/random.js
function random(min, max) { function random(min, max) {
if (min >= 0 && max > 0 && max >= min) { if (min >= 0 && max > 0 && max >= min) {
let gab = max - min + 1; let gab = max - min + 1;
@@ -882,7 +882,7 @@ function random(min, max) {
} }
var random_default = random; var random_default = random;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/trim.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/trim.js
function trim(str, pos = "both") { function trim(str, pos = "both") {
if (pos == "both") { if (pos == "both") {
return str.replace(/^\s+|\s+$/g, ""); return str.replace(/^\s+|\s+$/g, "");
@@ -898,7 +898,7 @@ function trim(str, pos = "both") {
} }
var trim_default = trim; var trim_default = trim;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/toast.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/toast.js
function toast(title, duration = 1500) { function toast(title, duration = 1500) {
uni.showToast({ uni.showToast({
title, title,
@@ -908,7 +908,7 @@ function toast(title, duration = 1500) {
} }
var toast_default = toast; var toast_default = toast;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/getParent.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/getParent.js
function getParent(name, keys) { function getParent(name, keys) {
let parent = this.$parent; let parent = this.$parent;
while (parent) { while (parent) {
@@ -945,7 +945,7 @@ function getParent(name, keys) {
return {}; return {};
} }
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/$parent.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/$parent.js
function $parent(name = void 0) { function $parent(name = void 0) {
let parent = this.$parent; let parent = this.$parent;
while (parent) { while (parent) {
@@ -958,7 +958,7 @@ function $parent(name = void 0) {
return false; return false;
} }
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/sys.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/sys.js
function os() { function os() {
return uni.getSystemInfoSync().platform; return uni.getSystemInfoSync().platform;
} }
@@ -966,7 +966,7 @@ function sys() {
return uni.getSystemInfoSync(); return uni.getSystemInfoSync();
} }
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/debounce.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/debounce.js
var timeout = null; var timeout = null;
function debounce(func, wait = 500, immediate = false) { function debounce(func, wait = 500, immediate = false) {
if (timeout !== null) if (timeout !== null)
@@ -986,7 +986,7 @@ function debounce(func, wait = 500, immediate = false) {
} }
var debounce_default = debounce; var debounce_default = debounce;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/function/throttle.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/function/throttle.js
var timer; var timer;
var flag; var flag;
function throttle(func, wait = 500, immediate = true) { function throttle(func, wait = 500, immediate = true) {
@@ -1010,7 +1010,7 @@ function throttle(func, wait = 500, immediate = true) {
} }
var throttle_default = throttle; var throttle_default = throttle;
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/config/config.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/config/config.js
var version = "1.8.8"; var version = "1.8.8";
var config_default = { var config_default = {
v: version, v: version,
@@ -1025,7 +1025,7 @@ var config_default = {
] ]
}; };
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/libs/config/zIndex.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/libs/config/zIndex.js
var zIndex_default = { var zIndex_default = {
toast: 10090, toast: 10090,
noNetwork: 10080, noNetwork: 10080,
@@ -1038,7 +1038,7 @@ var zIndex_default = {
indexListSticky: 965 indexListSticky: 965
}; };
// C:/Users/Administrator.DESKTOP-IRCM9I0/Desktop/locker-fans/locker-fans/uni-fans/node_modules/uview-ui/index.js // ../../../../../../Users/apple/Documents/subject/locker-fans/uni-fans/node_modules/uview-ui/index.js
function wranning(str) { function wranning(str) {
if (true) { if (true) {
console.warn(str); console.warn(str);
@@ -1 +1 @@
{"version":3,"file":"index.js","sources":["pages/feedback/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/apple/Documents/subject/locker-fans/uni-fans/pages/feedback/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,GAAG,WAAW,eAAe;"} {"version":3,"file":"index.js","sources":["pages/feedback/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/apple/Documents/subject/locker-fans/uni-fans/pages/feedback/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,GAAG,WAAW,eAAe;"}
+2 -2
View File
@@ -6874,9 +6874,9 @@ function initOnError() {
}; };
} }
function initRuntimeSocketService() { function initRuntimeSocketService() {
const hosts = "127.0.0.1,192.168.10.22,10.8.0.5"; const hosts = "127.0.0.1,192.168.10.9";
const port = "8090"; const port = "8090";
const id = "mp-weixin_PMV8-V"; const id = "mp-weixin_F5FmSr";
const lazy = typeof swan !== "undefined"; const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => { let restoreError = lazy ? () => {
} : initOnError(); } : initOnError();
+33 -3
View File
@@ -47,9 +47,39 @@ const _sfc_main = {
}); });
return; return;
} }
common_vendor.index.showToast({ const feedbackData = {
title: "提交成功", type: this.types[this.selectedType],
icon: "success" content: this.description,
phone: this.contact,
images: this.images
};
common_vendor.index.request({
url: "/app/feedback/add",
method: "POST",
data: feedbackData,
success: (res) => {
if (res.statusCode === 200) {
common_vendor.index.showToast({
title: "提交成功",
icon: "success"
});
this.selectedType = -1;
this.description = "";
this.contact = "";
this.images = [];
} else {
common_vendor.index.showToast({
title: "提交失败",
icon: "none"
});
}
},
fail: () => {
common_vendor.index.showToast({
title: "提交失败",
icon: "none"
});
}
}); });
} }
} }
+1 -1
View File
@@ -1 +1 @@
<view class="payment-container data-v-13c3fb22"><view class="status-card data-v-13c3fb22"><view class="{{['status-icon', 'data-v-13c3fb22', a]}}"></view><view class="status-text data-v-13c3fb22">{{b}}</view><view class="status-desc data-v-13c3fb22">{{c}}</view></view><view class="order-card data-v-13c3fb22"><view class="card-title data-v-13c3fb22">订单信息</view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">订单号</text><text class="value data-v-13c3fb22">{{d}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">设备号</text><text class="value data-v-13c3fb22">{{e}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">创建时间</text><text class="value data-v-13c3fb22">{{f}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">联系电话</text><text class="value data-v-13c3fb22">{{g}}</text></view></view><view class="price-card data-v-13c3fb22"><view class="card-title data-v-13c3fb22">费用信息</view><view class="price-item data-v-13c3fb22"><text class="label data-v-13c3fb22">押金</text><text class="value data-v-13c3fb22">¥{{h}}</text></view><view class="price-item data-v-13c3fb22"><text class="label data-v-13c3fb22">套餐</text><text class="value data-v-13c3fb22">{{i}}元/{{j}}小时</text></view><view class="price-item total data-v-13c3fb22"><text class="label data-v-13c3fb22">合计</text><text class="value data-v-13c3fb22">¥{{k}}</text></view></view><view class="bottom-bar data-v-13c3fb22"><view class="total-amount data-v-13c3fb22"><text class="data-v-13c3fb22">合计:</text><text class="amount data-v-13c3fb22">¥{{l}}</text></view><button class="pay-btn data-v-13c3fb22" bindtap="{{m}}">立即支付</button></view></view> <view class="payment-container data-v-13c3fb22"><view class="status-card data-v-13c3fb22"><view class="{{['status-icon', 'data-v-13c3fb22', a]}}"></view><view class="status-text data-v-13c3fb22">{{b}}</view><view class="status-desc data-v-13c3fb22">{{c}}</view></view><view class="order-card data-v-13c3fb22"><view class="card-title data-v-13c3fb22">订单信息</view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">订单号</text><text class="value data-v-13c3fb22">{{d}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">设备号</text><text class="value data-v-13c3fb22">{{e}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">创建时间</text><text class="value data-v-13c3fb22">{{f}}</text></view><view class="info-item data-v-13c3fb22"><text class="label data-v-13c3fb22">联系电话</text><text class="value data-v-13c3fb22">{{g}}</text></view></view><view class="price-card data-v-13c3fb22"><view class="card-title data-v-13c3fb22">费用信息</view><view class="pric 为了回馈他家新近三月公共努力公司决定五一假期22月1号减少,你喜欢这种什么嘿Siri换一个换一个App吃幼儿园那他那e-item data-v-13c3fb22"><text class="label data-v-13c3fb22">押金</text><text class="value data-v-13c3fb22">¥{{h}}</text></view><view class="price-item data-v-13c3fb22"><text class="label data-v-13c3fb22">套餐</text><text class="value data-v-13c3fb22">{{i}}元/{{j}}小时</text></view><view class="price-item total data-v-13c3fb22"><text class="label data-v-13c3fb22">合计</text><text class="value data-v-13c3fb22">¥{{k}}</text></view></view><view class="bottom-bar data-v-13c3fb22"><view class="total-amount data-v-13c3fb22"><text class="data-v-13c3fb22">合计:</text><text class="amount data-v-13c3fb22">¥{{l}}</text></view><button class="pay-btn data-v-13c3fb22" bindtap="{{m}}">立即支付</button></view></view>