mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
代码暂存
This commit is contained in:
parent
b2f16de5ce
commit
e925fa7956
@ -4,8 +4,8 @@
|
||||
* add by wuxw 2019-12-28
|
||||
*/
|
||||
// 服务器域名
|
||||
const baseUrl = 'https://app.demo.winqi.cn/';
|
||||
//const baseUrl = '/';
|
||||
//const baseUrl = 'https://app.demo.winqi.cn/';
|
||||
const baseUrl = '/';
|
||||
const hcBaseUrl = 'https://hc.demo.winqi.cn'; // 登录接口
|
||||
|
||||
const loginUrl = baseUrl + 'app/loginProperty';
|
||||
@ -16,7 +16,7 @@ const listMyEnteredCommunitys = baseUrl + 'app/community.listMyEnteredCommunitys
|
||||
|
||||
const listOwnerRepairs = baseUrl + 'app/ownerRepair.listOwnerRepairs'; //家庭成员
|
||||
|
||||
const saveOwner = baseUrl + 'app/owner.saveOwner'; //家庭成员列表
|
||||
const queryStaffInfos = baseUrl + 'app/query.staff.infos'; //查询员工信息
|
||||
|
||||
const queryOwnerMembers = baseUrl + 'app/owner.queryOwnerMembers'; //投诉建议列表
|
||||
|
||||
@ -65,7 +65,7 @@ module.exports = {
|
||||
GetNoticeListUrl: GetNoticeListUrl,
|
||||
listMyEnteredCommunitys: listMyEnteredCommunitys,
|
||||
listOwnerRepairs: listOwnerRepairs,
|
||||
saveOwner: saveOwner,
|
||||
queryStaffInfos: queryStaffInfos,
|
||||
appUserBindingOwner: appUserBindingOwner,
|
||||
queryAppUserBindingOwner: queryAppUserBindingOwner,
|
||||
queryOwnerMembers: queryOwnerMembers,
|
||||
|
||||
@ -62,7 +62,14 @@ const getCurrentLocation = function () {
|
||||
|
||||
const getUserInfo = function () {
|
||||
let userInfo = uni.getStorageSync(constant.mapping.USER_INFO);
|
||||
if(util.string.isNull(userInfo)){
|
||||
uni.redirectTo({
|
||||
url:"/pages/login/login"
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _userInfo = JSON.parse(util.des.desDecrypt(userInfo));
|
||||
|
||||
return _userInfo;
|
||||
};
|
||||
/**
|
||||
@ -139,11 +146,17 @@ const _loadArea = function (_level, _parentAreaCode, callBack = _areaList => {})
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 获取当前小区
|
||||
*/
|
||||
const getCurrentCommunity = function(){
|
||||
let currentCommunity = uni.getStorageSync(_that.java110Constant.mapping.CURRENT_COMMUNITY_INFO);
|
||||
return getCurrentCommunity;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取当前小区信息
|
||||
*/
|
||||
|
||||
|
||||
const getCommunity = function (callBack,reload) {
|
||||
let _communityInfo = uni.getStorageSync(constant.mapping.COMMUNITY_INFO);
|
||||
console.log('本地小区信息',_communityInfo);
|
||||
@ -207,5 +220,6 @@ module.exports = {
|
||||
_loadArea: _loadArea,
|
||||
getCurrentLocation: getCurrentLocation,
|
||||
getCommunity: getCommunity,
|
||||
request: request
|
||||
request: request,
|
||||
getCurrentCommunity:getCurrentCommunity
|
||||
};
|
||||
@ -3,17 +3,17 @@
|
||||
<view class="cu-bar bg-white search " >
|
||||
<view class="search-form round">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input type="text" placeholder="输入搜索的关键词" confirm-type="search"></input>
|
||||
<input type="text" placeholder="输入搜索的关键词" v-model="name" confirm-type="search"></input>
|
||||
</view>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-gradual-green shadow-blur round">搜索</button>
|
||||
<button class="cu-btn bg-gradual-green shadow-blur round" @tap = "_searchStaff()">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="indexes" :scroll-into-view="'indexes-'+ listCurID" :style="[{height:'calc(100vh - '+ CustomBar + 'px - 50px)'}]"
|
||||
<scroll-view scroll-y class="indexes" scroll-into-view="indexes-1" style="height:calc(100px - 50px)"
|
||||
:scroll-with-animation="true" :enable-back-to-top="true">
|
||||
<block v-for="(item,index) in list" :key="index">
|
||||
<view :class="'indexItem-' + item.name" :id="'indexes-' + item.name" :data-index="item.name">
|
||||
<view :class="'indexItem-' + item.nameIndex" :id="'indexes-' + item.nameIndex" :data-index="item.nameIndex">
|
||||
<view class="padding">{{item.name}}</view>
|
||||
<view class="cu-list menu-avatar no-padding">
|
||||
<view class="cu-item" v-for="(items,sub) in 2" :key="sub">
|
||||
@ -21,11 +21,11 @@
|
||||
<view class="content">
|
||||
<view class="text-grey">{{item.name}}<text class="text-abc">{{list[sub].name}}</text>君</view>
|
||||
<view class="text-gray text-sm">
|
||||
有{{sub+2}}个主子需要伺候
|
||||
{{item.orgName}}-{{item.tel}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<text class="lg text-gray cuIcon-dianhua photo_icon"></text>
|
||||
<text class="lg text-gray cuIcon-dianhua photo_icon" @tap="_callPhoto(item.tel)"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -40,19 +40,85 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
list: [],
|
||||
name:''
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let list = [{}];
|
||||
for (let i = 0; i < 5; i++) {
|
||||
list[i] = {};
|
||||
list[i].name = String.fromCharCode(65 + i);
|
||||
}
|
||||
this.list = list;
|
||||
//let list = [{}];
|
||||
|
||||
// for (let i = 0; i < 5; i++) {
|
||||
// list[i] = {};
|
||||
// list[i].name = String.fromCharCode(65 + i);
|
||||
// }
|
||||
//this.list = list;
|
||||
this._loadStaffInfo();
|
||||
|
||||
},
|
||||
methods: {
|
||||
_loadStaffInfo:function(){
|
||||
//获取商户ID
|
||||
let _that =this;
|
||||
let _userInfo = this.java110Context.getUserInfo();
|
||||
let storeId = _userInfo.storeId;
|
||||
let _objData = {
|
||||
page:1,
|
||||
row:15,
|
||||
storeId:storeId,
|
||||
name:this.name
|
||||
};
|
||||
this.java110Context.request({
|
||||
url: _that.java110Constant.url.queryStaffInfos,
|
||||
header: _that.java110Context.getHeaders(),
|
||||
method: "GET",
|
||||
data: _objData, //动态数据
|
||||
success: function (res) {
|
||||
console.log("请求返回信息:", res);
|
||||
if (res.statusCode == 200) {
|
||||
let _data = res.data;
|
||||
_data.staffs.forEach(function(_ite){
|
||||
_ite.nameIndex = 'a';
|
||||
});
|
||||
_that.list = _data.staffs;
|
||||
return;
|
||||
}
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
fail: function (e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
_callPhoto:function(_photo){
|
||||
uni.makePhoneCall({
|
||||
// 手机号
|
||||
phoneNumber: _photo,
|
||||
|
||||
// 成功回调
|
||||
success: (res) => {
|
||||
console.log('调用成功!')
|
||||
},
|
||||
|
||||
// 失败回调
|
||||
fail: (res) => {
|
||||
console.log('调用失败!')
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
_searchStaff:function(){
|
||||
this._loadStaffInfo();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
let _that = this;
|
||||
//加载小区信息
|
||||
this.java110Context.getCommunity(function(_communitys){
|
||||
let currentCommunity = uni.getStorageSync(_that.java110Constant.mapping.CURRENT_COMMUNITY_INFO);
|
||||
let currentCommunity = _that.java110Context.getCurrentCommunity(_that.java110Constant.mapping.CURRENT_COMMUNITY_INFO);
|
||||
//随机放一个小区
|
||||
let _tmpCommunityInfo = _communitys[0];
|
||||
if(_that.java110Util.string.isNull(currentCommunity)){
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
});
|
||||
|
||||
this.logoUrl = this.java110Constant.url.baseUrl + 'logo.png';
|
||||
L
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user