feat(1.0):除微信支付外,第一版功能完成
parent
a36eff4595
commit
0a2e118872
@ -0,0 +1,21 @@
|
||||
all: frontend build tar
|
||||
image: frontend docker-build save-image
|
||||
|
||||
TAG=v1.0
|
||||
|
||||
frontend:
|
||||
cd cls && yarn run build
|
||||
tar:
|
||||
tar -czf cls-h5.$(TAG).tar.gz cls config
|
||||
|
||||
docker-build:
|
||||
docker build -t k8s.dingshudata.com/cmcc-panoramic-application:$(TAG) .
|
||||
|
||||
save-image:
|
||||
docker save -o cmcc.tar k8s.dingshudata.com/cmcc-panoramic-application
|
||||
|
||||
build:export CGO_ENABLED=0
|
||||
build:export GOOS=linux
|
||||
build:export GOARCH=amd64
|
||||
build:
|
||||
go build -ldflags -s -tags="jsoniter nomsgpack" .
|
File diff suppressed because it is too large
Load Diff
@ -1,21 +0,0 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
});
|
@ -1,21 +1,27 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { MinePage } from './mine.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MinePage
|
||||
},
{
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { MinePage } from './mine.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MinePage
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
|
||||
},
|
||||
{
|
||||
path:'privacy',
|
||||
loadChildren:() => import('./privacy/privacy.module').then(m=>m.PrivacyPageModule)
|
||||
},
|
||||
|
||||
|
||||
];
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class MinePageRoutingModule {}
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class MinePageRoutingModule {}
|
||||
|
@ -1,17 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MinePage } from './mine.page';
|
||||
|
||||
describe('MinePage', () => {
|
||||
let component: MinePage;
|
||||
let fixture: ComponentFixture<MinePage>;
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MinePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import {PrivacyPage} from "./privacy.page";
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PrivacyPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PrivacyPageRoutingModule {}
|
@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { PrivacyPageRoutingModule } from './privacy-routing.module';
|
||||
import { PrivacyPage } from './privacy.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
PrivacyPageRoutingModule
|
||||
],
|
||||
declarations: [PrivacyPage]
|
||||
})
|
||||
export class PrivacyPageModule {}
|
@ -0,0 +1,13 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button text="" defaultHref="/mine"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>用户隐私政策</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="privacy-content" [innerHTML]="privacyContent">
|
||||
</div>
|
||||
</ion-content>
|
@ -0,0 +1,40 @@
|
||||
.privacy-content {
|
||||
padding: 20px;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 20px 0 15px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 15px 0 10px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 12px 0 8px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
ion-back-button {
|
||||
--color: #333333;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
selector: 'app-privacy',
|
||||
templateUrl: './privacy.page.html',
|
||||
styleUrls: ['./privacy.page.scss'],
|
||||
standalone:false,
|
||||
})
|
||||
export class PrivacyPage implements OnInit {
|
||||
privacyContent: SafeHtml = '';
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private sanitizer: DomSanitizer
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.loadPrivacyContent();
|
||||
}
|
||||
|
||||
private loadPrivacyContent() {
|
||||
this.http.get('assets/privacy/readme.md', { responseType: 'text' })
|
||||
.subscribe(content => {
|
||||
const htmlContent = this.convertMarkdownToHtml(content);
|
||||
this.privacyContent = this.sanitizer.bypassSecurityTrustHtml(htmlContent);
|
||||
});
|
||||
}
|
||||
|
||||
private convertMarkdownToHtml(markdown: string): string {
|
||||
return markdown
|
||||
.replace(/^# (.*$)/gm, '<h1>$1</h1>')
|
||||
.replace(/^## (.*$)/gm, '<h2>$1</h2>')
|
||||
.replace(/^### (.*$)/gm, '<h3>$1</h3>')
|
||||
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
|
||||
.replace(/\*(.*?)\*/g, '<em>$1</em>')
|
||||
.replace(/\n/g, '<br>');
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 225 KiB |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,5 @@
|
||||
package price_default
|
||||
|
||||
type PriceDefaultRepository interface {
|
||||
Get() (*PriceDefault, error)
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package price_default
|
||||
|
||||
import (
|
||||
"cls/internal/domain/price_default"
|
||||
"cls/pkg/xorm_engine"
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
||||
type PriceDefaultRepositoryORM struct {
|
||||
engine *xorm_engine.Engine
|
||||
}
|
||||
|
||||
var _ price_default.PriceDefaultRepository = (*PriceDefaultRepositoryORM)(nil)
|
||||
|
||||
func NewPriceRepositoryORM(engine *xorm_engine.Engine) price_default.PriceDefaultRepository {
|
||||
return &PriceDefaultRepositoryORM{engine}
|
||||
}
|
||||
|
||||
func (p PriceDefaultRepositoryORM) Get() (*price_default.PriceDefault, error) {
|
||||
data := &price_default.PriceDefault{}
|
||||
_, err := p.engine.Where(builder.Eq{"id": 1}).Get(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return data, err
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
Loading…
Reference in New Issue