feat: 登录增加调用获取用户房源信息接口
This commit is contained in:
parent
bc345b71ac
commit
9a9aec8dd9
2
App.vue
2
App.vue
@ -34,7 +34,7 @@
|
||||
|
||||
page{
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 120rpx;
|
||||
padding-bottom: 180rpx;
|
||||
}
|
||||
|
||||
.uicon-volume {
|
||||
|
||||
@ -2,5 +2,6 @@ export const apiArr = {
|
||||
login: '/api/v1/wechat/multi-login', // 小程序登录
|
||||
loginInfo: '/api/v1/wechat/mpusers/login-info', // 获取用户信息
|
||||
loginGetPhone: '/api/v1/wechat/mpusers/get-phone', // 获取用户手机号
|
||||
loginGetUserPhone:"/api/v2/wechat/mpusers/get-phone"
|
||||
loginGetUserPhone: "/api/v2/wechat/mpusers/get-phone",
|
||||
getCommunityList: '/api/v2/wechat/mpuser-crud/community-owner/info', // 我的房产信息小区列表
|
||||
}
|
||||
@ -475,9 +475,9 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
async onReachBottom() {
|
||||
if (this.flag) {
|
||||
const res = this.getHomeBottom();
|
||||
const res = await this.getHomeBottom();
|
||||
this.bottomList = this.bottomList.concat(res);
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
||||
@ -91,7 +91,8 @@ export default {
|
||||
uni.setStorageSync('shopId', res2.wshop_id);
|
||||
|
||||
this.isLogin = true;
|
||||
that.getUserInfo()
|
||||
that.getUserInfo();
|
||||
that.getCommunityList();
|
||||
})
|
||||
}, (err) => {
|
||||
uni.hideLoading();
|
||||
@ -146,6 +147,8 @@ export default {
|
||||
uni.removeStorageSync('is_shop');
|
||||
uni.removeStorageSync('shopId');
|
||||
uni.removeStorageSync('order_dispatch_permission');
|
||||
uni.removeStorageSync('nickName');
|
||||
uni.removeStorageSync('changeCommData');
|
||||
console.error('用户拒绝授权:', event.detail.errMsg);
|
||||
}
|
||||
},
|
||||
@ -153,8 +156,7 @@ export default {
|
||||
getUserInfo() {
|
||||
request(apiArr2.getUserInfo, "POST", {
|
||||
user_id: uni.getStorageSync('userId')
|
||||
}).then(res => {
|
||||
console.log('111111', res);
|
||||
}, { silent: false }).then(res => {
|
||||
const { community_worker } = res;
|
||||
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
|
||||
uni.setStorageSync('nickName', res.nick_name);
|
||||
@ -162,6 +164,20 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已入住房源信息
|
||||
getCommunityList() {
|
||||
request(apiArr.getCommunityList, 'POST', {
|
||||
latitude: uni.getStorageSync('location').lat,
|
||||
longitude: uni.getStorageSync('location').lng,
|
||||
page_num: 1,
|
||||
page_size: 10,
|
||||
}, { silent: false }).then((res3) => {
|
||||
const { rows: [{}] } = res3;
|
||||
uni.setStorageSync("changeCommData",{ name: rows[0].name, id: rows[0].community_id })
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// app端登录
|
||||
async appLogin() {
|
||||
try {
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</view>
|
||||
|
||||
<view class="center">
|
||||
<view class="gold_container">
|
||||
<view class="gold_container" @click="headerGoldClick">
|
||||
<view class="gold_title">
|
||||
<span class="gold">金币</span> <span class="monenyt">0</span> | <span class="price">价值0.00元</span> <u-icon size="30" name="arrow-right" />
|
||||
</view>
|
||||
@ -294,12 +294,14 @@
|
||||
|
||||
// 我的社区跳转
|
||||
handleCommunityClick(){
|
||||
NavgateTo('/packages/community/index/index')
|
||||
this.NotOpen();
|
||||
// NavgateTo('/packages/community/index/index')
|
||||
},
|
||||
|
||||
// 申请业主跳转
|
||||
handleApplyOwnerClick(){
|
||||
NavgateTo(`/packages/community/index/index?types=2`)
|
||||
this.NotOpen();
|
||||
// NavgateTo(`/packages/community/index/index?types=2`)
|
||||
},
|
||||
|
||||
// 我的设备跳转
|
||||
@ -309,7 +311,12 @@
|
||||
|
||||
// 我的申请跳转
|
||||
handleMeApplyClick() {
|
||||
NavgateTo(`/packages/community/ownerList/index`)
|
||||
this.NotOpen();
|
||||
// NavgateTo(`/packages/community/ownerList/index`)
|
||||
},
|
||||
headerGoldClick() {
|
||||
this.NotOpen();
|
||||
// NavgateTo(`/packages/community/ownerList/index`)
|
||||
},
|
||||
|
||||
// 我的订单跳转
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -290,7 +290,7 @@ image {
|
||||
}
|
||||
page{
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 120rpx;
|
||||
padding-bottom: 180rpx;
|
||||
}
|
||||
.uicon-volume {
|
||||
font-size: 28rpx !important;
|
||||
|
||||
17
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
17
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@ -392,6 +392,20 @@ exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1067:
|
||||
/*!*************************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js ***!
|
||||
\*************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _objectDestructuringEmpty(obj) {
|
||||
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
||||
}
|
||||
module.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 107:
|
||||
/*!******************************************************************************!*\
|
||||
!*** D:/project/uniapp-ZHSQ/node_modules/uview-ui/libs/config/props/line.js ***!
|
||||
@ -3463,7 +3477,8 @@ var apiArr = {
|
||||
// 获取用户信息
|
||||
loginGetPhone: '/api/v1/wechat/mpusers/get-phone',
|
||||
// 获取用户手机号
|
||||
loginGetUserPhone: "/api/v2/wechat/mpusers/get-phone"
|
||||
loginGetUserPhone: "/api/v2/wechat/mpusers/get-phone",
|
||||
getCommunityList: '/api/v2/wechat/mpuser-crud/community-owner/info' // 我的房产信息小区列表
|
||||
};
|
||||
exports.apiArr = apiArr;
|
||||
|
||||
|
||||
@ -774,16 +774,37 @@ var _default = {
|
||||
}
|
||||
},
|
||||
onReachBottom: function onReachBottom() {
|
||||
if (this.flag) {
|
||||
var res = this.getHomeBottom();
|
||||
this.bottomList = this.bottomList.concat(res);
|
||||
} else {
|
||||
var _this9 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
||||
var res;
|
||||
return _regenerator.default.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
switch (_context9.prev = _context9.next) {
|
||||
case 0:
|
||||
if (!_this9.flag) {
|
||||
_context9.next = 7;
|
||||
break;
|
||||
}
|
||||
_context9.next = 3;
|
||||
return _this9.getHomeBottom();
|
||||
case 3:
|
||||
res = _context9.sent;
|
||||
_this9.bottomList = _this9.bottomList.concat(res);
|
||||
_context9.next = 8;
|
||||
break;
|
||||
case 7:
|
||||
uni.showToast({
|
||||
title: '没有更多了',
|
||||
icon: 'none'
|
||||
});
|
||||
case 8:
|
||||
case "end":
|
||||
return _context9.stop();
|
||||
}
|
||||
}
|
||||
}, _callee9);
|
||||
}))();
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
||||
|
||||
@ -3,5 +3,25 @@
|
||||
"projectname": "uniapp-ZHSQ",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "packages/community/index/index",
|
||||
"pathName": "packages/community/index/index",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
},
|
||||
{
|
||||
"name": "pages/login/login",
|
||||
"pathName": "pages/login/login",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user