|
@@ -41,7 +41,7 @@ function userLoginRecord(uid) {
|
|
|
let url = genAPIUrl('wx/loginLog');
|
|
|
return request.getInstance().header({
|
|
|
uid: wx.getStorageSync('uid')
|
|
|
- }).method('POST').url(url).send().success(()=>{}).fail(()=>{});
|
|
|
+ }).method('POST').url(url).send().success(() => {}).fail(() => {});
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -54,10 +54,25 @@ function getLoginSchedule(sessionKey, openId, successcallback, failcallback) {
|
|
|
withCredentials: true,
|
|
|
success: function (res) {
|
|
|
let url = genAPIUrl('wx/user/loginRegist');
|
|
|
+ let appLaunch = wx.getLaunchOptionsSync();
|
|
|
+ let userSourseType = '';
|
|
|
+ console.log(appLaunch.scene)
|
|
|
+ switch (appLaunch.scene) {
|
|
|
+ case 1020:
|
|
|
+ userSourseType = 'profile';
|
|
|
+ break;
|
|
|
+ case 1058:
|
|
|
+ userSourseType = 'article';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ userSourseType = wx.getStorageSync('userSourseType');
|
|
|
+ break;
|
|
|
+ }
|
|
|
const userData = {
|
|
|
encryptedData: res.encryptedData,
|
|
|
sessionKey: sessionKey,
|
|
|
- iv: res.iv
|
|
|
+ iv: res.iv,
|
|
|
+ sourceType: userSourseType
|
|
|
}
|
|
|
request.getInstance().url(url).header({
|
|
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|