chore(分包): 拆分pages_tooll子包
This commit is contained in:
249
pages_tool/member/other/assets.vue
Normal file
249
pages_tool/member/other/assets.vue
Normal file
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="assets-wrap">
|
||||
<view class="assets-block">
|
||||
<view class="assets-tips"><text>风险提示:确认申请后您的资产将被清空且不可找回!</text></view>
|
||||
<view class="assets-box assets-account">
|
||||
<view class="assets-title">
|
||||
<text class="color-base-bg"></text>
|
||||
<text>账户资产</text>
|
||||
</view>
|
||||
<view class="assets-list">
|
||||
<view class="assets-li">
|
||||
<view>{{ member_info.point }}</view>
|
||||
<view>积分</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>¥{{ member_info.balance_money }}</view>
|
||||
<view>现金余额</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>¥{{ member_info.balance }}</view>
|
||||
<view>储值余额</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>{{ accountInfo.member_coupon_count }}</view>
|
||||
<view>优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="assets-box assets-order">
|
||||
<view class="assets-title">
|
||||
<text class="color-base-bg"></text>
|
||||
<text>订单资产</text>
|
||||
</view>
|
||||
<view class="assets-list">
|
||||
<view class="assets-li">
|
||||
<view>{{ accountInfo.order_pay_count }}</view>
|
||||
<view>待发货</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>{{ accountInfo.order_delivery_count }}</view>
|
||||
<view>待收货</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>{{ accountInfo.order_refund_count }}</view>
|
||||
<view>退款中</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="member_info.is_fenxiao == 1" class="assets-box assets-fenxiao">
|
||||
<view class="assets-title">
|
||||
<text class="color-base-bg"></text>
|
||||
<text>分销资产</text>
|
||||
</view>
|
||||
<view class="assets-list">
|
||||
<view class="assets-li">
|
||||
<view>¥{{ fenxiao_info.account }}</view>
|
||||
<view>可提现佣金</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>¥{{ fenxiao_info.account_withdraw_apply }}</view>
|
||||
<view>提现中佣金</view>
|
||||
</view>
|
||||
<view class="assets-li">
|
||||
<view>{{ accountInfo.fenxiao_order_count }}</view>
|
||||
<view>待结算订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="assets-btn">
|
||||
<button type="primary" @click="prev">上一步</button>
|
||||
<button class="color-base-bg" @click="submit">确认申请</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
accountInfo: {},
|
||||
member_info: {},
|
||||
fenxiao_info: {}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getAccountInfo();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAccountInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/accountInfo',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.accountInfo = res.data;
|
||||
this.member_info = res.data.member_info;
|
||||
if (res.data.member_info.is_fenxiao == 1) {
|
||||
this.fenxiao_info = res.data.fenxiao_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
prev() {
|
||||
this.$util.redirectTo('/pages_tool/member/cancellation');
|
||||
},
|
||||
submit() {
|
||||
uni.showModal({
|
||||
title: '风险提示',
|
||||
content: '确定要注销当前账号吗?',
|
||||
confirmColor: '#000000',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/apply',
|
||||
success: rres => {
|
||||
let cancellation_condition = rres.data.is_audit;
|
||||
if (rres.code >= 0) {
|
||||
this.$util.redirectTo('/pages_tool/member/cancelstatus');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: rres.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.assets-wrap {
|
||||
.assets-block {
|
||||
padding: 0 24rpx;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.assets-tips {
|
||||
width: 100%;
|
||||
height: 56rpx;
|
||||
background-color: rgba(250, 106, 0, 0.2);
|
||||
border-radius: 6rpx;
|
||||
line-height: 56rpx;
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
color: #fa6a00;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.assets-box {
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 6rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.assets-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
text:nth-child(1) {
|
||||
width: 6rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
padding-top: 8rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.assets-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 26rpx 35rpx;
|
||||
margin-top: 53rpx;
|
||||
|
||||
.assets-li {
|
||||
text-align: center;
|
||||
|
||||
view:nth-child(1) {
|
||||
font-size: 36rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
view:nth-child(2) {
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
color: #666666;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.assets-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
|
||||
button {
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
}
|
||||
|
||||
button[type='primary'] {
|
||||
background-color: unset !important;
|
||||
color: #333333;
|
||||
border: 2rpx solid #dddddd;
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
color: var(--btn-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
129
pages_tool/member/other/cancellation.vue
Normal file
129
pages_tool/member/other/cancellation.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="agreement-box">
|
||||
<view class="agreement-intro">
|
||||
<view class="align-center agreement-title">{{ agreement.title }}</view>
|
||||
<rich-text class="agreement-content" :nodes="agreement.content"></rich-text>
|
||||
</view>
|
||||
|
||||
<view class="agreement-btn">
|
||||
<view class="align-center agreement-btn-select">
|
||||
<text v-if="isSelect" class="iconfont icon-dui color-base-text" @click="changeSelect"></text>
|
||||
<text v-else class="iconfont icon-yuan_checkbox" @click="changeSelect"></text>
|
||||
<text class="agreement-text" @click="changeSelect">勾选即表示您已阅读并同意本协议</text>
|
||||
</view>
|
||||
<button class="btn color-base-bg" @click="next">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
agreement: {},
|
||||
isSelect: false
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getCancelAgreement();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCancelAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/agreement',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.agreement = res.data;
|
||||
if (this.agreement.content) this.agreement.content = htmlParser(this.agreement.content);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
changeSelect() {
|
||||
this.isSelect = this.isSelect == true ? false : true;
|
||||
},
|
||||
next() {
|
||||
if (this.isSelect) {
|
||||
this.$util.redirectTo('/pages_tool/member/assets');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '请先勾选同意协议'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.agreement-box {
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement-intro {
|
||||
height: calc(100vh - 210rpx);
|
||||
padding-top: 40rpx;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
|
||||
.agreement-title {
|
||||
font-size: 32rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.agreement-content {
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.agreement-btn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 210rpx;
|
||||
bottom: 0;
|
||||
padding-top: 16rpx;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
|
||||
.agreement-btn-select {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.agreement-btn-select .iconfont {
|
||||
color: #838383;
|
||||
}
|
||||
|
||||
.agreement-text {
|
||||
font-size: 28rpx;
|
||||
color: #838383;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
margin-top: 20rpx;
|
||||
color: var(--btn-text-color);
|
||||
font-size: 28rpx;
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
115
pages_tool/member/other/cancelrefuse.vue
Normal file
115
pages_tool/member/other/cancelrefuse.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="cancel-wrap">
|
||||
<view class="cancel-img">
|
||||
<image :src="$util.img('public/uniapp/member/refuse.png')"></image>
|
||||
</view>
|
||||
<view class="cancel-title">您的申请已拒绝</view>
|
||||
<view class="cancel-reason">拒绝理由:{{ reason }}</view>
|
||||
<view class="cancel-btn">
|
||||
<button type="primary" @click="toIndex">返回</button>
|
||||
<button class="color-base-bg" @click="apply">重新申请</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
reason: ''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/info',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.reason = res.data.reason;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
toIndex() {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
},
|
||||
apply() {
|
||||
this.$util.redirectTo('/pages_tool/member/cancellation');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cancel-wrap {
|
||||
padding-top: 300rpx;
|
||||
text-align: center;
|
||||
|
||||
.cancel-img {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
display: inline-block;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-title {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.cancel-reason {
|
||||
color: #838383;
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 75rpx;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin-top: 173rpx;
|
||||
|
||||
button {
|
||||
width: 300rpx;
|
||||
height: 84rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 84rpx;
|
||||
margin: 0 15rpx;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
button[type='primary'] {
|
||||
background-color: unset !important;
|
||||
color: #333333;
|
||||
border: 2rpx solid #dddddd;
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
188
pages_tool/member/other/cancelstatus.vue
Normal file
188
pages_tool/member/other/cancelstatus.vue
Normal file
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="cancelstatus-wrap">
|
||||
<view class="cancelstatus-block">
|
||||
<view class="cancelstatus-box">
|
||||
<view class="cancelstatus-box-sort color-base-bg">1</view>
|
||||
<view class="cancelstatus-box-con">
|
||||
<view class="cancelstatus-box-name">提交申请</view>
|
||||
<view class="cancelstatus-box-info">您已提交申请,请耐心等待~</view>
|
||||
</view>
|
||||
<view class="cancelstatus-box-line color-base-bg"></view>
|
||||
</view>
|
||||
<view class="cancelstatus-box">
|
||||
<view class="cancelstatus-box-sort color-base-bg">2</view>
|
||||
<view class="cancelstatus-box-con">
|
||||
<view class="cancelstatus-box-name">等待审核</view>
|
||||
<view class="cancelstatus-box-info">等待审核中,审核通过后您的账号将直接被删除</view>
|
||||
</view>
|
||||
<view class="cancelstatus-box-line color-base-bg" :class="{ 'opacity-4': state == 0 }"></view>
|
||||
</view>
|
||||
<view class="cancelstatus-box cancelstatus-box-last">
|
||||
<view class="cancelstatus-box-sort color-base-bg" :class="[state == 1 ? 'opacity' : 'opacity-4']">
|
||||
</view>
|
||||
<view class="cancelstatus-box-con">
|
||||
<view class="cancelstatus-box-name">审核通过,注销完成</view>
|
||||
<view class="cancelstatus-box-info">您已成功注销账号,期待下一次与您相遇</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cancelstatus-btn" v-if="state == 0">
|
||||
<button type="primary" @click="back">返回</button>
|
||||
<button class="color-base-bg" @click="revoke">撤销申请</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
state: 0
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getStatus();
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.state = res.data.status;
|
||||
if (this.state == -1) {
|
||||
this.$util.redirectTo('/pages_tool/member/cancelrefuse');
|
||||
}
|
||||
}
|
||||
|
||||
if (res.code == -1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
},
|
||||
revoke() {
|
||||
uni.showModal({
|
||||
title: '风险提示',
|
||||
content: '确定要撤销申请吗?',
|
||||
confirmColor: '#000000',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/membercancel/api/membercancel/cancelApply',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cancelstatus-wrap {
|
||||
.cancelstatus-block {
|
||||
padding: 50rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
|
||||
.cancelstatus-box-sort {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
border-radius: 50%;
|
||||
color: #ffffff;
|
||||
margin-right: 17rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 1;
|
||||
|
||||
&-4 {
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
.cancelstatus-box-name {
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 3rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box-info {
|
||||
margin-top: 15rpx;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.cancelstatus-box-line {
|
||||
position: absolute;
|
||||
width: 2rpx;
|
||||
height: 164rpx;
|
||||
top: 36rpx;
|
||||
left: 18rpx;
|
||||
}
|
||||
|
||||
&.cancelstatus-box-last {
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cancelstatus-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
|
||||
button {
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
button[type='primary'] {
|
||||
background-color: unset !important;
|
||||
color: #333333;
|
||||
border: 2rpx solid #dddddd;
|
||||
}
|
||||
|
||||
button:nth-child(2) {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
99
pages_tool/member/other/cancelsuccess.vue
Normal file
99
pages_tool/member/other/cancelsuccess.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="cancel-wrap">
|
||||
<view class="cancel-img">
|
||||
<image :src="$util.img('public/uniapp/member/success.png')"></image>
|
||||
</view>
|
||||
<view class="cancel-title">您已成功注销账号</view>
|
||||
<view class="cancel-reason">待下次与您更好的相遇,如需再次使用,请重新注册</view>
|
||||
<view class="cancel-btn"><button class="color-base-bg" @click="success">完成</button></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
state: ''
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
this.getStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStatus() {
|
||||
this.$api.sendRequest({
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.state = res.data.state;
|
||||
if (res.data.state == 1) {
|
||||
this.$store.commit('setToken', '');
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cancel-wrap {
|
||||
padding-top: 84rpx;
|
||||
text-align: center;
|
||||
|
||||
.cancel-img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-title {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.cancel-reason {
|
||||
color: #838383;
|
||||
font-size: 20rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 175rpx;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
width: 100%;
|
||||
margin-top: 173rpx;
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
width: 300rpx;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 0 15rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
96
pages_tool/member/other/collection.vue
Normal file
96
pages_tool/member/other/collection.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view :style="themeColor">
|
||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8" @listenRefresh="listenRefresh"
|
||||
v-if="storeToken">
|
||||
<view class="goods_list" slot="list">
|
||||
<block v-if="collectionList.length > 0">
|
||||
<view class="goods_li margin-top" v-for="(item, index) in collectionList" :key="index"
|
||||
@click.stop="toDetail(item)">
|
||||
<view class="pic">
|
||||
<image :src="$util.img(item.goods_image.split(',')[0], { size: 'mid' })" mode="aspectFill"
|
||||
@error="goodsImageError(index)"></image>
|
||||
</view>
|
||||
<view class="goods_info">
|
||||
<view class="goods_name font-size-base">{{ item.sku_name }}</view>
|
||||
<view class="goods_opection">
|
||||
<view class="left lineheight-clear ">
|
||||
<text class="symbol price-style small">¥</text>
|
||||
<text class="price price-style large">{{
|
||||
parseFloat(item.discount_price).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="symbol price-style small">.{{
|
||||
parseFloat(item.discount_price).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="cars" @click.stop="deleteItem(item.goods_id)">
|
||||
<view class="icon iconfont icon-icon7"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 第一个列表为空时 -->
|
||||
<ns-empty v-if="collectionList.length == 0 && isShowEmpty" text="暂无关注的商品" :isIndex="false"></ns-empty>
|
||||
<ns-goods-recommend ref="goodsRecommend"></ns-goods-recommend>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import collection from '../public/js/collection.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsGoodsRecommend: () => import('@/components/ns-goods-recommend/ns-goods-recommend.vue'),
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
mixins: [collection],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/collection');
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
@import '../public/css/collection.scss';
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
29
pages_tool/member/other/contact.vue
Normal file
29
pages_tool/member/other/contact.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<view class="contact" :style="themeColor">
|
||||
<image :src="$util.img('public/uniapp/member/contact_service.png')" mode="widthFix"></image>
|
||||
<!--<ns-contact><button type="primary">联系客服</button></ns-contact>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad(options) { },
|
||||
onShow() { },
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.contact {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 500rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
272
pages_tool/member/other/footprint.vue
Normal file
272
pages_tool/member/other/footprint.vue
Normal file
@@ -0,0 +1,272 @@
|
||||
<template>
|
||||
<view class="container" :style="themeColor">
|
||||
<view class="head-wrap" v-if="storeToken">
|
||||
<text @click="manageFootprint">{{ manage ? '完成' : '管理' }}</text>
|
||||
</view>
|
||||
<mescroll-uni ref="mescroll" @getData="getListData" top="110rpx" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="goods-list single-column" v-if="goodsList.length">
|
||||
<view v-for="(item, index) in goodsList" :key="index">
|
||||
<view class="datetime">{{ datetime(item) }}</view>
|
||||
<view class="goods-item" :class="{ manage: manage }">
|
||||
<view class="checkbox-wrap" v-if="manage" @click="singleElection(item)">
|
||||
<text class="iconfont"
|
||||
:class="$util.inArray(item.id, idArr) != -1 ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></text>
|
||||
</view>
|
||||
<view class="goods-img" @click="toDetail(item)">
|
||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)">
|
||||
</image>
|
||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap" @click="toDetail(item)">
|
||||
<view class="name-wrap">
|
||||
<view class="goods-name">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="lineheight-clear">
|
||||
<view class="discount-price">
|
||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price price-style large">{{
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
|
||||
<text class="unit price-style small">.{{
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="member-price-tag"
|
||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
||||
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="member-price-tag" v-else-if="item.promotion_type == 1">
|
||||
<image :src="$util.img('public/uniapp/index/discount.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pro-info">
|
||||
<view class="delete-price font-size-activity-tag color-tip price-font"
|
||||
v-if="showMarketPrice(item)">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</view>
|
||||
<view class="sale font-size-activity-tag color-tip" v-if="item.sale_show">已售{{
|
||||
item.sale_num }}{{ item.unit ? item.unit : '件' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else><ns-empty text="暂无浏览过的商品"></ns-empty></view>
|
||||
|
||||
<view class="bottom-wrap" v-if="goodsList.length && manage">
|
||||
<view class="all-election" @click="allElection">
|
||||
<view class="iconfont"
|
||||
:class="isAll ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<text>全选</text>
|
||||
</view>
|
||||
<view class="action-btn"><button type="primary" @click="deleteFootprint()" class="delete"
|
||||
:class="{ disabled: selected }">删除</button></view>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var dateList = [];
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
|
||||
nsLogin: () => import('@/components/ns-login/ns-login.vue'),
|
||||
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
|
||||
MescrollUni: () => import('@/components/mescroll/my-list-mescroll.vue'),
|
||||
// #ifdef MP-WEIXIN
|
||||
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue')
|
||||
// #endif
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goodsList: [],
|
||||
current: -1,
|
||||
manage: false,
|
||||
idArr: [],
|
||||
mescroll: null,
|
||||
isSub: false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/footprint');
|
||||
});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selected() {
|
||||
return this.idArr.length == 0;
|
||||
},
|
||||
isAll() {
|
||||
return this.idArr.length == this.goodsList.length;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getListData(mescroll) {
|
||||
this.mescroll = mescroll;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goodsbrowse/page',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
|
||||
this.goodsList = this.goodsList.concat(newArr); //追加新数据
|
||||
dateList = [];
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
longpress(index) {
|
||||
this.current = index;
|
||||
},
|
||||
deleteFootprint() {
|
||||
if (this.idArr.length == 0) {
|
||||
this.$util.showToast({
|
||||
title: '请选择要删除的数据!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goodsbrowse/delete',
|
||||
data: {
|
||||
id: this.idArr.toString()
|
||||
},
|
||||
success: res => {
|
||||
this.isSub = false;
|
||||
if (res.code >= 0) {
|
||||
this.idArr = [];
|
||||
this.mescroll.resetUpScroll();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
manageFootprint() {
|
||||
this.manage = !this.manage;
|
||||
dateList = [];
|
||||
},
|
||||
goodsImg(imgStr) {
|
||||
let imgs = imgStr.split(',');
|
||||
return imgs[0]
|
||||
? this.$util.img(imgs[0], {
|
||||
size: 'mid'
|
||||
})
|
||||
: this.$util.getDefaultImage().goods;
|
||||
},
|
||||
imgError(index) {
|
||||
dateList = [];
|
||||
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
|
||||
},
|
||||
showPrice(data) {
|
||||
let price = data.discount_price;
|
||||
if (data.member_price && parseFloat(data.member_price) < parseFloat(price)) price = data.member_price;
|
||||
return price;
|
||||
},
|
||||
showMarketPrice(item) {
|
||||
if (item.market_price_show) {
|
||||
let price = this.showPrice(item);
|
||||
if (item.market_price > 0) {
|
||||
return item.market_price;
|
||||
} else if (parseFloat(item.price) > parseFloat(price)) {
|
||||
return item.price;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
goodsTag(data) {
|
||||
return data.label_name || '';
|
||||
},
|
||||
datetime(item) {
|
||||
let date = new Date();
|
||||
date.setTime(item.browse_time * 1000);
|
||||
let y = date.getFullYear();
|
||||
let m = date.getMonth() + 1;
|
||||
m = m < 10 ? '0' + m : m;
|
||||
let d = date.getDate();
|
||||
d = d < 10 ? '0' + d : d;
|
||||
|
||||
var dateTime = y + '/' + m + '/' + d;
|
||||
|
||||
if (this.$util.inArray(dateTime, dateList) == -1) {
|
||||
dateList.push(dateTime);
|
||||
return dateTime;
|
||||
}
|
||||
},
|
||||
singleElection(item) {
|
||||
if (this.$util.inArray(item.id, this.idArr) == -1) {
|
||||
this.idArr.push(item.id);
|
||||
} else {
|
||||
this.idArr.splice(this.$util.inArray(item.id, this.idArr), 1);
|
||||
}
|
||||
dateList = [];
|
||||
},
|
||||
allElection() {
|
||||
if (this.idArr.length != this.goodsList.length) {
|
||||
this.idArr = [];
|
||||
let ids = [];
|
||||
this.goodsList.forEach(item => {
|
||||
ids.push(item.id);
|
||||
});
|
||||
this.idArr = ids;
|
||||
} else {
|
||||
this.idArr = [];
|
||||
}
|
||||
dateList = [];
|
||||
},
|
||||
toDetail(e) {
|
||||
this.$util.redirectTo('/pages_goods/detail', {
|
||||
goods_id: e.goods_id
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function (nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
@import '../public/css/footprint.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user