瀏覽代碼

充电结束增加反馈意见

wkyy 2 年之前
父節點
當前提交
2f9d0f29e5
共有 2 個文件被更改,包括 37 次插入3 次删除
  1. 13 1
      pages/index/index.vue
  2. 24 2
      pages/searchPile/chargeProcess/dcCharging.vue

+ 13 - 1
pages/index/index.vue

@@ -196,7 +196,7 @@
 				<view class="left-image">
 					<p>充电免服务费包月卡</p>
 					<view class="time-activities">
-						限时活动 <text class="time">127:59:59</text>
+						限时活动 <text class="time">{{description}}</text>
 					</view>
 				</view>
 				<view class="right-image" v-if="activityList.length > 0">
@@ -298,6 +298,7 @@
 				value: '长辈模式',
 				elderStatus: false,
 				fontMode: '',
+				description: ''
 			}
 		},
 		onLoad(op) {
@@ -365,8 +366,19 @@
 			this.getPointTimeOut();
 			this.getNewsList();
 			this.getActivityInfoList();
+			this.getDescriptionTime();
 		},
 		methods: {
+			getDescriptionTime() {
+				var data = new Date().getMonth();
+				console.log(data)
+				var dataTime2=new Date('2022-07-25 16:20:00').getTime()
+				var c=hourDistanceArr(new Date(),new Date(dataTime2+2*60*60*1000))
+				this.description= c[0]+':'+c[1]+':'+c[2];
+				// setTimeout(()=>{
+				// 	this.getDescriptionTime();
+				// },1000)
+			},
 			getUserInfo() {
 				uni.showLoading({
 					title: "加载中",

+ 24 - 2
pages/searchPile/chargeProcess/dcCharging.vue

@@ -128,8 +128,8 @@
 				<view class="title-2">
 					请在下方描述您所遇到的问题,或填写您的反馈意见。我们将对优质内容的反馈者发放奖励!
 				</view>
-				<textarea value="" placeholder="请填写反馈内容" />
-				<u-button class="submit" type="success">提交</u-button>
+				<textarea value="" v-model="message" placeholder="请填写反馈内容" />
+				<u-button class="submit" type="success" @click="submitMessage">提交</u-button>
 			</view>
 		</view>
 
@@ -299,6 +299,7 @@
 <script>
 	import * as API from '@/apis/chargeProcess.js'
 	import * as API_weixin from '@/apis/weixin.js'
+	import * as userAPI from '@/apis/user.js'
 	
 	import {
 		secondsDistance,
@@ -307,6 +308,7 @@
 	export default {
 		data() {
 			return {
+				message: '',
 				elderMode:false,
 				timer:'',
 				title: '联系客服',
@@ -384,6 +386,26 @@
 			}
 		},
 		methods: {
+			submitMessage() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				userAPI.feedback({content: this.message}).then(response => {
+					uni.hideLoading()
+					uni.showModal({
+						title: '提示',
+						content: '提交成功',
+						showCancel:false,
+						confirmColor: '#19be6b'
+					});
+					this.message = '';
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
 			theme(type) {
 				
 			  if(type == 'elder')