Commit b0bac0e5 by Sweet Zhang

提交

parents c14b643d fc1358a9
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"src/assets" "src/assets"
], ],
"styles": [ "styles": [
"src/assets/font/iconfont.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css", "node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css" "src/styles.css"
], ],
...@@ -178,4 +179,4 @@ ...@@ -178,4 +179,4 @@
} }
}, },
"defaultProject": "brokerQry" "defaultProject": "brokerQry"
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve --host 192.168.1.25",
"build": "ng build", "build": "ng build",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
"tslint": "~5.11.0", "tslint": "~5.11.0",
"typescript": "~3.2.2" "typescript": "~3.2.2"
} }
} }
\ No newline at end of file
<router-outlet></router-outlet> <router-outlet></router-outlet>
<app-guide-page *ngIf="shareGuidePageEnable"></app-guide-page>
\ No newline at end of file
import {Component} from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import {EventBusService} from "./event-bus.service"; import { EventBusService } from "./event-bus.service";
import { Subscription } from "rxjs/index";
declare const wx: any; declare const wx: any;
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.css'] styleUrls: ['./app.component.css']
}) })
export class AppComponent {
constructor(private eventBusService: EventBusService) { export class AppComponent implements OnInit, OnDestroy {
setTimeout(() => { shareGuidePageEnable: boolean;
this.wxConfig(); subscription: Subscription;
}, 500) constructor(public eventBusService: EventBusService) {
this.subscription = eventBusService.shareStatus$.subscribe(status => {
this.shareGuidePageEnable = status == '1';
});
}
ngOnInit() {
this.eventBusService.obtainToken().then(res => {
if (res['success']) {
localStorage.setItem('brokerQry', res['data']['token']);
this.getWxConfig();
}
});
}
ngOnDestroy() {
this.subscription.unsubscribe();
} }
wxConfig() { // 微信JS-SDK注册
const url = location.href.split('#')[0]; getWxConfig() {
const url = encodeURIComponent(location.href.split('#')[0]);
this.eventBusService.getWXJsInitConfig(url).then(res => { this.eventBusService.getWXJsInitConfig(url).then(res => {
const data = res['data']; const data = res['data'];
wx.config({ wx.config({
...@@ -26,7 +44,6 @@ export class AppComponent { ...@@ -26,7 +44,6 @@ export class AppComponent {
jsApiList: data.jsApiList, jsApiList: data.jsApiList,
beta: true beta: true
}); });
this.eventBusService.noShareCode();
}); });
} }
} }
import {BrowserModule} from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import {NgModule} from '@angular/core'; import { NgModule } from '@angular/core';
import {AppComponent} from './app.component'; import { AppComponent } from './app.component';
import {AppRoutingModule} from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import {BrokerQryComponent} from './broker-qry/broker-qry.component'; import { BrokerQryComponent } from './broker-qry/broker-qry.component';
import {BrokerDetailComponent} from './broker-detail/broker-detail.component'; import { BrokerDetailComponent } from './broker-detail/broker-detail.component';
import {MobileNoFormatPipe} from './mobile-no-format.pipe'; import { MobileNoFormatPipe } from './mobile-no-format.pipe';
import {HashLocationStrategy, LocationStrategy} from '@angular/common'; import { HashLocationStrategy, LocationStrategy } from '@angular/common';
import {FormsModule} from '@angular/forms'; import { FormsModule } from '@angular/forms';
import {HttpClientModule} from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import {EventBusService} from './event-bus.service'; import { EventBusService } from './event-bus.service';
import { GuidePageComponent } from './common/guide-page/guide-page/guide-page.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
BrokerQryComponent, BrokerQryComponent,
BrokerDetailComponent, BrokerDetailComponent,
MobileNoFormatPipe MobileNoFormatPipe,
GuidePageComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
...@@ -24,7 +26,7 @@ import {EventBusService} from './event-bus.service'; ...@@ -24,7 +26,7 @@ import {EventBusService} from './event-bus.service';
HttpClientModule, HttpClientModule,
AppRoutingModule AppRoutingModule
], ],
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}, EventBusService], providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy }, EventBusService],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
export class AppModule { export class AppModule {
......
...@@ -149,6 +149,27 @@ footer { ...@@ -149,6 +149,27 @@ footer {
align-items: center; align-items: center;
} }
.returnIndexBox {
position: fixed;
/* left: calc(100% - 70px);*/
top: calc(100% - 400px);
/* top: 0; */
right: 0;
z-index: 1001;
background: rgba(0, 0, 0, 0.5);
color: #fff;
width: 50px;
height: 50px;
/* border-radius: 50%; */
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 12px;
cursor: pointer;
}
@media (max-width: 767px) { @media (max-width: 767px) {
.wrapper { .wrapper {
width: 350px; width: 350px;
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
<h4>荣誉和证书</h4> <h4>荣誉和证书</h4>
<div class="honorList"> <div class="honorList">
<div *ngFor="let certificateItem of certificateList"> <div *ngFor="let certificateItem of certificateList">
<img src="{{certificateItem.imagePath}}" alt="{{certificateItem.certName}}" (click)="scaleImg(certificateItem.imagePath)"> <img src="{{certificateItem.imagePath}}" alt="{{certificateItem.certName}}"
(click)="scaleImg(certificateItem.imagePath)">
<span>{{certificateItem.certName}}</span> <span>{{certificateItem.certName}}</span>
</div> </div>
</div> </div>
...@@ -81,16 +82,18 @@ ...@@ -81,16 +82,18 @@
<!--尾部--> <!--尾部-->
<footer> <footer>
<div class="eqrocde"> <div class="eqrocde">
<div><img src="https://www.ydinsurance.cn/wp-content/uploads/2017/11/ydinsurance_qrcode.jpg" alt="" <div><img src="assets/images/online.jpg" class="img-responsive"></div>
class="img-responsive"></div>
<div><img src="https://www.zuihuibi.cn/wp-content/uploads/2018/07/qrcode_zuihuibi.jpg" alt=""
class="img-responsive"></div>
</div> </div>
<div class="text-center" style="padding-top: 15px;font-size: 10px">上海银盾保险经纪有限公司</div> <div class="text-center" style="padding-top: 15px;font-size: 10px">上海银盾保险经纪有限公司</div>
</footer> </footer>
</div> </div>
<div class="returnIndexBox" (click)="shareIdCard()">
<div><i class="iconfont icon-shouye"></i></div>
<div>分享</div>
</div>
</div> </div>
<!-- 图片放大缩小--> <!-- 图片放大缩小-->
<!--<div class="markBox" (click)="imgShowFlag=!imgShowFlag" *ngIf="imgShowFlag"> <!--<div class="markBox" (click)="imgShowFlag=!imgShowFlag" *ngIf="imgShowFlag">
<img src="{{this.scaleImgPath}}" alt="" id="scaleImg"> <img src="{{this.scaleImgPath}}" alt="" id="scaleImg">
</div>--> </div>-->
\ No newline at end of file
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core'; import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import {EventBusService} from '../event-bus.service'; import { EventBusService } from '../event-bus.service';
import {ActivatedRoute} from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { environment } from '../../environments/environment'
@Component({ @Component({
selector: 'app-broker-detail', selector: 'app-broker-detail',
templateUrl: './broker-detail.component.html', templateUrl: './broker-detail.component.html',
...@@ -14,15 +14,18 @@ export class BrokerDetailComponent implements OnInit { ...@@ -14,15 +14,18 @@ export class BrokerDetailComponent implements OnInit {
userPractitionerInfo: any; userPractitionerInfo: any;
imgShowFlag: boolean; imgShowFlag: boolean;
scaleImgPath: any; scaleImgPath: any;
reloadurl: any;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) { constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
} }
ngOnInit() { ngOnInit() {
this.practitionerId = this.activatedRoute.snapshot.params['id']; this.practitionerId = this.activatedRoute.snapshot.params['id'];
this.userPractitionerDetailQuery(); this.userPractitionerDetailQuery();
this.reloadurl = window.location.hash + '?reload=true';
if (this.getQuery('reload') !== 'true') {
window.location.href = this.reloadurl;
}
} }
userPractitionerDetailQuery() { userPractitionerDetailQuery() {
const practitionerId = { const practitionerId = {
practitionerId: this.practitionerId practitionerId: this.practitionerId
...@@ -40,4 +43,24 @@ export class BrokerDetailComponent implements OnInit { ...@@ -40,4 +43,24 @@ export class BrokerDetailComponent implements OnInit {
this.scaleImgPath = path; this.scaleImgPath = path;
this.imgShowFlag = true; this.imgShowFlag = true;
} }
getQuery(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
const r = decodeURIComponent(window.location.search).substr(1).match(reg);
if (r != null) {
return r[2];
}
return null;
}
// 分享名片
shareIdCard() {
const imgUrl = this.userPractitionerInfo.headFilePath ? this.userPractitionerInfo.headFilePath : `${environment.ORIGINNAME}/ydLife/assets/images/icons/meng.png`;
this.eventBusService.shareStatusPublish(1);
this.eventBusService.wxShare(
`银盾保险经纪 ${this.userPractitionerInfo.name}`,
'您的家庭保险专家、财务策划师。规划成就人生。',
`${window.location.href}`,
imgUrl);
}
} }
.guidePageContainer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
color: #fff;
display: flex;
justify-content: center;
z-index: 1002;
}
.guidePageContainer .guideTips {
margin-top: 35%;
letter-spacing: 3px;
text-align: center;
font-size: 22px;
}
.guidePageContainer .iconfont {
position: absolute;
right: 8%;
font-size: 40px;
top: 2px;
font-weight: 700;
}
\ No newline at end of file
<div class="guidePageContainer" (click)="closeGuidePage()">
<div class="guideTips">
<p>请点击右上角菜单</p>
<p>分享给朋友</p>
</div>
<i class="iconfont icon-yindaojiantou"></i>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GuidePageComponent } from './guide-page.component';
describe('GuidePageComponent', () => {
let component: GuidePageComponent;
let fixture: ComponentFixture<GuidePageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GuidePageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GuidePageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { EventBusService } from '../../../event-bus.service';
@Component({
selector: 'app-guide-page',
templateUrl: './guide-page.component.html',
styleUrls: ['./guide-page.component.css']
})
export class GuidePageComponent implements OnInit {
constructor(private eventBusService: EventBusService) { }
ngOnInit() {
setTimeout(() => {
this.closeGuidePage();
}, 6000);
}
closeGuidePage() {
this.eventBusService.shareStatusPublish(0);
}
}
import {Injectable} from '@angular/core'; import { Injectable } from '@angular/core';
import {environment} from './../environments/environment'; import { environment } from './../environments/environment';
import {HttpClient, HttpHeaders} from '@angular/common/http'; import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Subject } from "rxjs/index";
declare const wx: any; declare const wx: any;
@Injectable() @Injectable()
export class EventBusService { export class EventBusService {
private USER_API_URL = ''; private USER_API_URL = '';
private httpOptions; private httpOptions;
private shareStatusSource = new Subject<string>();
shareStatus$ = this.shareStatusSource.asObservable();
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
this.USER_API_URL = environment.apiUrl; this.USER_API_URL = environment.apiUrl;
this.httpOptions = { this.httpOptions = {
...@@ -28,13 +30,14 @@ export class EventBusService { ...@@ -28,13 +30,14 @@ export class EventBusService {
return this.http.post(url, JSON.stringify(ticketObj), this.httpOptions).toPromise(); return this.http.post(url, JSON.stringify(ticketObj), this.httpOptions).toPromise();
} }
/** /**
* 经纪人查询 * 经纪人查询
*/ */
async userPractitionerQuery(userPractitioner) { async userPractitionerQuery(userPractitioner) {
const url = this.USER_API_URL + '/user/userPractitionerQuery'; const url = this.USER_API_URL + '/user/userPractitionerQuery';
const res = await this.obtainToken(); const res = await this.obtainToken();
console.log(res)
this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token']); this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token']);
return this.http.post(url, JSON.stringify(userPractitioner), this.httpOptions) return this.http.post(url, JSON.stringify(userPractitioner), this.httpOptions)
.toPromise().then(response => { .toPromise().then(response => {
...@@ -74,24 +77,30 @@ export class EventBusService { ...@@ -74,24 +77,30 @@ export class EventBusService {
}); });
} }
/** // 向订阅者发布分享结果
* 没有分享码的分享 // 0.关闭分享引导页
*/ // 1.用户点击分享
noShareCode() { // 2.已经分享过了
setTimeout(() => { shareStatusPublish(type) {
// 默认的分享信息 this.shareStatusSource.next(type);
const shareData = { }
title: '银盾保险经纪人',
link: window.location.href, wxShare(title: string, desc: string, link: string, imgUrl: string) {
desc: '银盾保经,优选和定制最适合的保险方案,为您提供专业、中立的保险经纪服务。', const shareData = {
imgUrl: 'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/images/yd_shield.jpg' title: title, // 分享标题
}; desc: desc, // 分享描述
wx.ready(function () { link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
wx.onMenuShareAppMessage(shareData); // 分享微信 imgUrl: imgUrl, // 分享图标
wx.onMenuShareTimeline(shareData); // 分享到朋友圈 success: () => {
wx.onMenuShareQQ(shareData); // 分享到QQ this.shareStatusPublish(0);
}); alert(title)
}, 1000); // 说明:根组件初始化完成,子组件的异步请求数据可能还未返回,因此在2秒后注册分享。 }
};
wx.ready(() => { // 需在用户可能点击分享按钮前就先调用
wx.updateAppMessageShareData(shareData);
wx.updateTimelineShareData(shareData);
});
} }
......
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
export const environment = { export const environment = {
production: false, production: false,
apiUrl: 'https://mdev.zuihuibi.cn/api' apiUrl: 'https://mdev.zuihuibi.cn/api',
ORIGINNAME: 'https://mdev.zuihuibi.cn',
}; };
/* /*
......
*{margin:0;padding:0;}
html,body{
width:100%;
height:auto;
min-width: 320px;
max-width: 640px;
margin:0 auto;
}
a{
text-decoration: none;
}
img{
max-width:100%;
}
ul,ol,li{
list-style: none;
}
.wrapper{
position: relative;
}
.btn{
max-width: 55%;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
cursor: pointer;
}
.footer{
position: absolute;
bottom: .9%;
display: flex;
justify-content: space-around;
padding: 0 5%;
width: 100%;
box-sizing: border-box;
}
.footer div{
width: 50%;
}
.footer div:nth-child(1){
padding-right: 2%;
}
.footer div:nth-child(2){
padding-left: 2%;
}
.more_btn{
max-width: 100%;
position: relative;
cursor: pointer;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>春节最好的孝心礼</title>
<link rel="shortcut icon" href="https://www.ydinsurance.cn/wp-content/uploads/2018/04/favicon.gif" />
<link rel="stylesheet" href="./css/style.css" />
</head>
<body>
<div class="wrapper">
<img src="./images/parent_bg.jpg" alt="回家过年送父母" />
<img id="parent_btn_1" class="btn" style="top: 61.1%;" src="./images/btn_parent.png" alt="立即了解" />
<img id="parent_btn_2" class="btn" style="top: 95.7%;" src="./images/btn_parent.png" alt="立即了解" />
</div>
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js "></script>
<script src="./js/jquery.min.js"></script>
<script>
var api = 'https://' + window.location.host;
document.querySelector("#parent_btn_1").onclick = function () {
window.location.href = 'https://' + window.location.host + '/hProductDetail/245?type=9';
}
document.querySelector("#parent_btn_2").onclick = function () {
window.location.href = 'https://' + window.location.host + '/hProductDetail/438?type=7';
}
var _hmt = _hmt || [];
(function () {
const host = window.location.host;
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?36b1eb7eec3b5dac9f97d887092b5b27";
if (host == 'www.ydinsurance.cn') {
hm.src = "https://hm.baidu.com/hm.js?73a2215476525c6142927963135662e0";
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
function getToken() {
$.ajax({
type: "POST",
url: api + '/api/authorize/obtainToken',
contentType: "application/json",
data: JSON.stringify({
ticket: 'job'
}),
async: false,
success: function (res) {
token = res.data.token
}
})
return token;
}
var token = getToken();
getWxConfig();
// 获取微信分享配置
function getWxConfig() {
var url = location.href.split('#')[0];
$.ajax({
type: "POST",
url: api + '/api/wxConfig',
contentType: "application/json",
data: JSON.stringify({
url: url
}),
headers: {
"X-Authorization": token
},
async: false,
success: function (res) {
wx.config({
debug: false,
appId: res.data.appId,
timestamp: res.data.timestamp,
nonceStr: res.data.nonceStr,
signature: res.data.signature,
jsApiList: res.data.jsApiList,
beta: true
});
// 默认的分享信息
const shareData = {
title: '回家过年送父母最好的孝心礼',
link: `${api}/mk/springfestival/festival4parents.html`,
desc: '我们的牵挂,父母的安康',
imgUrl: 'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/7/festival4parents.jpg',
success: function () {
}
};
wx.ready(function () {
wx.onMenuShareAppMessage(shareData); // 分享微信
wx.onMenuShareTimeline(shareData); // 分享到朋友圈
wx.onMenuShareQQ(shareData); // 分享到QQ
});
}
})
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>春节出行旅游季</title>
<link rel="shortcut icon" href="https://www.ydinsurance.cn/wp-content/uploads/2018/04/favicon.gif" />
<link rel="stylesheet" href="./css/style.css" />
</head>
<body>
<div class="wrapper">
<img src="./images/travel_bg.jpg" alt="春节出游旅行季" />
<img id="btn1" class="btn" style="top: 47.8%;" src="./images/btn_travel.png" alt="立即了解" />
<img id="btn2" class="btn" style="top: 71%;" src="./images/btn_travel.png" alt="立即了解" />
<img id="btn3" class="btn" style="top: 94.2%;" src="./images/btn_travel.png" alt="立即了解" />
<div class="footer">
<div>
<img id="in" class="more_btn" src="./images/more_btn1.png" alt="国内旅游" />
</div>
<div>
<img id="out" class="more_btn" src="./images/more_btn2.png" alt="国外旅游" />
</div>
</div>
</div>
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js "></script>
<script src="./js/jquery.min.js"></script>
<script>
var api = 'https://' + window.location.host;
document.querySelector("#btn1").onclick = function () {
window.location.href = 'https://' + window.location.host + '/pdetail/139';
}
document.querySelector("#btn2").onclick = function () {
window.location.href = 'https://' + window.location.host + '/pdetail/346';
}
document.querySelector("#btn3").onclick = function () {
window.location.href = 'https://' + window.location.host + '/pdetail/80';
}
document.querySelector("#in").onclick = function () {
window.location.href = 'https://' + window.location.host + '/domestic';
}
document.querySelector("#out").onclick = function () {
window.location.href = 'https://' + window.location.host + '/travel';
}
var _hmt = _hmt || [];
(function () {
const host = window.location.host;
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?36b1eb7eec3b5dac9f97d887092b5b27";
if (host == 'www.ydinsurance.cn') {
hm.src = "https://hm.baidu.com/hm.js?73a2215476525c6142927963135662e0";
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
function getToken() {
$.ajax({
type: "POST",
url: api + '/api/authorize/obtainToken',
contentType: "application/json",
data: JSON.stringify({
ticket: 'job'
}),
async: false,
success: function (res) {
token = res.data.token
}
})
return token;
}
var token = getToken();
getWxConfig();
// 获取微信分享配置
function getWxConfig() {
var url = location.href.split('#')[0];
$.ajax({
type: "POST",
url: api + '/api/wxConfig',
contentType: "application/json",
data: JSON.stringify({
url: url
}),
headers: {
"X-Authorization": token
},
async: false,
success: function (res) {
wx.config({
debug: false,
appId: res.data.appId,
timestamp: res.data.timestamp,
nonceStr: res.data.nonceStr,
signature: res.data.signature,
jsApiList: res.data.jsApiList,
beta: true
});
// 默认的分享信息
const shareData = {
title: '春节出行旅游季,银盾伴您赏美景',
link: `${api}/mk/springfestival/festival4travel.html`,
desc: '保障在手全球畅行无忧',
imgUrl: 'https://ajb-images.oss-cn-shanghai-finance-1-pub.aliyuncs.com/7/festival4travel.jpg',
success: function () {
}
};
wx.ready(function () {
wx.onMenuShareAppMessage(shareData); // 分享微信
wx.onMenuShareTimeline(shareData); // 分享到朋友圈
wx.onMenuShareQQ(shareData); // 分享到QQ
});
}
})
}
</script>
</body>
</html>
\ No newline at end of file
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