域名配置替换
parent
73e2f94fe3
commit
779f654e09
12
App.vue
12
App.vue
|
@ -3,19 +3,23 @@
|
||||||
globalData:{
|
globalData:{
|
||||||
projectname:'', // 项目名称
|
projectname:'', // 项目名称
|
||||||
lat:'', // 公司地址维度
|
lat:'', // 公司地址维度
|
||||||
lng:'' // 公司地址经度
|
lng:'' ,// 公司地址经度
|
||||||
|
hostapi:'' // 域名配置
|
||||||
},
|
},
|
||||||
// 优先于show方法
|
// 优先于show方法
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
// 配置全局域名
|
// 配置全局域名
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
// uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
||||||
|
getApp().globalData.hostapi = 'http://maintain.7and5.cn';
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
// uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
||||||
|
getApp().globalData.hostapi = 'http://maintain.7and5.cn';
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.setStorageSync('hostapi','/web');
|
// uni.setStorageSync('hostapi','/web');
|
||||||
|
getApp().globalData.hostapi = '/web';
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
// 判断当前环境
|
// 判断当前环境
|
||||||
const ENV = process.env.NODE_ENV;
|
const ENV = process.env.NODE_ENV;
|
||||||
console.log(ENV,'当前环境'); // development:开发环境 test:测试环境 production:生产环境
|
console.log(ENV,'当前环境'); // development:开发环境 test:测试环境 production:生产环境
|
||||||
|
// 配置全局域名
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const hostapi = 'http://maintain.7and5.cn';
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
const hostapi = 'http://maintain.7and5.cn';
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
const hostapi = '/web';
|
||||||
|
// #endif
|
||||||
// 清理所有缓存并前往授权页
|
// 清理所有缓存并前往授权页
|
||||||
const goLogin = () => {
|
const goLogin = () => {
|
||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
|
@ -77,7 +86,7 @@ const request = (method, url, options) => {
|
||||||
params.token = uni.getStorageSync('token');
|
params.token = uni.getStorageSync('token');
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${uni.getStorageSync('hostapi')}${url}`,
|
url: `${hostapi}${url}`,
|
||||||
method: methods,
|
method: methods,
|
||||||
data: params,
|
data: params,
|
||||||
header: headers,
|
header: headers,
|
||||||
|
@ -108,7 +117,7 @@ const uploadFile = (url, options) => {
|
||||||
console.log(tempData,108);
|
console.log(tempData,108);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: `${uni.getStorageSync('hostapi')}${url}`,
|
url: `${hostapi}${url}`,
|
||||||
filePath: tempData.file,
|
filePath: tempData.file,
|
||||||
name: 'image',
|
name: 'image',
|
||||||
fileType:'image',
|
fileType:'image',
|
||||||
|
|
|
@ -405,7 +405,7 @@ const tools = {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
var params = {code:res.code}
|
var params = {code:res.code}
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${uni.getStorageSync('hostapi')}/api/user/login`,
|
url: `${getApp().globalData.hostapi}/api/user/login`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
|
|
|
@ -3,64 +3,41 @@
|
||||||
<statusNav :ifReturn="isReturn" navBarTitle="意见反馈"></statusNav>
|
<statusNav :ifReturn="isReturn" navBarTitle="意见反馈"></statusNav>
|
||||||
<container-subgroup-two>
|
<container-subgroup-two>
|
||||||
<view slot="content" style="margin: 0 -30rpx;">
|
<view slot="content" style="margin: 0 -30rpx;">
|
||||||
<view class="opinion-type">
|
<view class="opinion-type">意见类型</view>
|
||||||
意见类型
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="opinion-type-content">
|
<view class="opinion-type-content">
|
||||||
<view class="li" @click="opinionType(index)" :class="item.state?'on':''"
|
<view class="li" @click="opinionType(index)" :class="typeNum==index ? 'on':''" v-for="(item,index) in typeData">{{item.title}}</view>
|
||||||
v-for="(item,index) in typeData">
|
|
||||||
{{item.title}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="feedback-input">
|
<view class="feedback-input">
|
||||||
|
<input type="text" v-model="opinion" class="inputCss" placeholder="请填写您的意见或建议内容" placeholder-class="inputCss-input" />
|
||||||
<input type="text" class="inputCss" placeholder="请填写您的意见或建议内容" placeholder-class="inputCss-input"
|
<input type="text" v-model="name" class="inputCss" placeholder="请输入联系人姓名" placeholder-class="inputCss-input" />
|
||||||
value="" />
|
<input type="text" v-model="phone" class="inputCss" placeholder="请输入联系人电话" placeholder-class="inputCss-input" />
|
||||||
<input type="text" class="inputCss" placeholder="请输入联系人姓名" placeholder-class="inputCss-input"
|
<view class="fault-pictures" @tap="chooseImg">
|
||||||
value="" />
|
<image :src="imgSrc" v-if="imgSrc!=''" mode="aspectFill" lazy-load style="width: 100%;"></image>
|
||||||
<input type="text" class="inputCss" placeholder="请输入联系人电话" placeholder-class="inputCss-input"
|
<view class="disjcac fc" v-if="imgSrc==''">
|
||||||
value="" />
|
<image class="img" src="/static/iocn/gz.png" mode="aspectFill" lazy-load></image>
|
||||||
|
<view class="text">请上传图片</view>
|
||||||
<view class="fault-pictures">
|
|
||||||
<image class="img" src="../../static/iocn/gz.png" mode="aspectFill"></image>
|
|
||||||
<view class="text">
|
|
||||||
请上传图片
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feedback-approach">
|
<view class="feedback-approach">
|
||||||
<view class="feedback-con">
|
<view class="feedback-con">
|
||||||
<image class="icon" src="../../static/iocn/tel.png" mode=""></image>
|
<image class="icon" src="/static/iocn/tel.png" mode=""></image>
|
||||||
|
|
||||||
<view class="feedback-tel-con">
|
<view class="feedback-tel-con">
|
||||||
<view class="text">
|
<view class="text">服务监督电话:</view>
|
||||||
服务监督电话:
|
<view class="tel">156 1566 0510</view>
|
||||||
</view>
|
|
||||||
<view class="tel">
|
|
||||||
156 1566 0510
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="feedback-con">
|
<view class="feedback-con">
|
||||||
<image class="icon" src="../../static/iocn/date.png" mode=""></image>
|
<image class="icon" src="/static/iocn/date.png" mode=""></image>
|
||||||
|
|
||||||
<view class="feedback-tel-con">
|
<view class="feedback-tel-con">
|
||||||
<view class="text">
|
<view class="text">反馈受理时间:</view>
|
||||||
反馈受理时间:
|
<view class="tel">9:00 - 18:00</view>
|
||||||
</view>
|
|
||||||
<view class="tel">
|
|
||||||
9:00 - 18:00
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<button class="submit-button" @tap="submitData" type="default">提交反馈</button>
|
||||||
<button class="submit-button" type="default">提交反馈</button>
|
|
||||||
</view>
|
</view>
|
||||||
</container-subgroup-two>
|
</container-subgroup-two>
|
||||||
|
|
||||||
<footTabOne :current="3"></footTabOne>
|
<footTabOne :current="3"></footTabOne>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -78,37 +55,73 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isReturn:false,
|
isReturn:false,
|
||||||
typeData: [{
|
typeData: [
|
||||||
title: "未解决问题",
|
{title: "未解决问题",state: false},
|
||||||
state: false
|
{title: "处理不及时",state: false},
|
||||||
},
|
{title: "软件问题",state: false},
|
||||||
{
|
{title: "报修问题",state: false},
|
||||||
title: "处理不及时",
|
{title: "服务投诉",state: false},
|
||||||
state: false
|
{title: "其他问题反馈",state: false},
|
||||||
},
|
],
|
||||||
{
|
typeNum:0,
|
||||||
title: "软件问题",
|
opinion:'',
|
||||||
state: false
|
name:'',
|
||||||
},
|
phone:'',
|
||||||
{
|
imgSrc:'',
|
||||||
title: "报修问题",
|
flag:true
|
||||||
state: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "服务投诉",
|
|
||||||
state: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "其他问题反馈",
|
|
||||||
state: false
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.checkFeedback();
|
this.checkFeedback();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 提交反馈事件
|
||||||
|
submitData(){
|
||||||
|
if(this.checkEmpty()) {
|
||||||
|
if(this.flag) {
|
||||||
|
this.flag = false;
|
||||||
|
let params = {
|
||||||
|
a:this.typeData[this.typeNum].title,
|
||||||
|
b:this.opinion,
|
||||||
|
c:this.name,
|
||||||
|
d:this.phone,
|
||||||
|
e:this.imgSrc
|
||||||
|
}
|
||||||
|
console.log(params,107);
|
||||||
|
// this.$requst.post('',params).then(res=>{
|
||||||
|
// if(res.code) {
|
||||||
|
// uni.navigateBack({delta:1})
|
||||||
|
// } else {
|
||||||
|
// this.flag = true;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 判空事件
|
||||||
|
checkEmpty() {
|
||||||
|
let result = false;
|
||||||
|
if(!this.opinion) {
|
||||||
|
this.$toolAll.tools.showToast('请输入意见或建议');
|
||||||
|
} else if(!this.name) {
|
||||||
|
this.$toolAll.tools.showToast('请输入联系人姓名');
|
||||||
|
} else if(this.$toolAll.tools.isPhone(this.phone)) {
|
||||||
|
this.$toolAll.tools.showToast('请正确输入联系人电话');
|
||||||
|
} else {
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
// 图片选择事件
|
||||||
|
chooseImg(){
|
||||||
|
uni.chooseImage({
|
||||||
|
count:1,
|
||||||
|
sourceType:['album','camera'],
|
||||||
|
success: (res) => {
|
||||||
|
this.imgSrc = res.tempFilePaths[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询意见反馈类型
|
// 查询意见反馈类型
|
||||||
checkFeedback(){
|
checkFeedback(){
|
||||||
this.$requst.get('/universal/api.feedback/feedback_type',{page:1,list_rows:20}).then(res=>{
|
this.$requst.get('/universal/api.feedback/feedback_type',{page:1,list_rows:20}).then(res=>{
|
||||||
|
@ -116,10 +129,11 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
opinionType(index) {
|
opinionType(index) {
|
||||||
for (var i = 0; i < this.typeData.length; i++) {
|
this.typeNum = index;
|
||||||
this.typeData[i].state = false
|
// for (var i = 0; i < this.typeData.length; i++) {
|
||||||
}
|
// this.typeData[i].state = false
|
||||||
this.typeData[index].state = true
|
// }
|
||||||
|
// this.typeData[index].state = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,7 +372,7 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.name,
|
title:item.name,
|
||||||
imgsrc: uni.getStorageSync('hostapi') + '/' + item.cover_img,
|
imgsrc: getApp().globalData.hostapi + '/' + item.cover_img,
|
||||||
}
|
}
|
||||||
this.solutionList.push(obj);
|
this.solutionList.push(obj);
|
||||||
})
|
})
|
||||||
|
@ -402,7 +402,7 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
imgsrc: uni.getStorageSync('hostapi') + '/' + item.cover_img,
|
imgsrc: getApp().globalData.hostapi + '/' + item.cover_img,
|
||||||
content:item.summary,
|
content:item.summary,
|
||||||
views:item.reading
|
views:item.reading
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<view slot="content" style="margin: 0 -30rpx;">
|
<view slot="content" style="margin: 0 -30rpx;">
|
||||||
<view class="bacf fon28 pad-sx30 pad-zy40">
|
<view class="bacf fon28 pad-sx30 pad-zy40">
|
||||||
<view class=" bold disjbac fw line-h50">
|
<view class=" bold disjbac fw line-h50">
|
||||||
<view class="mar-y20">长沙XXXXXXXXX项目名称</view>
|
<view class="mar-y20">{{project_name}}</view>
|
||||||
<view>GD20220108-1002</view>
|
<view>{{project_number}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mar-s10 mar-x30" style="color: #6b6a6a;">服务时间:2022-01-11 15 : 27</view>
|
<view class="mar-s10 mar-x30" style="color: #6b6a6a;">服务时间:{{project_time}}</view>
|
||||||
<view class="radius20 pad30 dis" style="border: 2rpx solid #dcdcdc;">
|
<view class="radius20 pad30 dis" style="border: 2rpx solid #dcdcdc;">
|
||||||
<image src="/static/public/icon-evaluate-pen.png" mode="widthFix" lazy-load style="width: 25rpx;height: 30rpx;"></image>
|
<image src="/static/public/icon-evaluate-pen.png" mode="widthFix" lazy-load style="width: 25rpx;height: 30rpx;"></image>
|
||||||
<textarea v-model="serviceExperience" class="fon24 mar-z20 width100" style="height: 200rpx;" placeholder="写下您的服务体验,帮助我们更好的管理提升" placeholder-style="font-size:24rpx;color: #aaaaaa;" />
|
<textarea v-model="serviceExperience" class="fon24 mar-z20 width100" style="height: 200rpx;" placeholder="写下您的服务体验,帮助我们更好的管理提升" placeholder-style="font-size:24rpx;color: #aaaaaa;" />
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提交保存 -->
|
<!-- 提交保存 -->
|
||||||
<view class="person-btn" style="margin-top: 50rpx;">提交保存</view>
|
<view class="person-btn" @tap="submitData" style="margin-top: 50rpx;">提交保存</view>
|
||||||
</view>
|
</view>
|
||||||
</container-subgroup>
|
</container-subgroup>
|
||||||
</view>
|
</view>
|
||||||
|
@ -48,12 +48,38 @@
|
||||||
{imgsrc:''},
|
{imgsrc:''},
|
||||||
{imgsrc:''}
|
{imgsrc:''}
|
||||||
],
|
],
|
||||||
|
project_id:'',
|
||||||
|
project_name:'长沙XXXXXXXXX项目名称',
|
||||||
|
project_number:'GD20220108-1002',
|
||||||
|
project_time:'2022-01-11 15 : 27',
|
||||||
rateNum:5,//技术服务评分
|
rateNum:5,//技术服务评分
|
||||||
attitudeNum:5,//客服态度评分
|
attitudeNum:5,//客服态度评分
|
||||||
serviceExperience:''//服务体验
|
serviceExperience:'',//服务体验
|
||||||
|
flag:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 提交保存事件
|
||||||
|
submitData(){
|
||||||
|
if(this.flag) {
|
||||||
|
this.flag = false;
|
||||||
|
let params = {
|
||||||
|
id:this.project_id,
|
||||||
|
a:this.serviceExperience,
|
||||||
|
b:this.imgList[0].imgsrc,
|
||||||
|
c:this.imgList[1].imgsrc,
|
||||||
|
d:this.imgList[2].imgsrc,
|
||||||
|
f:this.rateNum,
|
||||||
|
g:this.attitudeNum
|
||||||
|
}
|
||||||
|
console.log(params,74);
|
||||||
|
// this.$requst.post('',params).then(res=>{
|
||||||
|
// if(res.code) {
|
||||||
|
// uni.navigateBack({delta:1})
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
},
|
||||||
// 选择图片
|
// 选择图片
|
||||||
chooseImg(index){
|
chooseImg(index){
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
// 日期转换
|
// 日期转换
|
||||||
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
||||||
// 封面图
|
// 封面图
|
||||||
this.dataObj.cover_img = uni.getStorageSync('hostapi') + '/' + this.dataObj.cover_img,
|
this.dataObj.cover_img = getApp().globalData.hostapi + '/' + this.dataObj.cover_img,
|
||||||
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
res.data.data.forEach(item=>{
|
res.data.data.forEach(item=>{
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
cover_img: uni.getStorageSync('hostapi') + '/' + item.cover_img,
|
cover_img: getApp().globalData.hostapi + '/' + item.cover_img,
|
||||||
title:item.title,//标题
|
title:item.title,//标题
|
||||||
summary:item.summary,//描述
|
summary:item.summary,//描述
|
||||||
hot:item.hot,//热度
|
hot:item.hot,//热度
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bbot disac pad-sx30 pad-zy30">
|
<view class="bbot disac pad-sx30 pad-zy30">
|
||||||
<view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view>
|
<view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view>
|
||||||
<view class="disac">
|
<input class="fon28 width100" type="text" v-model="detailed_address" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
|
||||||
<input class="fon28" type="text" v-model="detailed_address" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bbot disac pad-sx30 pad-zy30">
|
<view class="bbot disac pad-sx30 pad-zy30">
|
||||||
<view class="mar-y30 flexs">服务范围 <text style="color: red;">*</text></view>
|
<view class="mar-y30 flexs">服务范围 <text style="color: red;">*</text></view>
|
||||||
|
|
Loading…
Reference in New Issue