tijiao
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
|
||||
<view class="header_box"></view>
|
||||
<view class="appJump">
|
||||
<view class="everhealth item flexbox" @click="appjumpfun('everhealth')" v-if="$platform!='ios'">
|
||||
<view
|
||||
class="everhealth item flexbox"
|
||||
@click="appjumpfun('everhealth')"
|
||||
v-if="$platform != 'ios'"
|
||||
>
|
||||
<view class="img">
|
||||
<image
|
||||
src="@/static/icon/ic_login_health.png"
|
||||
@@ -116,18 +120,81 @@
|
||||
></image>
|
||||
</view>
|
||||
|
||||
<view class="flash_sale_content" style="margin-top: 40rpx">
|
||||
<view class="flash_sale_content" style="margin-top: 40rpx;height: auto !important;">
|
||||
<scroll-view scroll-x="true" class="scroll-X" style="">
|
||||
<view
|
||||
class="scroll-view-item flash_sale_content_item"
|
||||
@click="goGoodsDetail(v)"
|
||||
style="position: relative;"
|
||||
v-for="(v, i) in seckillLst"
|
||||
>
|
||||
> <view v-if="v.isVipPrice==1&&v.vipPrice!=0&&v.vipPrice!=null"
|
||||
style="z-index: 10;position: absolute;top: 10rpx;left: 10px;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4rpx;box-sizing: border-box;">
|
||||
VIP优惠</view>
|
||||
<image class="book_image" :src="v.productImages" mode="aspectFit">
|
||||
</image>
|
||||
<view class="book_name" style="padding-bottom: 20rpx">{{
|
||||
<view class="book_name" style="padding-bottom: 20rpx;font-weight: 500;font-size: 28rpx;">{{
|
||||
v.productName
|
||||
}}</view>
|
||||
<view>
|
||||
<!-- v-if="
|
||||
item.isVipPrice == 1 &&
|
||||
item.vipPrice != 0 &&
|
||||
item.vipPrice != null
|
||||
" -->
|
||||
<text
|
||||
class="price"
|
||||
v-if="
|
||||
v.isVipPrice == 1 &&
|
||||
v.vipPrice != 0 &&
|
||||
v.vipPrice != null
|
||||
"
|
||||
>
|
||||
<text
|
||||
style="color: #e97512; font-size: 28rpx; font-weight: bold"
|
||||
>¥{{ v.vipPrice }}</text
|
||||
>
|
||||
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 22rpx;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(v.price) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else-if="v.activityPrice && v.activityPrice > 0"
|
||||
class="price"
|
||||
>
|
||||
<text
|
||||
style="color: #e97512; font-size: 28rpx; font-weight: bold"
|
||||
>¥{{ v.activityPrice }}</text
|
||||
>
|
||||
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 22rpx;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(v.price) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text v-else class="price" style="color: #e97512; font-size: 28rpx; font-weight: bold"
|
||||
>¥{{ Number(v.price) }}</text
|
||||
>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -339,7 +406,7 @@ export default {
|
||||
},
|
||||
function (e) {
|
||||
console.log("Open system default browser failed: " + e.message);
|
||||
}
|
||||
},
|
||||
);
|
||||
} else if (plus.os.name == "iOS") {
|
||||
// plus.runtime.launchApplication(
|
||||
@@ -503,15 +570,16 @@ export default {
|
||||
bagName = "com.cn.nuttyreading";
|
||||
schemes = "nuttyreading";
|
||||
appId = "6446239659";
|
||||
|
||||
}
|
||||
if (name == "everhealth") {
|
||||
bagName = "cn.com.everhealth";
|
||||
schemes = "everhealth"; appId = "1073393620";
|
||||
schemes = "everhealth";
|
||||
appId = "1073393620";
|
||||
}
|
||||
if (name == "medicine") {
|
||||
bagName = "com.cn.medicine";
|
||||
schemes = "medicine"; appId = "6523420507";
|
||||
schemes = "medicine";
|
||||
appId = "6523420507";
|
||||
}
|
||||
// if(name == 'everhealth'){
|
||||
if (plus.os.name == "Android") {
|
||||
@@ -542,7 +610,7 @@ export default {
|
||||
//这链接会判断你手机是ios还是Android,Android进入应用宝下载app
|
||||
//跟下面的是一个链接
|
||||
console.log(res);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
} else if (plus.os.name == "iOS") {
|
||||
@@ -573,12 +641,12 @@ export default {
|
||||
function (e) {
|
||||
// 失败回调,说明 B App 未安装
|
||||
plus.runtime.openURL(
|
||||
"itms-apps://itunes.apple.com/app/"+appId, // 目标 App 的 App Store 下载链接(替换成实际 ID)
|
||||
"itms-apps://itunes.apple.com/app/" + appId, // 目标 App 的 App Store 下载链接(替换成实际 ID)
|
||||
function (res) {
|
||||
console.log("跳转 App Store 失败", res);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -819,14 +887,14 @@ function calcTimer(timer) {
|
||||
|
||||
.flash_sale_content_item {
|
||||
display: inline-block;
|
||||
width: 165rpx;
|
||||
width: 32%;
|
||||
|
||||
margin-right: 12rpx;
|
||||
margin-right: 1%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.book_image {
|
||||
width: 165rpx;
|
||||
width: 100%;
|
||||
height: 192rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template><page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<template>
|
||||
<page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
@@ -85,7 +86,7 @@ export default {
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;")
|
||||
.replace(/width:[^;]+;/gi, "max-width:100%;");
|
||||
return match;
|
||||
}
|
||||
},
|
||||
);
|
||||
// newContent = newContent.replace(/<img[^>]*>/gi, function(match, capture) {
|
||||
// match = match.replace(/<img[^>]*>/gi, "@click='1111'").replace(/<img[^>]*>/gi, "@click='1111'");
|
||||
@@ -94,7 +95,7 @@ export default {
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, "");
|
||||
newContent = newContent.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"'
|
||||
'<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"',
|
||||
);
|
||||
return newContent;
|
||||
},
|
||||
|
||||
@@ -1,423 +1,462 @@
|
||||
<template><page-meta
|
||||
<template>
|
||||
<page-meta
|
||||
:page-font-size="$baseFontSize() + 'px'"
|
||||
:root-font-size="$baseFontSize() + 'px'"
|
||||
></page-meta>
|
||||
<view class="page">
|
||||
<z-nav-bar></z-nav-bar>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="title">问题反馈/申诉</view>
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<view class="input_box " style="">
|
||||
<uni-forms-item label="" name="type" label-width="0">
|
||||
<view class="">
|
||||
<text class="input_tit"><i>*</i>问题类型:</text>
|
||||
</view>
|
||||
<view class="in" style="flex: 1; border: none;">
|
||||
<!-- <input type="text" v-model="form.type" placeholder="请输入手机号/邮箱" />
|
||||
<view class="page">
|
||||
<z-nav-bar></z-nav-bar>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="title">问题反馈/申诉</view>
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<view class="input_box" style="">
|
||||
<uni-forms-item label="" name="type" label-width="0">
|
||||
<view class="">
|
||||
<text class="input_tit"><i>*</i>问题类型:</text>
|
||||
</view>
|
||||
<view class="in" style="flex: 1; border: none">
|
||||
<!-- <input type="text" v-model="form.type" placeholder="请输入手机号/邮箱" />
|
||||
-->
|
||||
<uni-data-select style="width: 100%;" v-model="form.type"
|
||||
:localdata="typeLIst"></uni-data-select>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="account" label-width="0">
|
||||
<text class="input_tit"><i>*</i>众秒之门账号:</text>
|
||||
<view class="in">
|
||||
<input placeholder-style="font-size:26rpx" type="text" v-model="form.account"
|
||||
placeholder="请输入手机号/邮箱" />
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box" v-if="form.type == 3">
|
||||
<uni-forms-item label="" name="relation" label-width="0">
|
||||
<text class="input_tit"><i>*</i>订单编号:</text>
|
||||
<view class="in">
|
||||
<input type="number" @input="relationInput" placeholder-style="font-size:26rpx"
|
||||
v-model="form.relation" placeholder="请输入订单编号" />
|
||||
</view>
|
||||
<text v-show="relationError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">请填写订单编号</text>
|
||||
<text v-show="relationErrorPattern"
|
||||
style="font-size: 24rpx; color: red; margin-top: 10rpx;">订单编号格式错误</text>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="content" label-width="0">
|
||||
<text class="input_tit"><i>*</i>问题描述:</text>
|
||||
<view class="in">
|
||||
<view class="uni-textarea">
|
||||
<textarea placeholder-style="font-size:26rpx" v-model="form.content" maxlength="200"
|
||||
placeholder="请输入您要反馈的问题" />
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="contactInformation" label-width="0">
|
||||
<text class="input_tit"><i>*</i>联系电话:</text>
|
||||
{{reversedMessage}}
|
||||
<view class="in">
|
||||
<input type="number" placeholder-style="font-size:26rpx" @input="telInput"
|
||||
v-model="form.contactInformation" placeholder="请输入与您联系的手机号" />
|
||||
</view>
|
||||
<text v-show="telError" style="font-size: 24rpx; color: red; margin-top: 10rpx;">手机号格式错误</text>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<uni-data-select
|
||||
style="width: 100%"
|
||||
v-model="form.type"
|
||||
:localdata="typeLIst"
|
||||
></uni-data-select>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="account" label-width="0">
|
||||
<text class="input_tit"><i>*</i>众秒之门账号:</text>
|
||||
<view class="in">
|
||||
<input
|
||||
placeholder-style="font-size:26rpx"
|
||||
type="text"
|
||||
v-model="form.account"
|
||||
placeholder="请输入手机号/邮箱"
|
||||
/>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box" v-if="form.type == 3">
|
||||
<uni-forms-item label="" name="relation" label-width="0">
|
||||
<text class="input_tit"><i>*</i>订单编号:</text>
|
||||
<view class="in">
|
||||
<input
|
||||
type="number"
|
||||
@input="relationInput"
|
||||
placeholder-style="font-size:26rpx"
|
||||
v-model="form.relation"
|
||||
placeholder="请输入订单编号"
|
||||
/>
|
||||
</view>
|
||||
<text
|
||||
v-show="relationError"
|
||||
style="font-size: 24rpx; color: red; margin-top: 10rpx"
|
||||
>请填写订单编号</text
|
||||
>
|
||||
<text
|
||||
v-show="relationErrorPattern"
|
||||
style="font-size: 24rpx; color: red; margin-top: 10rpx"
|
||||
>订单编号格式错误</text
|
||||
>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="content" label-width="0">
|
||||
<text class="input_tit"><i>*</i>问题描述:</text>
|
||||
<view class="in">
|
||||
<view class="uni-textarea">
|
||||
<textarea
|
||||
placeholder-style="font-size:26rpx"
|
||||
v-model="form.content"
|
||||
maxlength="200"
|
||||
placeholder="请输入您要反馈的问题"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<uni-forms-item label="" name="contactInformation" label-width="0">
|
||||
<text class="input_tit"><i>*</i>联系电话:</text>
|
||||
{{ reversedMessage }}
|
||||
<view class="in">
|
||||
<input
|
||||
type="number"
|
||||
placeholder-style="font-size:26rpx"
|
||||
@input="telInput"
|
||||
v-model="form.contactInformation"
|
||||
placeholder="请输入与您联系的手机号"
|
||||
/>
|
||||
</view>
|
||||
<text
|
||||
v-show="telError"
|
||||
style="font-size: 24rpx; color: red; margin-top: 10rpx"
|
||||
>手机号格式错误</text
|
||||
>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
<view class="input_box">
|
||||
<text class="input_tit">问题截图:</text>
|
||||
<view class="in" style="border: none;" @click="checkPermision">
|
||||
<u-upload :fileList="fileList1" @afterRead="addPic" @delete="deletePic" multiple :maxCount="4"
|
||||
width="40" height="40" :previewFullImage="true">
|
||||
</u-upload>
|
||||
<text style="font-size: 24rpx; color: #999;">可上传4张问题截图</text>
|
||||
</view>
|
||||
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
|
||||
</view>
|
||||
</uni-forms>
|
||||
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||
</view>
|
||||
<view class="input_box">
|
||||
<text class="input_tit">问题截图:</text>
|
||||
<view class="in" style="border: none" @click="checkPermision">
|
||||
<u-upload
|
||||
:fileList="fileList1"
|
||||
@afterRead="addPic"
|
||||
@delete="deletePic"
|
||||
multiple
|
||||
:maxCount="4"
|
||||
width="40"
|
||||
height="40"
|
||||
:previewFullImage="true"
|
||||
>
|
||||
</u-upload>
|
||||
<text style="font-size: 24rpx; color: #999">可上传4张问题截图</text>
|
||||
</view>
|
||||
<!-- <input type="password" maxlength="8" v-model="confirmPassword" placeholder="请确认密码" /> -->
|
||||
</view>
|
||||
</uni-forms>
|
||||
<view class="btn_box"><button @click="onSubmit">提 交</button></view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import permission from "@/js_sdk/wa-permission/permission.js"
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileList1: [],
|
||||
playData: {},
|
||||
//手机号账号
|
||||
form: {
|
||||
account: '', // 账号
|
||||
content: '', // 描述
|
||||
image: '', //图片
|
||||
contactInformation: '', // 联系电话
|
||||
relation: '', // 订单号
|
||||
type: null, // 反馈类型
|
||||
},
|
||||
telError: false,
|
||||
relationError: false,
|
||||
relationErrorPattern: false,
|
||||
rules: {
|
||||
account: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入账号',
|
||||
}
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import permission from "@/js_sdk/wa-permission/permission.js";
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileList1: [],
|
||||
playData: {},
|
||||
//手机号账号
|
||||
form: {
|
||||
account: "", // 账号
|
||||
content: "", // 描述
|
||||
image: "", //图片
|
||||
contactInformation: "", // 联系电话
|
||||
relation: "", // 订单号
|
||||
type: null, // 反馈类型
|
||||
},
|
||||
telError: false,
|
||||
relationError: false,
|
||||
relationErrorPattern: false,
|
||||
rules: {
|
||||
account: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: "请输入账号",
|
||||
},
|
||||
],
|
||||
},
|
||||
content: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: "请输入问题描述",
|
||||
},
|
||||
],
|
||||
},
|
||||
contactInformation: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: "请输入联系电话",
|
||||
},
|
||||
],
|
||||
},
|
||||
type: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: "请选择反馈类型",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
pageType: "",
|
||||
typeLIst: [
|
||||
// { value: 0, text: "请选择" },
|
||||
{
|
||||
value: "1",
|
||||
text: "登陆相关问题",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
text: "账号相关问题",
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
text: "订单相关问题",
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
text: "购买相关问题",
|
||||
},
|
||||
{
|
||||
value: "5",
|
||||
text: "VIP相关问题",
|
||||
},
|
||||
{
|
||||
value: "6",
|
||||
text: "充值相关问题",
|
||||
},
|
||||
{
|
||||
value: "7",
|
||||
text: "网络暴力举报",
|
||||
},
|
||||
{
|
||||
value: "8",
|
||||
text: "其他",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
console.log("收到的值", e);
|
||||
this.pageType = e.name;
|
||||
switch (this.pageType) {
|
||||
case "login":
|
||||
this.form.type = "1";
|
||||
break;
|
||||
|
||||
]
|
||||
},
|
||||
content: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入问题描述',
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
contactInformation: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请输入联系电话',
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
type: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '请选择反馈类型',
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
pageType: '',
|
||||
typeLIst: [
|
||||
// { value: 0, text: "请选择" },
|
||||
{
|
||||
value: "1",
|
||||
text: "登陆相关问题"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
text: "账号相关问题"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
text: "订单相关问题"
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
text: "购买相关问题"
|
||||
},
|
||||
{
|
||||
value: "5",
|
||||
text: "VIP相关问题"
|
||||
},
|
||||
{
|
||||
value: "6",
|
||||
text: "充值相关问题"
|
||||
},
|
||||
{
|
||||
value: "7",
|
||||
text: "网络暴力举报"
|
||||
},
|
||||
{
|
||||
value: "8",
|
||||
text: "其他"
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
console.log('收到的值', e);
|
||||
this.pageType = e.name
|
||||
switch (this.pageType) {
|
||||
case "login":
|
||||
this.form.type = '1'
|
||||
break;
|
||||
|
||||
case "order":
|
||||
this.form.type = '3'
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
reversedMessage: function() {
|
||||
// `this` 指向 vm 实例
|
||||
this.form.account = this.userInfo.tel
|
||||
}
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
relationInput(e) {
|
||||
this.relationError = false
|
||||
this.relationErrorPattern = false
|
||||
},
|
||||
telInput(e) {
|
||||
// console.log('键盘输入',e);
|
||||
this.telError = false
|
||||
},
|
||||
async checkPermision() {
|
||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE")
|
||||
if (result != 1) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async addPic(e) {
|
||||
console.log("添加图片");
|
||||
let that = this;
|
||||
for (var i = 0; i < e.file.length; i++) {
|
||||
//console.log(i,e.file[i].url)
|
||||
uni.uploadFile({
|
||||
url: this.$baseUrl + "oss/fileoss",
|
||||
filePath: e.file[i].url,
|
||||
//files:e.file,
|
||||
name: "file",
|
||||
formData: {},
|
||||
success: (res) => {
|
||||
that.fileList1.push({
|
||||
url: JSON.parse(res.data).url,
|
||||
});
|
||||
console.log(that.fileList1, "that.uploadPicLIst");
|
||||
},
|
||||
fail: (error) => {
|
||||
console.log("上传失败", error);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1)
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
if (this.form.type == 3) {
|
||||
if (this.form.relation == '') {
|
||||
this.relationError = true
|
||||
return
|
||||
} else {
|
||||
if (!this.$base.orderRegular.test(this.form.relation)) {
|
||||
this.relationErrorPattern = true
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1
|
||||
_list = _list.map(item => item.url)
|
||||
// console.log('this.fileList1',_list);
|
||||
this.form.image = _list.join(',')
|
||||
}
|
||||
if (!this.$base.phoneRegular.test(this.form.contactInformation)) {
|
||||
this.telError = true
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// console.log('this.fileList1',this.form.image);
|
||||
$http.request({
|
||||
url: "common/sysFeedback/addSysFeedback",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
...this.form
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "提交成功!",
|
||||
showCancel: false,
|
||||
success: (res) => {
|
||||
this.fileList1 = []
|
||||
// this.$nextTick(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
// })
|
||||
|
||||
}
|
||||
});
|
||||
}).catch(e => {
|
||||
// console.log('表单错误信息:', err);
|
||||
uni.showToast({
|
||||
title: '提交失败',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}).catch(err => {
|
||||
console.log('表单错误信息:', err);
|
||||
uni.showToast({
|
||||
title: '页面有未填写的内容哦',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
//页面隐藏
|
||||
onHide() {},
|
||||
//页面卸载
|
||||
onUnload() {},
|
||||
//页面下来刷新
|
||||
onPullDownRefresh() {},
|
||||
//页面上拉触底
|
||||
onReachBottom() {},
|
||||
//用户点击分享
|
||||
onShareAppMessage(e) {
|
||||
return this.wxShare();
|
||||
}
|
||||
};
|
||||
case "order":
|
||||
this.form.type = "3";
|
||||
break;
|
||||
}
|
||||
},
|
||||
//页面显示
|
||||
onShow() {},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
reversedMessage: function () {
|
||||
// `this` 指向 vm 实例
|
||||
this.form.account = this.userInfo.tel;
|
||||
},
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
relationInput(e) {
|
||||
this.relationError = false;
|
||||
this.relationErrorPattern = false;
|
||||
},
|
||||
telInput(e) {
|
||||
// console.log('键盘输入',e);
|
||||
this.telError = false;
|
||||
},
|
||||
async checkPermision() {
|
||||
var result = await permission.premissionCheck("CAMERA_EXTERNAL_STORAGE");
|
||||
if (result != 1) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async addPic(e) {
|
||||
console.log("添加图片");
|
||||
let that = this;
|
||||
for (var i = 0; i < e.file.length; i++) {
|
||||
//console.log(i,e.file[i].url)
|
||||
uni.uploadFile({
|
||||
url: this.$baseUrl + "oss/fileoss",
|
||||
filePath: e.file[i].url,
|
||||
//files:e.file,
|
||||
name: "file",
|
||||
formData: {},
|
||||
success: (res) => {
|
||||
that.fileList1.push({
|
||||
url: JSON.parse(res.data).url,
|
||||
});
|
||||
console.log(that.fileList1, "that.uploadPicLIst");
|
||||
},
|
||||
fail: (error) => {
|
||||
console.log("上传失败", error);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
deletePic(event) {
|
||||
this.fileList1.splice(event.index, 1);
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form
|
||||
.validate()
|
||||
.then((res) => {
|
||||
if (this.form.type == 3) {
|
||||
if (this.form.relation == "") {
|
||||
this.relationError = true;
|
||||
return;
|
||||
} else {
|
||||
if (!this.$base.orderRegular.test(this.form.relation)) {
|
||||
this.relationErrorPattern = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.fileList1.length > 0) {
|
||||
let _list = this.fileList1;
|
||||
_list = _list.map((item) => item.url);
|
||||
// console.log('this.fileList1',_list);
|
||||
this.form.image = _list.join(",");
|
||||
}
|
||||
if (!this.$base.phoneRegular.test(this.form.contactInformation)) {
|
||||
this.telError = true;
|
||||
uni.showToast({
|
||||
title: "手机格式不正确",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
// console.log('this.fileList1',this.form.image);
|
||||
$http
|
||||
.request({
|
||||
url: "common/sysFeedback/addSysFeedback",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
...this.form,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "提交成功!",
|
||||
showCancel: false,
|
||||
success: (res) => {
|
||||
this.fileList1 = [];
|
||||
// this.$nextTick(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
// })
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
// console.log('表单错误信息:', err);
|
||||
uni.showToast({
|
||||
title: "提交失败",
|
||||
icon: "error",
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("表单错误信息:", err);
|
||||
uni.showToast({
|
||||
title: "页面有未填写的内容哦",
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
//页面隐藏
|
||||
onHide() {},
|
||||
//页面卸载
|
||||
onUnload() {},
|
||||
//页面下来刷新
|
||||
onPullDownRefresh() {},
|
||||
//页面上拉触底
|
||||
onReachBottom() {},
|
||||
//用户点击分享
|
||||
onShareAppMessage(e) {
|
||||
return this.wxShare();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
::v-deep .uni-forms-item {
|
||||
margin-bottom: 26rpx !important;
|
||||
}
|
||||
::v-deep .uni-forms-item {
|
||||
margin-bottom: 26rpx !important;
|
||||
}
|
||||
|
||||
.input_tit {
|
||||
font-weight: bold;
|
||||
}
|
||||
.input_tit {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.page {
|
||||
background-color: #ffffff;
|
||||
padding: 0 65rpx;
|
||||
min-height: 100vh;
|
||||
.page {
|
||||
background-color: #ffffff;
|
||||
padding: 0 65rpx;
|
||||
min-height: 100vh;
|
||||
|
||||
.title {
|
||||
padding: 30rpx 0 40rpx 0;
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.title {
|
||||
padding: 30rpx 0 40rpx 0;
|
||||
font-size: 40rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.input_box {
|
||||
display: block;
|
||||
// justify-content: space-between;
|
||||
// overflow: hidden;
|
||||
// height: 100rpx;
|
||||
padding-top: 10rpx;
|
||||
.input_box {
|
||||
display: block;
|
||||
// justify-content: space-between;
|
||||
// overflow: hidden;
|
||||
// height: 100rpx;
|
||||
padding-top: 10rpx;
|
||||
|
||||
// border-bottom: 1rpx solid #eeeeee;
|
||||
align-items: center;
|
||||
// border-bottom: 1rpx solid #eeeeee;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
i {
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.in {
|
||||
border: 1rpx solid #eeeeee;
|
||||
border-radius: 8rpx;
|
||||
padding: 8rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.in {
|
||||
border: 1rpx solid #eeeeee;
|
||||
border-radius: 8rpx;
|
||||
padding: 8rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
width: 180rpx;
|
||||
}
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
width: 180rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
input {
|
||||
flex: 1;
|
||||
height: 50rpx;
|
||||
// line-height: 70rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
flex: 1;
|
||||
height: 50rpx;
|
||||
// line-height: 70rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
button {
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
font-size: 30rpx;
|
||||
color: $themeColor;
|
||||
|
||||
button {
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
font-size: 30rpx;
|
||||
color: $themeColor;
|
||||
&:active {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
button {
|
||||
font-size: 32rpx;
|
||||
@include theme("btn_bg") color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
font-size: 32rpx;
|
||||
@include theme('btn_bg') color: #fff;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
.protocol {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.protocol {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
|
||||
text {
|
||||
color: $themeColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
text {
|
||||
color: $themeColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user