mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-06-11 14:17:25 +08:00
优化代码
This commit is contained in:
parent
7aea651719
commit
94a89baac1
@ -15,11 +15,11 @@ const baseUrl = '/';
|
||||
|
||||
// 腾讯地图Key, h5使用
|
||||
const QQMapKey = '';
|
||||
const commonBaseUrl= 'http://demo.homecommunity.cn';
|
||||
const commonBaseUrl= 'http://c.dgkaywin.com';
|
||||
|
||||
// #ifndef H5
|
||||
//服务器域名 小程序 或者 app 时 后端地址
|
||||
const baseUrl = 'http://demo.homecommunity.cn/';
|
||||
const baseUrl = 'http://c.dgkaywin.com/';
|
||||
// #endif
|
||||
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ export function login(userName, passwd) {
|
||||
let data = res.data;
|
||||
let _tmpUserInfo = data.userInfo;
|
||||
_tmpUserInfo['password'] = passwd;
|
||||
_tmpUserInfo['username'] = userName;
|
||||
let _userInfo = desEncrypt(JSON.stringify(_tmpUserInfo));
|
||||
uni.setStorageSync(java110Config.USER_INFO, _userInfo);
|
||||
uni.setStorageSync(java110Config.TOKEN, data.token);
|
||||
|
||||
@ -85,13 +85,14 @@
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : true // 设置支持https协议的代理
|
||||
},
|
||||
"/callComponent" : {
|
||||
"target" : "http://property.homecommunity.cn", //目标接口域名http://192.168.1.16:8012
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : true // 设置支持https协议的代理
|
||||
}
|
||||
"/callComponent" : {
|
||||
"target" : "http://property.homecommunity.cn", //目标接口域名http://192.168.1.16:8012
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : true // 设置支持https协议的代理
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain" : "http://property.homecommunity.cn"
|
||||
"domain" : "http://property.homecommunity.cn",
|
||||
"title" : "KK智慧云"
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "HC掌上物业"
|
||||
"navigationBarTitleText": "KK智慧云"
|
||||
}
|
||||
}
|
||||
,{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="content">
|
||||
<view class="margin-bottom-xs">
|
||||
<uni-notice-bar :showIcon="true" :scrollable="true" :single="true" :speed="30"
|
||||
text="HC掌上物业欢迎您"></uni-notice-bar>
|
||||
text="KK智慧云物业欢迎您"></uni-notice-bar>
|
||||
</view>
|
||||
<scroll-view @scrolltolower="lower" class="scroll-restaurants-list" scroll-y="true" style="height:100%">
|
||||
<swiper class="categoryList padding-top-xs bg-white" indicator-dots="true"
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
data() {
|
||||
return {
|
||||
logoUrl: '',
|
||||
username: 'wuxw',
|
||||
password: 'admin'
|
||||
username: '',
|
||||
password: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
@ -66,6 +66,28 @@
|
||||
<view class="cu-form-group margin-top">
|
||||
<textarea v-model="context" placeholder="请输入报修内容"></textarea>
|
||||
</view>
|
||||
<view class="block__title">相关图片</view>
|
||||
<view class="cu-bar bg-white ">
|
||||
<view class="action">
|
||||
图片上传
|
||||
</view>
|
||||
<view class="action">
|
||||
{{imgList.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(img,index) in imgList" :key='index' bindtap="ViewImage" :data-url="imgList[index]">
|
||||
<image :src='imgList[index]' mode='aspectFill'></image>
|
||||
<view class="cu-tag bg-red" @tap="deleteImage(index)" :data-index="index">
|
||||
<text class="cuIcon-close"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
|
||||
<text class="cuIcon-cameraadd"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="button_up_blank"></view>
|
||||
|
||||
@ -278,7 +300,7 @@
|
||||
"appointmentTime": this.bindDate + " " + this.bindTime + ":00",
|
||||
"tel": this.bindTel,
|
||||
"roomId": this.roomId,
|
||||
// "photos": [],
|
||||
"photos": [],
|
||||
"context": this.context,
|
||||
"communityId": this.communityId,
|
||||
"bindDate": this.bindDate,
|
||||
@ -301,12 +323,12 @@
|
||||
obj.repairObjName = this.floorNum + this.unitNum + this.roomNum;
|
||||
}
|
||||
|
||||
// let _photos = this.photos;
|
||||
// _photos.forEach(function(_item) {
|
||||
// obj.photos.push({
|
||||
// "photo": _item
|
||||
// });
|
||||
// });
|
||||
let _photos = this.photos;
|
||||
_photos.forEach(function(_item) {
|
||||
obj.photos.push({
|
||||
"photo": _item
|
||||
});
|
||||
});
|
||||
|
||||
let msg = "";
|
||||
if (obj.repairType == "") {
|
||||
@ -416,29 +438,29 @@
|
||||
url: '/pages/selectRoom/selectRoom?floorId=' + this.floorId + "&unitId=" + this.unitId
|
||||
});
|
||||
},
|
||||
// deleteImage: function(e) {
|
||||
// console.log(e);
|
||||
// let imageArr = this.$data.imgList;
|
||||
// imageArr.splice(e, 1);
|
||||
// this.photos.splice(e, 1);
|
||||
// },
|
||||
// ChooseImage: function(e) {
|
||||
// let that = this;
|
||||
// wx.chooseImage({
|
||||
// count: 4, //默认9
|
||||
// sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
// sourceType: ['album'], //从相册选择
|
||||
// success: (res) => {
|
||||
// console.log(res);
|
||||
// that.$data.imgList.push(res.tempFilePaths[0]);
|
||||
// var tempFilePaths = res.tempFilePaths[0]
|
||||
deleteImage: function(e) {
|
||||
console.log(e);
|
||||
let imageArr = this.$data.imgList;
|
||||
imageArr.splice(e, 1);
|
||||
this.photos.splice(e, 1);
|
||||
},
|
||||
ChooseImage: function(e) {
|
||||
let that = this;
|
||||
wx.chooseImage({
|
||||
count: 4, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
that.$data.imgList.push(res.tempFilePaths[0]);
|
||||
var tempFilePaths = res.tempFilePaths[0]
|
||||
|
||||
// TanslateImage.translate(tempFilePaths, (url) => {
|
||||
// that.photos.push(url);
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
TanslateImage.translate(tempFilePaths, (url) => {
|
||||
that.photos.push(url);
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
repairScopeChange: function(e) {
|
||||
this.repairScopeIndex = e.target.value //取其下标
|
||||
let selected = this.repairScopes[this.repairScopeIndex] //获取选中的数组
|
||||
|
||||
Loading…
Reference in New Issue
Block a user