Commit 91698862 by Chao Sun

分享按钮微信显示&icon更换

parent 04ff2aaa
......@@ -88,8 +88,8 @@
</footer>
</div>
<div class="returnIndexBox" (click)="shareIdCard()">
<div><i class="iconfont icon-shouye"></i></div>
<div class="returnIndexBox" *ngIf="deviceType==3" (click)="shareIdCard()">
<div style="text-align: center;"><img style="max-width: 45%;" src="assets/images/shareBtn.png" alt=""></div>
<div>分享</div>
</div>
</div>
......
......@@ -15,6 +15,7 @@ export class BrokerDetailComponent implements OnInit {
imgShowFlag: boolean;
scaleImgPath: any;
reloadurl: any;
deviceType: number;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
}
......@@ -25,6 +26,8 @@ export class BrokerDetailComponent implements OnInit {
if (this.getQuery('reload') !== 'true') {
window.location.href = this.reloadurl;
}
this.deviceType = this.checkDeviceType();
}
userPractitionerDetailQuery() {
const practitionerId = {
......@@ -63,4 +66,23 @@ export class BrokerDetailComponent implements OnInit {
`${window.location.href}`,
imgUrl);
}
/**
* 检测设备信息
* deviceType:PC为1,移动端为2,微信为3
*/
checkDeviceType() {
let deviceType = null;
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
deviceType = 3;
} else {
deviceType = 2;
}
} else {
deviceType = 1;
}
return deviceType;
}
}
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