Commit 7bbdc753 authored by yyh's avatar yyh

cs 环境

parent cc5bb6df
VUE_APP_SERVER=/api
VUE_APP_BROWSER=http://47.114.159.142:9036
VUE_APP_NAME=33慈善
VUE_APP_CATEGORY=cs
\ No newline at end of file
VUE_APP_SERVER=/api
VUE_APP_BROWSER=http://47.114.159.142:9033
\ No newline at end of file
VUE_APP_BROWSER=http://47.114.159.142:9033
VUE_APP_NAME=上链查溯源
VUE_APP_CATEGORY=sy
\ No newline at end of file
......@@ -16,4 +16,26 @@ rm -rf tracesourcemb
scp tracesourcemb.tar root@120.26.174.69:/usr/share/nginx/html/tracesourcemb.tar
rm -rf tracesourcemb.tar
ssh root@120.26.174.69 'cd /usr/share/nginx/html && rm -rf tracesourcemb && tar -xzf tracesourcemb.tar && rm -rf tracesourcemb.tar'
echo 'done. 👉 http://120.26.174.69:9090'
\ No newline at end of file
echo 'done. 👉 http://120.26.174.69:9090'
server {
listen 9090;
root /usr/share/nginx/html/goSlc;
index index.html index.htm index.nginx-debian.html;
client_max_body_size 20m;
client_body_buffer_size 128k;
fastcgi_intercept_errors on;
location / {
# 移动、pc 设备适配
if ($http_user_agent ~* '(Android|webOS|iPhone|iPod|BlackBerry)') {
root /usr/share/nginx/html/tracesourcemb
}
index index.html;
try_files $uri $uri/ /index.html;
gzip_static on;
}
location /api/ {
proxy_pass http://118.89.159.234:46789;
}
}
\ No newline at end of file
......@@ -3,7 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve:sy": "vue-cli-service serve --mode developmentsy",
"serve:cs": "vue-cli-service serve --mode developmentcs",
"build": "vue-cli-service build",
"buildtest": "vue-cli-service build --mode test",
"lint": "vue-cli-service lint",
......
......@@ -5,7 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title><%= VUE_APP_NAME %></title>
<script src="//at.alicdn.com/t/font_1750816_5kkvr3ge0hg.js"></script>
</head>
<body>
......
......@@ -7,7 +7,7 @@
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { Component, Vue, Provide } from 'vue-property-decorator';
import { Toast, Dialog, Tabbar, TabbarItem} from 'vant';
import { Getter, Action } from 'vuex-class';
......@@ -18,6 +18,8 @@ import { Getter, Action } from 'vuex-class';
},
})
export default class App extends Vue {
@Provide('isSy') private isSy: boolean = process.env.VUE_APP_CATEGORY !== 'cs';
@Provide('APP-NAME') private APP_NAME: string = process.env.VUE_APP_NAME;
@Action('getUserInfo') private getUserInfo!: () => void;
private mounted() {
......
......@@ -34,7 +34,7 @@
</van-steps>
<div class="desc" @click.stop="showIncrementList = !showIncrementList;getIncrementList(3);">
<common-svg name="suyuan-duoshaotiao1"></common-svg>
<div>溯源流程{{proof.increment_num}}条</div>
<div>{{isSy? '溯源' : '慈善'}}流程{{proof.increment_num}}条</div>
<common-svg name="fanhui" :style="{transform: showIncrementList?'rotate(180deg)':'rotate(0)'}"></common-svg>
</div>
</div>
......@@ -42,7 +42,7 @@
</template>
<script lang="ts">
import { Component, Prop, Vue, Emit } from 'vue-property-decorator';
import { Component, Prop, Vue, Emit, Inject } from 'vue-property-decorator';
import { Icon, Steps, Step, Collapse, CollapseItem } from 'vant';
import { ChainStatus } from '@/const/enum';
import { ChainStatusStr } from '@/const/constants';
......@@ -63,6 +63,7 @@ const classEnum: any = {
},
})
export default class ProofItem extends Vue {
@Inject('isSy') private isSy!: boolean;
@Prop( {
required: true,
})private proof!: any;
......
......@@ -23,6 +23,7 @@ import 'vant/lib/index.css';
Vue.use(Lazyload);
import Component from 'vue-class-component';
import VueRouter from 'vue-router';
Component.registerHooks([
'beforeRouteEnter', // 进入路由之前
'beforeRouteLeave', // 离开路由之前
......
server {
listen 9090;
root /usr/share/nginx/html/goSlc;
index index.html index.htm index.nginx-debian.html;
client_max_body_size 20m;
client_body_buffer_size 128k;
fastcgi_intercept_errors on;
location / {
# 移动、pc 设备适配
if ($http_user_agent ~* '(Android|webOS|iPhone|iPod|BlackBerry)') {
root /usr/share/nginx/html/tracesourcemb
}
index index.html;
try_files $uri $uri/ /index.html;
gzip_static on;
}
location /api/ {
proxy_pass http://118.89.159.234:46789;
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
:finished="finished"
@load="getList"
>
<van-image v-if="!list.length && !loading" src="@/assets/emptyProof.png" fit="contain"></van-image>
<van-image v-if="!list.length && !loading && isSy" src="@/assets/emptyProof.png" fit="contain"></van-image>
<van-empty
v-if="!list.length && !loading"
description="您还未添加存证"
......@@ -69,7 +69,7 @@
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
import { Component, Prop, Vue, Inject } from 'vue-property-decorator';
import { List, Popup, Button, Image, Picker, Grid, GridItem, Empty, Dialog } from 'vant';
import { ChainStatus } from '@/const/enum';
import { ActionList, ChainStatusStr } from '@/const/constants';
......@@ -96,6 +96,7 @@ import AddBaseinfo from './components/AddBaseinfo.vue';
})
export default class Index extends Vue {
@Inject('isSy') private isSy!: boolean;
private show: boolean = false;
private showFilterPicker: boolean = false;
private columns: any[] = [{text: '全部', status: []}];
......
......@@ -2,7 +2,7 @@
<div class="index">
<div class="header">
<div class="login" v-if="!isLogin">
<p>~ 欢迎来到上链查溯源平台</p>
<p>~ 欢迎来到{{APP_NAME}}平台</p>
<div class="button" @click="toLogin">登录/注册</div>
</div>
<div class="proof" v-else>
......@@ -25,6 +25,7 @@
</ul>
</div>
<div
v-if="isSy"
style="display:flex;flex-direction:row;justify-content:space-between;font-size:14px;color:#353535;margin-top:10px;"
>
<p style="font-weight:500;color:#353535;">我的模版</p>
......@@ -44,8 +45,9 @@
description="您还未添加模板"
image="@/assets/notemplate.png">
</van-empty> -->
<empty v-if="!list.length && !loading" name="moban" tip="您还未添加模板"></empty>
<div class="folder-item" v-for="{id, folder_simg_url, folder_name, detail} of list" :key="id" @click="goTemplList(detail)">
<empty v-if="!list.length && !loading && isSy" name="moban" tip="您还未添加模板"></empty>
<div v-if="isSy">
<div class="folder-item" v-for="{id, folder_simg_url, folder_name, detail} of list" :key="id" @click="goTemplList(detail)">
<van-image
class="thumb"
:src="folder_simg_url"
......@@ -54,13 +56,13 @@
<div class="title" style="#353535;font-size:18px;font-weight:500;">{{folder_name}}</div>
<div class="desc" style="color: #AAAAAA;">{{(detail || []).length}}条模版</div>
<common-svg name="jinru" class="right-icon"></common-svg>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import { Component, Prop, Vue, Watch, Inject } from 'vue-property-decorator';
import { List, Image, Empty } from 'vant';
import { TEMPLATETYPE } from '@/const/enum';
import { State, Action } from 'vuex-class';
......@@ -72,6 +74,8 @@ import { State, Action } from 'vuex-class';
},
})
export default class Index extends Vue {
@Inject('isSy') private isSy!: boolean;
@Inject('APP-NAME') private APP_NAME!: string;
@State('isLogin') private isLogin!: boolean;
@State('proofCount') private proofCount!: number;
@Action('getProofCount') private getProofCount!: any;
......
......@@ -44,7 +44,7 @@
</div>
<div v-else>
<div style="position:relative;" class="folderList" v-if="showDetailb">
<div class="addFolder" @click="addFolder">+添加文件夹</div>
<div class="addFolder" @click="addFolder" v-if="isSy">+添加文件夹</div>
<van-tabs v-model="active" >
<van-tab title="系统模板">
<div
......@@ -62,7 +62,7 @@
<common-svg name="jinru" class="right-icon"></common-svg>
</div>
</van-tab>
<van-tab title="我的模板">
<van-tab title="我的模板" v-if="isSy">
<div
v-for="(folder,index) in userFolderList"
:key="index"
......@@ -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;">+添加模板</router-link>
<router-link to="addTemplate" tag="p" style="color:#3F79FE;" v-if="isSy">+添加模板</router-link>
</header>
<van-radio-group v-model="radio" class="template-list">
<van-radio
......@@ -116,7 +116,7 @@
</van-popup>
</template>
<script lang="ts">
import { Component, Prop, Vue, Emit } from 'vue-property-decorator';
import { Component, Prop, Vue, Emit , Inject } from 'vue-property-decorator';
import { Collapse, CollapseItem, Field,
Button, NavBar, SwipeCell,
Popup, Uploader, Picker,
......@@ -144,6 +144,7 @@ import PreviewTemplate from './PreviewTemplate.vue';
},
})
export default class SelectTemplate extends Vue {
@Inject('isSy') private isSy!: boolean;
private active: number = 0;
private systemFolderList: any[] = [];
private userFolderList: any[] = [];
......
......@@ -8,7 +8,7 @@
</div>
<div>
<common-svg :name="authIcon" style="width:120px;height:40px;" v-if="isLogin"></common-svg>
<div style="color:#B6B5BA;font-size: 12px;" v-else>登录建立存证溯源</div>
<div style="color:#B6B5BA;font-size: 12px;" v-else>登录建立{{isSy ? '存证溯源': '慈善记录'}}</div>
</div>
<common-svg name="shezhi" class="right" v-if="isLogin" @click.native="go('AccountNum')" style="margin: 5px;"></common-svg>
</header>
......@@ -29,7 +29,7 @@
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import { Component, Prop, Vue, Watch, Inject } from 'vue-property-decorator';
import { Cell, Form, Field, CellGroup, Button, Image, Uploader } from 'vant';
import { Getter, State, Action } from 'vuex-class';
import { AuthStatus } from '@/const/enum';
......@@ -53,6 +53,7 @@ const authSucStr: any = {
},
})
export default class Index extends Vue {
@Inject('isSy') private isSy!: boolean;
@State('userInfo') private userInfo!: any;
@State('isSetPwd') private isSetPassWd!: number;
@State('isLogin') private isLogin!: boolean;
......
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