feat(feedback): 实现反馈表单提交功能并清空表单数据
在反馈页面中,新增了表单提交功能,用户提交反馈后,表单数据将被清空。同时,处理了提交成功和失败的场景,并显示相应的提示信息。
This commit is contained in:
+332
-299
@@ -1,300 +1,333 @@
|
||||
<template>
|
||||
<view class="feedback-container">
|
||||
<!-- 问题类型选择 -->
|
||||
<view class="type-section">
|
||||
<view class="section-title">问题类型</view>
|
||||
<view class="type-grid">
|
||||
<view
|
||||
v-for="(type, index) in types"
|
||||
:key="index"
|
||||
class="type-item"
|
||||
:class="{ active: selectedType === index }"
|
||||
@click="selectType(index)"
|
||||
>
|
||||
{{ type }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 问题描述 -->
|
||||
<view class="description-section">
|
||||
<view class="section-title">问题描述</view>
|
||||
<textarea
|
||||
class="description-input"
|
||||
v-model="description"
|
||||
placeholder="请详细描述您遇到的问题,以便我们更好地为您解决"
|
||||
maxlength="500"
|
||||
/>
|
||||
<view class="word-count">{{ description.length }}/500</view>
|
||||
</view>
|
||||
|
||||
<!-- 图片上传 -->
|
||||
<view class="upload-section">
|
||||
<view class="section-title">图片上传(选填)</view>
|
||||
<view class="upload-grid">
|
||||
<view
|
||||
class="upload-item"
|
||||
v-for="(img, index) in images"
|
||||
:key="index"
|
||||
>
|
||||
<image :src="img" mode="aspectFill" />
|
||||
<view class="delete-btn" @click="deleteImage(index)">×</view>
|
||||
</view>
|
||||
<view class="upload-btn" @click="chooseImage" v-if="images.length < 3">
|
||||
<text class="plus">+</text>
|
||||
<text class="tip">上传图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 联系方式 -->
|
||||
<view class="contact-section">
|
||||
<view class="section-title">联系方式</view>
|
||||
<input
|
||||
class="contact-input"
|
||||
v-model="contact"
|
||||
placeholder="请留下您的手机号,方便我们联系您"
|
||||
type="number"
|
||||
maxlength="11"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<view class="submit-section">
|
||||
<button class="submit-btn" @click="submitFeedback">提交反馈</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
types: ['设备故障', '收费问题', '使用建议', '其他'],
|
||||
selectedType: -1,
|
||||
description: '',
|
||||
images: [],
|
||||
contact: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectType(index) {
|
||||
this.selectedType = index
|
||||
},
|
||||
chooseImage() {
|
||||
uni.chooseImage({
|
||||
count: 3 - this.images.length,
|
||||
success: (res) => {
|
||||
this.images = [...this.images, ...res.tempFilePaths]
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteImage(index) {
|
||||
this.images.splice(index, 1)
|
||||
},
|
||||
submitFeedback() {
|
||||
if (this.selectedType === -1) {
|
||||
uni.showToast({
|
||||
title: '请选择问题类型',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.description.trim()) {
|
||||
uni.showToast({
|
||||
title: '请描述您的问题',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.contact) {
|
||||
uni.showToast({
|
||||
title: '请留下联系方式',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: 提交反馈
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.feedback-container {
|
||||
min-height: 100vh;
|
||||
background: #f8f8f8;
|
||||
padding: 30rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.type-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.type-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10rpx;
|
||||
|
||||
.type-item {
|
||||
width: calc(50% - 20rpx);
|
||||
margin: 10rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f5f5f5;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
transition: all 0.3s;
|
||||
|
||||
&.active {
|
||||
background: #E3F2FD;
|
||||
color: #1976D2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.description-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.description-input {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
background: #f8f8f8;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.word-count {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.upload-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.upload-item {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: -10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-btn {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
|
||||
.plus {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contact-section {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<template>
|
||||
<view class="feedback-container">
|
||||
<!-- 问题类型选择 -->
|
||||
<view class="type-section">
|
||||
<view class="section-title">问题类型</view>
|
||||
<view class="type-grid">
|
||||
<view
|
||||
v-for="(type, index) in types"
|
||||
:key="index"
|
||||
class="type-item"
|
||||
:class="{ active: selectedType === index }"
|
||||
@click="selectType(index)"
|
||||
>
|
||||
{{ type }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 问题描述 -->
|
||||
<view class="description-section">
|
||||
<view class="section-title">问题描述</view>
|
||||
<textarea
|
||||
class="description-input"
|
||||
v-model="description"
|
||||
placeholder="请详细描述您遇到的问题,以便我们更好地为您解决"
|
||||
maxlength="500"
|
||||
/>
|
||||
<view class="word-count">{{ description.length }}/500</view>
|
||||
</view>
|
||||
|
||||
<!-- 图片上传 -->
|
||||
<view class="upload-section">
|
||||
<view class="section-title">图片上传(选填)</view>
|
||||
<view class="upload-grid">
|
||||
<view
|
||||
class="upload-item"
|
||||
v-for="(img, index) in images"
|
||||
:key="index"
|
||||
>
|
||||
<image :src="img" mode="aspectFill" />
|
||||
<view class="delete-btn" @click="deleteImage(index)">×</view>
|
||||
</view>
|
||||
<view class="upload-btn" @click="chooseImage" v-if="images.length < 3">
|
||||
<text class="plus">+</text>
|
||||
<text class="tip">上传图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 联系方式 -->
|
||||
<view class="contact-section">
|
||||
<view class="section-title">联系方式</view>
|
||||
<input
|
||||
class="contact-input"
|
||||
v-model="contact"
|
||||
placeholder="请留下您的手机号,方便我们联系您"
|
||||
type="number"
|
||||
maxlength="11"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<view class="submit-section">
|
||||
<button class="submit-btn" @click="submitFeedback">提交反馈</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
types: ['设备故障', '收费问题', '使用建议', '其他'],
|
||||
selectedType: -1,
|
||||
description: '',
|
||||
images: [],
|
||||
contact: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectType(index) {
|
||||
this.selectedType = index
|
||||
},
|
||||
chooseImage() {
|
||||
uni.chooseImage({
|
||||
count: 3 - this.images.length,
|
||||
success: (res) => {
|
||||
this.images = [...this.images, ...res.tempFilePaths]
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteImage(index) {
|
||||
this.images.splice(index, 1)
|
||||
},
|
||||
submitFeedback() {
|
||||
if (this.selectedType === -1) {
|
||||
uni.showToast({
|
||||
title: '请选择问题类型',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.description.trim()) {
|
||||
uni.showToast({
|
||||
title: '请描述您的问题',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.contact) {
|
||||
uni.showToast({
|
||||
title: '请留下联系方式',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 构建反馈数据
|
||||
const feedbackData = {
|
||||
type: this.types[this.selectedType],
|
||||
content: this.description,
|
||||
phone: this.contact,
|
||||
images: this.images
|
||||
}
|
||||
|
||||
// 调用提交接口
|
||||
uni.request({
|
||||
url: '/app/feedback/add',
|
||||
method: 'POST',
|
||||
data: feedbackData,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 清空表单
|
||||
this.selectedType = -1
|
||||
this.description = ''
|
||||
this.contact = ''
|
||||
this.images = []
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.feedback-container {
|
||||
min-height: 100vh;
|
||||
background: #f8f8f8;
|
||||
padding: 30rpx;
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.type-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.type-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10rpx;
|
||||
|
||||
.type-item {
|
||||
width: calc(50% - 20rpx);
|
||||
margin: 10rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f5f5f5;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
transition: all 0.3s;
|
||||
|
||||
&.active {
|
||||
background: #E3F2FD;
|
||||
color: #1976D2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.description-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.description-input {
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
background: #f8f8f8;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.word-count {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.upload-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.upload-item {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: -10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-btn {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
|
||||
.plus {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contact-section {
|
||||
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>
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- 费用信息 -->
|
||||
<view class="price-card">
|
||||
<view class="card-title">费用信息</view>
|
||||
<view class="price-item">
|
||||
<view class="pric 为了回馈他家新近三月公共努力公司决定五一假期22月1号减少,你喜欢这种什么嘿Siri换一个换一个App吃幼儿园那他那e-item">
|
||||
<text class="label">押金</text>
|
||||
<text class="value">¥{{ orderInfo.deposit || '99.00' }}</text>
|
||||
</view>
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"hash": "eecc45c6",
|
||||
"configHash": "e4fbd916",
|
||||
"hash": "1aab2153",
|
||||
"configHash": "d5af41b4",
|
||||
"lockfileHash": "78df9316",
|
||||
"browserHash": "8d847c28",
|
||||
"browserHash": "506545f1",
|
||||
"optimized": {
|
||||
"uview-ui": {
|
||||
"src": "../../../../../node_modules/uview-ui/index.js",
|
||||
"file": "uview-ui.js",
|
||||
"fileHash": "b095c49f",
|
||||
"fileHash": "4f573264",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
|
||||
+28
-28
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
||||
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({
|
||||
"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 = {
|
||||
data() {
|
||||
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());
|
||||
|
||||
// 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()) {
|
||||
if (obj === null || typeof obj !== "object")
|
||||
return obj;
|
||||
@@ -116,7 +116,7 @@ function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) {
|
||||
}
|
||||
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 = {}) {
|
||||
target = deepClone_default(target);
|
||||
if (typeof target !== "object" || target === null || typeof source !== "object" || source === null)
|
||||
@@ -145,7 +145,7 @@ function deepMerge(target = {}, source = {}) {
|
||||
}
|
||||
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) {
|
||||
return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ var test_default = {
|
||||
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 {
|
||||
// 设置全局默认配置
|
||||
setConfig(customConfig) {
|
||||
@@ -424,7 +424,7 @@ var Request = class {
|
||||
};
|
||||
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") {
|
||||
let prefix = isPrefix ? "?" : "";
|
||||
let _result = [];
|
||||
@@ -472,7 +472,7 @@ function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
|
||||
}
|
||||
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 {
|
||||
constructor() {
|
||||
this.config = {
|
||||
@@ -571,7 +571,7 @@ var Router = class {
|
||||
};
|
||||
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) {
|
||||
String.prototype.padStart = function(maxLength, fillString = " ") {
|
||||
if (Object.prototype.toString.call(fillString) !== "[object String]")
|
||||
@@ -625,7 +625,7 @@ function timeFormat(dateTime = null, fmt = "yyyy-mm-dd") {
|
||||
}
|
||||
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") {
|
||||
if (!dateTime)
|
||||
dateTime = Number(/* @__PURE__ */ new Date());
|
||||
@@ -662,7 +662,7 @@ function timeFrom(dateTime = null, format = "yyyy-mm-dd") {
|
||||
}
|
||||
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) {
|
||||
let startRGB = hexToRgb(startColor, false);
|
||||
let startR = startRGB[0];
|
||||
@@ -770,7 +770,7 @@ var colorGradient_default = {
|
||||
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) {
|
||||
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
||||
let uuid = [];
|
||||
@@ -798,7 +798,7 @@ function guid(len = 32, firstU = true, radix = null) {
|
||||
}
|
||||
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 = {
|
||||
primary: "#2979ff",
|
||||
primaryDark: "#2b85e4",
|
||||
@@ -829,7 +829,7 @@ var 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) {
|
||||
if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
|
||||
type = "success";
|
||||
@@ -859,19 +859,19 @@ function type2icon(type = "success", fill = false) {
|
||||
}
|
||||
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 = []) {
|
||||
return array2.sort(() => Math.random() - 0.5);
|
||||
}
|
||||
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") {
|
||||
value = String(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) {
|
||||
if (min >= 0 && max > 0 && max >= min) {
|
||||
let gab = max - min + 1;
|
||||
@@ -882,7 +882,7 @@ function random(min, max) {
|
||||
}
|
||||
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") {
|
||||
if (pos == "both") {
|
||||
return str.replace(/^\s+|\s+$/g, "");
|
||||
@@ -898,7 +898,7 @@ function trim(str, pos = "both") {
|
||||
}
|
||||
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) {
|
||||
uni.showToast({
|
||||
title,
|
||||
@@ -908,7 +908,7 @@ function toast(title, duration = 1500) {
|
||||
}
|
||||
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) {
|
||||
let parent = this.$parent;
|
||||
while (parent) {
|
||||
@@ -945,7 +945,7 @@ function getParent(name, keys) {
|
||||
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) {
|
||||
let parent = this.$parent;
|
||||
while (parent) {
|
||||
@@ -958,7 +958,7 @@ function $parent(name = void 0) {
|
||||
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() {
|
||||
return uni.getSystemInfoSync().platform;
|
||||
}
|
||||
@@ -966,7 +966,7 @@ function sys() {
|
||||
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;
|
||||
function debounce(func, wait = 500, immediate = false) {
|
||||
if (timeout !== null)
|
||||
@@ -986,7 +986,7 @@ function debounce(func, wait = 500, immediate = false) {
|
||||
}
|
||||
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 flag;
|
||||
function throttle(func, wait = 500, immediate = true) {
|
||||
@@ -1010,7 +1010,7 @@ function throttle(func, wait = 500, immediate = true) {
|
||||
}
|
||||
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 config_default = {
|
||||
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 = {
|
||||
toast: 10090,
|
||||
noNetwork: 10080,
|
||||
@@ -1038,7 +1038,7 @@ var zIndex_default = {
|
||||
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) {
|
||||
if (true) {
|
||||
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
@@ -6874,9 +6874,9 @@ function initOnError() {
|
||||
};
|
||||
}
|
||||
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 id = "mp-weixin_PMV8-V";
|
||||
const id = "mp-weixin_F5FmSr";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
+33
-3
@@ -47,9 +47,39 @@ const _sfc_main = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
const feedbackData = {
|
||||
type: this.types[this.selectedType],
|
||||
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
@@ -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>
|
||||
Reference in New Issue
Block a user