修改html标签为uni标签,修改rem单位为rpx,修改提示及确认为uniapi,修改登录模块为uni接口,修改css入口为APP.vue,增加app端样式支持

This commit is contained in:
gaoxs
2020-03-16 15:51:08 +08:00
parent fa289d66a8
commit 95845779db
422 changed files with 34024 additions and 32630 deletions

View File

@ -1,10 +1,10 @@
<template>
<div class="ChangePassword">
<div class="list">
<div class="item">
<view class="ChangePassword">
<view class="list">
<view class="item">
<input type="number" placeholder="填写手机号码" v-model="phone" />
</div>
<div class="item acea-row row-between-wrapper">
</view>
<view class="item acea-row row-between-wrapper">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button
class="code font-color-red"
@ -12,10 +12,10 @@
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</div>
</div>
<div class="confirmBnt bg-color-red" @click="confirm">确认绑定</div>
</div>
</view>
</view>
<view class="confirmBnt bg-color-red" @click="confirm">确认绑定</view>
</view>
</template>
<script>
import { mapGetters } from "vuex";
@ -63,55 +63,47 @@ export default {
})
.then(res => {
if (res.data !== undefined && res.data.is_bind) {
that.$dialog.confirm({
mes: res.msg,
opts: [
{
txt: "确认绑定",
color: false,
callback: () => {
bindingPhone({
phone: this.phone,
captcha: this.captcha,
step: 1
})
.then(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
uni.showModal({
title: "提示",
content: "确认绑定?",
success: function(res) {
if (res.confirm) {
bindingPhone({
phone: this.phone,
captcha: this.captcha,
step: 1
})
.then(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}
},
{
txt: "取消",
color: false,
callback: () => {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}
} else if (res.cancel) {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}
]
}
});
} else {
uni.showToast({
@ -168,5 +160,4 @@ export default {
</script>
<style lang="">
</style>

View File

@ -1,17 +1,17 @@
<template>
<div class="ChangePassword">
<div class="phone">
<view class="ChangePassword">
<view class="phone">
当前手机号:
<input type="text" v-model="phone" disabled />
</div>
<div class="list">
<div class="item">
</view>
<view class="list">
<view class="item">
<input type="password" placeholder="设置新密码" v-model="password" />
</div>
<div class="item">
</view>
<view class="item">
<input type="password" placeholder="确认新密码" v-model="password2" />
</div>
<div class="item acea-row row-between-wrapper">
</view>
<view class="item acea-row row-between-wrapper">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button
class="code font-color-red"
@ -19,10 +19,10 @@
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</div>
</div>
<div class="confirmBnt bg-color-red" @click="confirm">确认修改</div>
</div>
</view>
</view>
<view class="confirmBnt bg-color-red" @click="confirm">确认修改</view>
</view>
</template>
<style scoped>
.ChangePassword .phone input {

View File

@ -1,17 +1,17 @@
<template>
<div class="CustomerList">
<div
<view class="CustomerList">
<view
class="item acea-row row-between-wrapper"
v-for="item in list"
:key="item.id"
@click="goCustomerService(item)"
>
<div class="pictrue">
<img :src="item.avatar" />
</div>
<div class="text line1">{{ item.nickname }}</div>
</div>
</div>
<view class="pictrue">
<image :src="item.avatar" />
</view>
<view class="text line1">{{ item.nickname }}</view>
</view>
</view>
</template>
<script>
import { serviceList } from "@/api/user";
@ -60,7 +60,7 @@ export default {
-webkit-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3;
-moz-box-shadow: 0 0 0.1rem 0.05rem #f3f3f3;
}
.CustomerList .item .pictrue img {
.CustomerList .item .pictrue image{
width: 100%;
height: 100%;
border-radius: 50%;

View File

@ -1,143 +1,113 @@
<template>
<div class="register absolute">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" />
</div>
</div>
<div class="whiteBg" v-if="formItem === 1">
<div class="title acea-row row-center-wrapper">
<div
<view class="register absolute">
<view class="shading">
<view class="pictrue acea-row row-center-wrapper">
<image src="@/assets/images/logo.png" />
</view>
</view>
<view class="whiteBg" v-if="formItem === 1">
<view class="title acea-row row-center-wrapper">
<view
class="item"
:class="current === index ? 'on' : ''"
v-for="(item, index) in navList"
@click="navTap(index)"
:key="index"
>
{{ item }}
</div>
</div>
<div class="list" :hidden="current !== 0">
>{{ item }}</view>
</view>
<view class="list" :hidden="current !== 0">
<form @submit.prevent="submit">
<div class="item">
<div class="acea-row row-between-wrapper">
<view class="item">
<view class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use>
<use xlink:href="#icon-phone_" />
</svg>
<input
type="text"
placeholder="输入手机号码"
v-model="account"
required
/>
</div>
</div>
<div class="item">
<div class="acea-row row-between-wrapper">
<input type="text" placeholder="输入手机号码" v-model="account" required />
</view>
</view>
<view class="item">
<view class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_"></use>
<use xlink:href="#icon-code_" />
</svg>
<input
type="password"
placeholder="填写登录密码"
v-model="password"
required
/>
</div>
</div>
<input type="password" placeholder="填写登录密码" v-model="password" required />
</view>
</view>
</form>
</div>
<div class="list" :hidden="current !== 1">
<div class="item">
<div class="acea-row row-between-wrapper">
</view>
<view class="list" :hidden="current !== 1">
<view class="item">
<view class="acea-row row-between-wrapper">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use>
<use xlink:href="#icon-phone_" />
</svg>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="align-left">
</view>
</view>
<view class="item">
<view class="align-left">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1"></use>
<use xlink:href="#icon-code_1" />
</svg>
<input
type="text"
placeholder="填写验证码"
class="codeIput"
v-model="captcha"
/>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button
class="code"
:disabled="disabled"
:class="disabled === true ? 'on' : ''"
@click="code"
>
{{ text }}
</button>
</div>
</div>
</div>
<div class="logon" @click="loginMobile" :hidden="current !== 1">登录</div>
<div class="logon" @click="submit" :hidden="current === 1">登录</div>
<div class="tip">
>{{ text }}</button>
</view>
</view>
</view>
<view class="logon" @click="loginMobile" :hidden="current !== 1">登录</view>
<view class="logon" @click="submit" :hidden="current === 1">登录</view>
<view class="tip">
没有账号?
<span @click="formItem = 2" class="font-color-red">立即注册</span>
</div>
</div>
<div class="whiteBg" v-else>
<div class="title">注册账号</div>
<div class="list">
<div class="item">
<div>
<text @click="formItem = 2" class="font-color-red">立即注册</text>
</view>
</view>
<view class="whiteBg" v-else>
<view class="title">注册账号</view>
<view class="list">
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_"></use>
<use xlink:href="#icon-phone_" />
</svg>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="align-left">
</view>
</view>
<view class="item">
<view class="align-left">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1"></use>
<use xlink:href="#icon-code_1" />
</svg>
<input
type="text"
placeholder="填写验证码"
class="codeIput"
v-model="captcha"
/>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button
class="code"
:disabled="disabled"
:class="disabled === true ? 'on' : ''"
@click="code"
>
{{ text }}
</button>
</div>
</div>
<div class="item">
<div>
>{{ text }}</button>
</view>
</view>
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_"></use>
<use xlink:href="#icon-code_" />
</svg>
<input
type="password"
placeholder="填写您的登录密码"
v-model="password"
/>
</div>
</div>
</div>
<div class="logon" @click="register">注册</div>
<div class="tip">
<input type="password" placeholder="填写您的登录密码" v-model="password" />
</view>
</view>
</view>
<view class="logon" @click="register">注册</view>
<view class="tip">
已有账号?
<span @click="formItem = 1" class="font-color-red">立即登录</span>
</div>
</div>
<div class="bottom"></div>
</div>
<text @click="formItem = 1" class="font-color-red">立即登录</text>
</view>
</view>
<view class="bottom"></view>
</view>
</template>
<script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
@ -179,7 +149,10 @@ export default {
alpha_num(alpha_num.message("验证码"))
]
})
.validate({ account, captcha });
.validate({
account,
captcha
});
} catch (e) {
return validatorDefaultCatch(e);
}
@ -193,10 +166,16 @@ export default {
that.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
const backUrl = cookie.get(BACK_URL) || "/";
cookie.remove(BACK_URL);
that.$yrouter.replace({ path: backUrl });
that.$yrouter.replace({
path: backUrl
});
})
.catch(res => {
that.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
});
},
async register() {
@ -219,7 +198,11 @@ export default {
alpha_num(alpha_num.message("密码"))
]
})
.validate({ account, captcha, password });
.validate({
account,
captcha,
password
});
} catch (e) {
return validatorDefaultCatch(e);
}
@ -230,11 +213,19 @@ export default {
spread: cookie.get("spread")
})
.then(res => {
that.$dialog.success(res.msg);
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.formItem = 1;
})
.catch(res => {
that.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
async code() {
@ -248,25 +239,38 @@ export default {
chs_phone(chs_phone.message())
]
})
.validate({ account });
.validate({
account
});
} catch (e) {
return validatorDefaultCatch(e);
}
if (that.formItem == 2) that.type = "register";
await registerVerify({ phone: that.account, type: that.type })
await registerVerify({
phone: that.account,
type: that.type
})
.then(res => {
that.$dialog.success(res.msg);
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.sendCode();
})
.catch(res => {
that.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
navTap: function(index) {
this.current = index;
},
async submit() {
console.log('spread:'+cookie.get("spread") )
console.log("spread:" + cookie.get("spread"));
const { account, password } = this;
try {
await this.$validator({
@ -280,21 +284,33 @@ export default {
attrs.range([6, 16], attrs.range.message("密码")),
alpha_num(alpha_num.message("密码"))
]
}).validate({ account, password });
}).validate({
account,
password
});
} catch (e) {
return validatorDefaultCatch(e);
}
login({ username: account, password, spread: cookie.get("spread") })
login({
username: account,
password,
spread: cookie.get("spread")
})
.then(({ data }) => {
this.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
const backUrl = cookie.get(BACK_URL) || "/";
cookie.remove(BACK_URL);
this.$yrouter.replace({ path: backUrl });
this.$yrouter.replace({
path: backUrl
});
})
.catch(e => {
this.$dialog.error(e.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
}
}

View File

@ -1,16 +1,16 @@
<template>
<div class="personal-data">
<div class="wrapper">
<div class="title">管理我的账号</div>
<div class="wrapList">
<div
<view class="personal-data">
<view class="wrapper">
<view class="title">管理我的账号</view>
<view class="wrapList">
<view
class="item acea-row row-between-wrapper"
:class="item.uid === userInfo.uid ? 'on' : ''"
v-for="(item, switchUserInfoIndex) in switchUserInfo"
:key="switchUserInfoIndex"
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<!-- <VueCoreImageUpload
class="btn btn-primary"
:crop="false"
@ -25,74 +25,74 @@
ref="upImg"
v-if="item.uid === userInfo.uid"
>
<div class="pictrue">
<img :src="item.avatar" />
</div>
<view class="pictrue">
<image :src="item.avatar" />
</view>
</VueCoreImageUpload>-->
<!-- <div class="pictrue" v-else>
<img :src="item.avatar" />
</div>-->
<!-- <view class="pictrue" v-else>
<image :src="item.avatar" />
</view>-->
<img
:src="$VUE_APP_RESOURCES_URL+'/images/alter.png'"
class="alter"
v-if="item.uid === userInfo.uid"
/>
</div>
<div class="text">
<div class="name line1">{{ item.nickname }}</div>
<div class="phone">绑定手机号{{ item.phone }}</div>
</div>
</div>
<div
</view>
<view class="text">
<view class="name line1">{{ item.nickname }}</view>
<view class="phone">绑定手机号{{ item.phone }}</view>
</view>
</view>
<view
class="currentBnt acea-row row-center-wrapper font-color-red"
v-if="item.uid === userInfo.uid"
>当前账号</div>
<div
>当前账号</view>
<view
class="bnt font-color-red acea-row row-center-wrapper"
v-else
@click="switchAccounts(index)"
>使用账号</div>
</div>
</div>
</div>
<div class="list">
<div class="item acea-row row-between-wrapper">
<div>昵称</div>
<div class="input">
>使用账号</view>
</view>
</view>
</view>
<view class="list">
<view class="item acea-row row-between-wrapper">
<view>昵称</view>
<view class="input">
<input type="text" v-model="userInfo.nickname" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div>ID号</div>
<div class="input acea-row row-between-wrapper">
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>ID号</view>
<view class="input acea-row row-between-wrapper">
<input type="text" :value="userInfo.uid" disabled class="id" />
<span class="iconfont icon-suozi"></span>
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div>手机号</div>
<div class="input">
<text class="iconfont icon-suozi"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>手机号</view>
<view class="input">
<input type="text" v-if="userInfo.phone" v-model="userInfo.phone" />
<input type="text" v-else value="未绑定" disabled class="id" />
</div>
</div>
<div class="item acea-row row-between-wrapper" @click="goChangePassword()">
<div>密码</div>
<div class="input acea-row row-between-wrapper">
<span>点击修改密码</span>
<span class="iconfont icon-suozi"></span>
</div>
</div>
</div>
<!--<div class="modifyBnt bg-color-red" @click="submit">保存修改</div>-->
<!-- <div
</view>
</view>
<view class="item acea-row row-between-wrapper" @click="goChangePassword()">
<view>密码</view>
<view class="input acea-row row-between-wrapper">
<text>点击修改密码</text>
<text class="iconfont icon-suozi"></text>
</view>
</view>
</view>
<!--<view class="modifyBnt bg-color-red" @click="submit">保存修改</view>-->
<!-- <view
class="logOut cart-color acea-row row-center-wrapper"
@click="logout"
v-if="!isWeixin"
>
退出登录
</div>-->
</div>
</view>-->
</view>
</template>
<script>
import { mapGetters } from "vuex";
@ -141,8 +141,14 @@ export default {
this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex];
if (this.switchUserInfo.length <= 1) return true;
if (userInfo === undefined)
return this.$dialog.toast({ mes: "切换的账号不存在" });
if (userInfo === undefined) {
uni.showToast({
title: "切换的账号不存在",
icon: "none",
duration: 2000
});
return;
}
if (userInfo.user_type === "h5") {
switchH5Login()
.then(({ data }) => {
@ -154,7 +160,11 @@ export default {
})
.catch(err => {
uni.hideLoading();
return that.$dialog.toast({ mes: err });
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
} else {
cookie.set("loginType", "wechat", 60);
@ -180,8 +190,14 @@ export default {
});
},
imageuploaded(res) {
if (res.status !== 200)
return this.$dialog.error(res.msg || "上传图片失败");
if (res.status !== 200) {
uni.showToast({
title: res.msg || res.response.data.msg,
icon: "none",
duration: 2000
});
return;
}
if (this.switchUserInfo[this.userIndex] === undefined) return;
this.$set(this.switchUserInfo[this.userIndex], "avatar", res.data.url);
},
@ -194,25 +210,38 @@ export default {
}).then(
res => {
this.$store.dispatch("USERINFO", true);
this.$uni.showToast({ title: res.msg, icon: "none", duration: 2000 });
this.$uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.$yrouter.back();
},
error => {
this.$dialog.error(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
);
},
logout: function() {
this.$dialog.confirm({
mes: "确认退出登录?",
opts: () => {
getLogout()
.then(res => {
this.$store.commit("LOGOUT");
clearAuthStatus();
location.href = location.origin;
})
.catch(err => {});
uni.showModal({
title: "提示",
content: "确认退出登录?",
success: function(res) {
if (res.confirm) {
getLogout()
.then(res => {
this.$store.commit("LOGOUT");
clearAuthStatus();
location.href = location.origin;
})
.catch(err => {});
} else if (res.cancel) {
console.log("用户点击取消");
}
}
});
}

View File

@ -1,28 +1,28 @@
<template>
<div>
<div class="recharge">
<div class="nav acea-row row-around row-middle">
<div
<view>
<view class="recharge">
<view class="nav acea-row row-around row-middle">
<view
class="item"
:class="active === navRechargeIndex ? 'on' : ''"
v-for="(item, navRechargeIndex) in navRecharge"
:key="navRechargeIndex"
@click="navRecharges(navRechargeIndex)"
>{{ item }}</div>
</div>
<div class="info-wrapper">
<div class="money">
<span></span>
>{{ item }}</view>
</view>
<view class="info-wrapper">
<view class="money">
<text></text>
<input type="number" placeholder="0.00" v-model="money" />
</div>
<div class="tips" v-if="!active">
</view>
<view class="tips" v-if="!active">
提示当前余额为
<span>{{ now_money || 0 }}</span>
</div>
<div class="pay-btn bg-color-red" @click="recharge">{{ active ? "立即转入" : "立即充值" }}</div>
</div>
</div>
</div>
<text>{{ now_money || 0 }}</text>
</view>
<view class="pay-btn bg-color-red" @click="recharge">{{ active ? "立即转入" : "立即充值" }}</view>
</view>
</view>
</view>
</template>
<script>
import { mapGetters } from "vuex";
@ -58,78 +58,97 @@ export default {
price = Number(this.money);
if (that.active) {
if (price === 0) {
return that.$dialog.toast({ mes: "请输入您要转入的金额" });
uni.showToast({
title: "请输入您要转入的金额",
icon: "none",
duration: 2000
});
return
} else if (price < 0.01) {
return that.$dialog.toast({ mes: "转入金额不能低于0.01" });
uni.showToast({
title: "转入金额不能低于0.01",
icon: "none",
duration: 2000
});
return
}
this.$dialog.confirm({
mes: "转入余额无法在转出,请确认转入",
uni.showModal({
title: "转入余额",
opts: [
{
txt: "确认",
color: false,
callback: () => {
rechargeWechat({ price: price, from: that.from, type: 1 })
.then(res => {
that.now_money = add(
price,
parseInt(that.userInfo.now_money)
);
that.userInfo.brokerage_price = sub(
that.userInfo.brokerage_price,
price
);
that.money = "";
return that.$dialog.toast({ mes: res.msg });
})
.catch(res => {
that.$dialog.toast({ mes: res.msg });
content: "转入余额无法在转出,请确认转入?",
success: function(res) {
if (res.confirm) {
rechargeWechat({ price: price, from: that.from, type: 1 })
.then(res => {
that.now_money = add(
price,
parseInt(that.userInfo.now_money)
);
that.userInfo.brokerage_price = sub(
that.userInfo.brokerage_price,
price
);
that.money = "";
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
}
},
{
txt: "取消",
color: false,
callback: () => {
return that.$dialog.toast({ mes: "已取消" });
}
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
} else if (res.cancel) {
uni.showToast({
title: "已取消",
icon: "none",
duration: 2000
});
return;
}
]
}
});
} else {
if (price === 0) {
return that.$dialog.toast({ mes: "请输入您要充值的金额" });
uni.showToast({
title: "请输入您要充值的金额",
icon: "none",
duration: 2000
});
return;
} else if (price < 0.01) {
return that.$dialog.toast({ mes: "充值金额不能低于0.01" });
uni.showToast({
title: "充值金额不能低于0.01",
icon: "none",
duration: 2000
});
return;
}
rechargeWechat({ price: price, from: that.from })
.then(res => {
var data = res.data;
if (data.type == "weixinh5") {
location.replace(data.data.mweb_url);
this.$dialog.confirm({
mes: "充值余额",
opts: [
{
txt: "已充值",
color: false,
callback: () => {
that.$yrouter.replace({
path: "/user/account"
});
}
},
{
txt: "查看余额",
color: false,
callback: () => {
that.$yrouter.replace({
path: "/user/account"
});
}
uni.showModal({
title: "提示",
content: "充值余额",
confirmText: "已充值",
cancelText: "查看余额",
success: function(res) {
if (res.confirm) {
that.$yrouter.replace({
path: "/user/account"
});
} else if (res.cancel) {
that.$yrouter.replace({
path: "/user/account"
});
}
]
}
});
} else {
weappPay(data.data)
@ -138,15 +157,27 @@ export default {
price,
parseInt(that.userInfo.now_money)
);
that.$dialog.toast({ mes: "支付成功" });
uni.showToast({
title: "支付成功",
icon: "success",
duration: 2000
});
})
.catch(function() {
that.$dialog.toast({ mes: "支付失败" });
uni.showToast({
title: "支付失败",
icon: "none",
duration: 2000
});
});
}
})
.catch(res => {
that.$dialog.toast({ mes: res.msg });
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
}
}
@ -185,7 +216,7 @@ export default {
padding-bottom: 0.2rem;
border-bottom: 1px dashed #ddd;
}
.recharge .info-wrapper .money span {
.recharge .info-wrapper .money text {
font-size: 0.56rem;
color: #333;
font-weight: bold;
@ -221,7 +252,7 @@ export default {
line-height: 1.5;
padding: 0 0.3rem;
}
.recharge .info-wrapper .tips span {
.recharge .info-wrapper .tips text {
color: #ef4a49;
}
.recharge .info-wrapper .pay-btn {

View File

@ -1,23 +1,23 @@
<template>
<div class="register absolute">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" />
</div>
</div>
<div class="whiteBg">
<div class="title">注册账号</div>
<div class="list">
<div class="item">
<div>
<view class="register absolute">
<view class="shading">
<view class="pictrue acea-row row-center-wrapper">
<image src="@/assets/images/logo.png" />
</view>
</view>
<view class="whiteBg">
<view class="title">注册账号</view>
<view class="list">
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg>
<input type="text" placeholder="输入手机号码" />
</div>
</div>
<div class="item">
<div class="align-left">
</view>
</view>
<view class="item">
<view class="align-left">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" />
</svg>
@ -28,25 +28,25 @@
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</div>
</div>
<div class="item">
<div>
</view>
</view>
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" />
</svg>
<input type="text" placeholder="填写您的登录密码" />
</div>
</div>
</div>
<div class="logon">注册</div>
<div class="tip">
</view>
</view>
</view>
<view class="logon">注册</view>
<view class="tip">
已有账号?
<span @click="goLogin()" class="font-color-red">立即登录</span>
</div>
</div>
<div class="bottom"></div>
</div>
<text @click="goLogin()" class="font-color-red">立即登录</text>
</view>
</view>
<view class="bottom"></view>
</view>
</template>
<script>

View File

@ -1,23 +1,23 @@
<template>
<div class="register absolute">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<img src="@/assets/images/logo.png" />
</div>
</div>
<div class="whiteBg">
<div class="title">找回密码</div>
<div class="list">
<div class="item">
<div>
<view class="register absolute">
<view class="shading">
<view class="pictrue acea-row row-center-wrapper">
<image src="@/assets/images/logo.png" />
</view>
</view>
<view class="whiteBg">
<view class="title">找回密码</view>
<view class="list">
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="align-left">
</view>
</view>
<view class="item">
<view class="align-left">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" />
</svg>
@ -28,24 +28,24 @@
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</div>
</div>
<div class="item">
<div>
</view>
</view>
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" />
</svg>
<input type="password" placeholder="填写您的登录密码" v-model="password" />
</div>
</div>
</div>
<div class="logon" @click="registerReset">确认</div>
<div class="tip">
<span @click="goLogin()" class="font-color-red">立即登录</span>
</div>
</div>
<div class="bottom"></div>
</div>
</view>
</view>
</view>
<view class="logon" @click="registerReset">确认</view>
<view class="tip">
<text @click="goLogin()" class="font-color-red">立即登录</text>
</view>
</view>
<view class="bottom"></view>
</view>
</template>
<script>
@ -98,12 +98,21 @@ export default {
password: that.password
})
.then(res => {
that.$dialog.success(res.msg).then(() => {
that.$yrouter.push({ name: "Login" });
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000,
complete: () => {
that.$yrouter.push({ name: "Login" });
}
});
})
.catch(res => {
that.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
async code() {
@ -123,11 +132,19 @@ export default {
}
registerVerify({ phone: that.account })
.then(res => {
that.$dialog.success(res.msg);
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.sendCode();
})
.catch(res => {
that.$dialog.error(res.msg);
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
}
}

View File

@ -1,148 +1,152 @@
<template>
<div class="user">
<div class="header bg-color-red acea-row row-between-wrapper">
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="userInfo.avatar" />
</div>
<div class="text">
<div class="acea-row row-middle">
<div class="name line1">{{ userInfo.nickname }}</div>
<div class="member acea-row row-middle" v-if="userInfo.vip">
<img :src="userInfo.vipIcon" />
{{ userInfo.vipName }}
</div>
</div>
<div @click="goPersonalData()" class="id" v-if="userInfo.phone">
ID{{ userInfo.uid || 0}}
<span class="iconfont icon-bianji1"></span>
</div>
<view class="user">
<view class="header bg-color-red acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="userInfo.avatar" />
</view>
<view class="text">
<view class="acea-row row-middle">
<view class="name line1">{{ userInfo.nickname }}</view>
<view class="member acea-row row-middle" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" />
<text>{{ userInfo.vipName }}</text>
</view>
</view>
<view @click="goPersonalData()" class="id" v-if="userInfo.phone">
<text>ID{{ userInfo.uid || 0}}</text>
<text class="iconfont icon-bianji1"></text>
</view>
<button
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
class="binding"
v-else
>
<span>绑定手机号</span>
<text>绑定手机号</text>
</button>
</div>
</div>
<span class="iconfont icon-shezhi" @click="goPersonalData()"></span>
</div>
<div class="wrapper">
<div class="nav acea-row row-middle">
<div @click="goUserAccount()" class="item">
<div>我的余额</div>
<div class="num">{{ userInfo.nowMoney || 0 }}</div>
</div>
<div
</view>
</view>
<text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
</view>
<view class="wrapper">
<view class="nav acea-row row-middle">
<view @click="goUserAccount()" class="item">
<text>我的余额</text>
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
</view>
<view
@click="goUserPromotion()"
class="item"
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
>
<div>当前佣金</div>
<div class="num">{{ userInfo.brokeragePrice || 0 }}</div>
</div>
<div @click="goIntegral()" class="item" v-else>
<div>当前积分</div>
<div class="num">{{ userInfo.integral || 0 }}</div>
</div>
<div @click="goUserCoupon()" class="item">
<div>优惠券</div>
<div class="num">{{ userInfo.couponCount || 0 }}</div>
</div>
</div>
<div class="myOrder">
<div class="title acea-row row-between-wrapper">
<div>我的订单</div>
<div @click="goMyOrder()" class="allOrder">
<text>当前佣金</text>
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
</view>
<view @click="goIntegral()" class="item" v-else>
<text>当前积分</text>
<text class="num">{{ userInfo.integral || 0 }}</text>
</view>
<view @click="goUserCoupon()" class="item">
<text>优惠券</text>
<text class="num">{{ userInfo.couponCount || 0 }}</text>
</view>
</view>
<view class="myOrder">
<view class="title acea-row row-between-wrapper">
<text>我的订单</text>
<text @click="goMyOrder()" class="allOrder">
全部订单
<span class="iconfont icon-jiantou"></span>
</div>
</div>
<div class="orderState acea-row row-middle">
<div @click="goMyOrder(0)" class="item">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" />
<span
<text class="iconfont icon-jiantou"></text>
</text>
</view>
<view class="orderState acea-row row-middle">
<view @click="goMyOrder(0)" class="item">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" />
<text
class="order-status-num"
v-if="orderStatusNum.unpaidCount > 0"
>{{ orderStatusNum.unpaidCount }}</span>
</div>
<div>待付款</div>
</div>
<div @click="goMyOrder(1)" class="item">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" />
<span
>{{ orderStatusNum.unpaidCount }}</text>
</view>
<view>待付款</view>
</view>
<view @click="goMyOrder(1)" class="item">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" />
<text
class="order-status-num"
v-if="orderStatusNum.unshippedCount > 0"
>{{ orderStatusNum.unshippedCount }}</span>
</div>
<div>待发货</div>
</div>
<div @click="goMyOrder(2)" class="item">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" />
<span
>{{ orderStatusNum.unshippedCount }}</text>
</view>
<view>待发货</view>
</view>
<view @click="goMyOrder(2)" class="item">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" />
<text
class="order-status-num"
v-if="orderStatusNum.receivedCount > 0"
>{{ orderStatusNum.receivedCount }}</span>
</div>
<div>待收货</div>
</div>
<div @click="goMyOrder(3)" class="item">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" />
<span
>{{ orderStatusNum.receivedCount }}</text>
</view>
<text>待收货</text>
</view>
<view @click="goMyOrder(3)" class="item">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" />
<text
class="order-status-num"
v-if="orderStatusNum.evaluatedCount > 0"
>{{ orderStatusNum.evaluatedCount }}</span>
</div>
<div>待评价</div>
</div>
<div @click="goReturnList()" class="item">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" />
<span
>{{ orderStatusNum.evaluatedCount }}</text>
</view>
<text>待评价</text>
</view>
<view @click="goReturnList()" class="item">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" />
<text
class="order-status-num"
v-if="orderStatusNum.refundCount > 0"
>{{ orderStatusNum.refundCount }}</span>
</div>
<div>售后/退款</div>
</div>
</div>
</div>
<div class="myService">
<div class="title acea-row row-middle">我的服务</div>
<div class="serviceList acea-row row-middle">
>{{ orderStatusNum.refundCount }}</text>
</view>
<text>售后/退款</text>
</view>
</view>
</view>
<view class="myService">
<view class="title acea-row row-middle">
<text>我的服务</text>
</view>
<view class="serviceList acea-row row-middle">
<template v-for="(item, MyMenusIndex) in MyMenus">
<div class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
<div class="pictrue">
<img :src="item.pic" />
</div>
<div>{{ item.name }}</div>
</div>
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view>{{ item.name }}</view>
</view>
</template>
<!--<div-->
<!--class="item"-->
<!--@click="changeswitch(true)"-->
<!--v-if="userInfo.phone && isWeixin"-->
<!--&gt;-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></div>-->
<!--<div>账号切换</div>-->
<!--</div>-->
</div>
</div>
</div>
<p style="text-align: center;margin-top: 1rem">By@意象</p>
<div class="footer-line-height"></div>
</view>
</view>
<!--<view -->
<!--class="item"-->
<!--@click="changeswitch(true)"-->
<!--v-if="userInfo.phone && isWeixin"-->
<!--&gt;-->
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></view>-->
<!--<view>账号切换</!--<view>-->
<!--</!--<view>-->
<!-- </view>
</view>-->
</view>
<view style="text-align: center;margin-top: 1rem">By@意象</view>
<view class="footer-line-height"></view>
<SwitchWindow
v-on:changeswitch="changeswitch"
:switchActive="switchActive"
:login_type="userInfo.login_type"
></SwitchWindow>
</div>
</view>
</template>
<script>
import { getUser, getMenuUser, bindingPhone } from "@/api/user";
@ -186,7 +190,9 @@ export default {
goMyOrder(type) {
this.$yrouter.push({
path: "/pages/order/MyOrder/index",
query: { type }
query: {
type
}
});
},
goUserCoupon() {
@ -199,7 +205,9 @@ export default {
this.$yrouter.push("/pages/user/promotion/UserPromotion/index");
},
goUserAccount() {
this.$yrouter.push({ path: "/pages/user/UserAccount/index" });
this.$yrouter.push({
path: "/pages/user/UserAccount/index"
});
},
goPersonalData() {
this.$yrouter.push("/pages/user/PersonalData/index");
@ -207,7 +215,9 @@ export default {
getPhoneNumber: function(e) {
console.log(e.mp.detail);
if (e.mp.detail.errMsg == "getPhoneNumber:ok") {
uni.showLoading({ title: "绑定中" });
uni.showLoading({
title: "绑定中"
});
wx.login({
success: loginRes => {
bindingPhone({
@ -263,18 +273,31 @@ export default {
url === "/pages/user/promotion/UserPromotion/index" &&
this.userInfo.statu === 1
) {
if (!this.userInfo.isPromoter)
return this.$dialog.toast({ mes: "您还没有推广权限!!" });
if (!this.userInfo.isPromoter) {
uni.showToast({
title: "您还没有推广权限!!",
icon: "none",
duration: 2000
});
return;
}
}
if (
url === "/pages/orderAdmin/OrderIndex/index" &&
!this.userInfo.adminid
) {
return this.$dialog.toast({ mes: "您还不是管理员!!" });
uni.showToast({
title: "您还不是管理员!!",
icon: "none",
duration: 2000
});
return;
}
this.$yrouter.push({ path: this.MyMenus[index].uniapp_url });
this.$yrouter.push({
path: this.MyMenus[index].uniapp_url
});
}
},
onShow() {
@ -289,6 +312,7 @@ export default {
.footer-line-height {
height: 1rem;
}
.order-status-num {
min-width: 0.33rem;
background-color: #fff;
@ -305,9 +329,11 @@ export default {
.pictrue {
position: relative;
}
.switch-h5 {
margin-left: 0.2rem;
}
.binding {
margin-top: 0.1rem;
display: inline-block;

View File

@ -1,40 +1,40 @@
<template>
<div class="my-account">
<div class="wrapper">
<div class="header">
<div class="headerCon">
<div class="account acea-row row-top row-between">
<div class="assets">
<div>总资产()</div>
<div class="money">{{ now_money }}</div>
</div>
</div>
<div class="cumulative acea-row row-top">
<div class="item">
<div>累计消费()</div>
<div class="money">{{ orderStatusSum }}</div>
</div>
</div>
</div>
</div>
<div class="nav acea-row row-middle">
<div class="item" @click="goUserBill(0)">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/record1.png'" />
</div>
<div>账单记录</div>
</div>
<div class="item" @click="goUserBill(1)">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/record2.png'" />
</div>
<div>消费记录</div>
</div>
</div>
<div class="advert acea-row row-between-wrapper"></div>
</div>
<view class="my-account">
<view class="wrapper">
<view class="header">
<view class="headerCon">
<view class="account acea-row row-top row-between">
<view class="assets">
<view>总资产()</view>
<view class="money">{{ now_money }}</view>
</view>
</view>
<view class="cumulative acea-row row-top">
<view class="item">
<view>累计消费()</view>
<view class="money">{{ orderStatusSum }}</view>
</view>
</view>
</view>
</view>
<view class="nav acea-row row-middle">
<view class="item" @click="goUserBill(0)">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/record1.png'" />
</view>
<view>账单记录</view>
</view>
<view class="item" @click="goUserBill(1)">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/record2.png'" />
</view>
<view>消费记录</view>
</view>
</view>
<view class="advert acea-row row-between-wrapper"></view>
</view>
<Recommend></Recommend>
</div>
</view>
</template>
<script>
import Recommend from "@/components/Recommend";
@ -74,7 +74,11 @@ export default {
that.recharge = res.data.recharge;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -86,8 +90,12 @@ export default {
that.activity.is_pink = res.data.is_pink;
that.activity.is_seckill = res.data.is_seckill;
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
}

View File

@ -1,30 +1,30 @@
<template>
<div class="bill-details" ref="container">
<div class="nav acea-row">
<div class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</div>
<div class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</div>
</div>
<div class="sign-record">
<div class="list">
<div class="item" v-for="(item, listIndex) in list" :key="listIndex">
<div class="data">{{ item.time }}</div>
<div class="listn" v-for="(val, key) in item.list" :key="key">
<div class="itemn acea-row row-between-wrapper">
<div>
<div class="name line1">{{ val.title }}</div>
<div>{{ val.add_time }}</div>
</div>
<div
<view class="bill-details" ref="container">
<view class="nav acea-row">
<view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view>
<view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view>
</view>
<view class="sign-record">
<view class="list">
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, key) in item.list" :key="key">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.add_time }}</view>
</view>
<view
class="num"
:class="val.pm == 0 ? 'font-color-red' : ''"
>{{ val.pm == 0 ? "-" : "+" }}{{ val.number }}</div>
</div>
</div>
</div>
</div>
</div>
>{{ val.pm == 0 ? "-" : "+" }}{{ val.number }}</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user";
@ -95,8 +95,12 @@ export default {
that.where.page = that.where.page + 1;
that.list.push.apply(that.list, res.data);
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
}

View File

@ -1,82 +1,78 @@
<template>
<div class="member-center">
<div class="header">
<div class="slider-banner banner">
<view class="member-center">
<view class="header">
<view class="slider-banner banner">
<swiper indicatorDots="true" @change="swiperChange">
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
<swiper-item>
<div class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <img :src="item.icon" />-->
<div class="name">{{ item.name }}</div>
<div class="discount">
<view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <image :src="item.icon" />-->
<view class="name">{{ item.name }}</view>
<view class="discount">
可享受商品折扣: {{ item.discount / 10 }}折
<span class="iconfont icon-zhekou"></span>
</div>
<div class="nav acea-row" v-if="item.grade == grade">
<div class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<div class="num">{{ val.newNumber }}</div>
<div>{{ val.realName }}</div>
</div>
</div>
<div class="lock" v-if="item.grade > grade">
<span class="iconfont icon-quanxianguanlisuozi"></span>该会员等级尚未解锁
</div>
<div class="lock" v-if="item.grade < grade">
<span class="iconfont icon-xuanzhong1"></span>已解锁更高等级
</div>
</div>
<text class="iconfont icon-zhekou"></text>
</view>
<view class="nav acea-row" v-if="item.grade == grade">
<view class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<view class="num">{{ val.newNumber }}</view>
<view>{{ val.realName }}</view>
</view>
</view>
<view class="lock" v-if="item.grade > grade">
<text class="iconfont icon-quanxianguanlisuozi"></text>该会员等级尚未解锁
</view>
<view class="lock" v-if="item.grade < grade">
<text class="iconfont icon-xuanzhong1"></text>已解锁更高等级
</view>
</view>
</swiper-item>
</block>
</swiper>
</div>
</div>
<div class="wrapper">
<div class="title acea-row row-between-wrapper">
<div>
<span class="iconfont icon-jingyanzhi"></span>会员升级要求
</div>
<div class="num">
<span class="current">{{ taskCount }}</span>
</view>
</view>
<view class="wrapper">
<view class="title acea-row row-between-wrapper">
<view>
<text class="iconfont icon-jingyanzhi"></text>会员升级要求
</view>
<view class="num">
<text class="current">{{ taskCount }}</text>
/{{ vipRequire.length }}
</div>
</div>
<div class="list">
<div class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<div class="top acea-row row-between-wrapper">
<div class="name">
</view>
</view>
<view class="list">
<view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<view class="top acea-row row-between-wrapper">
<view class="name">
{{ item.name
}}
<span
class="iconfont icon-wenti"
v-if="item.illustrate"
@click="showGrow(item)"
></span>
</div>
<div>{{ item.finish ? "已满足条件" : "未满足条件" }}</div>
</div>
<div class="cu-progress">
<div class="bg-red" :style="{ width: item.speed + '%' }"></div>
</div>
<div class="experience acea-row row-between-wrapper">
<div>{{ item.taskTypeTitle }}</div>
<div>
<span class="num">{{ item.newNumber }}</span>
<text class="iconfont icon-wenti" v-if="item.illustrate" @click="showGrow(item)"></text>
</view>
<view>{{ item.finish ? "已满足条件" : "未满足条件" }}</view>
</view>
<view class="cu-progress">
<view class="bg-red" :style="{ width: item.speed + '%' }"></view>
</view>
<view class="experience acea-row row-between-wrapper">
<view>{{ item.taskTypeTitle }}</view>
<view>
<text class="num">{{ item.newNumber }}</text>
/{{ item.number }}
</div>
</div>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</view>
<Recommend></Recommend>
<div class="growthValue" :class="growthValue === false ? 'on' : ''">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" />
<span class="iconfont icon-guanbi3" @click="growthTap"></span>
</div>
<div class="conter">{{ illustrate }}</div>
</div>
<div class="mask" :hidden="growthValue" @click="growthTap"></div>
</div>
<view class="growthValue" :class="growthValue === false ? 'on' : ''">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/value.jpg'" />
<text class="iconfont icon-guanbi3" @click="growthTap"></text>
</view>
<view class="conter">{{ illustrate }}</view>
</view>
<view class="mask" :hidden="growthValue" @click="growthTap"></view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -168,7 +164,11 @@ export default {
that.taskCount = res.data.task.reachCount;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
);
},
@ -181,7 +181,11 @@ export default {
that.taskCount = res.data.reach_count;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
);
},

View File

@ -1,19 +1,19 @@
<template>
<div class="addAddress absolute">
<div class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">姓名</div>
<view class="addAddress absolute">
<view class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">姓名</view>
<input type="text" placeholder="请输入姓名" v-model="userAddress.realName" required />
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">联系电话</div>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">联系电话</view>
<input type="text" placeholder="请输入联系电话" v-model="userAddress.phone" required />
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">所在地区</div>
<div class="picker acea-row row-between-wrapper select-value form-control">
<div class="address">
<div slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</div>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">所在地区</view>
<view class="picker acea-row row-between-wrapper select-value form-control">
<view class="address">
<view slot="right" @click.stop="show2 = true">{{ model2 || "请选择收货地址" }}</view>
<vant-popup :show="show2" position="bottom" @close="closeaArea">
<vant-area
:area-list="district"
@ -23,31 +23,31 @@
@confirm="result2"
/>
</vant-popup>
</div>
<div class="iconfont icon-dizhi font-color-red"></div>
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">详细地址</div>
</view>
<view class="iconfont icon-dizhi font-color-red"></view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">详细地址</view>
<input type="text" placeholder="请填写具体地址" v-model="userAddress.detail" required />
</div>
</div>
<div class="default acea-row row-middle">
<div class="select-btn">
<div class="checkbox-wrapper">
</view>
</view>
<view class="default acea-row row-middle">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="ChangeIsDefault">
<label class="well-check">
<checkbox value :checked="userAddress.isDefault ? true : false"></checkbox>
<span class="def">设置为默认地址</span>
<text class="def">设置为默认地址</text>
</label>
</checkbox-group>
</div>
</div>
</div>
<div></div>
<div class="keepBnt bg-color-red" @click="submit">立即保存</div>
<div class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</div>
</div>
</view>
</view>
</view>
<view></view>
<view class="keepBnt bg-color-red" @click="submit">立即保存</view>
<view class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</view>
</view>
</template>
<script type="text/babel">
// import { CitySelect } from "vue-ydui/dist/lib.rem/cityselect";
@ -130,12 +130,30 @@ export default {
post_code: ""
};
postAddress(data).then(function() {
if (that.id) that.$dialog.toast({ mes: "修改成功" });
else that.$dialog.toast({ mes: "添加成功" });
if (that.id) {
uni.showToast({
title: "修改成功",
icon: "none",
duration: 2000
});
} else {
uni.showToast({
title: "已取消绑定",
icon: "none",
duration: 2000
});
that.$yrouter.replace({
path: "/pages/user/PersonalData/index"
});
}
that.$yrouter.go(-1);
});
} catch (e) {
this.$dialog.error(e.msg);
} catch (err) {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
},
ChangeIsDefault: function() {

View File

@ -1,30 +1,30 @@
<template>
<div
<view
class="address-management"
:class="addressList.length < 1 && page > 1 ? 'on' : ''"
ref="container"
>
<div class="line" v-if="addressList.length > 0">
<img :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</div>
<div class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<div class="address">
<div class="consignee">
<view class="line" v-if="addressList.length > 0">
<image :src="$VUE_APP_RESOURCES_URL+'/images/line.jpg'" />
</view>
<view class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<view class="address">
<view class="consignee">
收货人:{{ item.realName }}
<span class="phone">{{ item.phone }}</span>
</div>
<div>
<text class="phone">{{ item.phone }}</text>
</view>
<view>
收货地址:{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</div>
</div>
<div class="operation acea-row row-between-wrapper">
<div class="select-btn">
<div class="checkbox-wrapper">
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)">
<label class="well-check">
<checkbox value :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<span class="default">设为默认</span>
<text class="default">设为默认</text>
</label>
</checkbox-group>
<!-- <label class="well-check">
@ -36,39 +36,39 @@
@click="radioChange(addressListIndex)"
/>
<i class="icon"></i>
<span class="default">设为默认</span>
<text class="default">设为默认</text>
</label>-->
</div>
</div>
<div class="acea-row row-middle">
<div @click="editAddress(addressListIndex)">
<span class="iconfont icon-bianji"></span>编辑
</div>
<div @click="delAddress(addressListIndex)">
<span class="iconfont icon-shanchu"></span>删除
</div>
</div>
</div>
</div>
</view>
</view>
<view class="acea-row row-middle">
<view @click="editAddress(addressListIndex)">
<text class="iconfont icon-bianji"></text>编辑
</view>
<view @click="delAddress(addressListIndex)">
<text class="iconfont icon-shanchu"></text>删除
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<div class="noCommodity" v-if="addressList.length < 1 && page > 1">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</div>
</div>
<div style="height:100rpx;"></div>
<div class="footer acea-row row-between-wrapper">
<div class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址
</div>
<div class="addressBnt on bg-color-red" v-else @click="addAddress">
<span class="iconfont icon-tianjiadizhi"></span>添加新地址
</div>
<!--<div class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<span class="iconfont icon-weixin2"></span>导入微信地址-->
<!--</div>-->
</div>
</div>
<view class="noCommodity" v-if="addressList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noAddress.png'" class="image" />
</view>
</view>
<view style="height:100rpx;"></view>
<view class="footer acea-row row-between-wrapper">
<view class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<view class="addressBnt on bg-color-red" v-else @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<!--<view class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<text class="iconfont icon-weixin2"></text>导入微信地址-->
<!--</view>-->
</view>
</view>
</template>
<style scoped>
.address-management.on {
@ -108,7 +108,7 @@ export default {
onReachBottom() {
!this.loading && this.AddressList();
},
onShow:function(){
onShow: function() {
this.refresh();
},
methods: {
@ -152,9 +152,11 @@ export default {
let address = this.addressList[index];
let id = address.id;
getAddressRemove(id).then(function() {
that.$dialog.toast({
mes: "删除成功!",
callback: () => {
uni.showToast({
title: "删除成功!",
icon:"success",
duration: 2000,
complete: () => {
that.addressList.splice(index, 1);
that.$set(that, "addressList", that.addressList);
}
@ -200,11 +202,19 @@ export default {
// this.addressList = [];
// this.AddressList();
// uni.hideLoading();
// this.$dialog.toast({ mes: "添加成功" });
// uni.showToast({
// title: "添加成功",
// icon: 'success',
// duration: 2000
// });
// })
// .catch(err => {
// uni.hideLoading();
// this.$dialog.error(err.msg || "添加失败");
// uni.showToast({
// title: err.msg || err.response.data.msg,
// icon: 'none',
// duration: 2000
// });
// });
// });
}

View File

@ -1,39 +1,39 @@
<template>
<div ref="container">
<div class="coupon-list" v-if="couponsList.length > 0">
<div
<view ref="container">
<view class="coupon-list" v-if="couponsList.length > 0">
<view
class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList"
:key="couponsListIndex"
>
<div class="money" :class="item.isUse ? 'moneyGray' : ''">
<view class="money" :class="item.isUse ? 'moneyGray' : ''">
<span class="num">{{ item.couponPrice }}</span>
</div>
<div class="text">
<div class="condition line1">购物满{{ item.useMinPrice }}元可用</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.endTime !== 0">
<text class="num">{{ item.couponPrice }}</text>
</view>
<view class="text">
<view class="condition line1">购物满{{ item.useMinPrice }}元可用</view>
<view class="data acea-row row-between-wrapper">
<view v-if="item.endTime !== 0">
<data-format-t :data="item.startTime"></data-format-t>-
<data-format-t :data="item.endTime"></data-format-t>
</div>
<div v-else>不限时</div>
<div class="bnt gray" v-if="item.isUse === true">已领取</div>
<div class="bnt gray" v-else-if="item.isUse === 2">已领完</div>
<div class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</div>
</div>
</div>
</div>
</div>
</view>
<view v-else>不限时</view>
<view class="bnt gray" v-if="item.isUse === true">已领取</view>
<view class="bnt gray" v-else-if="item.isUse === 2">已领完</view>
<view class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<!--暂无优惠券-->
<div class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div>
</div>
</div>
<view class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getCoupon, getCouponReceive } from "@/api/user";
@ -68,10 +68,18 @@ export default {
getCouponReceive(id)
.then(function(res) {
list[index].isUse = true;
that.$dialog.toast({ mes: "领取成功" });
uni.showToast({
title: "领取成功",
icon: "success",
duration: 2000
});
})
.catch(function(res) {
that.$dialog.toast({ mes: res.response.data.msg });
.catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
});
},
getUseCoupons: function() {

View File

@ -1,35 +1,35 @@
<template>
<div ref="container">
<div class="coupon-list" v-if="couponsList.length > 0">
<div
<view ref="container">
<view class="coupon-list" v-if="couponsList.length > 0">
<view
class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList"
:key="couponsListIndex"
>
<div class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<span class="num">{{ item.couponPrice }}</span>
</div>
<div class="text">
<div class="condition line1">{{ item.couponTitle }}</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.endTime === 0">不限时</div>
<div v-else><data-format-t :data="item.addTime"></data-format-t> - <data-format-t :data="item.endTime"></data-format-t></div>
<div class="bnt gray" v-if="item._type === 0">{{ item._msg }}</div>
<div class="bnt bg-color-red" v-else>{{ item._msg }}</div>
</div>
</div>
</div>
</div>
<view class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<text class="num">{{ item.couponPrice }}</text>
</view>
<view class="text">
<view class="condition line1">{{ item.couponTitle }}</view>
<view class="data acea-row row-between-wrapper">
<view v-if="item.endTime === 0">不限时</view>
<view v-else><data-format-t :data="item.addTime"></data-format-t> - <data-format-t :data="item.endTime"></data-format-t></view>
<view class="bnt gray" v-if="item._type === 0">{{ item._msg }}</view>
<view class="bnt bg-color-red" v-else>{{ item._msg }}</view>
</view>
</view>
</view>
</view>
<!--暂无优惠券-->
<div
<view
class="noCommodity"
v-if="couponsList.length === 0 && loading === true"
>
<div class="noPictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</div>
</div>
</div>
<view class="noPictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/noCoupon.png'" class="image" />
</view>
</view>
</view>
</template>
<script>
import { getCouponsUser } from "@/api/user";

View File

@ -1,12 +1,12 @@
<template>
<div class="cash-audit">
<div class="pictrue">
<img :src="$VUE_APP_RESOURCES_URL+'/images/examine.png'" />
</div>
<div class="tip">提现申请已提交等待人工审核</div>
<div class="time">{{ time }}</div>
<div class="bnt bg-color-red" @click="goUserPromotion()">好的</div>
</div>
<view class="cash-audit">
<view class="pictrue">
<image :src="$VUE_APP_RESOURCES_URL+'/images/examine.png'" />
</view>
<view class="tip">提现申请已提交等待人工审核</view>
<view class="time">{{ time }}</view>
<view class="bnt bg-color-red" @click="goUserPromotion()">好的</view>
</view>
</template>
<script>
export default {

View File

@ -1,37 +1,36 @@
<template>
<div class="commission-details" ref="container">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">提现记录</div>
<div class="money">
<span class="num">{{ commission }}</span>
</div>
</div>
<div class="iconfont icon-jinbi1"></div>
</div>
</div>
<div class="sign-record" ref="content">
<div class="list">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="data">{{ item.time }}</div>
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div class="itemn acea-row row-between-wrapper">
<div>
<div class="name line1">{{ val.title }}</div>
<div>{{ val.addTime }}</div>
</div>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div>
<div class="num font-color-red" v-if="val.pm == 0">
-{{ val.number }}
</div>
</div>
</div>
</div>
</div>
</div>
<view class="commission-details" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">提现记录</view>
<view class="money">
<text class="num">{{ commission }}</text>
</view>
</view>
<view class="iconfont icon-jinbi1"></view>
</view>
</view>
<view class="sign-record" ref="content">
<view class="list">
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
<view class="num font-color-red" v-if="val.pm == 0">-{{ val.number }}</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +74,12 @@ export default {
that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data);
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -86,8 +89,12 @@ export default {
res => {
that.commission = res.data.commissionCount;
},
error => {
this.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
);
}

View File

@ -1,36 +1,36 @@
<template>
<div class="commission-details" ref="container">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">佣金明细</div>
<div class="money">
<span class="num">{{ commission }}</span>
</div>
</div>
</div>
</div>
<div class="sign-record" ref="content">
<div class="list">
<div class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<div class="data">{{ item.time }}</div>
<div class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<div class="itemn acea-row row-between-wrapper">
<div>
<div class="name line1">{{ val.title }}</div>
<div>{{ val.addTime }}</div>
</div>
<div class="num" v-if="val.pm == 1">+{{ val.number }}</div>
<div class="num font-color-red" v-if="val.pm == 0">
<view class="commission-details" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">佣金明细</view>
<view class="money">
<text class="num">{{ commission }}</text>
</view>
</view>
</view>
</view>
<view class="sign-record" ref="content">
<view class="list">
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view class="num" v-if="val.pm == 1">+{{ val.number }}</view>
<view class="num font-color-red" v-if="val.pm == 0">
-{{ val.number }}
</div>
</div>
</div>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
@ -75,8 +75,12 @@ export default {
that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data);
},
error => {
that.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -86,8 +90,12 @@ export default {
res => {
that.commission = res.data.commissionCount;
},
error => {
this.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
}

View File

@ -1,16 +1,16 @@
<template>
<div class="distribution-posters">
<div class="slider-banner banner">
<view class="distribution-posters">
<view class="slider-banner banner">
<swiper indicatorDots="true">
<block v-for="(item, infoIndex) in info" :key="infoIndex">
<swiper-item>
<img class="slide-image" :src="item.wap_poster" mode="widthFix" show-menu-by-longpress />
<image class="slide-image" :src="item.wap_poster" mode="widthFix" show-menu-by-longpress />
</swiper-item>
</block>
</swiper>
</div>
<div class="keep bg-color-red" @click="saveImg">保存海报</div>
</div>
</view>
<view class="keep bg-color-red" @click="saveImg">保存海报</view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
@ -64,7 +64,11 @@ export default {
that.info = res.data;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},

View File

@ -1,249 +1,242 @@
<template>
<div class="promoter-list" ref="container">
<div class="header">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">推广人数</div>
<div>
<span class="num">{{ first + second }}</span
>
</div>
</div>
</div>
</div>
<div class="nav acea-row row-around">
<div
class="item"
:class="screen.grade == 0 ? 'on' : ''"
@click="checkGrade(0)"
>
一级({{ first }})
</div>
<div
class="item"
:class="screen.grade == 1 ? 'on' : ''"
@click="checkGrade(1)"
>
二级({{ second }})
</div>
</div>
<div class="search acea-row row-between-wrapper">
<form @submit.prevent="submitForm">
<div class="input">
<input placeholder="点击搜索会员名称" v-model="screen.keyword" />
<span class="iconfont icon-guanbi"></span>
</div>
</form>
<div class="iconfont icon-sousuo2"></div>
</div>
</div>
<div class="list">
<div
class="sortNav acea-row row-middle"
:class="fixedState === true ? 'on' : ''"
>
<div class="sortItem" @click="sort('childCount')">
团队排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="childCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="childCount == 2" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" />
</div>
<div class="sortItem" @click="sort('numberCount')">
金额排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="numberCount == 2" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="numberCount == 3" />
</div>
<div class="sortItem" @click="sort('orderCount')">
订单排序
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" />
<img :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" />
</div>
</div>
<div :class="fixedState === true ? 'sortList' : ''">
<div
class="item acea-row row-between-wrapper"
v-for="(val, spreadListIndex) in spreadList"
:key="spreadListIndex"
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue"><img :src="val.avatar" /></div>
<div class="text">
<div class="name line1">{{ val.nickname }}</div>
<div>加入时间: {{ val.time }}</div>
</div>
</div>
<div class="right">
<div>
<span class="font-color-red">{{ val.childCount }}</span> 人
</div>
<div>{{ val.orderCount }} 单</div>
<div>{{ val.numberCount ? val.numberCount : 0 }} 元</div>
</div>
</div>
</div>
</div>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
<view class="promoter-list" ref="container">
<view class="header">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">推广人数</view>
<view>
<text class="num">{{ first + second }}</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="nav acea-row row-around">
<view class="item" :class="screen.grade == 0 ? 'on' : ''" @click="checkGrade(0)">
一级({{ first }})
</view>
<view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)">
二级({{ second }})
</view>
</view>
<view class="search acea-row row-between-wrapper">
<form @submit.prevent="submitForm">
<view class="input">
<input placeholder="点击搜索会员名称" v-model="screen.keyword" />
<text class="iconfont icon-guanbi"></text>
</view>
</form>
<view class="iconfont icon-sousuo2"></view>
</view>
</view>
<view class="list">
<view class="sortNav acea-row row-middle" :class="fixedState === true ? 'on' : ''">
<view class="sortItem" @click="sort('childCount')">
团队排序
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="childCount == 1" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="childCount == 2" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="childCount == 3" />
</view>
<view class="sortItem" @click="sort('numberCount')">
金额排序
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="numberCount == 1" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="numberCount == 2" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="numberCount == 3" />
</view>
<view class="sortItem" @click="sort('orderCount')">
订单排序
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort1.png'" v-if="orderCount == 1" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort2.png'" v-if="orderCount == 2" />
<image :src="$VUE_APP_RESOURCES_URL+'/images/sort3.png'" v-if="orderCount == 3" />
</view>
</view>
<view :class="fixedState === true ? 'sortList' : ''">
<view class="item acea-row row-between-wrapper" v-for="(val, spreadListIndex) in spreadList" :key="spreadListIndex">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.avatar" />
</view>
<view class="text">
<view class="name line1">{{ val.nickname }}</view>
<view>加入时间: {{ val.time }}</view>
</view>
</view>
<view class="right">
<view>
<text class="font-color-red">{{ val.childCount }}</text> 人
</view>
<view>{{ val.orderCount }} 单</view>
<view>{{ val.numberCount ? val.numberCount : 0 }} 元</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</template>
<script>
import { getSpreadUser } from "@/api/user";
import Loading from "@/components/Loading";
export default {
name: "PromoterList",
components: {
Loading
},
props: {},
data: function() {
return {
fixedState: false,
screen: {
page: 1,
limit: 15,
grade: 0,
keyword: "",
sort: ""
},
childCount: 2,
numberCount: 2,
orderCount: 2,
loaded: false,
loading: false,
spreadList: [],
loadTitle: "",
first: "",
second: ""
};
},
mounted: function() {
this.getSpreadUsers();
},
onReachBottom() {
!this.loading && this.getSpreadUsers();
},
watch: {
"screen.sort": function() {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
methods: {
handleScroll: function() {
// var scrollTop =
// document.documentElement.scrollTop || document.body.scrollTop;
// var offsetTop = document.querySelector(".header").clientHeight;
// if (scrollTop >= offsetTop) {
// this.fixedState = true;
// } else {
// this.fixedState = false;
// }
},
submitForm: function() {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
},
getSpreadUsers: function() {
let that = this,
screen = that.screen;
if (that.loaded || that.loading) return;
that.loading = true;
getSpreadUser(screen).then(
res => {
that.loading = false;
that.spreadList.push.apply(that.spreadList, res.data.list);
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.screen.page = that.screen.page + 1;
that.first = res.data.total;
that.second = res.data.totalLevel;
},
error => {
that.$dialog.message(error.msg);
},
300
);
},
checkGrade: function(val) {
if (val == this.screen.grade) return;
else {
this.screen.page = 1;
this.screen.grade = val;
this.loading = false;
this.loaded = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
sort: function(types) {
let that = this;
switch (types) {
case "childCount":
if (that.childCount == 2) {
that.childCount = 1;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount DESC";
} else if (that.childCount == 1) {
that.childCount = 3;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount ASC";
} else if (that.childCount == 3) {
that.childCount = 2;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "";
}
break;
case "numberCount":
if (that.numberCount == 2) {
that.numberCount = 1;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount DESC";
} else if (that.numberCount == 1) {
that.numberCount = 3;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount ASC";
} else if (that.numberCount == 3) {
that.numberCount = 2;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
case "orderCount":
if (that.orderCount == 2) {
that.orderCount = 1;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount DESC";
} else if (that.orderCount == 1) {
that.orderCount = 3;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount ASC";
} else if (that.orderCount == 3) {
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
default:
that.screen.sort = "";
}
}
}
};
import {
getSpreadUser
} from "@/api/user";
import Loading from "@/components/Loading";
export default {
name: "PromoterList",
components: {
Loading
},
props: {},
data: function() {
return {
fixedState: false,
screen: {
page: 1,
limit: 15,
grade: 0,
keyword: "",
sort: ""
},
childCount: 2,
numberCount: 2,
orderCount: 2,
loaded: false,
loading: false,
spreadList: [],
loadTitle: "",
first: "",
second: ""
};
},
mounted: function() {
this.getSpreadUsers();
},
onReachBottom() {
!this.loading && this.getSpreadUsers();
},
watch: {
"screen.sort": function() {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
methods: {
handleScroll: function() {
// var scrollTop =
// document.documentElement.scrollTop || document.body.scrollTop;
// var offsetTop = document.querySelector(".header").clientHeight;
// if (scrollTop >= offsetTop) {
// this.fixedState = true;
// } else {
// this.fixedState = false;
// }
},
submitForm: function() {
this.screen.page = 0;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
},
getSpreadUsers: function() {
let that = this,
screen = that.screen;
if (that.loaded || that.loading) return;
that.loading = true;
getSpreadUser(screen).then(
res => {
that.loading = false;
that.spreadList.push.apply(that.spreadList, res.data.list);
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.screen.page = that.screen.page + 1;
that.first = res.data.total;
that.second = res.data.totalLevel;
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
},
300
);
},
checkGrade: function(val) {
if (val == this.screen.grade) return;
else {
this.screen.page = 1;
this.screen.grade = val;
this.loading = false;
this.loaded = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
sort: function(types) {
let that = this;
switch (types) {
case "childCount":
if (that.childCount == 2) {
that.childCount = 1;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount DESC";
} else if (that.childCount == 1) {
that.childCount = 3;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "childCount ASC";
} else if (that.childCount == 3) {
that.childCount = 2;
that.orderCount = 2;
that.numberCount = 2;
that.screen.sort = "";
}
break;
case "numberCount":
if (that.numberCount == 2) {
that.numberCount = 1;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount DESC";
} else if (that.numberCount == 1) {
that.numberCount = 3;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "numberCount ASC";
} else if (that.numberCount == 3) {
that.numberCount = 2;
that.orderCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
case "orderCount":
if (that.orderCount == 2) {
that.orderCount = 1;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount DESC";
} else if (that.orderCount == 1) {
that.orderCount = 3;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "orderCount ASC";
} else if (that.orderCount == 3) {
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
default:
that.screen.sort = "";
}
}
}
};
</script>

View File

@ -1,47 +1,52 @@
<template>
<div class="promoter-order" ref="container">
<div class="promoterHeader bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div>
<div class="name">累计推广订单</div>
<div>
<span class="num">{{ count }}</span
>
</div>
</div>
</div>
</div>
<div class="list">
<div class="item" v-for="(item, listIndex) in list" :key="listIndex">
<div class="title acea-row row-column row-center">
<div class="data">{{ item.time }}</div>
<div>本月累计推广订单:{{ item.count ? item.count : 0 }}单</div>
</div>
<div class="listn">
<div class="itenm" v-for="(val, indexn) in item.child" :key="indexn">
<div class="top acea-row row-between-wrapper">
<div class="pictxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="val.avatar" />
</div>
<div class="text line1">{{ val.nickname }}</div>
</div>
<div class="money">
返佣:<span class="font-color-red"
>¥{{ val.number ? val.number : 0 }}</span
>
</div>
</div>
<div class="bottom">
<div><span class="name">订单号:</span>{{ val.orderId }}</div>
<div><span class="name">下单时间:</span>{{ val.time }}</div>
</div>
</div>
</div>
</div>
</div>
<view class="promoter-order" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<text class="name">累计推广订单</text>
<view>
<text class="num">{{ count }}</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="list">
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<view class="title acea-row row-column row-center">
<view class="data">{{ item.time }}</view>
<text>本月累计推广订单:{{ item.count ? item.count : 0 }}单</text>
</view>
<view class="listn">
<view class="itenm" v-for="(val, indexn) in item.child" :key="indexn">
<view class="top acea-row row-between-wrapper">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.avatar" />
</view>
<text class="text line1">{{ val.nickname }}</text>
</view>
<view class="money">
<text>返佣:</text>
<text class="font-color-red">¥{{ val.number ? val.number : 0 }}</text>
</view>
</view>
<view class="bottom">
<view>
<text class="name">订单号:</text>
{{ val.orderId }}
</view>
<view>
<text class="name">下单时间:</text>
{{ val.time }}
</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getSpreadOrder } from "@/api/user";
@ -68,7 +73,7 @@ export default {
mounted: function() {
this.getIndex();
},
onReachBottom() {
onReachBottom() {
!this.loading && this.getIndex();
},
methods: {
@ -85,8 +90,12 @@ export default {
there.list.push.apply(there.list, res.data.list);
there.count = res.data.count;
},
error => {
there.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
},
300
);

View File

@ -1,73 +1,58 @@
<template>
<div class="cash-withdrawal">
<div class="nav acea-row">
<div
<view class="cash-withdrawal">
<view class="nav acea-row">
<view
v-for="(item, navListIndex) in navList"
class="item font-color-red"
@click="swichNav(navListIndex, item)"
:key="navListIndex"
>
<div
class="line bg-color-red"
:class="currentTab === navListIndex ? 'on' : ''"
></div>
<div
class="iconfont"
:class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"
></div>
<div>{{ item.name }}</div>
</div>
</div>
<div class="wrapper">
<div :hidden="currentTab !== 0" class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">微信号</div>
<div class="input">
<view class="line bg-color-red" :class="currentTab === navListIndex ? 'on' : ''"></view>
<view class="iconfont" :class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"></view>
<view>{{ item.name }}</view>
</view>
</view>
<view class="wrapper">
<view :hidden="currentTab !== 0" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">微信号</view>
<view class="input">
<input placeholder="请输入微信号" v-model="post.weixin" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">提现</div>
<div class="input">
<input
:placeholder="'最低提现金额' + minPrice"
v-model="post.money"
/>
</div>
</div>
<div class="tip">当前可提现金额: {{ commissionCount }}</div>
<div class="bnt bg-color-red" @click="submitted">提现</div>
</div>
<div :hidden="currentTab !== 1" class="list">
<div class="item acea-row row-between-wrapper">
<div class="name">用户名</div>
<div class="input">
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
<view :hidden="currentTab !== 1" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">用户名</view>
<view class="input">
<input placeholder="请填写您的支付宝用户名" v-model="post.name" />
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">账号</div>
<div class="input">
<input
placeholder="请填写您的支付宝账号"
v-model="post.alipay_code"
/>
</div>
</div>
<div class="item acea-row row-between-wrapper">
<div class="name">提现</div>
<div class="input">
<input
:placeholder="'最低提现金额' + minPrice"
v-model="post.money"
/>
</div>
</div>
<div class="tip">当前可提现金额: {{ commissionCount }}</div>
<div class="bnt bg-color-red" @click="submitted">提现</div>
</div>
</div>
</div>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">账号</view>
<view class="input">
<input placeholder="请填写您的支付宝账号" v-model="post.alipay_code" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
</view>
</view>
</template>
<script>
import { getBank, postCashInfo } from "@/api/user";
@ -116,7 +101,11 @@ export default {
that.commissionCount = res.data.commissionCount;
},
function(err) {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -131,10 +120,22 @@ export default {
if (
parseFloat(money) > parseFloat(that.commissionCount) ||
parseFloat(that.commissionCount) == 0
)
return that.$dialog.message("余额不足");
if (parseFloat(money) < parseFloat(that.minPrice))
return that.$dialog.message("最低提现金额" + that.minPrice);
) {
uni.showToast({
title: "余额不足",
icon: "none",
duration: 2000
});
return;
}
if (parseFloat(money) < parseFloat(that.minPrice)) {
uni.showToast({
title: "最低提现金额" + that.minPrice,
icon: "none",
duration: 2000
});
return;
}
switch (that.post.extract_type) {
case "alipay":
try {
@ -175,11 +176,19 @@ export default {
save: function(info) {
postCashInfo(info).then(
res => {
this.$dialog.message(res.msg);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.router.push({ path: "/user/audit" });
},
error => {
this.$dialog.message(error.msg);
err => {
uni.showToast({
title: err.msg || err.response.data.msg,
icon: "none",
duration: 2000
});
}
);
}

View File

@ -1,45 +1,45 @@
<template>
<div class="my-promotion">
<div class="header">
<div class="name acea-row row-center-wrapper">
<div>当前佣金</div>
<div class="record" @click="goCashRecord()">
<view class="my-promotion">
<view class="header">
<view class="name acea-row row-center-wrapper">
<view>当前佣金</view>
<view class="record" @click="goCashRecord()">
提现记录
<span class="iconfont icon-xiangyou"></span>
</div>
</div>
<div class="num">{{ Info.commissionCount }}</div>
<div class="profit acea-row row-between-wrapper">
<div class="item">
<div>昨日收益</div>
<div class="money">{{ Info.lastDayCount }}</div>
</div>
<div class="item">
<div>累积已提</div>
<div class="money">{{ Info.extractCount }}</div>
</div>
</div>
</div>
<div class="bnt bg-color-red" @click="toCash">立即提现</div>
<div class="list acea-row row-between-wrapper">
<div class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<span class="iconfont icon-erweima"></span>
<div>推广名片</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<span class="iconfont icon-tongji"></span>
<div>推广人统计</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<span class="iconfont icon-qiandai"></span>
<div>佣金明细</div>
</div>
<div class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<span class="iconfont icon-dingdan"></span>
<div>推广人订单</div>
</div>
</div>
</div>
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
<view class="num">{{ Info.commissionCount }}</view>
<view class="profit acea-row row-between-wrapper">
<view class="item">
<view>昨日收益</view>
<view class="money">{{ Info.lastDayCount }}</view>
</view>
<view class="item">
<view>累积已提</view>
<view class="money">{{ Info.extractCount }}</view>
</view>
</view>
</view>
<view class="bnt bg-color-red" @click="toCash">立即提现</view>
<view class="list acea-row row-between-wrapper">
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<text class="iconfont icon-erweima"></text>
<view>推广名片</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<text class="iconfont icon-tongji"></text>
<view>推广人统计</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<text class="iconfont icon-qiandai"></text>
<view>佣金明细</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<text class="iconfont icon-dingdan"></text>
<view>推广人订单</view>
</view>
</view>
</view>
</template>
<script>
import { getSpreadInfo } from "@/api/user";
@ -83,7 +83,11 @@ export default {
that.Info = res.data;
},
function(err) {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},

View File

@ -1,75 +1,75 @@
<template>
<div class="integral-details" ref="container">
<div class="header">
<div class="currentScore">当前积分</div>
<div>{{ info.integral }}</div>
<div class="line"></div>
<!--<div class="nav acea-row">-->
<!--<div class="item">-->
<!--<div class="num">{{ info.sum_integral }}</div>-->
<!--<div>累计积分</div>-->
<!--</div>-->
<!--<div class="item">-->
<!--<div class="num">{{ info.deduction_integral }}</div>-->
<!--<div>累计消费</div>-->
<!--</div>-->
<!--<div class="item">-->
<!--<div class="num">{{ info.today_integral }}</div>-->
<!--<div>今日获得</div>-->
<!--</div>-->
<!--</div>-->
</div>
<div class="wrapper">
<div class="nav acea-row">
<div
<view class="integral-details" ref="container">
<view class="header">
<view class="currentScore">当前积分</view>
<view>{{ info.integral }}</view>
<view class="line"></view>
<!--<view class="nav acea-row">-->
<!--<view class="item">-->
<!--<view class="num">{{ info.sum_integral }}</view>-->
<!--<view>累计积分</view>-->
<!--</view>-->
<!--<view class="item">-->
<!--<view class="num">{{ info.deduction_integral }}</view>-->
<!--<view>累计消费</view>-->
<!--</view>-->
<!--<view class="item">-->
<!--<view class="num">{{ info.today_integral }}</view>-->
<!--<view>今日获得</view>-->
<!--</view>-->
<!--</view>-->
</view>
<view class="wrapper">
<view class="nav acea-row">
<view
class="item acea-row row-center-wrapper"
:class="current === navListIndex ? 'on' : ''"
v-for="(item, navListIndex) in navList"
:key="navListIndex"
@click="nav(navListIndex)"
>
<span class="iconfont" :class="item.icon"></span>
<text class="iconfont" :class="item.icon"></text>
{{ item.name }}
</div>
</div>
<div class="list" :hidden="current !== 0">
<!--<div class="tip acea-row row-middle">-->
<!--<span class="iconfont icon-shuoming"></span-->
</view>
</view>
<view class="list" :hidden="current !== 0">
<!--<view class="tip acea-row row-middle">-->
<!--<text class="iconfont icon-shuoming"><text-->
<!--&gt;提示:积分数值的高低会直接影响您的会员等级-->
<!--</div>-->
<div
<!--</view>-->
<view
class="item acea-row row-between-wrapper"
v-for="(item, listIndex) in list"
:key="listIndex"
>
<div>
<div class="state">{{ item.title }}</div>
<div>
<view>
<view class="state">{{ item.title }}</view>
<view>
<data-format :data="item.addTime"></data-format>
</div>
</div>
<div class="num" v-if="item.pm == 1">+{{ item.number }}</div>
<div class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</div>
</div>
</div>
<!--<div class="list2" :hidden="current !== 1">-->
<!--<div class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>-->
<!--<div class="name">购买商品可获得积分奖励</div>-->
<!--<div class="earn">赚积分</div>-->
<!--</div>-->
<!--<div-->
</view>
</view>
<view class="num" v-if="item.pm == 1">+{{ item.number }}</view>
<view class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</view>
</view>
</view>
<!--<view class="list2" :hidden="current !== 1">-->
<!--<view class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<view class="name">购买商品可获得积分奖励</view>-->
<!--<view class="earn">赚积分</view>-->
<!--</view>-->
<!--<view-->
<!--class="item acea-row row-between-wrapper"-->
<!--@click="goSignIn()"-->
<!--&gt;-->
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></div>-->
<!--<div class="name">每日签到可获得积分奖励</div>-->
<!--<div class="earn">赚积分</div>-->
<!--</div>-->
<!--</div>-->
</div>
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/score.png'" /></view>-->
<!--<view class="name">每日签到可获得积分奖励</view>-->
<!--<view class="earn">赚积分</view>-->
<!--</view>-->
<!--</view>-->
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getIntegralList, postSignUser } from "@/api/user";
@ -134,7 +134,11 @@ export default {
that.list.push.apply(that.list, res.data);
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
},
@ -145,7 +149,11 @@ export default {
that.info = res.data;
},
err => {
that.$dialog.message(err.msg);
uni.showToast({
title: err.msg || err.response.data.msg,
icon: 'none',
duration: 2000
});
}
);
}

View File

@ -1,101 +1,101 @@
<template>
<div class="sign">
<div class="header bg-color-red">
<div class="headerCon acea-row row-between-wrapper">
<div class="left acea-row row-between-wrapper">
<div class="pictrue">
<img :src="userInfo.avatar" />
</div>
<div class="text">
<div class="line1">{{ userInfo.nickname }}</div>
<div class="integral acea-row">
<span>积分: {{ userInfo.integral }}</span>
</div>
</div>
</div>
<div @click="goSignRecord()" class="right acea-row row-middle">
<div class="iconfont icon-caidan"></div>
<div>明细</div>
</div>
</div>
</div>
<div class="wrapper">
<div class="list acea-row row-between-wrapper">
<div
<view class="sign">
<view class="header bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view class="left acea-row row-between-wrapper">
<view class="pictrue">
<image :src="userInfo.avatar" />
</view>
<view class="text">
<view class="line1">{{ userInfo.nickname }}</view>
<view class="integral acea-row">
<text>积分: {{ userInfo.integral }}</text>
</view>
</view>
</view>
<view @click="goSignRecord()" class="right acea-row row-middle">
<view class="iconfont icon-caidan"></view>
<view>明细</view>
</view>
</view>
</view>
<view class="wrapper">
<view class="list acea-row row-between-wrapper">
<view
class="item"
v-for="(item, signSystemListIndex) in signSystemList"
:key="signSystemListIndex"
>
<div
<view
:class="signSystemListIndex + 1 === signSystemList.length ? 'rewardTxt' : ''"
>{{ item.day }}</div>
<div
>{{ item.day }}</view>
<view
class="venus"
:class="
(signSystemListIndex + 1 === signSystemList.length ? 'reward' : '') +
' ' +
(sign_index >= signSystemListIndex + 1 ? 'venusSelect' : '')
"
></div>
<div
></view>
<view
class="num"
:class="sign_index >= signSystemListIndex + 1 ? 'on' : ''"
>+{{ item.signNum }}</div>
</div>
</div>
>+{{ item.signNum }}</view>
</view>
</view>
<!--加在 but on 为已签到-->
<div
<view
class="but bg-color-red"
:class="userInfo.is_day_sgin ? 'on' : ''"
@click="goSign"
>{{ userInfo.isDaySign ? "已签到" : "立即签到" }}</div>
<div class="lock"></div>
</div>
<div class="wrapper wrapper2">
<div class="tip">已累计签到</div>
<div class="list2 acea-row row-center row-bottom">
<div
>{{ userInfo.isDaySign ? "已签到" : "立即签到" }}</view>
<view class="lock"></view>
</view>
<view class="wrapper wrapper2">
<view class="tip">已累计签到</view>
<view class="list2 acea-row row-center row-bottom">
<view
class="item"
v-for="(item, signCountIndex) in signCount"
:key="signCountIndex"
>{{ item || 0 }}</div>
<div class="data"></div>
</div>
<div class="tip2">据说连续签到第{{ day }}天可获得超额积分一定要坚持签到哦~~~</div>
<div class="list3">
<div
>{{ item || 0 }}</view>
<view class="data"></view>
</view>
<view class="tip2">据说连续签到第{{ day }}天可获得超额积分一定要坚持签到哦~~~</view>
<view class="list3">
<view
class="item acea-row row-between-wrapper"
v-for="(item, signListIndex) in signList"
:key="signListIndex"
>
<div>
<div class="name line1">{{ item.title }}</div>
<div class="data">{{ item.addTime }}</div>
</div>
<div class="num font-color-red">+{{ item.number }}</div>
</div>
<div
<view>
<view class="name line1">{{ item.title }}</view>
<view class="data">{{ item.addTime }}</view>
</view>
<view class="num font-color-red">+{{ item.number }}</view>
</view>
<view
@click="goSignRecord()"
class="Loads acea-row row-center-wrapper"
v-if="signList.length > 0"
>
点击加载更多
<div class="iconfont icon-xiangyou acea-row row-center-wrapper"></div>
</div>
</div>
</div>
<div class="signTip acea-row row-center-wrapper" :class="active === true ? 'on' : ''">
<div class="signTipLight loadingpic">
<img :src="$VUE_APP_RESOURCES_URL+'/images/light.png'" />
</div>
<div class="signTipCon">
<div class="state">签到成功</div>
<div class="integral">获得{{ integral }}积分</div>
<div class="signTipBnt" @click="close">好的</div>
</div>
</div>
<div class="mask" @touchmove.prevent :hidden="active === false"></div>
</div>
<view class="iconfont icon-xiangyou acea-row row-center-wrapper"></view>
</view>
</view>
</view>
<view class="signTip acea-row row-center-wrapper" :class="active === true ? 'on' : ''">
<view class="signTipLight loadingpic">
<image :src="$VUE_APP_RESOURCES_URL+'/images/light.png'" />
</view>
<view class="signTipCon">
<view class="state">签到成功</view>
<view class="integral">获得{{ integral }}积分</view>
<view class="signTipBnt" @click="close">好的</view>
</view>
</view>
<view class="mask" @touchmove.prevent :hidden="active === false"></view>
</view>
</template>
<style scoped>
.Loads .iconfont {
@ -176,8 +176,14 @@ export default {
goSign: function() {
let that = this,
sumSginDay = that.userInfo.sumSignDay;
if (that.userInfo.is_day_sgin)
return that.$dialog.toast({ mes: "您今日已签到!" });
if (that.userInfo.is_day_sgin){
uni.showToast({
title: "您今日已签到!",
icon: "none",
duration: 2000
});
return
}
postSignIntegral().then(res => {
that.active = true;
that.integral = res.data.integral;

View File

@ -1,25 +1,25 @@
<template>
<div class="sign-record" ref="container">
<div class="list">
<div class="item" v-for="(item, signListIndex) in signList" :key="signListIndex">
<div class="data">{{ item.time }}</div>
<div class="listn">
<div
<view class="sign-record" ref="container">
<view class="list">
<view class="item" v-for="(item, signListIndex) in signList" :key="signListIndex">
<view class="data">{{ item.time }}</view>
<view class="listn">
<view
class="itemn acea-row row-between-wrapper"
v-for="(itemn, indexn) in item.list"
:key="indexn"
>
<div>
<div class="name line1">{{ itemn.title }}</div>
<div>{{ itemn.addTime }}</div>
</div>
<div class="num font-color-red">+{{ itemn.number }}</div>
</div>
</div>
</div>
</div>
<view>
<view class="name line1">{{ itemn.title }}</view>
<view>{{ itemn.addTime }}</view>
</view>
<view class="num font-color-red">+{{ itemn.number }}</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</div>
</view>
</template>
<script>
import { getSignMonth } from "@/api/user";