Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

master
misworga831 2023-04-04 15:15:09 +08:00
commit e5c25895a0
15 changed files with 149 additions and 83 deletions

View File

@ -139,7 +139,7 @@ export default {
"Button", "Button",
{ {
props: { props: {
type: "success", type: "primary",
size: "small", size: "small",
}, },
style: { style: {

View File

@ -212,6 +212,7 @@
filterStatus (status) { // filterStatus (status) { //
const arr = [ const arr = [
{status: 'WAIT_BILL', title: '待结算'}, {status: 'WAIT_BILL', title: '待结算'},
{status: 'NO_COMPLETED', title: '未完成'},
{status: 'WAIT_CASH', title: '待提现'}, {status: 'WAIT_CASH', title: '待提现'},
{status: 'COMPLETE_CASH', title: '提现完成'}, {status: 'COMPLETE_CASH', title: '提现完成'},
{status: 'CANCEL', title: '订单取消'}, {status: 'CANCEL', title: '订单取消'},
@ -229,6 +230,7 @@
{status: 'WAIT_CASH', color: 'orange'}, {status: 'WAIT_CASH', color: 'orange'},
{status: 'COMPLETE_CASH', color: 'green'}, {status: 'COMPLETE_CASH', color: 'green'},
{status: 'CANCEL', color: 'red'}, {status: 'CANCEL', color: 'red'},
{status: 'NO_COMPLETED', color: 'red'},
{status: 'REFUND', color: 'magenta'}, {status: 'REFUND', color: 'magenta'},
] ]
for (let i=0;i<arr.length;i++) { for (let i=0;i<arr.length;i++) {

View File

@ -337,6 +337,7 @@ export default {
// //
async initOrderChartList(name) { async initOrderChartList(name) {
this.orderChart ? this.orderChart.clear() : ''
const res = await API_Goods.getOrderChart(this.orderParams); const res = await API_Goods.getOrderChart(this.orderParams);
if (res.success) { if (res.success) {
this.chartList = res.result; this.chartList = res.result;
@ -446,6 +447,7 @@ export default {
// //
async getPvChart() { async getPvChart() {
this.pvChart ? this.pvChart.clear() : ''
API_Member.getStatisticsList(this.params).then((res) => { API_Member.getStatisticsList(this.params).then((res) => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;
@ -464,6 +466,7 @@ export default {
}, },
// //
async initHistoryMemberChartList() { async initHistoryMemberChartList() {
this.historyMemberChart ? this.historyMemberChart.clear() : ''
const res = await API_Member.historyMemberChartList(); const res = await API_Member.historyMemberChartList();
if (res.success) { if (res.success) {
this.chartList = res.result; this.chartList = res.result;

View File

@ -28,18 +28,16 @@
</div> </div>
<div slot="footer" style="text-align: right"> <div slot="footer" style="text-align: right">
<Button v-if="tab === 'WECHAT'" type="success" size="large" @click="wechatFormDataEdit"></Button> <Button v-if="tab === 'WECHAT'" type="primary" @click="wechatFormDataEdit"></Button>
<Button v-else type="success" size="large" @click="wechatMPFormDataEdit"></Button> <Button v-else type="primary" @click="wechatMPFormDataEdit"></Button>
</div> </div>
</Modal> </Modal>
<Card>
<Tabs @on-click="tabPaneChange" v-model="tab"> <Tabs @on-click="tabPaneChange" v-model="tab">
<TabPane label="微信消息" name="WECHAT"> <TabPane label="微信消息" name="WECHAT">
<div class="search"> <div class="search">
<Card>
<Row class="operation mt_10"> <Row class="operation mt_10">
<Button @click="weChatSync" type="primary">同步微信消息</Button> <Button @click="weChatSync" type="primary">同步微信消息</Button>
</Row> </Row>
@ -61,14 +59,11 @@
size="small" size="small"
></Page> ></Page>
</Row> </Row>
</Card>
</div> </div>
</TabPane> </TabPane>
<TabPane label="微信小程序订阅消息" name="WECHATMP"> <TabPane label="微信小程序订阅消息" name="WECHATMP">
<div class="search"> <div class="search">
<Card>
<Row class="operation mt_10"> <Row class="operation mt_10">
<Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button> <Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button>
</Row> </Row>
@ -91,10 +86,10 @@
size="small" size="small"
></Page> ></Page>
</Row> </Row>
</Card>
</div> </div>
</TabPane> </TabPane>
</Tabs> </Tabs>
</Card>
</div> </div>

View File

@ -2,10 +2,15 @@
<div class="box"> <div class="box">
<Row class="operation"> <Row class="operation">
<Col span="12"> <Col span="12">
<DatePicker
<DatePicker @on-change="search" show-week-numbers type="date" placement="bottom-end" placeholder="选择查看日期" :options="options"
style="width: 200px"></DatePicker> @on-change="search"
type="date"
placement="bottom-end"
placeholder="选择查看日期"
style="width: 200px"
v-model="yestDate"
></DatePicker>
</Col> </Col>
</Row> </Row>
<Row> <Row>
@ -16,16 +21,15 @@
</p> </p>
</Row> </Row>
<div id="container"></div> <div id="container"></div>
</div> </div>
</template> </template>
<script> <script>
import {Chart} from "@antv/g2"; import { Chart } from "@antv/g2";
import {getHotWordsHistory} from "@/api/index"; import { getHotWordsHistory } from "@/api/index";
import affixTime from "@/components/affix-time"; import affixTime from "@/components/affix-time";
import {Message} from "view-design"; import { Message } from "view-design";
export default { export default {
components: { components: {
@ -33,37 +37,54 @@ export default {
}, },
data() { data() {
return { return {
yestDate:new Date(new Date().getTime() - 24 * 60 * 60 * 1000).toString(),
yestDate:this.$options.filters.unixToDate(
(new Date().getTime() / 1000) - (24 * 60 * 60),
"yyyy年MM月dd日"
),
params: { params: {
date:this.$options.filters.unixToDate(new Date().getTime() / 1000,'yyyy-MM-dd') date: this.$options.filters.unixToDate(
(new Date().getTime() / 1000) - (24 * 60 * 60),
"yyyy-MM-dd"
),
}, },
hotWordsChart: "", // hotWordsChart: "", //
hotWordsData: [] // hotWordsData: [], //
options: {
disabledDate: (date) => {
if (this.endMonth) {
let endDate = this.getDate(this.endMonth);
return (date && date > endDate) || date > new Date();
} else {
return date && date > new Date();
}
},
},
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
clickBreadcrumb(val) { clickBreadcrumb(val) {
this.params = {...this.params, ...val} this.params = { ...this.params, ...val };
}, },
// //
async search(val) { async search(val) {
console.log(val)
val ? this.params.date = val : '' val ? (this.params.date = val) : "";
const res = await getHotWordsHistory(this.params); const res = await getHotWordsHistory(this.params);
if (res.success) { if (res.success) {
this.hotWordsData = res.result; this.hotWordsData = res.result;
this.hotWordsChart.data(this.hotWordsData) this.hotWordsChart.data(this.hotWordsData);
this.hotWordsChart.render(); this.hotWordsChart.render();
if (!this.hotWordsData) { if (!this.hotWordsData) {
Message.error("暂无数据"); Message.error("暂无数据");
} }
} }
}, },
handleClickSearch() { handleClickSearch() {},
},
init() { init() {
let chart = this.hotWordsChart let chart = this.hotWordsChart;
chart = new Chart({ chart = new Chart({
container: "container", container: "container",
autoFit: true, autoFit: true,
@ -84,11 +105,11 @@ export default {
chart.tooltip({ chart.tooltip({
showMarkers: false, showMarkers: false,
}); });
chart.interval().position("keywords*score"); chart.interval().position("keywords*score").color("#f59b99");
chart.interaction("element-active"); chart.interaction("element-active");
this.hotWordsChart = chart; this.hotWordsChart = chart;
this.search(); this.search();
} },
}, },
mounted() { mounted() {
this.init(); this.init();
@ -99,10 +120,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.affix-time { .affix-time {
padding-left: 15px; padding-left: 15px;
} }
.box { .box {
min-height: 400px; min-height: 400px;
margin-left: 50px;
} }
</style> </style>

View File

@ -3,7 +3,7 @@
<div class="affix-time"> <div class="affix-time">
<Affix :offset-top="100"> <Affix :offset-top="100">
<div class="flex affix-box"> <div class="flex affix-box">
<affixTime :closeShop="true" @selected="clickBreadcrumb"/> <affixTime :closeShop="true" @selected="clickBreadcrumb" />
<InputNumber <InputNumber
placeholder="展示前N" placeholder="展示前N"
@ -22,8 +22,8 @@
</template> </template>
<script> <script>
import {Chart} from "@antv/g2"; import { Chart } from "@antv/g2";
import {getHotWordsStatistics} from "@/api/index"; import { getHotWordsStatistics } from "@/api/index";
import affixTime from "@/components/affix-time"; import affixTime from "@/components/affix-time";
export default { export default {
@ -37,9 +37,9 @@ export default {
searchType: "LAST_SEVEN", searchType: "LAST_SEVEN",
year: "", year: "",
month: "", month: "",
top: 50 top: 50,
}, },
columns:[ columns: [
{ {
title: "热词名称", title: "热词名称",
key: "keywords", key: "keywords",
@ -49,53 +49,86 @@ export default {
key: "score", key: "score",
}, },
], ],
hotWordsChart:"", // hotWordsChart: "", //
hotWordsData:[] // hotWordsData: [], //
orderChart: "",
}; };
}, },
computed: {}, computed: {},
watch: {
params: {
handler(val) {
this.search();
},
deep: true,
immediate: true,
},
year(val) {
this.params.year = new Date(val).getFullYear();
},
},
methods: { methods: {
clickBreadcrumb(val) { clickBreadcrumb(val) {
this.params = {...this.params, ...val} this.params = { ...this.params, ...val };
}, },
// //
async search() { async search() {
const res = await getHotWordsStatistics(this.params); const res = await getHotWordsStatistics(this.params);
if (res.success) { if (res.success) {
this.hotWordsData=res.result; this.hotWordsData = res.result;
this.hotWordsChart.data(this.hotWordsData) if (!this.hotWordsChart) {
this.hotWordsChart = new Chart({
container: "container",
autoFit: true,
height: 500,
padding: [50, 20, 50, 20],
});
}
this.init();
}
},
handleClickSearch() {},
init() {
if (this.hotWordsChart) {
this.hotWordsChart.data(this.hotWordsData);
this.hotWordsChart.scale("score", {
alias: "搜索次数",
});
this.hotWordsChart.axis("keywords", {
tickLine: {
alignTick: false,
},
});
this.hotWordsChart.axis("score", false);
this.hotWordsChart.tooltip({
showMarkers: false,
});
this.hotWordsChart
.interval()
.position("keywords*score")
.color("#f59b99");
this.hotWordsChart.interaction("element-active");
//
// this.hotWordsData.forEach((item) => {
// this.hotWordsChart
// .annotation()
// .text({
// position: [item.keywords, item.score],
// content: item.score,
// style: {
// textAlign: "center",
// },
// offsetY: -30,
// })
// });
this.hotWordsChart.render(); this.hotWordsChart.render();
} }
}, },
handleClickSearch() {
},
init(){
let chart = this.hotWordsChart
chart = new Chart({
container: "container",
autoFit: true,
height: 500,
padding: [50, 20, 50, 20],
});
chart.scale("score", {
alias: "搜索次数",
});
chart.axis("keywords", {
tickLine: {
alignTick: false,
},
});
chart.axis("score", false);
chart.tooltip({
showMarkers: false,
});
chart.interval().position("keywords*score");
chart.interaction("element-active");
this.hotWordsChart=chart;
this.search();
}
}, },
mounted() { mounted() {
this.init(); this.init();
@ -107,5 +140,4 @@ export default {
.affix-time { .affix-time {
padding-left: 15px; padding-left: 15px;
} }
</style> </style>

View File

@ -3,6 +3,7 @@
<Row> <Row>
<Col span="24"> <Col span="24">
<Card class="article-detail"> <Card class="article-detail">
<Alert>隐私协议在移动端中 设置->关于我们->对应的文章展示</Alert>
<Table :loading="loading" border :columns="columns" :data="data" ref="table"> <Table :loading="loading" border :columns="columns" :data="data" ref="table">
</Table> </Table>
</Card> </Card>

View File

@ -180,6 +180,7 @@ export default {
}, },
// //
init() { init() {
this.orderChart ? this.orderChart.clear() : ''
API_Member.getMemberStatistics(this.params).then((res) => { API_Member.getMemberStatistics(this.params).then((res) => {
if (res.result) { if (res.result) {
res.result.forEach((item) => { res.result.forEach((item) => {

View File

@ -586,6 +586,7 @@ export default {
}, },
// //
async initOrderChartList(name) { async initOrderChartList(name) {
this.orderChart ? this.orderChart.clear() : ''
const res = await API_Goods.getOrderChart(this.orderParams); const res = await API_Goods.getOrderChart(this.orderParams);
if (res.success) { if (res.success) {
this.chartList = res.result; this.chartList = res.result;

View File

@ -185,6 +185,7 @@ export default {
}, },
// //
init() { init() {
this.orderChart ? this.orderChart.clear() : ''
API_Member.getStatisticsList(this.params).then((res) => { API_Member.getStatisticsList(this.params).then((res) => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;

View File

@ -47,16 +47,16 @@
openTip ? "关闭提示" : "开启提示" openTip ? "关闭提示" : "开启提示"
}}</Button> }}</Button>
</Row> </Row>
<Row v-show="openTip"> <div v-show="openTip">
<Alert show-icon> <Alert show-icon>
<span>展示详细内容</span> <span>展示详细内容</span>
<Icon type="ios-bulb-outline" slot="icon"></Icon> <Icon type="ios-bulb-outline" slot="icon"></Icon>
<i-switch size="large" v-model="showDev"> <i-switch class="switch" size="large" v-model="showDev">
<span slot="open">开发</span> <span slot="open">开发</span>
<span slot="close">普通</span> <span slot="close">普通</span>
</i-switch> </i-switch>
</Alert> </Alert>
</Row> </div>
<Table <Table
v-if="showDev" v-if="showDev"
@ -323,3 +323,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.switch{
margin-left: 20px;
}
</style>

View File

@ -49,7 +49,7 @@
<script> <script>
import { setSetting } from "@/api/index"; import { setSetting } from "@/api/index";
import { handleSubmit } from "../setting/validate"; import { handleSubmit } from "../setting/validate";
import { getPaymentSupportForm } from "@/api/setting";
export default { export default {
data() { data() {
return { return {

View File

@ -9,7 +9,7 @@
</FormItem> </FormItem>
<FormItem label="最低提现金额" prop="minPrice"> <FormItem label="最低提现金额" prop="minPrice">
<Input class="label-appkey" v-model="formValidate.minPrice" /> <Input class="label-appkey" v-model="formValidate.minPrice" />
</FormItem> </FormItem>
<FormItem label="提现方式" prop="type"> <FormItem label="提现方式" prop="type">

View File

@ -523,6 +523,7 @@ export default {
}, },
// //
async initOrderChartList(name) { async initOrderChartList(name) {
this.orderChart ? this.orderChart.clear() : ''
const res = await API_Goods.getOrderChart(this.orderParams); const res = await API_Goods.getOrderChart(this.orderParams);
if (res.success) { if (res.success) {
this.chartList = res.result; this.chartList = res.result;

View File

@ -190,6 +190,7 @@ export default {
}, },
// //
init() { init() {
this.orderChart ? this.orderChart.clear() : ''
API_Member.getStatisticsList(this.params).then((res) => { API_Member.getStatisticsList(this.params).then((res) => {
if (res.result) { if (res.result) {
this.data = res.result; this.data = res.result;