| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <view class="page" style="background-color: #ffffff" v-if="XCXIsSelect == '是'">
- <view class="feedback-title">
- <text>问题和意见</text>
- <text @tap="chooseMsg">快速键入</text>
- </view>
- <view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.feedbackMessage" class="feedback-textare" /></view>
- <view class="feedback-title"><text>联系方式</text></view>
- <view class="feedback-body"><input class="feedback-input" v-model="sendDate.userEmail" placeholder="方便我们联系你" /></view>
- <button style="" class="feedback-submit" @tap="send">提交</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- XCXIsSelect: '是',
- msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
- sendDate: {
- score: 5,
- feedbackMessage: '',
- userEmail: ''
- }
- }
- },
- onLoad() {
- this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
- // let deviceInfo = {
- // appid: plus.runtime.appid,
- // imei: plus.device.imei, //设备标识
- // p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
- // md: plus.device.model, //设备型号
- // app_version: plus.runtime.version,
- // plus_version: plus.runtime.innerVersion, //基座版本号
- // os: plus.os.version,
- // net: '' + plus.networkinfo.getCurrentType()
- // };
- // this.sendDate = Object.assign(deviceInfo, this.sendDate);
- },
- methods: {
- chooseMsg() {
- //快速输入
- uni.showActionSheet({
- itemList: this.msgContents,
- success: (res) => {
- this.sendDate.feedbackMessage = this.msgContents[res.tapIndex]
- }
- })
- },
- send() {
- //发送反馈
- console.log(JSON.stringify(this.sendDate))
- if (!this.sendDate.feedbackMessage) {
- uni.showToast({
- icon: 'none',
- title: '请输入反馈内容'
- })
- return
- }
- if (!this.sendDate.userEmail) {
- uni.showToast({
- icon: 'none',
- title: '请填写联系方式'
- })
- return
- }
- this.$queue.showLoading('加载中...')
- this.$Request
- .postJson('/app/userinfo/userFeedback', {
- userEmail: this.sendDate.userEmail,
- feedbackMessage: this.sendDate.feedbackMessage,
- feedbackType: 1
- })
- .then((res) => {
- if (res.code === 0) {
- uni.showToast({
- title: '提交成功'
- })
- setTimeout(function () {
- uni.navigateBack()
- }, 1000)
- } else {
- uni.hideLoading()
- uni.showModal({
- showCancel: false,
- title: '提交失败',
- feedbackMessage: res.msg
- })
- }
- })
- }
- }
- }
- </script>
- <style>
- @font-face {
- font-family: uniicons;
- font-weight: normal;
- font-style: normal;
- src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
- }
- page {
- background-color: #f5f5f5 !important;
- }
- view {
- font-size: 28upx;
- }
- /*问题反馈*/
- .feedback-title {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding: 20upx;
- color: #8f8f94;
- font-size: 28upx;
- }
- .feedback-star-view.feedback-title {
- justify-content: flex-start;
- margin: 0;
- }
- .feedback-body {
- font-size: 32upx;
- padding: 16upx;
- margin: 16upx;
- border-radius: 16upx;
- background: #ffffff;
- /* color: #FFF; */
- }
- .feedback-textare {
- height: 200upx;
- font-size: 34upx;
- line-height: 50upx;
- width: 100%;
- box-sizing: border-box;
- padding: 20upx 30upx 0;
- }
- .feedback-input {
- font-size: 32upx;
- height: 60upx;
- /* padding: 15upx 20upx; */
- line-height: 60upx;
- }
- .feedback-submit {
- background: #ffcc00;
- /* color: #ffffff; */
- margin: 20upx;
- margin-top: 32upx;
- }
- </style>
|