mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-11 06:07:24 +08:00
优化小程序 绑定问题
This commit is contained in:
parent
bd9e1a13fa
commit
02cacb9729
2
app.json
2
app.json
@ -41,7 +41,7 @@
|
||||
"window": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#00AA00",
|
||||
"navigationBarTitleText": "HC智慧小区"
|
||||
"navigationBarTitleText": "融生活智慧社区"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#272636",
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
|
||||
|
||||
// 服务器域名
|
||||
const baseUrl = 'https://app.demo.winqi.cn/';
|
||||
const baseUrl = 'https://xq.rshenstar.com/';
|
||||
//const baseUrl = 'http://hc.demo.winqi.cn:8012/';
|
||||
const hcBaseUrl = 'https://hc.demo.winqi.cn';
|
||||
const hcBaseUrl = 'https://xq.rshenstar.com';
|
||||
|
||||
//获取环境
|
||||
const getEnv = baseUrl + 'app/env/getEnv';
|
||||
|
||||
@ -14,18 +14,18 @@ const factory = require('../factory/index.js');
|
||||
* 获取请后台服务时的头信息
|
||||
*/
|
||||
const getHeaders = function() {
|
||||
let _userInfo = getUserInfo();
|
||||
//let _userInfo = getUserInfo();
|
||||
let userId = '-1';
|
||||
if (_userInfo != null || _userInfo != undefined){
|
||||
userId = _userInfo.userId;
|
||||
}
|
||||
//if (_userInfo != null || _userInfo != undefined){
|
||||
// userId = _userInfo.userId;
|
||||
//}
|
||||
return {
|
||||
app_id: constant.app.appId,
|
||||
transaction_id: util.core.wxuuid(),
|
||||
req_time: util.date.getDateYYYYMMDDHHMISS(),
|
||||
sign: '1234567',
|
||||
user_id: userId,
|
||||
cookie: '_java110_token_=' + wx.getStorageSync('token')
|
||||
'app-id': constant.app.appId,
|
||||
'transaction-id': util.core.wxuuid(),
|
||||
'req-time': util.date.getDateYYYYMMDDHHMISS(),
|
||||
'sign': '1234567',
|
||||
'user-id': userId,
|
||||
'cookie': '_java110_token_=' + wx.getStorageSync('token')
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
@ -77,7 +77,7 @@ class LoginFactory {
|
||||
url: constant.url.loginUrl,
|
||||
method: 'post',
|
||||
header: {
|
||||
APP_ID: constant.app.appId
|
||||
'APP-ID': constant.app.appId
|
||||
},
|
||||
data: {
|
||||
code: loginRes.code, // 临时登录凭证
|
||||
|
||||
@ -207,9 +207,17 @@ Page({
|
||||
wx.showLoading({
|
||||
title: '绑定中',
|
||||
});
|
||||
|
||||
let _userInfo = context.getUserInfo();
|
||||
let userId = '-1';
|
||||
if (_userInfo != null && _userInfo != undefined) {
|
||||
userId = _userInfo.userId;
|
||||
}
|
||||
let _header = context.getHeaders();
|
||||
_header['user-id'] = userId;
|
||||
context.request({
|
||||
url: constant.url.appUserBindingOwner,
|
||||
header: context.getHeaders(),
|
||||
header: _header,
|
||||
method: "POST",
|
||||
data: obj, //动态数据
|
||||
success: function(res) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "HC智慧家园",
|
||||
"navigationBarTitleText": "融生活智慧社区",
|
||||
"backgroundColor": "#ffffff",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -3,7 +3,7 @@
|
||||
<view>
|
||||
<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="HC智慧家园是免费开源的HC小区管理系统的分支项目,欢迎访问官网http://homecommunity.cn了解"
|
||||
text="融生活智慧社区欢迎您"
|
||||
speed="30"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.9.4",
|
||||
"isGameTourist": false,
|
||||
"appid": "wxf83d66b0e9f5964d",
|
||||
"appid": "wxfecd955f5ce1bb20",
|
||||
"projectname": "WechatOwnerService",
|
||||
"simulatorType": "wechat",
|
||||
"simulatorPluginLibVersion": {},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user