Commit a55dd220 by Sweet Zhang

经纪人查询分享

parent 9f39396a
......@@ -28,8 +28,8 @@
],
"scripts": [],
"es5BrowserSupport": true,
"baseHref": "/wp-content/themes/salient/brokerQry/",
"deployUrl": "/wp-content/themes/salient/brokerQry/"
"baseHref": "/brokerQry/",
"deployUrl": "/brokerQry/"
},
"configurations": {
"production": {
......@@ -73,6 +73,30 @@
"maximumError": "5mb"
}
]
},
"stage": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.stage.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
......
import { Component } from '@angular/core';
import {Component} from '@angular/core';
import {EventBusService} from "./event-bus.service";
declare const wx: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(private eventBusService: EventBusService) {
this.wxConfig();
}
wxConfig() {
const url = location.href.split('#')[0];
this.eventBusService.getWXJsInitConfig(url).then(res => {
const data = res['data'];
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: data.jsApiList,
beta: true
});
this.eventBusService.noShareCode();
});
}
}
......@@ -55,7 +55,7 @@
}
.honorList > div {
width: 100px;
width: 33.33%;
display: flex;
flex-direction: column;
align-items: center;
......@@ -66,6 +66,11 @@
margin-bottom: 5px;
}
.honorList > div > span {
padding-bottom: 25px;
font-size: 13px;
}
.bioIntro {
text-align: justify;
}
......@@ -152,6 +157,10 @@ footer {
padding: 15px;
}
.honorList > div > span {
font-size: 10px;
}
.basicInfo {
flex-direction: column-reverse;
}
......@@ -164,10 +173,6 @@ footer {
font-size: 12px;
}
.honorList > div {
width: 80px;
}
.cerPhoto {
width: 80px;
}
......
......@@ -29,7 +29,7 @@
</section>
<!--经纪人荣誉-->
<section class="honor" *ngIf="certificateList && certificateList.length>0">
<h4>荣誉</h4>
<h4>荣誉和证书</h4>
<div class="honorList">
<div *ngFor="let certificateItem of certificateList">
<img src="{{certificateItem.imagePath}}" alt="{{certificateItem.certName}}" (click)="scaleImg(certificateItem.imagePath)">
......
import {Injectable} from '@angular/core';
import {environment} from './../environments/environment';
import {HttpClient, HttpHeaders} from '@angular/common/http';
declare const wx: any;
@Injectable()
export class EventBusService {
private USER_API_URL = '';
......@@ -53,4 +54,44 @@ export class EventBusService {
});
}
/**
* 微信分享配置接口
* @param Currenturl
* @returns {Promise<any|TResult2|TResult1>}
*/
async getWXJsInitConfig(Currenturl) {
const url = this.USER_API_URL + '/wxConfig';
const postUrl = {
url: Currenturl
};
const res = await this.obtainToken();
this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token'])
return this.http.post(url, JSON.stringify(postUrl), this.httpOptions)
.toPromise().then(response => {
return response;
});
}
/**
* 没有分享码的分享
*/
noShareCode() {
setTimeout(() => {
// 默认的分享信息
const shareData = {
title: '银盾保险经纪人',
link: window.location.href,
desc: '银盾保经,优选和定制最适合的保险方案,为您提供专业、中立的保险经纪服务。',
imgUrl: 'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/images/yd_shield.jpg'
};
wx.ready(function () {
wx.onMenuShareAppMessage(shareData); // 分享微信
wx.onMenuShareTimeline(shareData); // 分享到朋友圈
wx.onMenuShareQQ(shareData); // 分享到QQ
});
}, 1000); // 说明:根组件初始化完成,子组件的异步请求数据可能还未返回,因此在2秒后注册分享。
}
}
......@@ -9,5 +9,6 @@
</head>
<body>
<app-root></app-root>
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js "></script>
</body>
</html>
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JsFlowSettings">
<service-enabled>false</service-enabled>
<exe-path />
<annotation-enable>false</annotation-enable>
<other-services-enabled>false</other-services-enabled>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
</expanded-state>
<selected-state>
<State>
<id>TypeScript</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/yzgMarketing.iml" filepath="$PROJECT_DIR$/.idea/yzgMarketing.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......@@ -20,7 +20,9 @@
a {
text-decoration: none;
}
#goBuy{
cursor: pointer;
}
.container .marketingInfo > img, .container .m-marketingInfo > img {
max-width: 100%;
height: auto;
......@@ -61,35 +63,45 @@
height: 100%;
padding-top: 8px;
}
@keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 100;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 100;
}
100% {
opacity: 0;
}
}
@keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 100;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes blink {
0% {
opacity: 0;
}
50% {
opacity: 100;
}
100% {
opacity: 0;
}
}
.blink {
animation: blink 2s infinite;
-webkit-animation: blink 2s infinite; /*Safari and Chrome*/
}
.blink {
animation: blink 2s infinite;
-webkit-animation: blink 2s infinite; /*Safari and Chrome*/
}
</style>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?36b1eb7eec3b5dac9f97d887092b5b27";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div class="container">
......@@ -98,7 +110,7 @@
<img src="images/minsu_pic_2.png" alt="">
<img src="images/minsu_pic_3.png" alt="">
<img src="images/minsu_pic_4.png" alt="">
<a href="https://m.zuihuibi.cn/pdetail/381?shareCode=xfjui6zcg8e&hmsr=yunzhanggui&hmpl=minsuwuyo&hmcu=CPIC&hmkw=20190220&hmci=" target="_blank"><img src="images/minsu_pic_5.png" alt=""></a>
<img src="images/minsu_pic_5.png" alt="" id="goBuy">
</div>
<div class="m-container" id="m-container">
<div class="m-marketingInfo">
......@@ -129,8 +141,11 @@
document.getElementById('marketingInfo').style.display = 'block';
}
}
window.onresize = function(){
window.onresize = function () {
checkDeviceType();
};
document.getElementById('goBuy').onclick = function () {
window.open('https://m.zuihuibi.cn/pdetail/381?shareCode=xfjui6zcg8e&hmsr=yunzhanggui&hmpl=minsuwuyo&hmcu=CPIC&hmkw=20190220&hmci=');
}
</script>
</body>
......
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