代码注释添加

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>
</Col>
<!-- <LangSwitch /> -->
</Row>
</div>
</template>
@ -36,12 +35,10 @@ import { validateMobile } from "@/libs/validate";
import Cookies from "js-cookie";
import Header from "@/views/main-components/header";
import Footer from "@/views/main-components/footer";
import LangSwitch from "@/views/main-components/lang-switch";
import util from "@/libs/util.js";
import verify from "@/views/my-components/verify";
export default {
components: {
LangSwitch,
Header,
Footer,
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, //
contextMenuLeft: 0, //
contextMenuTop: 0, //
actionList: {
actionList: { //
others: '关闭其他',
clearAll: '关闭所有'
},
@ -68,6 +68,7 @@ export default {
}
},
methods: {
//
itemTitle(item) {
if (typeof item.title == "object") {
return this.$t(item.title.i18n);
@ -75,6 +76,7 @@ export default {
return item.title;
}
},
//
closePage(event, name) {
let storeOpenedList = this.$store.state.app.storeOpenedList;
let lastPageObj = storeOpenedList[0];
@ -102,6 +104,7 @@ export default {
this.linkTo(lastPageObj);
}
},
//
linkTo(item) {
if (this.$route.name == item.name) {
return;
@ -118,6 +121,7 @@ export default {
this.$router.push(routerObj);
}
},
//
handlescroll(e) {
var type = e.type;
let delta = 0;
@ -155,6 +159,7 @@ export default {
}
this.tagBodyLeft = left;
},
//
handleTagsOption(type) {
if (type == "clearAll") {
this.$store.commit("clearAllTags");
@ -166,6 +171,7 @@ export default {
}
this.tagBodyLeft = 0;
},
//
moveToView(tag) {
if (tag.offsetLeft < -this.tagBodyLeft) {
//
@ -193,12 +199,14 @@ export default {
);
}
},
//
contextMenu (item, e) {
this.visible = true
const offsetLeft = this.$el.getBoundingClientRect().left
this.contextMenuLeft = e.clientX - offsetLeft + 10
this.contextMenuTop = e.clientY - 64
},
//
closeMenu () {
this.visible = false
}

View File

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