feat(vipCenter): 用户中心主题样式样式修改

This commit is contained in:
woody 2025-04-30 11:38:14 +08:00
parent 6913479b40
commit 1e4ba285ae
16 changed files with 1915 additions and 1730 deletions

View File

@ -6,13 +6,12 @@
--> -->
<template> <template>
<div> <div>
<div id="firstPv" <div id="firstPv" style="width: 700px; height: 400px"></div>
style="width: 700px; height: 400px"></div>
</div> </div>
</template> </template>
<script> <script>
import * as api from '@/api/activity.js' import * as api from "@/api/activity.js";
export default { export default {
// mounted() { // mounted() {
// this.upDateCover() // this.upDateCover()
@ -21,31 +20,31 @@ export default {
upDateCover() { upDateCover() {
api.achieveDay().then((res) => { api.achieveDay().then((res) => {
let arr1 = res.data.map((item) => { let arr1 = res.data.map((item) => {
return item.settleDate return item.settleDate;
}) });
let arr2 = res.data.map((item) => { let arr2 = res.data.map((item) => {
return item.aNewPv return item.aNewPv;
}) });
let arr3 = res.data.map((item) => { let arr3 = res.data.map((item) => {
return item.bNewPv return item.bNewPv;
}) });
this.drawChart(arr1, arr2, arr3) this.drawChart(arr1, arr2, arr3);
}) });
}, },
drawChart(arr1, arr2, arr3) { drawChart(arr1, arr2, arr3) {
let myChart = this.$echarts.init(document.getElementById('firstPv')) let myChart = this.$echarts.init(document.getElementById("firstPv"));
// //
let option = { let option = {
title: { title: {
text: '', text: "",
subtext: '业绩(万)', subtext: "业绩",
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: "axis",
}, },
legend: { legend: {
top: 'bottom', top: "bottom",
data: ['左区', '右区'], data: ["左区", "右区"],
itemWidth: 20, // itemWidth: 20, //
itemHeight: 10, // itemHeight: 10, //
}, },
@ -55,9 +54,9 @@ export default {
interval: 0, interval: 0,
// rotate: 45, // rotate: 45,
textStyle: { textStyle: {
color: '#000', color: "#000",
fontSize: '10', fontSize: "10",
itemSize: '', itemSize: "",
}, },
}, },
axisTick: { axisTick: {
@ -68,19 +67,19 @@ export default {
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: "dashed",
}, },
}, },
}, },
series: [ series: [
{ {
name: '左区', name: "左区",
type: 'line', type: "line",
data: arr2, data: arr2,
symbol: 'none', symbol: "none",
itemStyle: { itemStyle: {
normal: { normal: {
color: '#5A64FF', color: "#5A64FF",
}, },
}, },
lineStyle: { lineStyle: {
@ -90,13 +89,13 @@ export default {
}, },
}, },
{ {
name: '右区', name: "右区",
type: 'line', type: "line",
data: arr3, data: arr3,
symbol: 'none', symbol: "none",
itemStyle: { itemStyle: {
normal: { normal: {
color: '#01C4FF', color: "#01C4FF",
}, },
}, },
lineStyle: { lineStyle: {
@ -106,13 +105,12 @@ export default {
}, },
}, },
], ],
} };
// 使 // 使
myChart.setOption(option) myChart.setOption(option);
}, },
}, },
} };
</script> </script>
<style> <style></style>
</style>

View File

@ -81,8 +81,7 @@
</div> </div>
</div> </div>
<div class="money"> <div class="money">
{{ "左区" }}{{ dataList.memberAwardsUnderVO.aSumRealPv {{ "左区" }}{{ dataList.memberAwardsUnderVO.aSumRealPv }}
}}{{ "万" }}
</div> </div>
</div> </div>
<div class="max-right"> <div class="max-right">
@ -144,8 +143,7 @@
</div> </div>
</div> </div>
<div class="money"> <div class="money">
{{ "右区" }}{{ dataList.memberAwardsUnderVO.bSumRealPv {{ "右区" }}{{ dataList.memberAwardsUnderVO.bSumRealPv }}
}}{{ "万" }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
<template> <template>
<div class="yjfb"> <div class="yjfb">
<div class="qiu1" style="cursor: pointer;" @click="goDetail(1,1)"> <div class="qiu1" style="cursor: pointer" @click="goDetail(1, 1)">
<div class="num">{{ achieveData.leftCoun || 0 }}</div> <div class="num">{{ achieveData.leftCoun || 0 }}</div>
<div class="btom">{{ '左区人数' }}</div> <div class="btom">{{ "左区人数" }}</div>
</div> </div>
<div class="qiu2" style="cursor: pointer;" @click="goDetail(1,2)"> <div class="qiu2" style="cursor: pointer" @click="goDetail(1, 2)">
<div class="num">{{ achieveData.leftAchieve || 0 }}</div> <div class="num">{{ achieveData.leftAchieve || 0 }}</div>
<div class="btom">{{ '左区业绩(万)' }}</div> <div class="btom">{{ "左区业绩" }}</div>
</div> </div>
<div class="qiu4" style="cursor: pointer;" @click="goDetail(1,3)"> <div class="qiu4" style="cursor: pointer" @click="goDetail(1, 3)">
<div class="num">{{ achieveData.leftDirectAchieve || 0 }}</div> <div class="num">{{ achieveData.leftDirectAchieve || 0 }}</div>
<div class="btom">{{'左区'}}{{'血缘业绩(万)'}}</div> <div class="btom">{{ "左区" }}{{ "血缘业绩" }}</div>
</div> </div>
<div class="qiu3" style="cursor: pointer;" @click="goDetail(3,4)"> <div class="qiu3" style="cursor: pointer" @click="goDetail(3, 4)">
<div class="num">{{ achieveData.directAchieve || 0 }}</div> <div class="num">{{ achieveData.directAchieve || 0 }}</div>
<div class="btom">{{ '血缘业绩(万)' }}</div> <div class="btom">{{ "血缘业绩" }}</div>
</div> </div>
<div class="qiu4" style="cursor: pointer;" @click="goDetail(2,3)"> <div class="qiu4" style="cursor: pointer" @click="goDetail(2, 3)">
<div class="num">{{ achieveData.rightDirectAchieve || 0 }}</div> <div class="num">{{ achieveData.rightDirectAchieve || 0 }}</div>
<div class="btom">{{'右区'}}{{'血缘业绩(万)'}}</div> <div class="btom">{{ "右区" }}{{ "血缘业绩" }}</div>
</div> </div>
<div class="qiu2" style="cursor: pointer;" @click="goDetail(2,2)"> <div class="qiu2" style="cursor: pointer" @click="goDetail(2, 2)">
<div class="num">{{ achieveData.rightAchieve || 0 }}</div> <div class="num">{{ achieveData.rightAchieve || 0 }}</div>
<div class="btom">{{ '右区业绩(万)' }}</div> <div class="btom">{{ "右区业绩" }}</div>
</div> </div>
<div class="qiu1" style="cursor: pointer;" @click="goDetail(2,1)"> <div class="qiu1" style="cursor: pointer" @click="goDetail(2, 1)">
<div class="num">{{ achieveData.rightCount || 0 }}</div> <div class="num">{{ achieveData.rightCount || 0 }}</div>
<div class="btom">{{ '右区人数' }}</div> <div class="btom">{{ "右区人数" }}</div>
</div> </div>
</div> </div>
</template> </template>
@ -47,7 +47,7 @@ export default {
// }, // },
achieveData: { achieveData: {
type: Object, type: Object,
} },
}, },
mounted() { mounted() {
// this.getFgDataList() // this.getFgDataList()
@ -115,7 +115,8 @@ export default {
width: 253px; width: 253px;
height: 253px; height: 253px;
margin: 0 8px; margin: 0 8px;
background: linear-gradient(208deg, #667AFF 0%, #6B7CEA 100%); display: flex; background: linear-gradient(208deg, #667aff 0%, #6b7cea 100%);
display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -126,7 +127,8 @@ export default {
border-radius: 50%; border-radius: 50%;
margin: 0 10px; margin: 0 10px;
margin-top: 8px; margin-top: 8px;
background: linear-gradient(153deg, #65FF61 0%, #48FF2A 100%); display: flex; background: linear-gradient(153deg, #65ff61 0%, #48ff2a 100%);
display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@ -22,13 +22,13 @@
{ {
value: 0, value: 0,
age: 0, age: 0,
name: '大区', name: "大区",
itemStyle: { color: "#2982ff" }, itemStyle: { color: "#2982ff" },
}, },
{ {
value: 0, value: 0,
age: 0, age: 0,
name: '小区', name: "小区",
itemStyle: { color: "#01c291" }, itemStyle: { color: "#01c291" },
}, },
], ],
@ -58,7 +58,7 @@
}, },
ageChart(datas) { ageChart(datas) {
var myChart = echarts.init(document.getElementById("main3")); var myChart = echarts.init(document.getElementById("main3"));
let that = this let that = this;
var option = { var option = {
legend: { legend: {
// //
@ -83,8 +83,7 @@
"人" + "人" +
"\n " + "\n " +
"业绩:" + "业绩:" +
data.data.value + data.data.value
that.$t('S_C_58')
); );
}, },
lineHeight: 25, // lineHeight: 25, //

View File

@ -6,15 +6,12 @@
--> -->
<template> <template>
<div> <div>
<div id="mounthData" <div id="mounthData" style="width: 700px; height: 400px"></div>
style="width: 700px; height: 400px">
</div>
</div> </div>
</template> </template>
<script> <script>
import * as api from '@/api/activity.js' import * as api from "@/api/activity.js";
export default { export default {
props: { props: {
time: { time: {
@ -35,31 +32,31 @@ export default {
}) })
.then((res) => { .then((res) => {
let arr1 = res.data.map((item) => { let arr1 = res.data.map((item) => {
return item.date return item.date;
}) });
let arr2 = res.data.map((item) => { let arr2 = res.data.map((item) => {
return item.aNewPv return item.aNewPv;
}) });
let arr3 = res.data.map((item) => { let arr3 = res.data.map((item) => {
return item.bNewPv return item.bNewPv;
}) });
this.drawChart(arr1, arr2, arr3) this.drawChart(arr1, arr2, arr3);
}) });
}, },
drawChart(arr1, arr2, arr3) { drawChart(arr1, arr2, arr3) {
// domecharts main // domecharts main
let myChart = this.$echarts.init(document.getElementById('mounthData')) let myChart = this.$echarts.init(document.getElementById("mounthData"));
// //
let option = { let option = {
title: { title: {
text: '', text: "",
subtext: '业绩(万)', subtext: "业绩",
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
top: 'bottom', top: "bottom",
bottom: '5%', bottom: "5%",
data: ['左区', '右区'], data: ["左区", "右区"],
}, },
xAxis: { xAxis: {
data: arr1, data: arr1,
@ -71,41 +68,40 @@ export default {
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: "dashed",
}, },
}, },
}, },
series: [ series: [
{ {
name: '左区', name: "左区",
type: 'bar', type: "bar",
data: arr2, data: arr2,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: [10, 10, 0, 0], barBorderRadius: [10, 10, 0, 0],
color: '#FE4C4B', color: "#FE4C4B",
}, },
}, },
}, },
{ {
name: '右区', name: "右区",
type: 'bar', type: "bar",
data: arr3, data: arr3,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: [10, 10, 0, 0], barBorderRadius: [10, 10, 0, 0],
color: '#FFAE36', color: "#FFAE36",
}, },
}, },
}, },
], ],
} };
// 使 // 使
myChart.setOption(option) myChart.setOption(option);
}, },
}, },
} };
</script> </script>
<style> <style></style>
</style>

