Commit af6ad8c2 by Chao Sun

ydLife接口迁移对接

parent 3509b8f2
...@@ -19,7 +19,7 @@ export class AuthService { ...@@ -19,7 +19,7 @@ export class AuthService {
redirectUrl: string; redirectUrl: string;
// 经纪人登陆 // 经纪人登陆
login(loginInfo): Observable<any> { login(loginInfo): Observable<any> {
const api = this.ydapi + '/ydapi/practitioner/login'; const api = this.ydapi + '/practitioner/login';
return this.http.post(api, JSON.stringify(loginInfo)); return this.http.post(api, JSON.stringify(loginInfo));
} }
...@@ -53,7 +53,7 @@ export class AuthService { ...@@ -53,7 +53,7 @@ export class AuthService {
//获取微信配置ydLife公众号 //获取微信配置ydLife公众号
ydWxConfig(Currenturl) { ydWxConfig(Currenturl) {
const url = this.ydapi + '/ydapi/wxConfig'; const url = this.ydapi + '/wxConfig';
const postUrl = { const postUrl = {
url: Currenturl url: Currenturl
}; };
......
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { NavigationExtras, Router } from '@angular/router'; import { NavigationExtras, Router } from '@angular/router';
import { AuthService } from '../auth.service'; import { AuthService } from '../auth.service';
import { LifeCommonService } from '../../common/life-common.service';
@Component({ @Component({
selector: 'ydlife-login', selector: 'ydlife-login',
...@@ -21,7 +21,7 @@ export class LoginComponent implements OnInit, OnDestroy { ...@@ -21,7 +21,7 @@ export class LoginComponent implements OnInit, OnDestroy {
isNeedAlert: boolean; isNeedAlert: boolean;
dialogInfo: any; dialogInfo: any;
redirect: any; redirect: any;
constructor(public authService: AuthService, public router: Router) { constructor(public authService: AuthService, public router: Router, public lifeCommonService: LifeCommonService) {
} }
ngOnInit() { ngOnInit() {
...@@ -54,14 +54,26 @@ export class LoginComponent implements OnInit, OnDestroy { ...@@ -54,14 +54,26 @@ export class LoginComponent implements OnInit, OnDestroy {
localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo)); localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo));
//如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页 //如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页
if (response['data']['getOpenIdUrl']) { if (response['data']['getOpenIdUrl']) {
window.location.href = response['data']['getOpenIdUrl']; const deviceType = this.lifeCommonService.checkDeviceType()
if (deviceType == 3) {
window.location.href = response['data']['getOpenIdUrl'];
} else {
if (response['data']['loginTimes'] > 0) {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
this.router.navigateByUrl(this.redirect);
} else {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/thanks';
this.router.navigateByUrl(this.redirect);
}
}
} else { } else {
if (response['data']['loginTimes'] > 0) { if (response['data']['loginTimes'] > 0) {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my'; this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
this.router.navigateByUrl(this.redirect);
} else { } else {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/thanks'; this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/thanks';
this.router.navigateByUrl(this.redirect);
} }
this.router.navigateByUrl(this.redirect);
} }
// if (response['data']['loginTimes'] > 0) { // if (response['data']['loginTimes'] > 0) {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my'; // this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
......
...@@ -137,7 +137,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -137,7 +137,6 @@ export class MyBusinessDetailComponent implements OnInit {
this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => { this.myService.tagQuery({ tagType: 2, isActive: 1 }).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.tagList = res['data']['tagVOs']; this.tagList = res['data']['tagVOs'];
} }
}) })
} }
...@@ -155,7 +154,6 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -155,7 +154,6 @@ export class MyBusinessDetailComponent implements OnInit {
this.editBusiness.opportunityCustomerTags = this.tagList.filter((item) => { this.editBusiness.opportunityCustomerTags = this.tagList.filter((item) => {
return item.selected == true; return item.selected == true;
}) })
} }
//选男女 //选男女
......
...@@ -63,7 +63,7 @@ export class MyService { ...@@ -63,7 +63,7 @@ export class MyService {
//经纪人商机列表 //经纪人商机列表
ownOpportunityQuery(param) { ownOpportunityQuery(param) {
const url = this.API + "/practitioner/ownOpportunityQuery"; const url = this.ydapi + "/practitioner/ownOpportunityQuery";
return this.http.post(url, JSON.stringify(param)).pipe(res => { return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res; return res;
}); });
...@@ -71,14 +71,14 @@ export class MyService { ...@@ -71,14 +71,14 @@ export class MyService {
//经纪人商机详情 //经纪人商机详情
ownOpportunityDetailQuery(param) { ownOpportunityDetailQuery(param) {
const url = this.API + "/practitioner/ownOpportunityDetailQuery"; const url = this.ydapi + "/practitioner/ownOpportunityDetailQuery";
return this.http.post(url, JSON.stringify(param)).pipe(res => { return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res; return res;
}); });
} }
//经纪人修改商机跟进信息 //经纪人修改商机跟进信息
ownOpportunityRecordSave(param) { ownOpportunityRecordSave(param) {
const url = this.API + "/practitioner/ownOpportunityRecordSave"; const url = this.ydapi + "/practitioner/ownOpportunityRecordSave";
return this.http.post(url, JSON.stringify(param)).pipe(res => { return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res; return res;
}); });
...@@ -94,7 +94,7 @@ export class MyService { ...@@ -94,7 +94,7 @@ export class MyService {
//商机基本信息保存 //商机基本信息保存
ownOpportunityBasicInformationSave(param) { ownOpportunityBasicInformationSave(param) {
const url = this.API + "/practitioner/ownOpportunityBasicInformationSave"; const url = this.ydapi + "/practitioner/ownOpportunityBasicInformationSave";
return this.http.post(url, JSON.stringify(param)).pipe(res => { return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res; return res;
}); });
...@@ -135,32 +135,32 @@ export class MyService { ...@@ -135,32 +135,32 @@ export class MyService {
//下载多媒体文件接口 //下载多媒体文件接口
mediaGet(mediaId) { mediaGet(mediaId) {
const url = this.ydapi + '/ydapi/practitioner/mediaGet'; const url = this.ydapi + '/practitioner/mediaGet';
return this.http.post(url, JSON.stringify(mediaId)); return this.http.post(url, JSON.stringify(mediaId));
} }
//设置查询 //设置查询
mySettingQuery(practitionerId) { mySettingQuery(practitionerId) {
const url = this.ydapi + '/ydapi/practitioner/settingQuery'; const url = this.ydapi + '/practitioner/settingQuery';
return this.http.post(url, JSON.stringify(practitionerId)); return this.http.post(url, JSON.stringify(practitionerId));
} }
//我的设置保存 //我的设置保存
mySettingSave(param) { mySettingSave(param) {
const url = this.ydapi + '/ydapi/practitioner/settingSave'; const url = this.ydapi + '/practitioner/settingSave';
return this.http.post(url, JSON.stringify(param)); return this.http.post(url, JSON.stringify(param));
} }
//删除生活照 //删除生活照
myImgDelete(param) { myImgDelete(param) {
const url = this.ydapi + '/ydapi/practitioner/imgDelete'; const url = this.ydapi + '/practitioner/imgDelete';
return this.http.post(url, JSON.stringify(param)); return this.http.post(url, JSON.stringify(param));
} }
//排行榜 //排行榜
rank(param) { rank(param) {
const url = this.ydapi + '/ydapi/practitioner/rank'; const url = this.ydapi + '/practitioner/rank';
return this.http return this.http
.post(url, JSON.stringify(param)); .post(url, JSON.stringify(param));
} }
......
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
margin-right: 1%; margin-right: 1%;
position: relative; position: relative;
margin-bottom: 5px; margin-bottom: 5px;
overflow: hidden;
height: 30px;
li.icon .iconfont{ li.icon .iconfont{
position: absolute; position: absolute;
} }
...@@ -79,7 +81,7 @@ ...@@ -79,7 +81,7 @@
} }
li:nth-child(2),li:nth-child(3){ li:nth-child(2),li:nth-child(3){
width: 25%; width: 25%;
} }
li:nth-child(4){ li:nth-child(4){
text-align: right; text-align: right;
color: #ff002a; color: #ff002a;
......
...@@ -116,6 +116,8 @@ ...@@ -116,6 +116,8 @@
margin-right: 1%; margin-right: 1%;
position: relative; position: relative;
margin-bottom: 5px; margin-bottom: 5px;
overflow: hidden;
height: 30px;
li.icon .iconfont{ li.icon .iconfont{
position: absolute; position: absolute;
} }
......
export const environment = { export const environment = {
production: true, production: true,
BACKEND_URL_CONFIG_VALUE: 'https://m.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://m.zuihuibi.cn/api',
ORIGINNAME: 'https://m.zuihuibi.cn', ORIGINNAME: 'https://m.zuihuibi.cn/ydapi',
BAIDU_TONGJI_CODE: '36b1eb7eec3b5dac9f97d887092b5b27' BAIDU_TONGJI_CODE: '36b1eb7eec3b5dac9f97d887092b5b27'
}; };
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
export const environment = { export const environment = {
production: true, production: true,
BACKEND_URL_CONFIG_VALUE: 'https://mstage.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://mstage.zuihuibi.cn/api',
ORIGINNAME: 'https://mstage.zuihuibi.cn', ORIGINNAME: 'https://mstage.zuihuibi.cn/ydapi',
BAIDU_TONGJI_CODE: '84be9b9eaaca51048f32bb160ccad2e6' BAIDU_TONGJI_CODE: '84be9b9eaaca51048f32bb160ccad2e6'
}; };
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
export const environment = { export const environment = {
production: false, production: false,
BACKEND_URL_CONFIG_VALUE: 'https://mdev.zuihuibi.cn/api', BACKEND_URL_CONFIG_VALUE: 'https://mdev.zuihuibi.cn/api',
ORIGINNAME: 'https://mdev.zuihuibi.cn', ORIGINNAME: 'https://mdev.zuihuibi.cn/ydapi',
BAIDU_TONGJI_CODE: 'e8fa107d82e0471d097d545225aeed64' BAIDU_TONGJI_CODE: 'e8fa107d82e0471d097d545225aeed64'
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment