Commit 1f964c54 authored by chenqikuai's avatar chenqikuai

fix: 修复UI提出的问题

parent b3e528a8
......@@ -7,7 +7,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title><%= VUE_APP_NAME %></title>
<script src="//at.alicdn.com/t/font_1750816_hwmh10b4d34.js"></script>
<script src="//at.alicdn.com/t/font_1750816_w9got831wre.js"></script>
</head>
<body ontouchstart>
......
......@@ -36,7 +36,7 @@ export default class App extends Vue {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
color: #353535;
.van-dialog {
border-radius: 10px;
......@@ -52,11 +52,18 @@ export default class App extends Vue {
line-height: 40px;
}
}
.van-dialog__footer--buttons {
.van-cell::after {
border-bottom: 0;
}
[class*='van-hairline']::after {
border: 0;
}
.van-dialog__footer {
justify-content: space-evenly;
margin: 10px 0 20px;
.van-button {
border: 1px solid #d7d7d7;
box-sizing: border-box;
width: 140px;
height: 45px;
flex: none;
......@@ -64,12 +71,14 @@ export default class App extends Vue {
}
.van-dialog__confirm {
border: 0;
background: linear-gradient(180deg, #6c7afe 0%, #5d7bf6 100%);
color: #ffffff;
}
}
}
}
html {
// background: #F9FBFF;
// background: #f9f9f9;
......
......@@ -96,6 +96,7 @@ export default class MoreAction extends Vue {
margin-left: 19px;
.text {
margin-left: 21px;
color: #353535;
}
}
.action-title {
......@@ -123,7 +124,7 @@ export default class MoreAction extends Vue {
}
}
.btn-cancel {
border-top: 1px solid #cdcdcd;
border-top: 1px solid #EAEAEB;
text-align: center;
line-height: 50px;
height: 50px;
......
......@@ -41,6 +41,7 @@ export default class BasePopup extends Vue {
}
.content {
height: calc(100% - 16px - 24px - 22px);
padding: 0 15px;
overflow: auto;
}
}
......
......@@ -22,7 +22,7 @@ export default class Index extends Vue {
protected mounted() {
this.getSysTemplateList();
}
private renameFolder(folder: any) {
private renameFolder(folder: any, refresh: () => void) {
const { folder_name } = folder;
return true;
}
......@@ -30,6 +30,7 @@ export default class Index extends Vue {
const { folder_id} = folder;
return new Promise((resolve: any) => {
this.$dialog.confirm({
title: '提示',
message: '您确定要删除该文件夹吗?',
beforeClose: (action, done) => {
if ( action === 'confirm' ) {
......
<template>
<div class="index">
<van-image
class="banner"
src="@/assets/indexbanner.png"
fit="contain"
width="100%"
......@@ -42,13 +43,16 @@
"
>
<span style="font-weight: 500; color: #353535">我的模版</span>
<div>
<common-svg v-if="isLogin" @click="showAddFolder = true" name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>
<span
v-if="isLogin"
style="color: #3f79fe"
@click="showAddFolder = true"
>+添加文件夹</span
>添加文件夹</span
>
</div>
</div>
<empty
v-if="!loading && list.length === 0"
name="moban"
......@@ -76,7 +80,7 @@
show-cancel-button
@confirm="onConfirm"
>
<van-field v-model="currentFolder.folder_name" />
<van-field v-model="currentFolder.folder_name" ref="rename"/>
</van-dialog>
<add-folder
:show.sync="showAddFolder"
......@@ -194,6 +198,11 @@ export default class IndexSy extends Mixins(IndexMixin) {
}
private async callbackAction(cb: any) {
this.isShowRename = await cb.call(this, this.currentFolder, this.refreshPage);
if(this.isShowRename){
this.$nextTick(()=>{
(this.$refs.rename as any).focus();
})
}
}
private async refreshPage(){
......@@ -217,6 +226,9 @@ export default class IndexSy extends Mixins(IndexMixin) {
.index {
margin-bottom: $tabHeight;
padding: 11px 14px;
.banner{
margin-top: 5px;
}
div.header {
padding: 36px 21px;
text-align: left;
......
<template>
<div v-on="$listeners" class="sys-folder-item">
<van-image :src="thumb" width="44px" fit="contain"></van-image>
<van-image :src="thumb" class="image" fit="contain"></van-image>
<div class="desc">{{name}}</div>
</div>
</template>
......@@ -25,6 +25,9 @@ export default class SysFolderItem extends Vue {
</script>
<style scoped lang="scss">
.sys-folder-item{
.image{
width: 34px;
}
.desc {
font-size:14px;
color:#353535;
......
......@@ -19,7 +19,8 @@
background:linear-gradient(360deg,rgba(93,123,246,1) 0%,rgba(108,122,254,1) 100%);
box-shadow:0px 2px 10px 0px rgba(63,121,254,0.4);
border-radius:4px;"
@click="showBanner = true">
:class="!existFilledField && 'btn-next-disabled'"
@click="handleClickNext">
下一步
</div>
</div>
......@@ -47,6 +48,9 @@ import { Getter, State } from 'vuex-class';
import { TemplateDataItem } from '@/const/interface';
import { Route } from 'vue-router';
import AddBanner from './components/AddBanner.vue';
import { DataType } from '@/const/enum';
import {IFirstLevelField} from "./types"
@Component({
components: {
AddBanner,
......@@ -230,6 +234,49 @@ export default class Detail extends Vue {
};
return baseData;
}
private handleClickNext(){
if(!this.existFilledField)return;
this.showBanner = true;
}
get existFilledField(){
if(this.detail){
for(let indexOfFirstLevel = 0; indexOfFirstLevel < this.detail.length; ++indexOfFirstLevel){
const firstLevelItem: IFirstLevelField = this.detail[indexOfFirstLevel];
const firstLevelData = firstLevelItem.data;
for(let indexOfSecondLevel = 0; indexOfSecondLevel < firstLevelData.length; ++indexOfSecondLevel){
const secondLevel = firstLevelData[indexOfSecondLevel];
if(Array.isArray(secondLevel.data)){
const ret = secondLevel.data.some((value)=>value.value !== '');
if(ret) {
console.log(1);
return true
};
}else{
if(Array.isArray(secondLevel.data.value)){
if(secondLevel.data.value.length !== 0){
return true;
}
}else{
const value = secondLevel.data.value;
if(typeof value === 'string'){
if(value !== '') {
return true
};
}else if(typeof value === "number"){
if(value !== 0) {
return true
};
}
}
}
}
}
}
return false;
}
private async beforeRouteLeave(to: Route, from: Route, next: (params?: any) => void) {
if (!this.checkEdited) { return next(); }
if (!this.isEdited) { return next(); }
......@@ -347,10 +394,15 @@ export default class Detail extends Vue {
margin-top: 8px;
color: $valueColor;
}
}
::v-deep .van-cell{
padding: 12px 0;
}
.van-cell::after{
left: 0px;
right: 0px;
}
.caozuo{
.tubiao{
position:absolute;
......@@ -364,10 +416,14 @@ export default class Detail extends Vue {
}
}
}
.btn-next-disabled{
background: #B2C9FF !important;
}
.detail{
margin-bottom: 66px;
}
.btn-group{
z-index: 10;
.right{
flex: auto;
}
......
......@@ -87,7 +87,7 @@
<div style="position: relative" class="template-title">
我的模板
<div class="addFolder" @click="handleClickAddFolder" v-if="isSy">
+添加文件夹
<common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加文件夹
</div>
</div>
<div v-if="isSy">
......@@ -124,7 +124,7 @@
tag="p"
style="color: #3f79fe"
v-if="isSy"
>+添加模板</router-link
> <common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加模板</router-link
>
</header>
<van-radio-group v-model="radio" class="template-list">
......
......@@ -48,6 +48,7 @@ export default class AddBaseinfo extends Vue {
}
private cancle() {
this.$dialog({
title: '提示',
message: '是否放弃当前的存证',
confirmButtonText: '继续存证',
confirmButtonColor: '#3175FF',
......
import { DataType } from '@/const/enum';
export interface IFirstLevelField {
data: ISecondLevelField[];
key: string;
label: string;
type: DataType;
}
export interface ISecondLevelField {
data: IFieldData[] | IFieldData;
key: string;
label: string;
type: DataType;
}
export interface IFieldData {
format: EFormat;
type: EType;
value: string | number;
}
export enum EType {
FILE = 'file',
IMAGE = 'image',
TEXT = 'text',
DATE = 'date',
VIDEO = 'video',
AUDIO = 'audio',
}
export enum EFormat {
STRING = 'string',
HASH = 'hash',
UTC = 'utc',
}
......@@ -29,7 +29,7 @@
<div style="position: relative" class="template-title">
我的模板
<div class="addFolder" @click="handleClickAddFolder" v-if="isSy">
+添加文件夹
<common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加文件夹
</div>
</div>
<div v-if="isSy">
......
......@@ -91,7 +91,7 @@ export default class Add extends Vue {
this.$dialog
.confirm({
title: '提示',
message: '近保存还是去存证',
message: '存还是去存证',
confirmButtonText: '立即存证',
cancelButtonText: '仅保存',
})
......
......@@ -120,7 +120,7 @@ export default class Add extends Vue {
this.$dialog
.confirm({
title: '提示',
message: '保存还是去存证',
message: '保存还是去存证',
confirmButtonText: '立即存证',
cancelButtonText: '仅保存',
})
......
......@@ -8,13 +8,13 @@
align-items: center;
"
>
<p>{{ folderName }}</p
<p class="title">{{ folderName }}</p
><router-link
v-if="isFolderList"
:to="{ name: 'Add', query: { folderId: id } }"
tag="p"
style="color: #3f79fe"
>+添加模板</router-link
> <common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加模板</router-link
>
</div>
<empty
......@@ -47,7 +47,7 @@
show-cancel-button
@confirm="onConfirm"
>
<van-field v-model="currentTem.name" />
<van-field v-model="currentTem.name" ref="rename"/>
</van-dialog>
<base-pop-up
:show.sync="folderMoveingPopupVisible"
......@@ -164,6 +164,11 @@ export default class List extends Mixins(TemplateMixin) {
private async callbackAction(cb: any) {
// cb是什么东西?
this.isShowRename = await cb.call(this, this.currentTem, this.isSystemCategory());
if(this.isShowRename){
this.$nextTick(()=>{
(this.$refs.rename as any).focus()
})
}
this.getTemplateListToList(+this.id);
}
......@@ -246,6 +251,12 @@ export default class List extends Mixins(TemplateMixin) {
min-height: 100vh;
padding: 11px 14px;
background: #f9fbff;
.title{
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #353535;
}
a {
display: flex;
align-items: center;
......
......@@ -8,7 +8,7 @@
:style="{ height: '80%' }"
class="base-info"
>
<div style="position:relative;margin-bottom:26px;font-size:18px;">
<div style="position:relative;margin-bottom:26px;" class="title">
<common-svg
@click.native="cancel"
name="shanchu5"
......@@ -27,7 +27,7 @@
<label
for="thumb"
class="file-input"
style="padding: 10px 15px;margin:0 17px;"
style="padding: 10px 15px;margin:0 10px;"
>
<common-svg name="tianjia" style="margin-right:10px;"></common-svg>
<span>{{ imgUrl ? '已上传' : '添加模板封面' }}</span>
......@@ -251,6 +251,16 @@ $bottom-block: calc(40px + 2 * 18px);
::-webkit-input-placeholder {
color: #cdcdcd;
}
.van-cell::after{
border: 0;
}
.title{
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #353535;
line-height: 22px;
}
.file-input {
display: grid;
grid-template-columns: 20px auto 32px 20px;
......
......@@ -44,7 +44,7 @@
</div>
<div v-else>
<div style="position:relative;" class="folderList" v-if="showDetailb">
<div class="addFolder" @click="addFolder" v-if="isSy">+添加文件夹</div>
<div class="addFolder" @click="addFolder" v-if="isSy"> <common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加文件夹</div>
<van-tabs v-model="active" >
<van-tab title="系统模板">
<div
......@@ -83,7 +83,7 @@
<div class="folder-detail" v-else>
<header>
<div>{{currentFolder.folder_name}}</div>
<router-link to="addTemplate" tag="p" style="color:#3F79FE;" v-if="isSy">+添加模板</router-link>
<router-link to="addTemplate" tag="p" style="color:#3F79FE;" v-if="isSy"> <common-svg name="xuanzemoban-tianjia1" width="11px" style="margin-right:5px"></common-svg>添加模板</router-link>
</header>
<van-radio-group v-model="radio" class="template-list">
<van-radio
......
......@@ -15,7 +15,7 @@
class="desc van-multi-ellipsis--l2">
{{desc}}
</div>
<common-svg v-if="showActionIcon && !isSystemTemplate" @click.stop.native="showMoreAction" class="more" name="cunzhengliebiao-gengduo"></common-svg>
<common-svg v-if="showActionIcon && !isSystemTemplate" @click.stop.native="showMoreAction" class="more" name="sandian"></common-svg>
</div>
</template>
......
......@@ -39,6 +39,7 @@
>
<van-field
v-model="wordName"
ref="input"
label=""
:placeholder="levelObj.placeholder"
/>
......@@ -379,6 +380,9 @@ export default class Add extends Vue {
private preAddWord({ wordType, word }: any, flag: string = '') {
this.show = true;
this.$nextTick(()=>{
(this.$refs.input as any).focus();
})
this.wordType = wordType;
this.currentWords = word ? word.data : this.words;
if (flag === FLAG_UPDATE) {
......
......@@ -166,8 +166,10 @@ export default class Recharge extends Vue {
localStorage.setItem('orderId', this.orderId);
const redirectUrl = encodeURIComponent(`${protocol}//${host}/#/recharge?isCallback=true`);
this.redirectUrl = this.method === 0 ? pay_url : `${pay_url}&redirect_url=${redirectUrl}`;
console.log(this.redirectUrl);
localStorage.setItem('payUrl', this.redirectUrl);
location.href = this.redirectUrl;
// location.href = this.redirectUrl;
// (window as any).appslc.toPay(this.redirectUrl);
}
private async confrimPayed() {
......
......@@ -13,7 +13,7 @@
class="item"
@click="goToBrowser(item)">
<common-svg
name="cunzhengliebiao-gengduo"
name="sandian"
class="icon"
width="30px" height="15px"
v-on="$listeners"
......@@ -95,9 +95,9 @@ export default class RecycleList extends Mixins(MixinProof) {
border-radius:5px;
.icon {
position:absolute;
top: 0;
top: 50%;
right: 0;
margin: 10px;
transform: translateY(-50%);
}
}
}
......
<template>
<div class="view-template">
<div class="first-line">
<div class="select-template">选择模板</div>
<div class="select-template" style="font-size: 16px; color: rgb(53, 53, 53); font-weight: 500;">选择模板</div>
<div class="click-to-preview-select">点击模板图像进行预览和选择</div>
<div class="add-template" @click="handleClickAddTemplate" v-if="isFolderList">
<van-image src="@/assets/addTemplate.png" />添加模板
......
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