Commit e9c15db3 authored by leiqingsong's avatar leiqingsong

优化

parent 4da8e182
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
up: { up: {
offset: 50, offset: 50,
isAuto: true, isAuto: true,
contentnomore: '没有数据了~', contentnomore: "没有数据了~",
toTop: { toTop: {
isEnable: false isEnable: false
}, },
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
}); });
} else { } else {
const addParams = params; const addParams = params;
addParams.userId =JSON.parase(localStorage.getItem('user')).userId; addParams.userId = JSON.parase(localStorage.getItem("user")).userId;
addUserBankInfo(params) addUserBankInfo(params)
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
}, },
getBankInfo() { getBankInfo() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getUserBankInfo(params).then(res => { getUserBankInfo(params).then(res => {
if (res.code === 0 && res.data) { if (res.code === 0 && res.data) {
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
methods: { methods: {
getWithdrawal() { getWithdrawal() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getWithdrawalAmount(params).then(res => { getWithdrawalAmount(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
}, },
getRecordList(yearMonth) { getRecordList(yearMonth) {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId, userId: JSON.parase(localStorage.getItem("user")).userId,
yearMonth: yearMonth yearMonth: yearMonth
}; };
getWithdrawalRecord(params).then(res => { getWithdrawalRecord(params).then(res => {
......
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
name: "CashOut", name: "CashOut",
data() { data() {
return { return {
userPhone:JSON.parase(localStorage.getItem('user')).userId, userPhone: JSON.parase(localStorage.getItem("user")).userId,
bank: "", bank: "",
money: null, money: null,
account: 0, account: 0,
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
}, },
canCashOut() { canCashOut() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getWithdrawalAmount(params).then(res => { getWithdrawalAmount(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
return; return;
} }
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
sendSms(params).then(); sendSms(params).then();
this.validCode = null; this.validCode = null;
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
}, },
getUserInfo() { getUserInfo() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getUserBankInfo(params).then(res => { getUserBankInfo(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
}, },
getCustomerData() { getCustomerData() {
let params = { let params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getCustomer(params).then(res => { getCustomer(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
this.$router.push({ name: urlName }); this.$router.push({ name: urlName });
}, },
getstatus() { getstatus() {
const userId =JSON.parase(localStorage.getItem('user')).userId; const userId = JSON.parase(localStorage.getItem("user")).userId;
console.log(userId); console.log(userId);
const _this = this; const _this = this;
getForestStatus(userId).then(res => { getForestStatus(userId).then(res => {
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
methods: { methods: {
getAllRecord() { getAllRecord() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
showIncomeRecord(params).then(res => { showIncomeRecord(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -231,7 +231,7 @@ export default { ...@@ -231,7 +231,7 @@ export default {
}, },
getDetail() { getDetail() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
queryIncomeDetail(params).then(res => { queryIncomeDetail(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
...@@ -259,7 +259,7 @@ export default { ...@@ -259,7 +259,7 @@ export default {
}); });
this.pieOption.legend = legend; this.pieOption.legend = legend;
if (!res.data.totalIncome) { if (!res.data.totalIncome) {
this.pieOption.graphic.children[1].style.text="暂无数据~" this.pieOption.graphic.children[1].style.text = "暂无数据~";
} }
} }
}); });
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<div class="wallet"> <div class="wallet">
<div class="content"> <div class="content">
<img class="balance-img" src="@/assets/images/余额.png" alt /> <img class="balance-img" src="@/assets/images/余额.png" alt />
<p class="currentprofitlabel"> <p class="currentprofitlabel">当月收益</p>
当月收益
</p>
<div class="currentprofit" @click="jumpToIncomeDetail"> <div class="currentprofit" @click="jumpToIncomeDetail">
<span class="month-income">{{ walletInfo.moneyIncome }}</span> <span class="month-income">{{ walletInfo.moneyIncome }}</span>
<img src="@/assets/images/右箭头.png" alt class="month-income-arrow" /> <img src="@/assets/images/右箭头.png" alt class="month-income-arrow" />
...@@ -75,7 +73,7 @@ export default { ...@@ -75,7 +73,7 @@ export default {
// 获取用户钱包展示信息 // 获取用户钱包展示信息
getWalletInfo() { getWalletInfo() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
getMoneyPackage(params) getMoneyPackage(params)
.then(res => { .then(res => {
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
this.canSubmit = false; this.canSubmit = false;
const params = { const params = {
headImage: this.imageUrl, headImage: this.imageUrl,
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
setAvatar(params).then(res => { setAvatar(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
methods: { methods: {
getMoment() { getMoment() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
findByUserId(params).then(res => { findByUserId(params).then(res => {
console.log(res); console.log(res);
......
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
fd.append("files", file.file); fd.append("files", file.file);
}); });
fd.append("zxField", this.message); fd.append("zxField", this.message);
fd.append("userId",JSON.parase(localStorage.getItem('user')).userId); fd.append("userId", JSON.parase(localStorage.getItem("user")).userId);
uploadImage(fd).then(); uploadImage(fd).then();
}, },
openPopup() { openPopup() {
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
}, },
data() { data() {
return { return {
avatar: '', avatar: "",
inviteeArr: [], inviteeArr: [],
userRecommendInfo: {}, userRecommendInfo: {},
activeTab: "", activeTab: "",
...@@ -149,8 +149,8 @@ export default { ...@@ -149,8 +149,8 @@ export default {
this.getRecommendDetail(0); this.getRecommendDetail(0);
}, },
mounted() { mounted() {
const userAvatar = JSON.parse(localStorage.getItem('user')).headImage; const userAvatar = JSON.parse(localStorage.getItem("user")).headImage;
this.avatar = process.env.VUE_APP_BASE_URL + userAvatar this.avatar = process.env.VUE_APP_BASE_URL + userAvatar;
}, },
methods: { methods: {
changeTab(name) { changeTab(name) {
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
}, },
getRecommendInfo() { getRecommendInfo() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
recomendInfo(params).then(res => { recomendInfo(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
}, },
getRecommendDetail(level) { getRecommendDetail(level) {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId, userId: JSON.parase(localStorage.getItem("user")).userId,
userlevel: level userlevel: level
}; };
recommendDetail(params).then(res => { recommendDetail(params).then(res => {
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
data() { data() {
return { return {
form: { form: {
userId:JSON.parase(localStorage.getItem('user')).userId, userId: JSON.parase(localStorage.getItem("user")).userId,
sms: "", sms: "",
beInvitedCode: "" beInvitedCode: ""
}, },
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
{{ RankIndex > 9 ? RankIndex : "0" + RankIndex }} {{ RankIndex > 9 ? RankIndex : "0" + RankIndex }}
</span> </span>
<div style="flex:1"> <div style="flex:1">
<img class="avatar" :src="imgBaseUrl + prizeVos.headImage" alt="用户头像" /> <img
class="avatar"
:src="imgBaseUrl + prizeVos.headImage"
alt="用户头像"
/>
</div> </div>
<span class="userName" style="flex:2;text-align:center">{{ <span class="userName" style="flex:2;text-align:center">{{
prizeVos.userId prizeVos.userId
...@@ -30,10 +34,10 @@ export default { ...@@ -30,10 +34,10 @@ export default {
data() { data() {
return { return {
imgBaseUrl: "" imgBaseUrl: ""
} };
}, },
created() { created() {
this.imgBaseUrl = process.env.VUE_APP_BASE_URL this.imgBaseUrl = process.env.VUE_APP_BASE_URL;
} }
}; };
</script> </script>
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<div class="bg"> <div class="bg">
<van-icon name="arrow-left" @click="handlerBack" /> <van-icon name="arrow-left" @click="handlerBack" />
<span class="title">本月进步最大奖励池</span> <span class="title">本月进步最大奖励池</span>
<span class="award"><span v-if="growthTotal > 0"></span>{{ growthTotal }}</span> <span class="award"
><span v-if="growthTotal > 0"></span>{{ growthTotal }}</span
>
</div> </div>
<div class="rank"> <div class="rank">
<div class="header rank-flex"> <div class="header rank-flex">
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
</div> </div>
<div class="my"> <div class="my">
<p>{{ awardInfo.userMonthAward }}</p> <p>{{ awardInfo.userMonthAward || 0 }}</p>
<div class="bottom"> <div class="bottom">
<img src="@/assets/images/我的份额.png" alt /> <img src="@/assets/images/我的份额.png" alt />
<span>我的份额</span> <span>我的份额</span>
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
}, },
getData() { getData() {
const params = { const params = {
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
monthRewards(params).then(res => { monthRewards(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
methods: { methods: {
getUser() { getUser() {
const params = { const params = {
userId: JSON.parse(localStorage.getItem('user')).userId userId: JSON.parse(localStorage.getItem("user")).userId
}; };
console.log("setting-userId", params); console.log("setting-userId", params);
getUserInfo2(params).then(res => { getUserInfo2(params).then(res => {
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
localStorage.setItem("user", JSON.stringify(res)); localStorage.setItem("user", JSON.stringify(res));
this.$nextTick(() => { this.$nextTick(() => {
this.userName = res.userId; this.userName = res.userId;
this.inviteeCode = res.beInvitedCode == 1 ? '请填写推荐人邀请码' : res.beInvitedCode; this.inviteeCode =
res.beInvitedCode == 1 ? "请填写推荐人邀请码" : res.beInvitedCode;
this.avatar = res.headImage; this.avatar = res.headImage;
}); });
} }
...@@ -124,12 +125,15 @@ export default { ...@@ -124,12 +125,15 @@ export default {
this.inviteeCode = this.fillCode; this.inviteeCode = this.fillCode;
const params = { const params = {
inviteCode: this.fillCode, inviteCode: this.fillCode,
userId:JSON.parase(localStorage.getItem('user')).userId userId: JSON.parase(localStorage.getItem("user")).userId
}; };
fillInviteCode(params).then(); fillInviteCode(params).then();
}, },
fillInviterCode() { fillInviterCode() {
if (this.inviteeCode === "请填写推荐人邀请码" || this.inviteeCode == "1") { if (
this.inviteeCode === "请填写推荐人邀请码" ||
this.inviteeCode == "1"
) {
this.inviteeCodeDialog = true; this.inviteeCodeDialog = true;
this.fillCode = ""; this.fillCode = "";
} }
......
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