代码注释添加

master
mabo 2021-07-15 10:19:56 +08:00
parent e74c6d9eda
commit 133febe7a7
4 changed files with 61 additions and 98 deletions

View File

@ -25,7 +25,6 @@
<!-- 拼图验证码 --> <!-- 拼图验证码 -->
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify> <verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
</Col> </Col>
<!-- <LangSwitch /> -->
</Row> </Row>
</div> </div>
</template> </template>
@ -36,12 +35,10 @@ import { validateMobile } from "@/libs/validate";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import Header from "@/views/main-components/header"; import Header from "@/views/main-components/header";
import Footer from "@/views/main-components/footer"; import Footer from "@/views/main-components/footer";
import LangSwitch from "@/views/main-components/lang-switch";
import util from "@/libs/util.js"; import util from "@/libs/util.js";
import verify from "@/views/my-components/verify"; import verify from "@/views/my-components/verify";
export default { export default {
components: { components: {
LangSwitch,
Header, Header,
Footer, Footer,
verify, verify,

View File

@ -1,32 +0,0 @@
<template>
<div class="lang-icon">
<Dropdown @on-click="langChange">
<Icon type="md-globe" size="26"/>
<DropdownMenu slot="list">
<DropdownItem name="zh-CN">简体中文</DropdownItem>
<DropdownItem name="en-US">English</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
</template>
<script>
export default {
name: "langSwitch",
methods: {
langChange(v) {
this.$i18n.locale = v;
this.$store.commit("switchLang", v);
}
}
};
</script>
<style lang="scss" scoped>
.lang-icon {
position: fixed;
top: 2vh;
right: 1.5vw;
cursor: pointer;
}
</style>

View File

@ -42,7 +42,7 @@ export default {
visible: false, // visible: false, //
contextMenuLeft: 0, // contextMenuLeft: 0, //
contextMenuTop: 0, // contextMenuTop: 0, //
actionList: { actionList: { //
others: '关闭其他', others: '关闭其他',
clearAll: '关闭所有' clearAll: '关闭所有'
}, },
@ -68,6 +68,7 @@ export default {
} }
}, },
methods: { methods: {
//
itemTitle(item) { itemTitle(item) {
if (typeof item.title == "object") { if (typeof item.title == "object") {
return this.$t(item.title.i18n); return this.$t(item.title.i18n);
@ -75,6 +76,7 @@ export default {
return item.title; return item.title;
} }
}, },
//
closePage(event, name) { closePage(event, name) {
let storeOpenedList = this.$store.state.app.storeOpenedList; let storeOpenedList = this.$store.state.app.storeOpenedList;
let lastPageObj = storeOpenedList[0]; let lastPageObj = storeOpenedList[0];
@ -102,6 +104,7 @@ export default {
this.linkTo(lastPageObj); this.linkTo(lastPageObj);
} }
}, },
//
linkTo(item) { linkTo(item) {
if (this.$route.name == item.name) { if (this.$route.name == item.name) {
return; return;
@ -118,6 +121,7 @@ export default {
this.$router.push(routerObj); this.$router.push(routerObj);
} }
}, },
//
handlescroll(e) { handlescroll(e) {
var type = e.type; var type = e.type;
let delta = 0; let delta = 0;
@ -155,6 +159,7 @@ export default {
} }
this.tagBodyLeft = left; this.tagBodyLeft = left;
}, },
//
handleTagsOption(type) { handleTagsOption(type) {
if (type == "clearAll") { if (type == "clearAll") {
this.$store.commit("clearAllTags"); this.$store.commit("clearAllTags");
@ -166,6 +171,7 @@ export default {
} }
this.tagBodyLeft = 0; this.tagBodyLeft = 0;
}, },
//
moveToView(tag) { moveToView(tag) {
if (tag.offsetLeft < -this.tagBodyLeft) { if (tag.offsetLeft < -this.tagBodyLeft) {
// //
@ -193,12 +199,14 @@ export default {
); );
} }
}, },
//
contextMenu (item, e) { contextMenu (item, e) {
this.visible = true this.visible = true
const offsetLeft = this.$el.getBoundingClientRect().left const offsetLeft = this.$el.getBoundingClientRect().left
this.contextMenuLeft = e.clientX - offsetLeft + 10 this.contextMenuLeft = e.clientX - offsetLeft + 10
this.contextMenuTop = e.clientY - 64 this.contextMenuTop = e.clientY - 64
}, },
//
closeMenu () { closeMenu () {
this.visible = false this.visible = false
} }

View File

@ -1,57 +1,53 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" inline :label-width="70" class="search-form">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="会员名称" prop="memberName">
<Form-item label="会员名称" prop="memberName"> <Input
<Input type="text"
type="text" v-model="searchForm.memberName"
v-model="searchForm.memberName" clearable
clearable placeholder="请输入会员名称"
placeholder="请输入会员名称" style="width: 200px"
style="width: 200px" />
/> </Form-item>
</Form-item> <Form-item label="商品名称" prop="goodsName">
<Form-item label="商品名称" prop="goodsName"> <Input
<Input type="text"
type="text" v-model="searchForm.goodsName"
v-model="searchForm.goodsName" clearable
clearable placeholder="请输入商品名"
placeholder="请输入商品名" style="width: 200px"
style="width: 200px" />
/> </Form-item>
</Form-item> <Form-item label="评价" prop="orderStatus">
<Form-item label="评价" prop="orderStatus"> <Select v-model="searchForm.grade" placeholder="请选择" clearable style="width: 200px">
<Select v-model="searchForm.grade" placeholder="请选择" clearable style="width: 200px"> <Option value="GOOD">好评</Option>
<Option value="GOOD">好评</Option> <Option value="MODERATE">中评</Option>
<Option value="MODERATE">中评</Option> <Option value="WORSE">差评</Option>
<Option value="WORSE">差评</Option> </Select>
</Select> </Form-item>
</Form-item> <Form-item label="评论日期">
<Form-item label="评论日期"> <DatePicker
<DatePicker v-model="selectDate"
v-model="selectDate" type="datetimerange"
type="datetimerange" format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss" clearable
clearable @on-change="selectDateRange"
@on-change="selectDateRange" placeholder="选择起始时间"
placeholder="选择起始时间" style="width: 200px"
style="width: 200px" ></DatePicker>
></DatePicker> </Form-item>
</Form-item> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleReset" class="search-btn">重置</Button>
<Button @click="handleReset" class="search-btn">重置</Button> </Form>
</Form>
</Row>
<Table <Table
:loading="loading" :loading="loading"
border border
:columns="columns" :columns="columns"
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" class="mt_10"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
@ -154,10 +150,9 @@ export default {
}, },
data() { data() {
return { return {
detailInfo: [], detailInfo: {}, //
image: [],// image: [],//
replyStatus: false,// replyStatus: false,//
modalType: 0, //
modalVisible: false, // modalVisible: false, //
modalTitle: "", // modalTitle: "", //
loading: true, // loading: true, //
@ -179,7 +174,7 @@ export default {
// //
formValidate: { formValidate: {
reply: [ reply: [
{required: true, message: '请输入回复内容', trigger: 'blur'}, {required: true, message: '请输入回复内容', trigger: 'blur'}
], ],
}, },
submitLoading: false, // submitLoading: false, //
@ -284,50 +279,45 @@ export default {
}; };
}, },
methods: { methods: {
init() { init() { //
this.getDataList(); this.getDataList();
}, },
//
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
//
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
//
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
//
handleReset() { handleReset() {
this.searchForm = {} this.searchForm = {}
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
changeSort(e) { //
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
clearSelectAll() { clearSelectAll() {
this.$refs.table.selectAll(false); this.$refs.table.selectAll(false);
}, },
changeSelect(e) { //
this.selectList = e;
this.selectCount = e.length;
},
selectDateRange(v) { selectDateRange(v) {
if (v) { if (v) {
this.searchForm.startDate = v[0]; this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1]; this.searchForm.endDate = v[1];
} }
}, },
//
getDataList() { getDataList() {
this.loading = true; this.loading = true;
API_Member.getMemberReview(this.searchForm).then((res) => { API_Member.getMemberReview(this.searchForm).then((res) => {
@ -353,7 +343,7 @@ export default {
} }
}); });
}, },
//
detail(v) { detail(v) {
this.form.replyImage = [] this.form.replyImage = []
this.loading = true; this.loading = true;