View File

@ -3,14 +3,13 @@
<div class="styles"> <div class="styles">
<el-form> <el-form>
<el-col :span="12"> <el-col :span="12">
<el-select v-model="texts" <el-select v-model="texts" @change="selectTime" placeholder="">
@change="selectTime" <el-option
placeholder=""> v-for="item in deliList"
<el-option v-for="item in deliList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-col>
@ -19,31 +18,47 @@
<div class="right-lines"> <div class="right-lines">
<div class="item-s" v-for="item in list"> <div class="item-s" v-for="item in list">
<div>{{ item.name }}</div> <div>{{ item.name }}</div>
<div class="bg-color" :style="{backgroundColor:`${item.color}`}"></div> <div
class="bg-color"
:style="{ backgroundColor: `${item.color}` }"
></div>
</div> </div>
</div> </div>
<!-- <div class="lines"></div>--> <!-- <div class="lines"></div>-->
<div class="flex-s"> <div class="flex-s">
<div id="main1" style="width: 100%;margin-top: 10px" :style="myChartStyle"></div> <div
id="main1"
style="width: 100%; margin-top: 10px"
:style="myChartStyle"
></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import {getDayType, getIndexAddAchieve, getMemberRecommend} from "@/api/index"; import {
getDayType,
getIndexAddAchieve,
getMemberRecommend,
} from "@/api/index";
import { formatSeconds } from "@/util/common"; import { formatSeconds } from "@/util/common";
export default { export default {
name: "recommendTime", name: "recommendTime",
data() { data() {
return { return {
list:[{"name":'左区首购',"color":"#FF5151"}, list: [
{"name":'左区复购',"color":"#BB0909"}, { name: "左区首购", color: "#FF5151" },
{"name":'右区首购',"color":"#FFAE36"}, { name: "左区复购", color: "#BB0909" },
{"name":'右区复购',"color":"#935801"} { name: "右区首购", color: "#FFAE36" },
{ name: "右区复购", color: "#935801" },
],
texts: "",
deliList: [
{ label: "近七日", value: 7 },
{ label: "近十四日", value: 14 },
{ label: "近三十日", value: 30 },
], ],
texts:'',
deliList:[{"label":'近七日',"value":7},{"label":'近十四日',"value":14},{"label":'近三十日',"value":30}],
myChartStyle: { myChartStyle: {
float: "center", float: "center",
width: "700px", width: "700px",
@ -54,39 +69,39 @@ export default {
sexData: [ sexData: [
{ {
data: [150, 230, 224, 218, 135, 147, 260], data: [150, 230, 224, 218, 135, 147, 260],
type: 'line', type: "line",
color:'#FE9A02', color: "#FE9A02",
label: { label: {
show: false, show: false,
position:'right', position: "right",
}, },
}, },
], ],
} };
}, },
mounted() { mounted() {
this.selected(); this.selected();
}, },
methods: { methods: {
selectTime(data) { selectTime(data) {
this.texts =data this.texts = data;
this.getData(); this.getData();
}, },
selected() { selected() {
getDayType().then((res) => { getDayType().then((res) => {
this.deliList = res.data this.deliList = res.data;
this.ageChart(res.data); this.ageChart(res.data);
this.getData(res.data[0].value); this.getData(res.data[0].value);
this.texts = res.data[0].label this.texts = res.data[0].label;
}) });
}, },
getData(value) { getData(value) {
getIndexAddAchieve({"dayType":this.texts || value}).then((res)=>{ getIndexAddAchieve({ dayType: this.texts || value }).then((res) => {
this.ageChart(res.data); this.ageChart(res.data);
}) });
}, },
ageChart(data) { ageChart(data) {
var myChart = echarts.init(document.getElementById('main1')); var myChart = echarts.init(document.getElementById("main1"));
let time = []; let time = [];
let time1 = []; let time1 = [];
let arr1 = []; let arr1 = [];
@ -97,17 +112,17 @@ export default {
if (item.settleDate) { if (item.settleDate) {
// let time1=item.settleDate.split("-"); // let time1=item.settleDate.split("-");
// let json = time1[1]+'-'+time1[2] // let json = time1[1]+'-'+time1[2]
time.push(item.settleDate) time.push(item.settleDate);
} }
arr1.push(item.repANewPv) arr1.push(item.repANewPv);
arr2.push(item.repBNewPv) arr2.push(item.repBNewPv);
arr3.push(item.bNewPv) arr3.push(item.bNewPv);
arr4.push(item.aNewPv) arr4.push(item.aNewPv);
}) });
console.error(time) console.error(time);
var option = { var option = {
title: { title: {
text: '业绩(万)' text: "业绩",
}, },
tooltip: { tooltip: {
// _8:function (params){ // _8:function (params){
@ -124,25 +139,25 @@ export default {
top: "70px", top: "70px",
right: "30px", right: "30px",
width: "auto", width: "auto",
orient: 'vertical', orient: "vertical",
itemHeight: 21, itemHeight: 21,
itemWidth:39 itemWidth: 39,
}, },
grid: { grid: {
left: '0%', left: "0%",
right: '4%', right: "4%",
bottom: '3%', bottom: "3%",
containLabel: true containLabel: true,
}, },
xAxis: { xAxis: {
type: 'category', type: "category",
data: time, data: time,
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: "#333", color: "#333",
width: '1', // 线线 width: "1", // 线线
type: 'solid', // 线线solid线dashed线dotted type: "solid", // 线线solid线dashed线dotted
}, },
}, },
axisTick: { axisTick: {
@ -150,86 +165,85 @@ export default {
inside: true, // inside: true, //
length: 5, // length: 5, //
lineStyle: { lineStyle: {
color: '#FFF', // 线 color: "#FFF", // 线
width: 10, // 线 width: 10, // 线
type: 'solid', // 线线solid线dashed线dotted type: "solid", // 线线solid线dashed线dotted
}, },
}, },
splitLine: { splitLine: {
show: false show: false,
}, },
axisLabel: { axisLabel: {
type: 'category', type: "category",
interval: 0, interval: 0,
textStyle: { textStyle: {
color: '#000', color: "#000",
fontSize: '10', fontSize: "10",
itemSize: '', itemSize: "",
}, },
formatter: function (data) { formatter: function (data) {
return data return data;
} },
} },
}, },
yAxis: { yAxis: {
type: 'value', type: "value",
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: "#CCCCCC", color: "#CCCCCC",
type: "dashed", //线 type: "dashed", //线
width: 2 width: 2,
} },
} },
}, },
series: [ series: [
{ {
data: arr4, data: arr4,
type: 'line', type: "line",
color:'#FF5151', color: "#FF5151",
label: { label: {
show: false, show: false,
position:'right', position: "right",
}, },
formatter: function (data) { formatter: function (data) {
console.error(data) console.error(data);
} },
}, },
{ {
data: arr1, data: arr1,
type: 'line', type: "line",
color:'#BB0909', color: "#BB0909",
label: { label: {
show: false, show: false,
position:'right', position: "right",
}, },
}, },
{ {
data: arr3, data: arr3,
type: 'line', type: "line",
color:'#FE9A02', color: "#FE9A02",
label: { label: {
show: false, show: false,
position:'right', position: "right",
}, },
}, },
{ {
data: arr2, data: arr2,
type: 'line', type: "line",
color:'#935801', color: "#935801",
label: { label: {
show: false, show: false,
position:'right', position: "right",
},
}, },
}
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
}, },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -20,17 +20,16 @@ export default {
return { return {
texts: "", texts: "",
pieData: [ pieData: [
{ {
value: 0, value: 0,
age: 0, age: 0,
name: '左区', name: "左区",
itemStyle: { color: "#EE5858" }, itemStyle: { color: "#EE5858" },
}, },
{ {
value: 0, value: 0,
age: 0, age: 0,
name: '右区', name: "右区",
itemStyle: { color: "#FBB046" }, itemStyle: { color: "#FBB046" },
}, },
], ],
@ -60,7 +59,7 @@ export default {
}, },
ageChart(datas) { ageChart(datas) {
var myChart = echarts.init(document.getElementById("main2")); var myChart = echarts.init(document.getElementById("main2"));
let that = this let that = this;
var option = { var option = {
legend: { legend: {
// //
@ -75,7 +74,6 @@ export default {
type: "pie", type: "pie",
label: { label: {
show: true, show: true,
// formatter:'{b}: {c}\n : {d}',
formatter: function (data) { formatter: function (data) {
return ( return (
data.data.name + data.data.name +
@ -84,8 +82,7 @@ export default {
"人" + "人" +
"\n " + "\n " +
"业绩:" + "业绩:" +
data.data.value + data.data.value
that.$t('S_C_58')
); );
}, },
lineHeight: 25, // lineHeight: 25, //

View File

@ -6,14 +6,12 @@
--> -->
<template> <template>
<div> <div>
<div id="mounthData1" <div id="mounthData1" :style="myChartStyle"></div>
:style="myChartStyle">
</div>
</div> </div>
</template> </template>
<script> <script>
import * as api from '@/api/activity.js' import * as api from "@/api/activity.js";
import { getPerformance } from "@/api/index"; import { getPerformance } from "@/api/index";
export default { export default {
props: { props: {
@ -26,13 +24,13 @@ export default {
data() { data() {
return { return {
myChartStyle: { myChartStyle: {
float: 'center', float: "center",
width: '700px', width: "700px",
height: '450px', height: "450px",
paddingTop: '0', paddingTop: "0",
// margin: "20px", // margin: "20px",
}, },
} };
}, },
mounted() { mounted() {
// this.upDateCover() // this.upDateCover()
@ -40,42 +38,41 @@ export default {
}, },
methods: { methods: {
upDateCover(val) { upDateCover(val) {
let arr2=[] let arr2 = [];
let arr3=[] let arr3 = [];
getPerformance({ getPerformance({
month: val || this.time, month: val || this.time,
}) }).then((res) => {
.then((res) => { arr2.push(res.data.leftGrandTotal);
arr2.push(res.data.leftGrandTotal) arr2.push(res.data.firstLeftPurchaseTotal);
arr2.push(res.data.firstLeftPurchaseTotal) arr2.push(res.data.firstLeftRepurchaseTotal);
arr2.push(res.data.firstLeftRepurchaseTotal) arr3.push(res.data.rightGrandTotal);
arr3.push(res.data.rightGrandTotal) arr3.push(res.data.firstRightPurchaseTotal);
arr3.push(res.data.firstRightPurchaseTotal) arr3.push(res.data.firstRightRepurchaseTotal);
arr3.push(res.data.firstRightRepurchaseTotal)
// arr2.push(3) // arr2.push(3)
// arr2.push(5) // arr2.push(5)
// arr2.push(10) // arr2.push(10)
// arr3.push(3) // arr3.push(3)
// arr3.push(5) // arr3.push(5)
// arr3.push(10) // arr3.push(10)
this.drawChart(arr2, arr3) this.drawChart(arr2, arr3);
}) });
}, },
drawChart(arr2, arr3) { drawChart(arr2, arr3) {
let arr1 =['累计业绩','首购累计业绩','复购累计业绩'] let arr1 = ["累计业绩", "首购累计业绩", "复购累计业绩"];
// domecharts main // domecharts main
let myChart = this.$echarts.init(document.getElementById('mounthData1')) let myChart = this.$echarts.init(document.getElementById("mounthData1"));
// //
let option = { let option = {
title: { title: {
text: '', text: "",
subtext: '业绩(万)', subtext: "业绩",
left: 40, left: 40,
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
top: 'bottom', top: "bottom",
data: ['左区', '右区'], data: ["左区", "右区"],
itemHeight: 20, itemHeight: 20,
itemWidth: 40, itemWidth: 40,
bottom: 0, bottom: 0,
@ -90,41 +87,40 @@ export default {
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: "dashed",
}, },
}, },
}, },
series: [ series: [
{ {
name: '左区', name: "左区",
type: 'bar', type: "bar",
data: arr2, data: arr2,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: [10, 10, 0, 0], barBorderRadius: [10, 10, 0, 0],
color: '#01C291', color: "#01C291",
}, },
}, },
}, },
{ {
name: '右区', name: "右区",
type: 'bar', type: "bar",
data: arr3, data: arr3,
itemStyle: { itemStyle: {
normal: { normal: {
barBorderRadius: [10, 10, 0, 0], barBorderRadius: [10, 10, 0, 0],
color: '#FE4C4B', color: "#FE4C4B",
}, },
}, },
}, },
], ],
} };
// 使 // 使
myChart.setOption(option) myChart.setOption(option);
}, },
}, },
} };
</script> </script>
<style> <style></style>
</style>

View File

@ -12,15 +12,12 @@
--> -->
<template> <template>
<div> <div>
<div id="repPv" <div id="repPv" style="width: 700px; height: 400px"></div>
style="width: 700px; height: 400px">
</div>
</div> </div>
</template> </template>
<script> <script>
import * as api from '@/api/activity.js' import * as api from "@/api/activity.js";
export default { export default {
// mounted() { // mounted() {
// this.upDateCover() // this.upDateCover()
@ -29,31 +26,31 @@ export default {
upDateCover() { upDateCover() {
api.achieveDay().then((res) => { api.achieveDay().then((res) => {
let arr1 = res.data.map((item) => { let arr1 = res.data.map((item) => {
return item.settleDate return item.settleDate;
}) });
let arr2 = res.data.map((item) => { let arr2 = res.data.map((item) => {
return item.repANewPv return item.repANewPv;
}) });
let arr3 = res.data.map((item) => { let arr3 = res.data.map((item) => {
return item.repBNewPv return item.repBNewPv;
}) });
this.drawChart(arr1, arr2, arr3) this.drawChart(arr1, arr2, arr3);
}) });
}, },
drawChart(arr1, arr2, arr3) { drawChart(arr1, arr2, arr3) {
let myChart = this.$echarts.init(document.getElementById('repPv')) let myChart = this.$echarts.init(document.getElementById("repPv"));
// //
let option = { let option = {
title: { title: {
text: '', text: "",
subtext: '业绩(万)', subtext: "业绩",
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: "axis",
}, },
legend: { legend: {
top: 'bottom', top: "bottom",
data: ['左区', '右区'], data: ["左区", "右区"],
itemWidth: 20, // itemWidth: 20, //
itemHeight: 10, // itemHeight: 10, //
}, },
@ -66,9 +63,9 @@ export default {
interval: 0, interval: 0,
// rotate: 45, // rotate: 45,
textStyle: { textStyle: {
color: '#000', color: "#000",
fontSize: '10', fontSize: "10",
itemSize: '', itemSize: "",
}, },
}, },
}, },
@ -76,19 +73,19 @@ export default {
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: 'dashed', type: "dashed",
}, },
}, },
}, },
series: [ series: [
{ {
name: '左区', name: "左区",
type: 'line', type: "line",
data: arr2, data: arr2,
symbol: 'none', symbol: "none",
itemStyle: { itemStyle: {
normal: { normal: {
color: '#FF5A5A', color: "#FF5A5A",
}, },
}, },
lineStyle: { lineStyle: {
@ -98,13 +95,13 @@ export default {
}, },
}, },
{ {
name: '右区', name: "右区",
type: 'line', type: "line",
data: arr3, data: arr3,
symbol: 'none', symbol: "none",
itemStyle: { itemStyle: {
normal: { normal: {
color: '#FFAE36', color: "#FFAE36",
}, },
}, },
lineStyle: { lineStyle: {
@ -114,13 +111,12 @@ export default {
}, },
}, },
], ],
} };
// 使 // 使
myChart.setOption(option) myChart.setOption(option);
}, },
}, },
} };
</script> </script>
<style> <style></style>
</style>

View File

@ -0,0 +1,100 @@
<template>
<el-dialog
class="password-dialog"
title="二级密码"
:visible.sync="dialogVisible"
width="400px"
center
:close-on-click-modal="false"
:before-close="handleClose"
>
<div class="pwd-container">
<div class="tit">请输入二级密码</div>
<el-input v-model="password" type="password"></el-input>
<el-button
:loading="loading"
class="confirm-btn"
type="primary"
@click="confirmBtnHandle"
>
<span>确定</span>
</el-button>
</div>
</el-dialog>
</template>
<script>
import { checkPwd } from "@/api/wallet";
export default {
name: "SecondaryPassword",
props: {
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
password: "",
loading: false,
};
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:visible", val);
},
},
},
methods: {
confirmBtnHandle() {
this.loading = true;
checkPwd({ pwd: this.password })
.then((res) => {
if (res.code == 200) {
this.password = "";
this.dialogVisible = false;
this.$emit("validPwd", true);
} else {
this.$emit("validPwd", false);
}
})
.catch(() => {
this.$emit("validPwd", false);
})
.finally(() => {
this.loading = false;
});
},
handleClose() {
this.dialogVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.password-dialog {
margin-top: 120px;
.pwd-container {
display: flex;
flex-direction: column;
align-items: center;
.tit {
font-size: 16px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
text-align: center;
margin: 10px 0;
}
.confirm-btn {
margin-top: 20px;
width: 100%;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -844,7 +844,7 @@ export default {
this.goodDetail = res.data; this.goodDetail = res.data;
let sl = this.goodDetail.sales + ""; let sl = this.goodDetail.sales + "";
if (sl >= 10000) { if (sl >= 10000) {
sl = sl.substring(0, sl.length - 4) + "万" + "+"; sl = sl.substring(0, sl.length - 4) + "+";
} }
this.goodDetail.sales = sl; this.goodDetail.sales = sl;
this.mainImgUrl = res.data.videoUrl; this.mainImgUrl = res.data.videoUrl;

View File

@ -53,7 +53,7 @@
}" }"
></div> ></div>
<div class="cha"> <div class="cha">
左区 {{ awards.aNewPv }}/右区 {{ awards.bNewPv }} 左区 {{ awards.aNewPv }}/右区 {{ awards.bNewPv }}
</div> </div>
</div> </div>
</div> </div>
@ -73,7 +73,7 @@
}" }"
></div> ></div>
<div class="cha"> <div class="cha">
左区 {{ awards.aMonthPv }}/右区 {{ awards.bMonthPv }} 左区 {{ awards.aMonthPv }}/右区 {{ awards.bMonthPv }}
</div> </div>
</div> </div>
</div> </div>
@ -93,7 +93,7 @@
}" }"
></div> ></div>
<div class="cha"> <div class="cha">
左区 {{ awards.aSumPv }}/右区 {{ awards.bSumPv }} 左区 {{ awards.aSumPv }}/右区 {{ awards.bSumPv }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -23,12 +23,10 @@
<div class="box"> <div class="box">
<div class="titles">{{ startDate }} {{ endDate }}</div> <div class="titles">{{ startDate }} {{ endDate }}</div>
<div class="echarts"> <div class="echarts">
<div class="title_s">{{'目标业绩'}}(PV)</div> <div class="title_s">{{ "目标业绩" }}(PV)</div>
<div class="e-chat"> <div class="e-chat">
<div class="list" v-for="item in list"> <div class="list" v-for="item in list">
<div class="tops"> <div class="tops"></div>
</div>
<div class="process" :style="{ height: item.percentage }"> <div class="process" :style="{ height: item.percentage }">
<div class="money">{{ item.percentage }}</div> <div class="money">{{ item.percentage }}</div>
</div> </div>
@ -40,14 +38,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="titles" style="margin-top: 40px">{{ startDate1 }} {{endDate1}}</div> <div class="titles" style="margin-top: 40px">
{{ startDate1 }} {{ endDate1 }}
</div>
<div class="echarts"> <div class="echarts">
<div class="title_s" style="margin-top: 250px" >{{'目标业绩'}}(金额)</div> <div class="title_s" style="margin-top: 250px">
{{ "目标业绩" }}(金额)
</div>
<div class="e-chat" style="margin-top: 40px"> <div class="e-chat" style="margin-top: 40px">
<div class="list" v-for="item in list1"> <div class="list" v-for="item in list1">
<div class="tops"> <div class="tops"></div>
</div>
<div class="process" :style="{ height: item.percentage }"> <div class="process" :style="{ height: item.percentage }">
<div class="money">{{ item.percentage }}</div> <div class="money">{{ item.percentage }}</div>
</div> </div>
@ -78,10 +78,6 @@ import {getPerFormance,getPerFormanceAmount} from "@/api/register";
export default { export default {
data() { data() {
return { return {
// list:[{"name":"20","percent":15,num:20},{"name":"40","percent":25,num:40},
// {"name":"60","percent":22,num:60},{"name":"80","percent":20,num:80},
// {"name":"100","percent":10,num:100}
// ],
list: [], list: [],
list1: [], list1: [],
xData: [20, 40, 60, 80, 100], // xData: [20, 40, 60, 80, 100], //
@ -97,14 +93,14 @@ export default {
memberCode: "", memberCode: "",
memberName: "", memberName: "",
}, },
startDate:'', startDate: "",
endDate:'', endDate: "",
startDate1:'', startDate1: "",
endDate1:'', endDate1: "",
navList: [ navList: [
{ name: "认证资质", url: "/superStudio" }, { name: "认证资质", url: "/superStudio" },
{ name: '注册业绩', url: "/performance" }, { name: "注册业绩", url: "/performance" },
{ name: '专属礼包', url: "/giftBag" }, { name: "专属礼包", url: "/giftBag" },
], ],
}; };
}, },
@ -117,19 +113,19 @@ export default {
methods: { methods: {
getPerFormance() { getPerFormance() {
getPerFormance().then((res) => { getPerFormance().then((res) => {
this.startDate = res.data.startDate this.startDate = res.data.startDate;
this.endDate = res.data.endDate this.endDate = res.data.endDate;
this.list = res.data.targetPerformanceList this.list = res.data.targetPerformanceList;
}) });
}, },
getPerFormanceAmount() { getPerFormanceAmount() {
getPerFormanceAmount().then((res) => { getPerFormanceAmount().then((res) => {
this.startDate1 = res.data.startDate this.startDate1 = res.data.startDate;
this.endDate1 = res.data.endDate this.endDate1 = res.data.endDate;
this.list1 = res.data.targetPerformanceList this.list1 = res.data.targetPerformanceList;
}) });
} },
} },
}; };
</script> </script>
<style> <style>
@ -164,7 +160,6 @@ export default {
bottom: 0; bottom: 0;
justify-content: center; justify-content: center;
margin-left: 135px; margin-left: 135px;
} }
.money { .money {
position: absolute; position: absolute;
@ -177,7 +172,6 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
display: flex; display: flex;
} }
.e-chat { .e-chat {
display: flex; display: flex;
@ -186,7 +180,7 @@ export default {
.list { .list {
width: 128px; width: 128px;
height: 184px; height: 184px;
background: #F3F3F3; background: #f3f3f3;
margin-right: 40px; margin-right: 40px;
border-radius: 7px 7px 0 0; border-radius: 7px 7px 0 0;
} }
@ -216,7 +210,7 @@ export default {
//height: 475px; //height: 475px;
border-radius: 10px 10px 10px 10px; border-radius: 10px 10px 10px 10px;
opacity: 1; opacity: 1;
border: 1px solid #CCCCCC; border: 1px solid #cccccc;
margin: 40px 0 40px 40px; margin: 40px 0 40px 40px;
padding: 30px; padding: 30px;
} }

View File

@ -11,35 +11,42 @@
* @Date: 2023-01-12 16:21:41 * @Date: 2023-01-12 16:21:41
--> -->
<template> <template>
<div class="contain" <div class="contain" ref="box">
ref="box">
<!-- 用户头 --> <!-- 用户头 -->
<personInfo></personInfo> <personInfo></personInfo>
<Sidebar :showCar="true" <Sidebar
:showCar="true"
@showShare="showShare" @showShare="showShare"
@showCar="showCar" @showCar="showCar"
ref="sideBar"></Sidebar> ref="sideBar"
></Sidebar>
<!-- 面包屑 --> <!-- 面包屑 -->
<div class="mianbao"> <div class="mianbao">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">{{'首页'}}</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">{{
<el-breadcrumb-item v-if="specialArea!=18&&specialArea!=19" "首页"
:to="{ path: '/shoppingMall?id=' + specialArea }">{{ labelName }}</el-breadcrumb-item> }}</el-breadcrumb-item>
<el-breadcrumb-item v-else <el-breadcrumb-item
:to="{ path: '/spaceMallList' }">{{ labelName }}</el-breadcrumb-item> v-if="specialArea != 18 && specialArea != 19"
<el-breadcrumb-item>{{'商品详情'}}</el-breadcrumb-item> :to="{ path: '/shoppingMall?id=' + specialArea }"
>{{ labelName }}</el-breadcrumb-item
>
<el-breadcrumb-item v-else :to="{ path: '/spaceMallList' }">{{
labelName
}}</el-breadcrumb-item>
<el-breadcrumb-item>{{ "商品详情" }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="details_t"> <div class="details_t">
<!-- 轮播图 --> <!-- 轮播图 -->
<Swiper :mainImgUrls="mainImgUrl" <Swiper :mainImgUrls="mainImgUrl" :imgUrlLists="imgUrlList"></Swiper>
:imgUrlLists="imgUrlList"></Swiper>
<!-- 商品信息 --> <!-- 商品信息 -->
<div class="details_c"> <div class="details_c">
<div class="dis_flex"> <div class="dis_flex">
<div class="qzbq" <div class="qzbq" v-if="goodDetail.prefixLabelTarget">
v-if="goodDetail.prefixLabelTarget">[{{ goodDetail.prefixLabelTarget.label }}]</div> [{{ goodDetail.prefixLabelTarget.label }}]
</div>
<div class="c_tit1"> <div class="c_tit1">
{{ goodDetail.waresName }} {{ goodDetail.waresName }}
</div> </div>
@ -51,26 +58,31 @@
<div class="c_bai_b"> <div class="c_bai_b">
<div class="dis_flex just"> <div class="dis_flex just">
<div class="dis_flex"> <div class="dis_flex">
<div class="tit5">{{ userInfo.currencyIcon }}{{ goodDetail.waresPrice |numberToCurrency }}</div> <div class="tit5">
{{ userInfo.currencyIcon
}}{{ goodDetail.waresPrice | numberToCurrency }}
</div>
<!-- <div class="tit6">{{ goodDetail.goodsAchive }}</div> --> <!-- <div class="tit6">{{ goodDetail.goodsAchive }}</div> -->
</div> </div>
<div class="tit7">{{'累计销售'}}</div> <div class="tit7">{{ "累计销售" }}</div>
</div> </div>
<div class="dis_flex just m10"> <div class="dis_flex just m10">
<div class="tit4 dis_flex"> <div class="tit4 dis_flex">
<div style="margin-right:20px">PV:{{ goodDetail.waresAchieve|numberToCurrency }} </div> <div style="margin-right: 20px">
<div v-show="goodDetail.specialArea == 13">BV:{{ goodDetail.goodsAssAchive }} </div> PV:{{ goodDetail.waresAchieve | numberToCurrency }}
</div>
<div v-show="goodDetail.specialArea == 13">
BV:{{ goodDetail.goodsAssAchive }}
</div>
</div> </div>
<div class="tit5">{{ goodDetail.sales | seles }}</div> <div class="tit5">{{ goodDetail.sales | seles }}</div>
</div> </div>
<div class="dis_flex just m10"> <div class="dis_flex just m10">
<div class="dis_flex" <div class="dis_flex" v-if="goodDetail.giftNames">
v-if="goodDetail.giftNames"> <div class="tit8">{{ "赠品" }}:</div>
<div class="tit8">{{ '赠品'}}:</div>
<div class="tit9">{{ goodDetail.giftNames }}</div> <div class="tit9">{{ goodDetail.giftNames }}</div>
</div> </div>
<div v-else></div> <div v-else></div>
</div> </div>
</div> </div>
</div> </div>
@ -97,70 +109,75 @@
</div> --> </div> -->
<div class="gui"> <div class="gui">
<div class="gui_b"> <div class="gui_b">
<div class="gui_bt">{{ '规格' }}:</div> <div class="gui_bt">{{ "规格" }}:</div>
<div class="gui_bb"> <div class="gui_bb">
<div v-for="item,index in goodDetail.waresSkuList" <div
v-for="(item, index) in goodDetail.waresSkuList"
:key="item.pkId" :key="item.pkId"
class="gui_i"> class="gui_i"
>
<div class="gui_ia"> <div class="gui_ia">
<div @click.stop="tapSku(index)" <div
:class="['gui_ii',hasChecked==item.pkId?'gui_a':'']"> @click.stop="tapSku(index)"
<img :src="item.image" :class="['gui_ii', hasChecked == item.pkId ? 'gui_a' : '']"
alt=""> >
<img :src="item.image" alt="" />
<div class="gui_iit">{{ item.specValueNames }}</div> <div class="gui_iit">{{ item.specValueNames }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 数量 --> <!-- 数量 -->
<div class="dis_flex" <div class="dis_flex" v-if="userInfo.registerFans == 0">
v-if="userInfo.registerFans == 0"> <div>{{ "数量" }}</div>
<div>{{ '数量' }}</div> <el-input-number v-model="num" :min="1"></el-input-number>
<el-input-number v-model="num"
:min="1"></el-input-number>
</div> </div>
<div class="addCar" <div class="addCar" @click="toAddCar">{{ "加入购物车" }}</div>
@click="toAddCar">{{ '加入购物车' }}</div>
<!-- <div class="addCar" <!-- <div class="addCar"
v-if="userInfo.registerFans == 0" v-if="userInfo.registerFans == 0"
@click="goBuy">{{'立即购买'}}</div> --> @click="goBuy">{{'立即购买'}}</div> -->
<!-- {{ '服务承诺' }} --> <!-- {{ '服务承诺' }} -->
<div class="dis_flex fw"> <div class="dis_flex fw">
<div>{{ '服务承诺' }}:</div> <div>{{ "服务承诺" }}:</div>
<div class="fw_i" <div
class="fw_i"
v-for="item in goodDetail.ensureLabelList" v-for="item in goodDetail.ensureLabelList"
:key="item.pkId">{{ item.label }}</div> :key="item.pkId"
>
{{ item.label }}
</div>
</div> </div>
</div> </div>
<!-- 推荐 --> <!-- 推荐 -->
<!-- 商品列表 --> <!-- 商品列表 -->
<div class="goodList"> <div class="goodList">
<div class="tited">{{ '精品推荐' }}</div> <div class="tited">{{ "精品推荐" }}</div>
<div class="good_i" <div
class="good_i"
v-for="item in goodList" v-for="item in goodList"
:key="item.pkId" :key="item.pkId"
@click="goDetails(item)"> @click="goDetails(item)"
<img class="goodImg" >
:src="item.cover1" <img class="goodImg" :src="item.cover1" alt="" />
alt="">
<div class="goodBtm"> <div class="goodBtm">
<div class="disFlex"> <div class="disFlex">
<div class="tit5">{{ userInfo.currencyIcon }}{{ item.waresPrice |numberToCurrency }}</div> <div class="tit5">
{{ userInfo.currencyIcon
}}{{ item.waresPrice | numberToCurrency }}
</div>
<div class="tit2"></div> <div class="tit2"></div>
</div> </div>
<div class="disFlex"> <div class="disFlex">
<div class="tit3">{{ item.waresName }}</div> <div class="tit3">{{ item.waresName }}</div>
</div> </div>
<div class="disFlex"> <div class="disFlex">
<div class="tit4">{{ "销量" }}:{{ item.sales | seles }}</div>
<div class="tit4"> <div class="tit4">
{{'销量'}}:{{ item.sales |seles}} {{ "业绩" }}:{{
</div> item.waresAchieve | toThousandthAndKeepDecimal
<div class="tit4"> }}
{{ '业绩' }}:{{ item.waresAchieve|toThousandthAndKeepDecimal }}
</div> </div>
</div> </div>
</div> </div>
@ -169,33 +186,34 @@
</div> </div>
<div class="menuList"> <div class="menuList">
<div :class="['menu_i', isMenu == 0 ? 'actMenu' : '']" <div
@click="isMenu =0"> :class="['menu_i', isMenu == 0 ? 'actMenu' : '']"
{{'商品介绍'}} @click="isMenu = 0"
>
{{ "商品介绍" }}
</div> </div>
<div :class="['menu_i', isMenu == 1 ? 'actMenu' : '']" <div
@click="isMenu =1"> :class="['menu_i', isMenu == 1 ? 'actMenu' : '']"
{{'售后保障'}} @click="isMenu = 1"
>
{{ "售后保障" }}
</div> </div>
</div> </div>
<div class="xian"></div> <div class="xian"></div>
<div class="allDetail"> <div class="allDetail">
<div v-show="isMenu==0" <div v-show="isMenu == 0" v-html="goodDetail.description"></div>
v-html="goodDetail.description"></div> <div v-show="isMenu == 1" v-html="goodDetail.afterGuarantee"></div>
<div v-show="isMenu==1"
v-html="goodDetail.afterGuarantee"></div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import personInfo from '@/components/personInfo.vue' import personInfo from "@/components/personInfo.vue";
import Swiper from '@/components/Swiper.vue' import Swiper from "@/components/Swiper.vue";
import Sidebar from '@/components/Sidebar.vue' import Sidebar from "@/components/Sidebar.vue";
import * as api from '@/api/goods.js' import * as api from "@/api/goods.js";
import { memLevel } from '@/api/register.js' import { memLevel } from "@/api/register.js";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
export default { export default {
components: { components: {
@ -206,15 +224,15 @@ export default {
data() { data() {
return { return {
isMenu: 0, isMenu: 0,
specialArea: '', specialArea: "",
waresCode: '', waresCode: "",
goodList: [ goodList: [
{ {
waresCode: '1', waresCode: "1",
cover1: cover1:
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
waresPrice: '1980.00', waresPrice: "1980.00",
waresName: '海之圣超饱和富氢水杯(粉色),你值得拥有', waresName: "海之圣超饱和富氢水杯(粉色),你值得拥有",
}, },
], ],
goodDetail: { goodDetail: {
@ -223,40 +241,38 @@ export default {
}, },
isClick: 0, isClick: 0,
num: 1, num: 1,
mainImgUrl: '', mainImgUrl: "",
imgUrlList: [], imgUrlList: [],
labelName: '', labelName: "",
countDown: '', countDown: "",
pkId: '', pkId: "",
source: '', source: "",
hasChecked: '', hasChecked: "",
} };
}, },
filters: { filters: {
seles(value) { seles(value) {
if (value > 999) { if (value > 999) {
return 999 + '+' return 999 + "+";
} else { } else {
return value return value;
}
} }
}, },
},
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(["userInfo"]),
}, },
watch: { watch: {
$route: { $route: {
immediate: true, immediate: true,
handler(n) { handler(n) {
this.specialArea = this.$route.query.specialArea this.specialArea = this.$route.query.specialArea;
this.pkId = Number(this.$route.query.pkId) this.pkId = Number(this.$route.query.pkId);
this.source = this.$route.query.source this.source = this.$route.query.source;
this.labelName = this.$route.query.label this.labelName = this.$route.query.label;
this.getDetails() this.getDetails();
this.$store.dispatch('SpecialQuantity', this.specialArea) this.$store.dispatch("SpecialQuantity", this.specialArea);
this.getRecGoods() this.getRecGoods();
}, },
}, },
}, },
@ -270,7 +286,7 @@ export default {
}, },
methods: { methods: {
showShare() { showShare() {
this.$refs.sideBar.getShare(this.specialArea) this.$refs.sideBar.getShare(this.specialArea);
}, },
goBuy() { goBuy() {
let data = { let data = {
@ -278,31 +294,34 @@ export default {
pkId: this.pkId, pkId: this.pkId,
source: 0, // ID source: 0, // ID
waresSkuList: [], waresSkuList: [],
} };
this.goodDetail.waresSkuList.forEach((item) => { this.goodDetail.waresSkuList.forEach((item) => {
if (item.pkId == this.hasChecked) { if (item.pkId == this.hasChecked) {
data.waresSkuList.push({ pkTWares: this.goodDetail.pkId,pkTWaresSku:item.pkId}) data.waresSkuList.push({
pkTWares: this.goodDetail.pkId,
pkTWaresSku: item.pkId,
});
} }
}) });
this.$router.push({ this.$router.push({
path: 'shareConfirm', path: "shareConfirm",
query: { query: {
specialArea: 21, specialArea: 21,
allData: JSON.stringify([data]), allData: JSON.stringify([data]),
hasChecked: this.hasChecked, hasChecked: this.hasChecked,
}, },
}) });
}, },
goDetails(item) { goDetails(item) {
this.$router.replace({ this.$router.replace({
path: '/shareDetails', path: "/shareDetails",
query: { query: {
pkId: item.pkId, pkId: item.pkId,
specialArea: this.specialArea, specialArea: this.specialArea,
label: this.labelName, label: this.labelName,
source: 0, source: 0,
}, },
}) });
}, },
getRecGoods() { getRecGoods() {
api api
@ -311,13 +330,13 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
res.rows.splice(2) res.rows.splice(2);
this.goodList = res.rows this.goodList = res.rows;
} }
}) });
}, },
showCar() { showCar() {
this.$refs.sideBar.getCarList(this.specialArea) this.$refs.sideBar.getCarList(this.specialArea);
}, },
toAddCar() { toAddCar() {
let obj = { let obj = {
@ -326,61 +345,69 @@ export default {
pkId: this.pkId, // ID pkId: this.pkId, // ID
source: 0, // ID source: 0, // ID
productGroup: [], productGroup: [],
} };
this.goodDetail.waresSkuList.forEach((item) => { this.goodDetail.waresSkuList.forEach((item) => {
if (item.pkId == this.hasChecked) { if (item.pkId == this.hasChecked) {
obj.productGroup.push(item.productGroup[0]) obj.productGroup.push(item.productGroup[0]);
} }
}) });
api.addShopping(obj).then((res) => { api.addShopping(obj).then((res) => {
this.$store.dispatch('SpecialQuantity', this.specialArea) this.$store.dispatch("SpecialQuantity", this.specialArea);
this.$message({ this.$message({
message: '购物车添加成功', message: "购物车添加成功",
type: 'success', type: "success",
}) });
}) });
}, },
getNum(index, cndex, quantity) { getNum(index, cndex, quantity) {
// 0 // 0
if (quantity == 0) { if (quantity == 0) {
this.$set( this.$set(
this.goodDetail.productParams[index].waresItemsParamsList[cndex], this.goodDetail.productParams[index].waresItemsParamsList[cndex],
'checked', "checked",
false false
) );
} else { } else {
this.$set( this.$set(
this.goodDetail.productParams[index].waresItemsParamsList[cndex], this.goodDetail.productParams[index].waresItemsParamsList[cndex],
'checked', "checked",
true true
) );
} }
let ggNum = 0 let ggNum = 0;
this.goodDetail.productParams[index].waresItemsParamsList.forEach( this.goodDetail.productParams[index].waresItemsParamsList.forEach(
(item) => { (item) => {
ggNum += item.quantity ggNum += item.quantity;
} }
) );
if (this.goodDetail.productParams[index].quantity - quantity >= 0) { if (this.goodDetail.productParams[index].quantity - quantity >= 0) {
this.goodDetail.productParams[index].waresItemsParamsList.forEach( this.goodDetail.productParams[index].waresItemsParamsList.forEach(
(stem, sndex) => { (stem, sndex) => {
if (sndex != cndex) { if (sndex != cndex) {
this.$set( this.$set(
stem, stem,
'maxNum', "maxNum",
this.goodDetail.productParams[index].quantity - this.goodDetail.productParams[index].quantity -
(ggNum - stem.quantity) (ggNum - stem.quantity)
) );
} }
} }
) );
} }
}, },
tapSku(index) { tapSku(index) {
this.hasChecked = this.goodDetail.waresSkuList[index].pkId this.hasChecked = this.goodDetail.waresSkuList[index].pkId;
// this.goodDetail.waresPrice = this.goodDetail.waresSkuList[index].price // this.goodDetail.waresPrice = this.goodDetail.waresSkuList[index].price
this.$set(this.goodDetail,'waresPrice',this.goodDetail.waresSkuList[index].price) this.$set(
this.$set(this.goodDetail,'waresAchieve',this.goodDetail.waresSkuList[index].achieve) this.goodDetail,
"waresPrice",
this.goodDetail.waresSkuList[index].price
);
this.$set(
this.goodDetail,
"waresAchieve",
this.goodDetail.waresSkuList[index].achieve
);
// this.goodDetail.waresAchieve = this.goodDetail.waresSkuList[index].waresAchieve // this.goodDetail.waresAchieve = this.goodDetail.waresSkuList[index].waresAchieve
}, },
getDetails() { getDetails() {
@ -390,13 +417,13 @@ export default {
source: this.source, source: this.source,
}) })
.then((res) => { .then((res) => {
this.goodDetail = res.data this.goodDetail = res.data;
let sl = this.goodDetail.sales + '' let sl = this.goodDetail.sales + "";
if (sl >= 10000) { if (sl >= 10000) {
sl = sl.substring(0, sl.length - 4) + '万'+'+' sl = sl.substring(0, sl.length - 4) + "+";
} }
this.goodDetail.sales = sl this.goodDetail.sales = sl;
this.mainImgUrl = res.data.videoUrl || res.data.cover1 this.mainImgUrl = res.data.videoUrl || res.data.cover1;
this.imgUrlList = [ this.imgUrlList = [
res.data.cover, res.data.cover,
res.data.cover1, res.data.cover1,
@ -405,43 +432,51 @@ export default {
res.data.cover4, res.data.cover4,
res.data.cover5, res.data.cover5,
res.data.cover6, res.data.cover6,
] ];
this.imgUrlList = this.imgUrlList.filter( this.imgUrlList = this.imgUrlList.filter(
(item) => item && item.trim() (item) => item && item.trim()
) );
this.hasChecked = this.goodDetail.waresSkuList[0].pkId this.hasChecked = this.goodDetail.waresSkuList[0].pkId;
this.$set(this.goodDetail,'waresPrice',this.goodDetail.waresSkuList[0].price) this.$set(
this.$set(this.goodDetail,'waresAchieve',this.goodDetail.waresSkuList[0].achieve) this.goodDetail,
}) "waresPrice",
this.goodDetail.waresSkuList[0].price
);
this.$set(
this.goodDetail,
"waresAchieve",
this.goodDetail.waresSkuList[0].achieve
);
});
}, },
downTime() { downTime() {
let that = this let that = this;
this.clockTime = setInterval(() => { this.clockTime = setInterval(() => {
if ( if (
that.goodDetail.deliveryTimeMs && that.goodDetail.deliveryTimeMs &&
that.goodDetail.deliveryTimeMs > 0 that.goodDetail.deliveryTimeMs > 0
) { ) {
that.countDown = this.getTime(this.goodDetail.deliveryTimeMs--) that.countDown = this.getTime(this.goodDetail.deliveryTimeMs--);
} else { } else {
that.countDown = '0天00时00分00秒' that.countDown = "0天00时00分00秒";
} }
}, 1000) }, 1000);
}, },
getTime(time) { getTime(time) {
// //
let d = parseInt(time / 60 / 60 / 24) //\ let d = parseInt(time / 60 / 60 / 24); //\
d = d < 10 ? '0' + d : d d = d < 10 ? "0" + d : d;
let h = parseInt((time / 60 / 60) % 24) let h = parseInt((time / 60 / 60) % 24);
h = h < 10 ? '0' + h : h h = h < 10 ? "0" + h : h;
let m = parseInt((time / 60) % 60) let m = parseInt((time / 60) % 60);
m = m < 10 ? '0' + m : m m = m < 10 ? "0" + m : m;
let s = parseInt(time % 60) let s = parseInt(time % 60);
s = s < 10 ? '0' + s : s s = s < 10 ? "0" + s : s;
// //
return d + '天' + h + '小时' + m + '分' + s + '秒' return d + "天" + h + "小时" + m + "分" + s + "秒";
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -566,7 +601,7 @@ export default {
font-size: 16px; font-size: 16px;
} }
.coloNum { .coloNum {
color: #00417C; color: #00417c;
font-weight: 600; font-weight: 600;
margin: 0 10px; margin: 0 10px;
} }
@ -695,7 +730,7 @@ export default {
.tit1 { .tit1 {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #00417C; color: #00417c;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
@ -721,7 +756,7 @@ export default {
.tit5 { .tit5 {
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
color: #00417C; color: #00417c;
} }
.tit6 { .tit6 {
font-size: 14px; font-size: 14px;
@ -737,7 +772,7 @@ export default {
.tit8 { .tit8 {
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;
color: #00417C; color: #00417c;
} }
.tit9 { .tit9 {
font-size: 18px; font-size: 18px;
@ -769,7 +804,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.actMenu { .actMenu {
border-bottom: 5px solid #00417C; border-bottom: 5px solid #00417c;
} }
} }
.xian { .xian {

View File

@ -8,10 +8,10 @@
<div class="main"> <div class="main">
<div> <div>
<!-- 公告弹窗 --> <!-- 公告弹窗 -->
<notice-popup <!-- <notice-popup
:userInfo="userInfo" :userInfo="userInfo"
:publishLocationIndex="index" :publishLocationIndex="index"
></notice-popup> ></notice-popup> -->
</div> </div>
<sidebarUserInfo></sidebarUserInfo> <sidebarUserInfo></sidebarUserInfo>
<div class="main_r"> <div class="main_r">
@ -30,7 +30,7 @@
<div class="xian"></div> <div class="xian"></div>
<!-- 钱包 --> <!-- 钱包 -->
<div v-show="isMenu == 0 && cango"> <div v-show="isMenu == 0 && walletVisible">
<!-- <walletComments></walletComments> --> <!-- <walletComments></walletComments> -->
<div class="bartopbox"> <div class="bartopbox">
<div class="flexbox"> <div class="flexbox">
@ -113,19 +113,10 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog <SecondaryPassword
class="pswdialog"
:title="'二级密码'"
:visible.sync="pswShow" :visible.sync="pswShow"
width="30%" @validPwd="validPwd"
center ></SecondaryPassword>
:close-on-click-modal="false"
:before-close="handleClose"
>
<div class="tit">{{ "请输入二级密码" }}</div>
<el-input v-model="password" type="password"></el-input>
<div class="btn" @click="surePsw">{{ "确定" }}</div>
</el-dialog>
</div> </div>
</template> </template>
@ -148,14 +139,15 @@ import monthlyHistory from "@/components/selfService/monthlyHistory.vue";
import selfPickOrders from "@/components/selfService/selfPickOrders.vue"; import selfPickOrders from "@/components/selfService/selfPickOrders.vue";
import selfCancleOrder from "@/components/selfService/selfCancleOrder.vue"; import selfCancleOrder from "@/components/selfService/selfCancleOrder.vue";
import existRealName from "@/components/selfService/existRealName.vue"; import existRealName from "@/components/selfService/existRealName.vue";
import noticePopup from "@/components/noticePopup.vue"; import SecondaryPassword from "@/components/secondary-password/index.vue";
// import noticePopup from "@/components/noticePopup.vue";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { checkPwd, checkIfShow } from "@/api/wallet.js"; import { checkIfShow } from "@/api/wallet.js";
import * as api from "@/api/goods.js"; import * as api from "@/api/goods.js";
export default { export default {
components: { components: {
noticePopup, // noticePopup,
carryGoods, carryGoods,
delar, delar,
activity, activity,
@ -174,6 +166,7 @@ export default {
monthlyHistory, monthlyHistory,
selfCancleOrder, selfCancleOrder,
existRealName, existRealName,
SecondaryPassword,
}, },
computed: { computed: {
...mapGetters(["userInfo"]), ...mapGetters(["userInfo"]),
@ -277,13 +270,13 @@ export default {
pkAccountId: "", pkAccountId: "",
pswShow: false, pswShow: false,
password: "", password: "",
cango: false, walletVisible: false,
theselfHeader: [], theselfHeader: [],
}; };
}, },
watch: { watch: {
$route(n, o) { $route(n, o) {
this.cango = false; this.walletVisible = false;
this.isMenu = n.query.id; this.isMenu = n.query.id;
if (this.isMenu == 0) { if (this.isMenu == 0) {
this.password = ""; this.password = "";
@ -476,26 +469,11 @@ export default {
} }
}); });
}, },
surePsw() {
checkPwd({ pwd: this.password }).then((res) => {
if (res.code == 200) {
this.cango = true;
this.password = "";
this.pswShow = false;
}
});
},
handleClose() {
this.pswShow = false;
},
goMenu(id) { goMenu(id) {
if (id == 0) { if (id == 0) {
this.password = ""; this.password = "";
this.pswShow = true; this.pswShow = true;
} }
// if (id == 5) {
// }
this.$router.push({ this.$router.push({
path: "/vipCenter", path: "/vipCenter",
query: { id: id }, query: { id: id },
@ -512,6 +490,11 @@ export default {
handleLink2(id) { handleLink2(id) {
this.atabActive = id; this.atabActive = id;
}, },
validPwd(valid) {
if (valid) {
this.walletVisible = true;
}
},
}, },
}; };
</script> </script>
@ -520,31 +503,7 @@ export default {
::v-deep .el-carousel__container { ::v-deep .el-carousel__container {
height: 500px; height: 500px;
} }
::v-deep .pswdialog {
margin-top: 120px;
}
.tit {
font-size: 16px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
text-align: center;
margin: 10px 0;
}
.btn {
line-height: 50px;
width: 180px;
// height: 50px;
background: #d5251d;
border-radius: 6px 6px 6px 6px;
text-align: center;
font-size: 18px;
font-weight: 500;
color: #ffffff;
margin: 0 auto;
margin-top: 25px;
cursor: pointer;
}
.bartopbox { .bartopbox {
margin-top: 20px; margin-top: 20px;
.flexbox { .flexbox {
@ -568,7 +527,7 @@ export default {
} }
.act { .act {
color: #ffffff; color: #ffffff;
background: rgba(192, 31, 31, 1); background: var(--primary-color);
} }
.main { .main {
min-height: 100vh; min-height: 100vh;
@ -599,7 +558,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
.actMenu { .actMenu {
border-bottom: 5px solid #00417C; border-bottom: 5px solid #00417c;
} }
} }
.xian { .xian {