init
This commit is contained in:
449
pages_tool/member/account.vue
Normal file
449
pages_tool/member/account.vue
Normal file
@@ -0,0 +1,449 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="nc-info-list-content">
|
||||
<view class="list-item balance-item" @click="setBalanceDefault()" v-if="type=='fenxiao' && payList && payList.balance">
|
||||
<view class="item-top">
|
||||
<view class="item-left">
|
||||
<view class="title-text">提现到余额</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="dataList.length > 0">
|
||||
<view class="list-item" v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item-top">
|
||||
<view class="item-left">
|
||||
<view class="title-text">{{ item.withdraw_type_name }}</view>
|
||||
<view class="info-content">
|
||||
<text class="top-title">{{ item.realname }}</text>
|
||||
<text class="top-num">{{ item.mobile }}</text>
|
||||
</view>
|
||||
<view class="content-bottom">
|
||||
<block v-if="item.withdraw_type == 'alipay'">
|
||||
提现账号:{{ item.bank_account }}
|
||||
</block>
|
||||
<block v-if="item.withdraw_type == 'bank'">
|
||||
银行名称 :{{ item.branch_bank_name }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-btn" @click.stop="editAccount('edit', item.id)">修改</view>
|
||||
</view>
|
||||
|
||||
<view class="item-bottom">
|
||||
<view class="account-default" @click="setDefault(item.id,item.is_default)">
|
||||
<text class="default">设为默认账户</text>
|
||||
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
<switch v-else style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
</view>
|
||||
<view class="account-btn">
|
||||
<text class="delete" v-if="item.is_default != 1" @click="deleteAccount(item.id)">
|
||||
<text class="iconfont iconicon7"></text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view v-if="dataList.length <= 0 && (type != 'fenxiao' || (type == 'fenxiao' && payList && !payList.balance))" class="empty-box">
|
||||
<image :src="$util.img('public/uniapp/member/account/empty.png')" mode="widthFix"></image>
|
||||
<view class="tips">暂无账户信息,请添加</view>
|
||||
<button type="primary" class="add-account" @click="editAccount('add')">{{ $lang('newAddAccount') }}</button>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
<view class="btn-add" v-if="dataList.length > 0 || (type == 'fenxiao' && payList && payList.balance)">
|
||||
<button class="add-account" type="primary" @click="editAccount('add')">{{ $lang('newAddAccount') }}</button>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [], //账号列表
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
type: 'member',
|
||||
payList: null
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.type) this.type = option.type;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getTransferType();
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/account');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 编辑提现账户信息
|
||||
editAccount(type, id) {
|
||||
let data = {};
|
||||
data.type = this.type;
|
||||
if (type == 'edit') data.id = id;
|
||||
if (this.back) data.back = this.back;
|
||||
this.$util.redirectTo('/pages_tool/member/account_edit', data);
|
||||
},
|
||||
deleteAccount(id) {
|
||||
uni.showModal({
|
||||
title: '操作提示',
|
||||
content: '确定要删除该账户吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/delete',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: result => {
|
||||
if (result.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: '删除成功'
|
||||
});
|
||||
this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '删除失败'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setDefault(id, is_default) {
|
||||
if (is_default == 1) return;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/setdefault',
|
||||
data: {
|
||||
id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data >= 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.show();
|
||||
this.dataList = [];
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setBalanceDefault() {
|
||||
this.$util.redirectTo(this.back, {
|
||||
'is_balance': 1
|
||||
}, this.redirect);
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
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.dataList = []; //如果是第一页需手动制空列表
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
|
||||
let withdrawType = {
|
||||
bank: '银行',
|
||||
alipay: '支付宝',
|
||||
wechatpay: '微信'
|
||||
};
|
||||
|
||||
this.dataList.forEach(item => {
|
||||
item.withdraw_type_name = withdrawType[item.withdraw_type] ? withdrawType[
|
||||
item.withdraw_type] : '';
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getTransferType() {
|
||||
let url = this.type == "member" ? "/api/memberwithdraw/transferType" :
|
||||
"/fenxiao/api/withdraw/transferType";
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.empty-box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.get-account,
|
||||
.add-account {
|
||||
width: 50%;
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
border-radius: 78rpx;
|
||||
margin-top: 50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.get-account {
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
color: $base-color;
|
||||
border: 2rpx solid $base-color;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.mescroll-downwarp+.empty-box {
|
||||
height: calc(100vh - 260rpx);
|
||||
}
|
||||
|
||||
|
||||
.btn-add {
|
||||
margin-top: 60rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 10;
|
||||
|
||||
.add-account {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
margin: 30rpx 0 30rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zw {
|
||||
margin-top: 250rpx;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 0;
|
||||
padding: 24rpx $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
margin-bottom: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&.balance-item {
|
||||
.item-top {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
|
||||
.item-mr {
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #fff;
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
right: -90rpx;
|
||||
top: -90rpx;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.item-top {
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding-bottom: 26rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 100rpx);
|
||||
|
||||
.title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
display: flex;
|
||||
|
||||
.top-title {
|
||||
font-size: 26rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.top-num {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-bottom {
|
||||
font-size: 26rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.account-default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
color: #666666;
|
||||
|
||||
.default {}
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.account-btn {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.edit {
|
||||
text {
|
||||
vertical-align: center;
|
||||
margin-right: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
background: #F1F1F1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
/deep/ .mescroll-upwarp {
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input {
|
||||
height: 48rpx !important;
|
||||
width: 88rpx !important;
|
||||
}
|
||||
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:after {
|
||||
height: 44rpx !important;
|
||||
width: 44rpx !important;
|
||||
}
|
||||
|
||||
.item-bottom>>>.uni-switch-wrapper .uni-switch-input:before {
|
||||
background-color: #EDEDED !important;
|
||||
height: 44rpx !important;
|
||||
width: 90rpx !important;
|
||||
}
|
||||
</style>
|
||||
324
pages_tool/member/account_edit.vue
Normal file
324
pages_tool/member/account_edit.vue
Normal file
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="account-list-content">
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('name') }}</text>
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('mobilePhone') }}</text>
|
||||
<input class="desc uni-input" type="number" maxlength="11" placeholder="请输入手机号" v-model="formData.mobile" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('accountType') }}</text>
|
||||
<picker @change="bindPickerChange" :value="index" :range="payList" class="picker">
|
||||
<text class="desc uni-input">{{ payList[index] }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="edit-item" v-if="formData.withdraw_type == 'bank'">
|
||||
<text class="tit">银行名称</text>
|
||||
<input class="desc uni-input" type="text" maxlength="50" placeholder="请输入银行名称" v-model.trim="formData.branch_bank_name" />
|
||||
</view>
|
||||
<view class="edit-item" v-if="formData.withdraw_type != 'wechatpay'">
|
||||
<text class="tit">提现账号</text>
|
||||
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入提现账号" v-model.trim="formData.bank_account" />
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="primary" class="add" @click="saveAccount">{{ $lang('save') }}</button>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import validate from 'common/js/validate.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
realname: '',
|
||||
mobile: '',
|
||||
withdraw_type: '',
|
||||
bank_account: '',
|
||||
branch_bank_name: ''
|
||||
},
|
||||
payList: [],
|
||||
index: 0,
|
||||
flag: false,
|
||||
transferType: [],
|
||||
accountInfo: null,
|
||||
back: '',
|
||||
type: 'member'
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.id) this.formData.id = option.id;
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.type) this.type = option.type; // 区分是从会员提现还是从分销提现
|
||||
},
|
||||
onShow() {
|
||||
if (this.formData.id) {
|
||||
this.getAccountDetail(this.formData.id);
|
||||
} else {
|
||||
this.getTransferType();
|
||||
}
|
||||
if (this.formData.id) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑账户'
|
||||
});
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '新增账户'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAccountDetail(id) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/info',
|
||||
data: {
|
||||
id: this.formData.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.accountInfo = res.data;
|
||||
this.formData.realname = res.data.realname;
|
||||
this.formData.mobile = res.data.mobile;
|
||||
this.formData.bank_account = res.data.bank_account;
|
||||
this.formData.branch_bank_name = res.data.branch_bank_name;
|
||||
this.formData.withdraw_type = res.data.withdraw_type;
|
||||
}
|
||||
this.getTransferType();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
this.getTransferType();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取转账方式
|
||||
*/
|
||||
getTransferType() {
|
||||
this.payList = [];
|
||||
let url = this.type == "member" ? "/api/memberwithdraw/transferType" : "/fenxiao/api/withdraw/transferType";
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
delete res.data.balance;
|
||||
this.transferType = res.data;
|
||||
for (let v in this.transferType) {
|
||||
this.payList.push(this.transferType[v]);
|
||||
}
|
||||
|
||||
if (this.payList.length == 1 && this.payList[0] == '银行卡') {
|
||||
this.formData.withdraw_type = 'bank';
|
||||
}
|
||||
|
||||
this.payList.reverse();
|
||||
if (!this.formData.id && this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
|
||||
if (this.accountInfo && this.$util.inArray(this.accountInfo.withdraw_type_name, this.payList) == -1) {
|
||||
this.payList.push(this.accountInfo.withdraw_type_name);
|
||||
}
|
||||
|
||||
if (this.payList.length && this.accountInfo) {
|
||||
this.index = this.$util.inArray(this.accountInfo.withdraw_type_name, this.payList);
|
||||
}
|
||||
|
||||
if (!this.formData.withdraw_type && this.payList.length) {
|
||||
switch (this.payList[0]) {
|
||||
case '银行卡':
|
||||
this.formData.withdraw_type = 'bank';
|
||||
break;
|
||||
case '支付宝':
|
||||
this.formData.withdraw_type = 'alipay';
|
||||
break;
|
||||
case '微信零钱':
|
||||
this.formData.withdraw_type = 'wechatpay';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
bindPickerChange(e) {
|
||||
this.index = e.detail.value;
|
||||
let value = '';
|
||||
for (let i in this.transferType) {
|
||||
if (this.transferType[i] == this.payList[this.index]) {
|
||||
value = i;
|
||||
}
|
||||
}
|
||||
if (value != '') this.formData.withdraw_type = value;
|
||||
},
|
||||
vertify() {
|
||||
var rule = [
|
||||
{
|
||||
name: 'realname',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入姓名'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'withdraw_type',
|
||||
checkType: 'required',
|
||||
errorMsg: '请选择账户类型'
|
||||
}
|
||||
];
|
||||
if (this.formData.withdraw_type == 'bank') {
|
||||
rule.push({
|
||||
name: 'branch_bank_name',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入银行名称'
|
||||
});
|
||||
}
|
||||
if (this.formData.withdraw_type != 'wechatpay') {
|
||||
rule.push({
|
||||
name: 'bank_account',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入提现账号'
|
||||
});
|
||||
}
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
if (checkRes) {
|
||||
return true;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: validate.error
|
||||
});
|
||||
this.flag = false;
|
||||
return false;
|
||||
}
|
||||
},
|
||||
saveAccount() {
|
||||
if (this.flag) return;
|
||||
this.flag = true;
|
||||
if (this.vertify()) {
|
||||
let url = !this.formData.id ? 'add' : 'edit';
|
||||
let data = {};
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/' + url,
|
||||
data: {
|
||||
id: this.formData.id,
|
||||
realname: this.formData.realname,
|
||||
mobile: this.formData.mobile,
|
||||
withdraw_type: this.formData.withdraw_type,
|
||||
bank_account: this.formData.bank_account,
|
||||
branch_bank_name: this.formData.branch_bank_name
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
if (!this.formData.id) {
|
||||
this.$util.showToast({
|
||||
title: '添加成功'
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '修改成功'
|
||||
});
|
||||
}
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/member/account');
|
||||
}
|
||||
} else {
|
||||
this.flag = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.account-list-content {
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: $border-radius;
|
||||
|
||||
.edit-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 30rpx 0;
|
||||
background-color: #fff;
|
||||
|
||||
.tit {
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
margin-top: $uni-spacing-row-base;
|
||||
}
|
||||
|
||||
.picker {
|
||||
flex: 1;
|
||||
|
||||
text {
|
||||
&:last-child {
|
||||
line-height: 50rpx;
|
||||
float: right;
|
||||
color: $color-tip;
|
||||
font-size: $font-size-activity-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.account-list-content > .edit-item + .edit-item {
|
||||
border-top: 2rpx solid $color-line;
|
||||
}
|
||||
|
||||
.add {
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
border-radius: 80rpx;
|
||||
font-weight: 500;
|
||||
width: calc(100% - 60rpx);
|
||||
margin-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
bottom: 30rpx;
|
||||
height: auto;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
/*兼容 IOS<11.2*/
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/*兼容 IOS>11.2*/
|
||||
}
|
||||
</style>
|
||||
599
pages_tool/member/address.vue
Normal file
599
pages_tool/member/address.vue
Normal file
@@ -0,0 +1,599 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni ref="mescroll" @getData="getListData" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="address-list">
|
||||
<template v-if="addressList.length !== 0">
|
||||
<view class="address-item" v-for="(item, index) in addressList" :key="index">
|
||||
<view class="address-item-top" v-if="localType == 2 && item.local_data">
|
||||
<view class="address-item-left">
|
||||
<view class="address-top-info">
|
||||
<view class="address-name">{{ item.name }}</view>
|
||||
<view class="address-tel">{{ item.mobile }}</view>
|
||||
<view class="address-status" v-if="localType == 2 && item.local_data">{{ item.local_data }}</view>
|
||||
</view>
|
||||
<view class="address-info">{{ item.full_address }}{{ item.address }}</view>
|
||||
</view>
|
||||
<view class="address-item-edit" @click="addAddress('edit', item.id)">
|
||||
{{ $lang('modify') }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="address-item-top" v-else @click="setDefault(item.id)">
|
||||
<view class="address-item-left">
|
||||
<view class="address-top-info">
|
||||
<view class="address-name">{{ item.name }}</view>
|
||||
<view class="address-tel">{{ item.mobile }}</view>
|
||||
</view>
|
||||
<view class="address-info">{{ item.full_address }}{{ item.address }}</view>
|
||||
</view>
|
||||
<view class="address-item-edit" @click.stop="addAddress('edit', item.id)">
|
||||
{{ $lang('modify') }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="address-item-bottom">
|
||||
<view class="address-default" @click="setDefault(item.id,item.is_default)">
|
||||
<text class="default" v-if="localType == 2 && item.local_data">设为默认地址</text>
|
||||
<text class="default" v-else>设为默认地址</text>
|
||||
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
<switch v-else style="transform:scale(0.7)" :color="themeStyle.main_color" />
|
||||
</view>
|
||||
<view class="address-btn">
|
||||
<text class="delete" v-if="item.is_default != 1" @click="deleteAddress(item.id, item.is_default)">
|
||||
<text class="iconfont icon-icon7"></text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<view v-if="addressList.length == 0 && showEmpty" class="empty-box">
|
||||
<image :src="$util.img('public/uniapp/member/address/empty.png')" mode="widthFix"/>
|
||||
<view class="tips">暂无收货地址,请添加</view>
|
||||
|
||||
<button type="primary" class="add-address" @click="addAddress('add')">{{ $lang('newAddAddress') }}</button>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<button type="primary" class="get-address" @click="getChooseAddress()" v-if="$util.isWeiXin() && local != 1">{{ $lang('getAddress') }}</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO -->
|
||||
<button type="primary" class="get-address" @click="getChooseAddress()" v-if="local != 1">{{ $lang('getAddress') }}</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
|
||||
<view class="btn-add" v-if="addressList.length !== 0">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="wx-add" @click="getChooseAddress()" v-if="local != 1">
|
||||
<text>{{ $lang('getAddress') }}</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<button type="primary" class="add-address" @click="getChooseAddress()" v-if="$util.isWeiXin() && local != 1">{{ $lang('getAddress') }}</button>
|
||||
<!-- #endif -->
|
||||
<button type="primary" class="add-address" @click="addAddress('add')">
|
||||
<text class="iconfont icon-add1"></text>
|
||||
{{ $lang('newAddAddress') }}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Weixin
|
||||
} from 'common/js/wx-jssdk.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addressList: [],
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
isIndex: false,
|
||||
showEmpty: false,
|
||||
local: 0, //定位是否显示
|
||||
localType: 1,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) {
|
||||
this.back = option.back;
|
||||
uni.setStorageSync('addressBack', option.back);
|
||||
} else {
|
||||
if (uni.getStorageSync('addressBack')) {
|
||||
this.back = uni.getStorageSync('addressBack');
|
||||
uni.removeStorageSync('addressBack');
|
||||
}
|
||||
}
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
if (option.local) this.local = option.local;
|
||||
if (option.type) this.localType = option.type;
|
||||
},
|
||||
onShow() {
|
||||
uni.removeStorageSync('addressInfo');
|
||||
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/address');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getListData(mescroll) {
|
||||
let storeId = 0;
|
||||
let delivery = uni.getStorageSync('delivery');
|
||||
if (delivery && delivery.delivery_type == 'local') {
|
||||
storeId = delivery.store_id || 0;
|
||||
}
|
||||
this.showEmpty = false;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/page',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
type: this.localType,
|
||||
store_id: storeId
|
||||
},
|
||||
success: res => {
|
||||
this.showEmpty = true;
|
||||
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.addressList = []; //如果是第一页需手动制空列表
|
||||
this.addressList = this.addressList.concat(newArr); //追加新数据
|
||||
this.$forceUpdate();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/* 地址跳转 */
|
||||
addAddress(type, id) {
|
||||
let data = {
|
||||
type: this.localType
|
||||
};
|
||||
if (type == 'edit') data.id = id;
|
||||
if (this.back) data.back = this.back;
|
||||
|
||||
this.$util.redirectTo('/pages_tool/member/address_edit', data);
|
||||
},
|
||||
/* 删除地址信息 */
|
||||
deleteAddress(id, is_default) {
|
||||
uni.showModal({
|
||||
title: '操作提示',
|
||||
content: '确定要删除该地址吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
if (is_default == 1) {
|
||||
this.$util.showToast({
|
||||
title: '默认地址,不能删除'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/delete',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: '删除成功'
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '删除失败'
|
||||
});
|
||||
}
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setDefault(id, is_default) {
|
||||
if (is_default == 1) return;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/setdefault',
|
||||
data: {
|
||||
id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data > 0) {
|
||||
this.$refs.mescroll.refresh();
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, 'redirectTo');
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.show();
|
||||
this.addressList = [];
|
||||
this.$refs.mescroll.refresh();
|
||||
this.$util.showToast({
|
||||
title: '修改默认地址成功'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 一键获取地址
|
||||
*/
|
||||
getChooseAddress() {
|
||||
// #ifdef H5
|
||||
if (this.$util.isWeiXin()) {
|
||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||
var url = uni.getStorageSync('initUrl');
|
||||
} else {
|
||||
var url = location.href;
|
||||
}
|
||||
// 获取jssdk配置
|
||||
this.$api.sendRequest({
|
||||
url: '/wechat/api/wechat/jssdkconfig',
|
||||
data: {
|
||||
url: url
|
||||
},
|
||||
success: jssdkRes => {
|
||||
if (jssdkRes.code == 0) {
|
||||
var wxJS = new Weixin();
|
||||
wxJS.init(jssdkRes.data);
|
||||
wxJS.openAddress(res => {
|
||||
if (res.errMsg == 'openAddress:ok') {
|
||||
this.saveAddress({
|
||||
name: res.userName, // 收货人姓名,
|
||||
mobile: res.telNumber, // 手机号
|
||||
province: res.provinceName, // 省
|
||||
city: res.cityName, // 市
|
||||
district: res.countryName, // 县
|
||||
address: res.detailInfo, // 详细地址
|
||||
full_address: res.provinceName + '-' + res.cityName + '-' + res.countryName,
|
||||
is_default: 1
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.errMsg == 'openAddress:function not implement' ? 'PC端微信不支持一键获取地址' : res.errMsg
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: jssdkRes.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO
|
||||
uni.chooseAddress({
|
||||
success: res => {
|
||||
if (res.errMsg == 'chooseAddress:ok') {
|
||||
this.saveAddress({
|
||||
name: res.userName, // 收货人姓名,
|
||||
mobile: res.telNumber, // 手机号
|
||||
province: res.provinceName, // 省
|
||||
city: res.cityName, // 市
|
||||
district: res.countyName, // 县
|
||||
address: res.detailInfo, // 详细地址
|
||||
full_address: res.provinceName + '-' + res.cityName + '-' + res.countyName,
|
||||
is_default: 1
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.errMsg
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 保存微信地址
|
||||
* @param {Object} params
|
||||
*/
|
||||
saveAddress(params) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/addthreeparties',
|
||||
data: params,
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, 'redirectTo');
|
||||
} else {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cart-empty {
|
||||
padding-top: 208rpx !important;
|
||||
}
|
||||
|
||||
.address-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.local {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: $margin-updown $margin-both;
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: $border-radius;
|
||||
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address-item {
|
||||
margin: $padding 0 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #ffffff;
|
||||
padding: 24rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0;
|
||||
|
||||
.address-item-top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.address-item-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 100rpx);
|
||||
}
|
||||
|
||||
.address-item-edit {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
width: 100rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.address-top-info {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
position: relative;
|
||||
|
||||
.address-name {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.address-tel {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
margin-left: 26rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.address-status {
|
||||
color: #f00;
|
||||
font-size: $font-size-base;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.address-info {
|
||||
font-size: 26rpx;
|
||||
color: #888888;
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address-item-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.address-default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
color: #666666;
|
||||
|
||||
.default {}
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.address-btn {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.edit {
|
||||
text {
|
||||
vertical-align: center;
|
||||
margin-right: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
background: #F1F1F1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
margin-top: 60rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 10;
|
||||
|
||||
.add-address {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
margin: 30rpx 0 30rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
|
||||
text {
|
||||
margin-right: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wx-add {
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
text-align: center;
|
||||
border-radius: 80rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background-color: var(--main-color);
|
||||
border: 2rpx solid var(--main-color);
|
||||
color: #FFFFFF;
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.get-address,
|
||||
.add-address {
|
||||
width: 50%;
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
border-radius: 78rpx;
|
||||
margin-top: 50rpx;
|
||||
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
.get-address {
|
||||
width: 50%;
|
||||
border: 2rpx solid $base-color;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.mescroll-downwarp+.empty-box {
|
||||
height: calc(100vh - 260rpx);
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.address-item>>>.uni-switch-wrapper .uni-switch-input {
|
||||
height: 48rpx !important;
|
||||
width: 88rpx !important;
|
||||
}
|
||||
|
||||
.address-item>>>.uni-switch-wrapper .uni-switch-input:after {
|
||||
height: 44rpx !important;
|
||||
width: 44rpx !important;
|
||||
}
|
||||
|
||||
.address-item>>>.uni-switch-wrapper .uni-switch-input:before {
|
||||
background-color: #EDEDED !important;
|
||||
height: 44rpx !important;
|
||||
width: 90rpx !important;
|
||||
}
|
||||
</style>
|
||||
502
pages_tool/member/address_edit.vue
Normal file
502
pages_tool/member/address_edit.vue
Normal file
@@ -0,0 +1,502 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="address-edit-content">
|
||||
<view class="edit-wrap">
|
||||
<view class="tip">地址信息</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">
|
||||
{{ $lang('consignee') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('consigneePlaceholder')"
|
||||
maxlength="30"
|
||||
name="name"
|
||||
v-model="formData.name" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">
|
||||
{{ $lang('mobile') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input class="uni-input" type="number" placeholder-class="placeholder-class" :placeholder="$lang('mobilePlaceholder')" maxlength="11" v-model="formData.mobile" />
|
||||
</view>
|
||||
<view class="edit-item">
|
||||
<text class="tit">{{ $lang('telephone') }}</text>
|
||||
<input
|
||||
class="uni-input"
|
||||
type="text"
|
||||
placeholder-class="placeholder-class"
|
||||
:placeholder="$lang('telephonePlaceholder')"
|
||||
maxlength="20"
|
||||
v-model="formData.telephone" />
|
||||
</view>
|
||||
<!-- 外卖地址区分 -->
|
||||
<block v-if="localType == 2">
|
||||
<view class="edit-item">
|
||||
<text class="tit">
|
||||
{{ $lang('receivingCity') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<view class="text_inp" :class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }" @click="selectAddress">
|
||||
{{ formData.full_address ? formData.full_address : '请选择省市区县' }}
|
||||
</view>
|
||||
|
||||
<text @click="selectAddress" class="padding-left iconfont icon-location"></text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="edit-item">
|
||||
<text class="tit">
|
||||
{{ $lang('receivingCity') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<pick-regions :default-regions="defaultRegions" @getRegions="handleGetRegions">
|
||||
<text class="select-address " :class="{ empty: !formData.full_address, 'color-tip': !formData.full_address }">
|
||||
{{ formData.full_address ? formData.full_address : '请选择省市区县' }}
|
||||
</text>
|
||||
</pick-regions>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="edit-item">
|
||||
<text class="tit" style="">
|
||||
{{ $lang('address') }}
|
||||
<text>*</text>
|
||||
</text>
|
||||
<input class="uni-input" type="text" placeholder-class="placeholder-class" :placeholder="$lang('addressPlaceholder')" maxlength="50" v-model="formData.address" />
|
||||
<!-- <textarea class="uni-input " type="text" placeholder-class="placeholder-class" :placeholder="$lang('addressPlaceholder')" maxlength="50" v-model="formData.address" ></textarea> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="primary" class="add" @click="saveAddress">{{ $lang('save') }}</button>
|
||||
</view>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue';
|
||||
import validate from 'common/js/validate.js';
|
||||
import Config from '@/common/js/config.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
id: 0,
|
||||
name: '',
|
||||
mobile: '',
|
||||
telephone: '',
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
district_id: '',
|
||||
community_id: '',
|
||||
address: '',
|
||||
full_address: '',
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
is_default: 1
|
||||
},
|
||||
address: '',
|
||||
addressValue: '',
|
||||
back: '', // 返回页
|
||||
redirect: 'redirectTo', // 跳转方式
|
||||
flag: false, //防重复标识
|
||||
defaultRegions: [],
|
||||
localType: 1
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
if (option.type) this.localType = option.type;
|
||||
if (option.id && !option.name) {
|
||||
this.formData.id = option.id;
|
||||
this.getAddressDetail();
|
||||
} else if (option.name) {
|
||||
if (uni.getStorageSync('addressInfo')) this.formData = uni.getStorageSync('addressInfo');
|
||||
this.formData.address = option.name;
|
||||
this.localType = 2;
|
||||
this.getAddress(option.latng);
|
||||
//给formData复制
|
||||
var tempArr = this.getQueryVariable('latng').split(',');
|
||||
this.formData.latitude = tempArr[0];
|
||||
this.formData.longitude = tempArr[1];
|
||||
} else {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
},
|
||||
onBackPress() {
|
||||
uni.setStorageSync('addressInfo', '');
|
||||
},
|
||||
onShow() {
|
||||
if (this.formData.id) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑收货地址'
|
||||
});
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '新增收货地址'
|
||||
});
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.loadingCover.hide();
|
||||
},
|
||||
onHide() {
|
||||
this.flag = false;
|
||||
},
|
||||
methods: {
|
||||
// 获取地址信息
|
||||
getAddressDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/info',
|
||||
data: {
|
||||
id: this.formData.id
|
||||
},
|
||||
success: res => {
|
||||
let data = res.data;
|
||||
if (data != null) {
|
||||
this.formData.name = data.name;
|
||||
this.formData.mobile = data.mobile;
|
||||
this.formData.telephone = data.telephone;
|
||||
this.formData.address = data.address;
|
||||
this.formData.full_address = data.full_address;
|
||||
this.formData.latitude = data.latitude;
|
||||
this.formData.longitude = data.longitude;
|
||||
this.formData.is_default = data.is_default;
|
||||
this.localType = data.type;
|
||||
this.defaultRegions = [data.province_id, data.city_id, data.district_id];
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取详细地址
|
||||
getAddress(value) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/tranAddressInfo',
|
||||
data: {
|
||||
latlng: value
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += res.data.province != undefined ? res.data.province : '';
|
||||
this.formData.full_address += res.data.city != undefined ? '-' + res.data.city : '';
|
||||
this.formData.full_address += res.data.district != undefined ? '-' + res.data.district : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += res.data.province_id != undefined ? res.data.province_id : '';
|
||||
this.addressValue += res.data.city_id != undefined ? '-' + res.data.city_id : '';
|
||||
this.addressValue += res.data.district_id != undefined ? '-' + res.data.district_id : '';
|
||||
} else {
|
||||
this.showToast({
|
||||
title: '数据有误'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取选择的地区
|
||||
handleGetRegions(regions) {
|
||||
this.formData.full_address = '';
|
||||
this.formData.full_address += regions[0] != undefined ? regions[0].label : '';
|
||||
this.formData.full_address += regions[1] != undefined ? '-' + regions[1].label : '';
|
||||
this.formData.full_address += regions[2] != undefined ? '-' + regions[2].label : '';
|
||||
this.addressValue = '';
|
||||
this.addressValue += regions[0] != undefined ? regions[0].value : '';
|
||||
this.addressValue += regions[1] != undefined ? '-' + regions[1].value : '';
|
||||
this.addressValue += regions[2] != undefined ? '-' + regions[2].value : '';
|
||||
},
|
||||
|
||||
selectAddress() {
|
||||
// #ifdef MP
|
||||
/* uni.chooseLocation({
|
||||
success: res => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
},
|
||||
fail(res) {
|
||||
uni.getSetting({
|
||||
success: function(res) {
|
||||
var statu = res.authSetting;
|
||||
if (!statu['scope.userLocation']) {
|
||||
uni.showModal({
|
||||
title: '是否授权当前位置',
|
||||
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
||||
success(tip) {
|
||||
if (tip.confirm) {
|
||||
uni.openSetting({
|
||||
success: function (data) {
|
||||
if (data.authSetting['scope.userLocation'] === true) {
|
||||
this.$util.showToast({
|
||||
title: '授权成功'
|
||||
});
|
||||
//授权成功之后,再调用chooseLocation选择地方
|
||||
setTimeout(function () {
|
||||
uni.chooseLocation({
|
||||
success: data => {
|
||||
this.formData.latitude = res.latitude;
|
||||
this.formData.longitude = res.longitude;
|
||||
this.formData.address = res.name;
|
||||
this.getAddress(res.latitude + ',' + res.longitude);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '授权失败'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});*/
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
var urlencode = this.formData;
|
||||
uni.setStorageSync('addressInfo', urlencode);
|
||||
let backurl = Config.h5Domain + '/pages_tool/member/address_edit?type=' + this.localType;
|
||||
if (this.formData.id) backurl += '&id=' + this.formData.id;
|
||||
if (this.back) backurl += '&back=' + this.back;
|
||||
|
||||
window.location.href = 'https://apis.map.qq.com/tools/locpicker?search=1&type=0&backurl=' + encodeURIComponent(backurl) + '&key=' + Config.mpKey + '&referer=myapp';
|
||||
// #endif
|
||||
},
|
||||
|
||||
getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
vertify() {
|
||||
this.formData.name = this.formData.name.trim();
|
||||
this.formData.mobile = this.formData.mobile.trim();
|
||||
this.formData.address = this.formData.address.trim();
|
||||
var rule = [{
|
||||
name: 'name',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入姓名'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
},
|
||||
{
|
||||
name: 'full_address',
|
||||
checkType: 'required',
|
||||
errorMsg: '请选择省市区县'
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
checkType: 'required',
|
||||
errorMsg: '详细地址不能为空'
|
||||
}
|
||||
];
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
if (checkRes) {
|
||||
return true;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: validate.error
|
||||
});
|
||||
this.flag = false;
|
||||
return false;
|
||||
}
|
||||
},
|
||||
saveAddress() {
|
||||
if (this.flag) return;
|
||||
this.flag = true;
|
||||
if (this.vertify()) {
|
||||
let addressValueArr = this.addressValue.split('-'),
|
||||
data = {},
|
||||
url = '';
|
||||
|
||||
data = {
|
||||
name: this.formData.name,
|
||||
mobile: this.formData.mobile,
|
||||
telephone: this.formData.telephone,
|
||||
province_id: addressValueArr[0],
|
||||
city_id: addressValueArr[1],
|
||||
district_id: addressValueArr[2] ? addressValueArr[2] : '',
|
||||
community_id: 0,
|
||||
address: this.formData.address,
|
||||
full_address: this.formData.full_address,
|
||||
latitude: this.formData.latitude,
|
||||
longitude: this.formData.longitude,
|
||||
is_default: this.formData.is_default,
|
||||
type: this.localType
|
||||
};
|
||||
|
||||
url = 'add';
|
||||
if (this.formData.id) {
|
||||
url = 'edit';
|
||||
data.id = this.formData.id;
|
||||
if (this.back != '') data.is_default = 1;
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaddress/' + url,
|
||||
data: data,
|
||||
success: res => {
|
||||
this.flag = false;
|
||||
|
||||
if (res.code == 0) {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, 'redirectTo');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
uni.removeStorageSync('addressInfo');
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ pick-regions,
|
||||
.pick-regions {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.edit-wrap {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
|
||||
.tip {
|
||||
padding: 20rpx 30rpx 10rpx;
|
||||
background-color: #f8f8f8;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 30rpx;
|
||||
min-height: 100rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.text_inp {
|
||||
margin-left: $margin-updown;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.tit {
|
||||
width: 148rpx;
|
||||
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
color: #ff4544;
|
||||
}
|
||||
|
||||
&.margin_tit {
|
||||
align-self: flex-start;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-location {
|
||||
color: #606266;
|
||||
align-self: flex-start;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.select-address {
|
||||
display: block;
|
||||
margin-left: 10rpx;
|
||||
|
||||
&.empty {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
textarea,
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: $font-size-base;
|
||||
margin-left: 20rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
margin-top: 6rpx;
|
||||
height: 100rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-wrap>.edit-item+.edit-item {
|
||||
border-top: 2rpx solid #ebedf0;
|
||||
}
|
||||
|
||||
.add {
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx !important;
|
||||
border-radius: 80rpx;
|
||||
font-weight: 500;
|
||||
width: calc(100% - 60rpx);
|
||||
margin-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 30rpx;
|
||||
height: auto;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
/*兼容 IOS<11.2*/
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/*兼容 IOS>11.2*/
|
||||
}
|
||||
</style>
|
||||
426
pages_tool/member/apply_withdrawal.vue
Normal file
426
pages_tool/member/apply_withdrawal.vue
Normal file
@@ -0,0 +1,426 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<view class="bank-account-wrap" @click="goAccount()">
|
||||
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type">
|
||||
<text class="tx-to">提现到</text>
|
||||
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">微信默认钱包</view>
|
||||
<view class="tx-bank" v-else>{{ bankAccountInfo.bank_account }}</view>
|
||||
<view class="tx-img" v-if="bankAccountInfo.withdraw_type == 'alipay'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/alipay.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="tx-img" v-else-if="bankAccountInfo.withdraw_type == 'bank'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/bank.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="tx-img" v-else-if="bankAccountInfo.withdraw_type == 'wechatpay'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/wechatpay.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="tx-to" v-else>请添加提现方式</text>
|
||||
<view class="iconfont icon-right"></view>
|
||||
</view>
|
||||
<view class="empty-box"></view>
|
||||
<view class="withdraw-wrap">
|
||||
<view class="withdraw-wrap-title">提现金额</view>
|
||||
<view class="money-wrap">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
|
||||
<view class="delete" @click="remove" v-if="withdrawMoney">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/close.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bootom">
|
||||
<view>
|
||||
<text class="color-tip">可提现余额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
|
||||
<text class="all-tx color-base-text" @click="allTx">全部提现</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<text>最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}</text>
|
||||
<text>,手续费为{{ withdrawInfo.config.rate + '%' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
|
||||
提现
|
||||
</view>
|
||||
|
||||
<view class="recoend" @click="toWithdrawal">
|
||||
<view class="recoend-con">提现记录</view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
withdrawInfo: {
|
||||
config: {
|
||||
is_use: 0,
|
||||
min: 1,
|
||||
rate: 0
|
||||
},
|
||||
member_info: {
|
||||
balance_money: 0,
|
||||
balance_withdraw: 0,
|
||||
balance_withdraw_apply: 0
|
||||
}
|
||||
},
|
||||
bankAccountInfo: {},
|
||||
withdrawMoney: '',
|
||||
isSub: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getWithdrawInfo();
|
||||
this.getBankAccountInfo();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toWithdrawal() {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal');
|
||||
},
|
||||
//全部提现
|
||||
allTx() {
|
||||
this.withdrawMoney = this.withdrawInfo.member_info.balance_money;
|
||||
},
|
||||
// 删除提现金额
|
||||
remove() {
|
||||
this.withdrawMoney = '';
|
||||
},
|
||||
/**
|
||||
* 获取提现信息
|
||||
*/
|
||||
getWithdrawInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/info',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawInfo = res.data;
|
||||
if (this.withdrawInfo.config.is_use == 0) {
|
||||
this.$util.showToast({
|
||||
title: '未开启提现'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 银行账号信息
|
||||
*/
|
||||
getBankAccountInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/defaultinfo',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.bankAccountInfo = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
verify() {
|
||||
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
|
||||
this.$util.showToast({
|
||||
title: '请输入提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.member_info.balance_money)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额超出可提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawInfo.config.min)) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额小于最低提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
withdraw() {
|
||||
if (!this.bankAccountInfo.withdraw_type) {
|
||||
this.$util.showToast({
|
||||
title: '请先添加提现方式'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
var applet_type = 0;
|
||||
if (this.bankAccountInfo.withdraw_type == 'wechatpay') {
|
||||
// #ifdef MP
|
||||
applet_type = 1;
|
||||
// #endif
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/apply',
|
||||
data: {
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: this.bankAccountInfo.withdraw_type, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: this.bankAccountInfo.branch_bank_name,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/withdrawal', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/apply',
|
||||
data: {
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: this.bankAccountInfo.withdraw_type, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: this.bankAccountInfo.branch_bank_name,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
goAccount() {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/account', {
|
||||
back: '/pages_tool/member/apply_withdrawal'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
},
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback) {
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
data: {
|
||||
keywords: 'USER_WITHDRAWAL_SUCCESS'
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.bank-account-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-bottom: 2rpx solid #f7f7f7;
|
||||
position: relative;
|
||||
|
||||
.tx-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 60rpx;
|
||||
|
||||
.tx-bank {
|
||||
margin-right: 60rpx;
|
||||
flex: 1;
|
||||
margin-left: 10rpx;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tx-img {
|
||||
position: absolute;
|
||||
right: 100rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.withdraw-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: rgba(110, 110, 110, 0.09) 0 0 20rpx 0;
|
||||
|
||||
.money-wrap {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
.unit {
|
||||
font-size: 60rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.withdraw-money {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
min-height: 70rpx;
|
||||
padding-left: 20rpx;
|
||||
font-size: 60rpx;
|
||||
flex: 1;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.delete {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bootom {
|
||||
display: flex;
|
||||
padding-top: 20rpx;
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.all-tx {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 30rpx;
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: var(--main-color);
|
||||
|
||||
&.disabled {
|
||||
background: #ccc;
|
||||
border-color: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.recoend {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.recoend-con {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: $font-size-tag;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
250
pages_tool/member/assets.vue
Normal file
250
pages_tool/member/assets.vue
Normal file
@@ -0,0 +1,250 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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>
|
||||
189
pages_tool/member/balance.vue
Normal file
189
pages_tool/member/balance.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="balance">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="custom-navbar" :style="{
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}">
|
||||
<view class="navbar-wrap">
|
||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
||||
<view class="navbar-title">
|
||||
账户余额
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ')',backgroundSize:'100% 100%' }">
|
||||
<!-- <view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance-bg.png') + ') no-repeat right bottom/ auto 380rpx, linear-gradient(314deg, #FE7849 0%, #FF1959 100%)' }"> -->
|
||||
<view class="title">账户余额(元)</view>
|
||||
<view class="balance price-font">{{ (parseFloat(balanceInfo.balance) + parseFloat(balanceInfo.balance_money)).toFixed(2) }}</view>
|
||||
<!-- <view class="flex-box">
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ balanceInfo.balance_money|moneyFormat }}</view>
|
||||
<view class="font-size-tag">现金余额(元)</view>
|
||||
</view>
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ balanceInfo.balance|moneyFormat }}</view>
|
||||
<view class="font-size-tag">储值余额(元)</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btns">
|
||||
<view class="cash btn" @click="toWithdrawal">提现</view>
|
||||
<view class="recharge btn" @click="toList">充值</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-wrap">
|
||||
<view class="menu-item" @click="toApply" style="border-bottom: 0.5px solid #f2f2f2;">
|
||||
<view class="icon">
|
||||
<text class="iconfont icon-yuemingxi"></text>
|
||||
</view>
|
||||
<text class="title">提现记录</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<view class="menu-item" @click="toBalanceDetail" style="border-bottom: 0.5px solid #f2f2f2;">
|
||||
<view class="icon">
|
||||
<text class="iconfont icon-yuemingxi"></text>
|
||||
</view>
|
||||
<text class="title">余额明细</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="toOrderList">
|
||||
<view class="icon">
|
||||
<text class="iconfont icon-chongzhijilu"></text>
|
||||
</view>
|
||||
<text class="title">充值记录</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="action">
|
||||
<view @click="toList" class="recharge-withdraw" v-if="addonIsExist.memberrecharge && memberrechargeConfig && memberrechargeConfig.is_use">
|
||||
{{ $lang('recharge') }}
|
||||
</view>
|
||||
<view class="withdraw" v-if="addonIsExist.memberwithdraw && withdrawConfig && withdrawConfig.is_use" @click="toWithdrawal">
|
||||
{{ $lang('withdrawal') }}
|
||||
</view>
|
||||
</view> -->
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balanceInfo: {
|
||||
balance: 0,
|
||||
balance_money: 0
|
||||
},
|
||||
withdrawConfig: null,
|
||||
memberrechargeConfig: null,
|
||||
menuButtonBounding: {} // 小程序胶囊属性
|
||||
};
|
||||
},
|
||||
async onShow() {
|
||||
this.getWithdrawConfig();
|
||||
this.getMemberrechargeConfig();
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/balance');
|
||||
});
|
||||
} else {
|
||||
this.getUserInfo();
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef MP
|
||||
this.menuButtonBounding = uni.getMenuButtonBoundingClientRect();
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
toWithdrawal() {
|
||||
this.$util.redirectTo('/pages_tool/member/apply_withdrawal');
|
||||
},
|
||||
toOrderList() {
|
||||
this.$util.redirectTo('/pages_tool/recharge/order_list');
|
||||
},
|
||||
toBalanceDetail() {
|
||||
this.$util.redirectTo('/pages_tool/member/balance_detail');
|
||||
},
|
||||
toApply(){
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal');
|
||||
},
|
||||
toList() {
|
||||
this.$util.redirectTo('/pages_tool/recharge/list');
|
||||
},
|
||||
//获取余额信息
|
||||
getUserInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/info',
|
||||
data: {
|
||||
account_type: 'balance,balance_money'
|
||||
},
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.balanceInfo = res.data;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取余额提现配置
|
||||
*/
|
||||
getWithdrawConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/config',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawConfig = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取充值提现配置
|
||||
*/
|
||||
getMemberrechargeConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberrecharge/api/memberrecharge/config',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.memberrechargeConfig = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getUserInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/balance.scss';
|
||||
</style>
|
||||
359
pages_tool/member/balance_detail.vue
Normal file
359
pages_tool/member/balance_detail.vue
Normal file
@@ -0,0 +1,359 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<!-- <scroll-view id="tab-bar" class="order-nav" :scroll-x="true" :show-scrollbar="false" :scroll-into-view="scrollInto">
|
||||
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
|
||||
<text class="uni-tab-item-title" :class="statusIndex == orderStatus ? 'uni-tab-item-title-active' : ''">{{ statusItem.name }}</text>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
<!-- <view class="tab color-bg">
|
||||
<view class="tab-left">
|
||||
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
||||
<view class="uni-input">
|
||||
{{ date }}
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="tab-right">
|
||||
<picker @change="bindPickerChange" :value="balanceIndex" :range="balanceType" class="picker" range-key="label">
|
||||
<text class="desc uni-input">{{ balanceType[balanceIndex].label }}</text>
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</picker>
|
||||
</view>
|
||||
</view> -->
|
||||
<mescroll-uni @getData="getData" ref="mescroll">
|
||||
<block slot="list">
|
||||
<!-- 明细列表 -->
|
||||
<block v-if="dataList.length > 0">
|
||||
<view class="detailed-wrap">
|
||||
<view class="balances" v-for="(item, index) in dataList" :key="index">
|
||||
<image :src="$util.img('public/uniapp/balance/recharge.png')" class="balances-img" v-if="item.account_data > 0"></image>
|
||||
<image v-else :src="$util.img('public/uniapp/balance/shopping.png')" mode="widthFix"></image>
|
||||
<view class="balances-info" @click="toFromDetail(item)">
|
||||
<text class="title">{{ item.remark }}</text>
|
||||
<!-- <text>{{ item.remark }}</text> -->
|
||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
</view>
|
||||
<view class="balances-num">
|
||||
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ? '+' + item.account_data : item.account_data }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else><ns-empty :isIndex="false" text="暂无余额明细"></ns-empty></block>
|
||||
<!-- 无明细列表 -->
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
});
|
||||
return {
|
||||
dataList: [],
|
||||
statusList: [{
|
||||
name: '全部',
|
||||
id: '0'
|
||||
}, {
|
||||
name: '收入',
|
||||
id: '1'
|
||||
}, {
|
||||
name: '支出',
|
||||
id: '2'
|
||||
}],
|
||||
scrollInto: '',
|
||||
orderStatus: '0',
|
||||
date: currentDate,
|
||||
searchType: {
|
||||
from_type: 0,
|
||||
date: ''
|
||||
},
|
||||
balanceType: [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}], //积分类型
|
||||
balanceIndex: 0,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
onLoad(option) {
|
||||
if (option.group_id) this.related_id = option.group_id ? option.group_id : 0;
|
||||
if (option.from_type) this.searchType.from_type = option.from_type;
|
||||
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
||||
if (option.status) this.orderStatus = option.status;
|
||||
this.getbalanceType();
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/balance');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindDateChange: function(e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
if (type === 'start') {
|
||||
year = year - 60;
|
||||
} else if (type === 'end') {
|
||||
year = year + 2;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}年${month}月`;
|
||||
},
|
||||
bindPickerChange(e) {
|
||||
this.balanceIndex = e.detail.value;
|
||||
this.searchType.from_type = this.balanceType[this.balanceIndex].value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
//获取分类类型
|
||||
getbalanceType() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/fromType',
|
||||
success: res => {
|
||||
let balanceType = Object.assign(res.balance, res.balance_money),
|
||||
typeArr = [{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}];
|
||||
for (var index in balanceType) {
|
||||
typeArr.push({
|
||||
label: balanceType[index].type_name,
|
||||
value: index
|
||||
})
|
||||
}
|
||||
this.balanceType = typeArr;
|
||||
}
|
||||
});
|
||||
},
|
||||
ontabtap(e) {
|
||||
let index = e.currentTarget.dataset.current;
|
||||
this.orderStatus = this.statusList[index].id;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
account_type: 'balance,balance_money',
|
||||
from_type: this.searchType.from_type,
|
||||
date: this.searchType.date,
|
||||
related_id: this.related_id
|
||||
},
|
||||
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.dataList = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
toFromDetail(item) {
|
||||
if (item.from_type == 'order' && !isNaN(parseInt(item.type_tag))) {
|
||||
this.$util.redirectTo('/pages/order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
||||
this.$util.redirectTo('/pages/order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.detailed-wrap {
|
||||
padding-top: 20rpx;
|
||||
|
||||
margin: 24rpx;
|
||||
}
|
||||
|
||||
.tab {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 80rpx;
|
||||
background-color: $color-bg;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-left {
|
||||
display: flex;
|
||||
padding-left: 46rpx;
|
||||
}
|
||||
|
||||
.tab-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-nav {
|
||||
width: 100vw;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* #ifndef APP-PLUS */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
background: #fff;
|
||||
border-bottom-left-radius: 24rpx;
|
||||
border-bottom-right-radius: 24rpx;
|
||||
padding-bottom: 30rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 998;
|
||||
|
||||
.uni-tab-item {
|
||||
width: 33.33%;
|
||||
text-align: center;
|
||||
/* #ifndef APP-PLUS */
|
||||
display: inline-block;
|
||||
/* #endif */
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.uni-tab-item-title {
|
||||
color: #555;
|
||||
font-size: $font-size-base;
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
border-bottom: 4rpx solid #fff;
|
||||
padding: 0 10rpx;
|
||||
flex-wrap: nowrap;
|
||||
/* #ifndef APP-PLUS */
|
||||
white-space: nowrap;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-tab-item-title-active {
|
||||
display: block;
|
||||
height: 64rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.balances {
|
||||
padding: $margin-both 24rpx;
|
||||
// margin: 0 $margin-both;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 24rpx;
|
||||
image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 50%;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.balances-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
line-height: 1;
|
||||
|
||||
&:last-child {}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-top: $margin-updown;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-top: $margin-updown;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balances-num {
|
||||
text {
|
||||
line-height: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
color:#09c15f;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
130
pages_tool/member/cancellation.vue
Normal file
130
pages_tool/member/cancellation.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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';
|
||||
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>
|
||||
114
pages_tool/member/cancelrefuse.vue
Normal file
114
pages_tool/member/cancelrefuse.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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>
|
||||
190
pages_tool/member/cancelstatus.vue
Normal file
190
pages_tool/member/cancelstatus.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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' ]">
|
||||
3
|
||||
</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>
|
||||
100
pages_tool/member/cancelsuccess.vue
Normal file
100
pages_tool/member/cancelsuccess.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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>
|
||||
229
pages_tool/member/card.vue
Normal file
229
pages_tool/member/card.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="member-level">
|
||||
<view class="level-top">
|
||||
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError" mode="aspectFill"/>
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"/>
|
||||
<view class="member-desc">
|
||||
<view class="font-size-toolbar">{{ memberInfo.nickname }}</view>
|
||||
<view class="font-size-tag expire-time" v-if="memberInfo.level_expire_time > 0">
|
||||
有效期至:{{ $util.timeStampTurnTime(memberInfo.level_expire_time, true) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="image-container item-center">
|
||||
<view class="slide-image">
|
||||
<view class="bg-border"></view>
|
||||
<image :src="$util.img('public/uniapp/level/card-bg.png')"></image>
|
||||
<view class="info">
|
||||
<view class="level-detail">{{ levelInfo.level_name }}</view>
|
||||
<view class="growr-name">{{ levelInfo.level_name }}可享受消费折扣和</view>
|
||||
<view class="growr-value">会员大礼包等权益</view>
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup" v-if="levelInfo.remark != ''">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
</view>
|
||||
<button type="default" class="renew-btn" @click="$util.redirectTo('/pages_tool/member/card_buy')">立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-content" v-if="levelInfo.is_free_shipping || levelInfo.consume_discount < 100 || levelInfo.point_feedback > 0">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
</view>
|
||||
<view class="card-content-title">会员权益</view>
|
||||
<view class="line-box">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-privilege-list">
|
||||
<view class="card-privilege-item" v-if="levelInfo.is_free_shipping">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-tedianquanchangbaoyou"></text>
|
||||
</view>
|
||||
<view class="card-privilege-name">全场包邮</view>
|
||||
<view class="card-privilege-text">享受商品包邮服务</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="levelInfo.consume_discount < 100">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-zhekou"></text></view>
|
||||
<view class="card-privilege-name">消费折扣</view>
|
||||
<view class="card-privilege-text">部分商品下单可享{{ levelInfo.consume_discount / 10 }}折优惠</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="levelInfo.point_feedback > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-jifen2 f32"></text></view>
|
||||
<view class="card-privilege-name">积分回馈</view>
|
||||
<view class="card-privilege-text">下单享{{ parseFloat(levelInfo.point_feedback) }}倍积分回馈</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="levelInfo.send_coupon != '' || levelInfo.send_point > 0 || levelInfo.send_balance > 0">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
</view>
|
||||
<view class="card-content-title">开卡礼包</view>
|
||||
<view class="line-box">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-privilege-list">
|
||||
<view class="card-privilege-item" v-if="levelInfo.send_point > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-jifen3"></text></view>
|
||||
<view class="card-privilege-name">积分礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ levelInfo.send_point }}积分</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="levelInfo.send_balance > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-hongbao"></text></view>
|
||||
<view class="card-privilege-name">红包礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ parseFloat(levelInfo.send_balance) }}元红包</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="levelInfo.send_coupon != ''">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-youhuiquan1"></text></view>
|
||||
<view class="card-privilege-name">优惠券礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ levelInfo.send_coupon.split(',').length }}张优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹出规则 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="explainPopup" type="bottom">
|
||||
<view class="tips-layer">
|
||||
<view class="head" @click="closeExplainPopup()">
|
||||
<view class="title">会员卡说明</view>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="detail margin-bottom">
|
||||
<block v-if="levelInfo.remark != ''">
|
||||
<view class="tip">会员卡说明</view>
|
||||
<view class="font-size-base">{{ levelInfo.remark }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<ns-goods-recommend ref="goodrecommend" route="super_member"></ns-goods-recommend>
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup,
|
||||
nsGoodsRecommend
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
levelId: 0,
|
||||
levelInfo: {
|
||||
bg_color: '#333'
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
|
||||
let levelInfo = this.memberInfo.member_level_info;
|
||||
let charge_rule = levelInfo.charge_rule ? JSON.parse(levelInfo.charge_rule) : {};
|
||||
levelInfo.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
levelInfo.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
});
|
||||
this.levelInfo = levelInfo;
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/card.scss';
|
||||
|
||||
.banner-container .image-container .slide-image {
|
||||
width: calc(100% - 60rpx);
|
||||
height: 360rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.banner-container .image-container image {
|
||||
background-color: #e3b66b;
|
||||
}
|
||||
|
||||
.banner-container .slide-image .renew-btn {
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: $border-radius;
|
||||
width: 160rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #e3b66b !important;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 40rpx;
|
||||
border: none;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
67
pages_tool/member/card_agreement.vue
Normal file
67
pages_tool/member/card_agreement.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="page">
|
||||
<view class="agreement-title">{{ title }}</view>
|
||||
<view class="agreement-content"><rich-text :nodes="content"></rich-text></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: ''
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getAgreement();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/agreement',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.title = res.data.title;
|
||||
this.content = htmlParser(res.data.content);
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages_tool/member/card_buy', {}, 'redirectTo');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.agreement-title {
|
||||
font-size: $font-size-toolbar;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.agreement-content {
|
||||
margin-top: $margin-updown;
|
||||
word-break: break-all;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
</style>
|
||||
422
pages_tool/member/card_buy.vue
Normal file
422
pages_tool/member/card_buy.vue
Normal file
@@ -0,0 +1,422 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="member-level">
|
||||
<block v-if="levelList.length">
|
||||
<view class="level-top">
|
||||
<image :src="$util.img('public/uniapp/level/card-top-bg.png')"></image>
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="headimgError" mode="aspectFill"/>
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"></image>
|
||||
<view class="member-desc">
|
||||
<view class="font-size-toolbar">{{ memberInfo.nickname }}</view>
|
||||
<view class="font-size-tag expire-time" v-if="memberInfo.level_expire_time > 0">
|
||||
有效期至:{{ $util.timeStampTurnTime(memberInfo.level_expire_time, true) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<swiper :style="{ width: '100vw', height: '390rpx' }" class="margin-bottom"
|
||||
:indicator-dots="swiperConfig.indicatorDots" :indicator-color="swiperConfig.indicatorColor"
|
||||
:indicator-active-color="swiperConfig.indicatorActiveColor" :autoplay="false"
|
||||
:interval="swiperConfig.interval" :duration="swiperConfig.duration"
|
||||
:circular="swiperConfig.circular" :previous-margin="swiperConfig.previousMargin"
|
||||
:next-margin="swiperConfig.nextMargin" @change="swiperChange" @animationfinish="animationfinish"
|
||||
:current="curIndex">
|
||||
<swiper-item :class="levelList.length == 1 ? 'image-container-box' : ''" v-for="(item, i) in levelList" :key="i">
|
||||
<view class="image-container" :class="[
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
: curIndex === listLen - 1
|
||||
? i === 0
|
||||
? 'item-right'
|
||||
: i === listLen - 2
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
: i === curIndex - 1
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
<view class="slide-image" style="background-size: 100% 100%;background-repeat:no-repeat"
|
||||
:style="{
|
||||
transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
|
||||
transitionDuration: '.3s',
|
||||
transitionTimingFunction: 'ease'
|
||||
}">
|
||||
<view class="bg-border"></view>
|
||||
|
||||
<image v-if="levelList[curIndex] && levelList[curIndex]['level_picture']" :src="$util.img(levelList[curIndex]['level_picture'])"/>
|
||||
<image v-else :style="{backgroundColor:levelList[curIndex]['bg_color']}"/>
|
||||
|
||||
<view class="info">
|
||||
<view class="level-detail" :style="{color:levelList[curIndex]['level_text_color']}">{{ levelList[curIndex].level_name }}</view>
|
||||
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">{{ levelList[curIndex].level_name }}可享受消费折扣和</view>
|
||||
<view class="growr-value" :style="{color:levelList[curIndex]['level_text_color']}">会员大礼包等权益</view>
|
||||
<view class="growth-rules font-size-tag" @click="openExplainPopup" v-if="levelList[curIndex].remark != ''">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="card-content">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
</view>
|
||||
<view class="card-content-title">卡种选择</view>
|
||||
<view class="line-box">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-time-list">
|
||||
<view class="card-item-box" :class="{ small: currCard.charge_rule_arr.length == 4 }" v-for="(item, index) in currCard.charge_rule_arr" :key="index">
|
||||
<view class="card-time-item" :class="{ active: choiceIndex == index }" @click="choice(index)">
|
||||
<image :src="$util.img('public/uniapp/level/card-icon.png')" mode="widthFix"></image>
|
||||
<view class="time-name">{{ cardType[item.key].name }}</view>
|
||||
<view class="time-price">
|
||||
{{ $lang('common.currencySymbol') }}
|
||||
<text class="price">{{ item.value }}</text>
|
||||
/{{ cardType[item.key].unit }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-content"
|
||||
v-if="currCard.is_free_shipping || currCard.consume_discount < 100 || currCard.point_feedback > 0">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
</view>
|
||||
<view class="card-content-title">会员权益</view>
|
||||
<view class="line-box">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-privilege-list">
|
||||
<view class="card-privilege-item" v-if="currCard.is_free_shipping">
|
||||
<view class="card-privilege-icon">
|
||||
<text class="iconfont icon-tedianquanchangbaoyou"></text>
|
||||
</view>
|
||||
<view class="card-privilege-name">全场包邮</view>
|
||||
<view class="card-privilege-text">享受商品包邮服务</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="currCard.consume_discount < 100">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-zhekou"></text></view>
|
||||
<view class="card-privilege-name">消费折扣</view>
|
||||
<view class="card-privilege-text">部分商品下单可享{{ currCard.consume_discount / 10 }}折优惠</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="currCard.point_feedback > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-jifen2 f32"></text></view>
|
||||
<view class="card-privilege-name">积分回馈</view>
|
||||
<view class="card-privilege-text">下单享{{ parseFloat(currCard.point_feedback) }}倍积分回馈</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="currCard.send_coupon != '' || currCard.send_point > 0 || currCard.send_balance > 0">
|
||||
<view class="card-content-head">
|
||||
<view class="line-box">
|
||||
<view class="line right"></view>
|
||||
</view>
|
||||
<view class="card-content-title">开卡礼包</view>
|
||||
<view class="line-box">
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
<view class="card-privilege-list">
|
||||
<view class="card-privilege-item" v-if="currCard.send_point > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-jifen3"></text></view>
|
||||
<view class="card-privilege-name">积分礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ currCard.send_point }}积分</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="currCard.send_balance > 0">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-hongbao"></text></view>
|
||||
<view class="card-privilege-name">红包礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ parseFloat(currCard.send_balance) }}元红包</view>
|
||||
</view>
|
||||
<view class="card-privilege-item" v-if="currCard.send_coupon != ''">
|
||||
<view class="card-privilege-icon"><text class="iconfont icon-youhuiquan1"></text></view>
|
||||
<view class="card-privilege-name">优惠券礼包</view>
|
||||
<view class="card-privilege-text">赠送{{ currCard.send_coupon.split(',').length }}张优惠券
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block v-if="currCard.charge_rule_arr.length">
|
||||
<view class="action-wrap" :class="{ 'bottom-safe-area': isIphoneX, 'have-agreement': agreement }">
|
||||
</view>
|
||||
<view class="action" :class="{ 'bottom-safe-area': isIphoneX, 'have-agreement': agreement }">
|
||||
<view class="action-btn" @click="create">
|
||||
<block v-if="currCard.level_id == levelId"><text class="bold title">立即续费</text></block>
|
||||
<block v-else>
|
||||
<text class="bold title" v-if="currCard.charge_type == 1">充值开通</text>
|
||||
<text class="bold title" v-else>立即开通</text>
|
||||
</block>
|
||||
<text class="font-size-tag">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="bold">{{ currCard.charge_rule_arr[choiceIndex].value }}</text>
|
||||
<text>/{{ cardType[currCard.charge_rule_arr[choiceIndex].key].unit }}</text>
|
||||
</view>
|
||||
<view class="agreement" v-if="agreement">
|
||||
购买既视为同意
|
||||
<text @click="$util.redirectTo('/pages_tool/member/card_agreement')">《{{ agreement.title }}》</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 弹出规则 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="explainPopup" type="bottom">
|
||||
<view class="tips-layer">
|
||||
<view class="head" @click="closeExplainPopup()">
|
||||
<view class="title">会员卡说明</view>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="detail margin-bottom">
|
||||
<block v-if="currCard.remark != ''">
|
||||
<view class="tip">会员卡说明</view>
|
||||
<view class="font-size-base">{{ currCard.remark }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<ns-payment ref="choosePaymentPopup" :payMoney="currCard.charge_rule_arr[choiceIndex].value" @confirm="toPay" v-if="currCard.charge_rule_arr.length"></ns-payment>
|
||||
</block>
|
||||
<block v-else><ns-empty text="暂无可开会员卡" :isIndex="false"></ns-empty></block>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<!-- 选择支付方式弹窗 -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
isSub: false, // 是否已提交
|
||||
isIphoneX: false,
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [],
|
||||
levelId: 0,
|
||||
cardType: {
|
||||
week: {
|
||||
name: '周卡',
|
||||
unit: '周'
|
||||
},
|
||||
month: {
|
||||
name: '月卡',
|
||||
unit: '月'
|
||||
},
|
||||
quarter: {
|
||||
name: '季卡',
|
||||
unit: '季'
|
||||
},
|
||||
year: {
|
||||
name: '年卡',
|
||||
unit: '年'
|
||||
}
|
||||
},
|
||||
choiceIndex: 0,
|
||||
outTradeNo: '',
|
||||
agreement: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
currCard() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
let card = this.levelList[this.curIndex];
|
||||
let charge_rule = card.charge_rule ? JSON.parse(card.charge_rule) : {};
|
||||
card.charge_rule_arr = [];
|
||||
Object.keys(charge_rule).forEach(key => {
|
||||
card.charge_rule_arr.push({
|
||||
key: key,
|
||||
value: charge_rule[key]
|
||||
});
|
||||
});
|
||||
return card;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
//会员卡
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getCardList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/card_buy');
|
||||
});
|
||||
}
|
||||
this.getAgreement();
|
||||
},
|
||||
onShow() {},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getCardList();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.curIndex = e.detail.current;
|
||||
this.choiceIndex = 0;
|
||||
this.isDescAnimating = true;
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getCardList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/lists',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
choice(index) {
|
||||
this.choiceIndex = index;
|
||||
},
|
||||
/**
|
||||
* 创建
|
||||
*/
|
||||
create() {
|
||||
if (this.memberInfo.member_level_type && this.memberInfo.member_level != this.currCard.level_id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.choosePaymentPopup.open();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
toPay() {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/ordercreate/create',
|
||||
data: {
|
||||
level_id: this.currCard.level_id,
|
||||
period_unit: this.currCard.charge_rule_arr[this.choiceIndex].key
|
||||
},
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.outTradeNo = res.data.out_trade_no;
|
||||
uni.setStorageSync('paySource', 'membercard');
|
||||
this.$refs.choosePaymentPopup.getPayInfo(this.outTradeNo);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
headimgError() {
|
||||
this.memberInfo.headimg = this.$util.getDefaultImage().head;
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
openExplainPopup() {
|
||||
this.$refs.explainPopup.open();
|
||||
},
|
||||
/**
|
||||
* 打开说明弹出层
|
||||
*/
|
||||
closeExplainPopup() {
|
||||
this.$refs.explainPopup.close();
|
||||
},
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/supermember/api/membercard/agreement',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.title != '' && res.data.content != '') {
|
||||
this.agreement = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/card.scss';
|
||||
</style>
|
||||
86
pages_tool/member/collection.vue
Normal file
86
pages_tool/member/collection.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<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 nsGoodsRecommend from '@/components/ns-goods-recommend/ns-goods-recommend.vue';
|
||||
import collection from './public/js/collection.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsGoodsRecommend
|
||||
},
|
||||
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 scoped>
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
29
pages_tool/member/contact.vue
Normal file
29
pages_tool/member/contact.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="contact">
|
||||
<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>
|
||||
401
pages_tool/member/coupon.vue
Normal file
401
pages_tool/member/coupon.vue
Normal file
@@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view :class="isIphoneX ? 'iphone-x' : ''">
|
||||
<view class="cf-container color-line-border" v-if="storeToken">
|
||||
<view class="tab">
|
||||
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
|
||||
<view @click="changeState(2)"><text :class="state == 2 ? 'color-base-text active color-base-border-bottom' : ''">已使用</text></view>
|
||||
<view @click="changeState(3)"><text :class="state == 3 ? 'color-base-text active color-base-border-bottom' : ''">已过期</text></view>
|
||||
</view>
|
||||
<!-- <view class="coupon-head">
|
||||
<view class="sort" :class="sort == 1 ? 'color-base-border color-base-text' : ''" @click="changeSort(1, '')">全部</view>
|
||||
<view class="sort" :class="sort == 2 ? 'color-base-border color-base-text' : ''" @click="changeSort(2, 'reward')">满减券</view>
|
||||
<view class="sort" :class="sort == 3 ? 'color-base-border color-base-text' : ''" @click="changeSort(3, 'discount')">折扣券</view>
|
||||
<view class="sort" :class="sort == 4 ? 'color-base-border color-base-text' : ''" @click="changeSort(4, 'no_threshold')">无门槛券</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<mescroll-uni ref="mescroll" top="100" @getData="getMemberCounponList" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="coupon-listone">
|
||||
<view class="item" :class="['item',item.state != 1&&'item-disabled']" v-for="(item, index) in list" :key="index" @click="toGoodsList(item)" :style="{ backgroundColor: item.state != 1 ? '#FFF' : 'var(--main-color-shallow)' }">
|
||||
<view class="item-base">
|
||||
<image class="coupon-line" mode="heightFix" :src="$util.img('public/uniapp/coupon/coupon_line.png')"/>
|
||||
<view>
|
||||
<view class="use_price " v-if="item.type == 'divideticket'">
|
||||
<text>¥</text>
|
||||
{{ parseFloat(item.money) }}
|
||||
</view>
|
||||
<view class="use_price " v-if="item.type == 'reward'">
|
||||
<text>¥</text>
|
||||
{{ parseFloat(item.money) }}
|
||||
</view>
|
||||
<view class="use_price" v-else-if="item.type == 'discount'">
|
||||
{{ parseFloat(item.discount) }}
|
||||
<text>折</text>
|
||||
</view>
|
||||
<view class="use_condition font-size-tag" v-if="item.at_least > 0">
|
||||
满{{ item.at_least }}元可用</view>
|
||||
<view class="use_condition font-size-tag" v-else>无门槛优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-info">
|
||||
<view class="use_title">
|
||||
<view class="title">{{ item.coupon_name }}</view>
|
||||
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.state == 3 }">指定商品</view>
|
||||
<view class="max_price" v-if="item.discount_limit != '0.00'">(最大优惠{{ item.discount_limit }}元)</view>
|
||||
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{ item.use_channel_name }}</view>
|
||||
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
|
||||
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="use_time" v-if="item.end_time">有效期:{{ $util.timeStampTurnTime(item.end_time) }}
|
||||
</view>
|
||||
<view class="use_time" v-else>有效期:长期有效</view>
|
||||
</view>
|
||||
<view class="item-btn">
|
||||
<view class="tag" v-if="item.state == 1">去使用</view>
|
||||
<view class="tag disabled" v-if="item.state == 2">已使用</view>
|
||||
<view class="tag disabled" v-if="item.state == 3">已过期</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!list.length && showEmpty" class="margin-top cart-empty" :fixed="false">
|
||||
<ns-empty :isIndex="true" :emptyBtn="{url: '/pages/index/index',text: '去逛逛'}" text="暂无优惠券"></ns-empty>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
<ns-login ref="ns-login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: '',
|
||||
types: '',
|
||||
state: 1,
|
||||
sort: 1,
|
||||
list: [],
|
||||
isIphoneX: false, //判断手机是否是iphoneX以上
|
||||
showEmpty: false,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.coupon) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启优惠券',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (data.related_id) this.related_id = data.related_id ? data.related_id : 0;
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
if (this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/coupon');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//切换状态
|
||||
changeState(state) {
|
||||
this.list = [];
|
||||
this.state = state;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
changeSort(sort, types) {
|
||||
this.list = [];
|
||||
this.sort = sort;
|
||||
this.types = types;
|
||||
this.$refs.mescroll.refresh(false);
|
||||
},
|
||||
getMemberCounponList(mescroll) {
|
||||
this.showEmpty = false;
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/memberpage',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
state: this.state,
|
||||
is_own: this.type,
|
||||
type: this.types,
|
||||
related_id: this.related_id
|
||||
},
|
||||
success: res => {
|
||||
this.showEmpty = true;
|
||||
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.list = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
let data = res.data;
|
||||
if (data) this.couponList = data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.list[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toGoodsList(item) {
|
||||
if (item.state == 1) {
|
||||
this.$util.redirectTo('/pages/goods/list', {
|
||||
coupon: item.coupon_type_id
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cart-empty {
|
||||
margin-top: 208rpx !important;
|
||||
}
|
||||
|
||||
.active {
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
|
||||
.coupon-head {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 20rpx 50rpx;
|
||||
|
||||
.sort {
|
||||
border: 2rpx solid #c5c5c5;
|
||||
padding: 1rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cf-container {
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 86rpx;
|
||||
|
||||
>view {
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
height: 86rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
line-height: 86rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-listone {
|
||||
margin: 0 30rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
background-color: #fff2f0;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 20rpx;
|
||||
align-items: stretch;
|
||||
margin-top: $padding;
|
||||
overflow: hidden;
|
||||
|
||||
&.item-disabled {
|
||||
.item-base {
|
||||
background: #e7e7e7 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item-base {
|
||||
position: relative;
|
||||
width: 197rpx;
|
||||
min-width: 197rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(to left, var(--bg-color), var(--bg-color-shallow));
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 38rpx 10rpx 38rpx 18rpx;
|
||||
|
||||
&.disabled {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.coupon-line {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>view {
|
||||
width: calc(100%);
|
||||
height: auto;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.use_price {
|
||||
font-size: 60rpx;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
|
||||
text {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.use_condition {
|
||||
color: #fff;
|
||||
margin-top: $padding;
|
||||
|
||||
&.margin_top_none {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 0 30rpx 30rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-btn {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
min-width: 160rpx;
|
||||
align-self: center;
|
||||
|
||||
view {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
border-radius: $border-radius;
|
||||
line-height: 50rpx;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
background-image: linear-gradient(to right, var(--bg-color), var(--bg-color-shallow));
|
||||
color: var(--btn-text-color);
|
||||
;
|
||||
font-size: $font-size-tag;
|
||||
|
||||
&.disabled {
|
||||
background: $color-line !important;
|
||||
color: $color-tip !important;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: #f8f8f8;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
height: 30rpx;
|
||||
width: 15rpx;
|
||||
border-radius: 30rpx 0 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: $padding;
|
||||
overflow: hidden;
|
||||
background-repeat-x: no-repeat;
|
||||
background-repeat-y: repeat;
|
||||
|
||||
.use_time {
|
||||
padding: $padding 0;
|
||||
border-top: 2rpx dashed #cccccc;
|
||||
font-size: $font-size-activity-tag;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.use_title {
|
||||
font-size: $font-size-base;
|
||||
font-weight: 500;
|
||||
padding: $padding 0;
|
||||
|
||||
.title {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.max_price {
|
||||
font-weight: 400;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.truncate {
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
253
pages_tool/member/footprint.vue
Normal file
253
pages_tool/member/footprint.vue
Normal file
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<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">{{ 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 {
|
||||
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>
|
||||
334
pages_tool/member/info.vue
Normal file
334
pages_tool/member/info.vue
Normal file
@@ -0,0 +1,334 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view v-if="indent == 'all' && memberInfo" class="info-wrap">
|
||||
<!-- 头像@click="headImage" -->
|
||||
<view class="info-list-cell info-item info-list-con" hover-class="cell-hover">
|
||||
<text class="cell-tit">头像</text>
|
||||
<view class="info-list-head cell-tip">
|
||||
<image :src="memberInfo.headimg ? $util.img(memberInfo.headimg) : $util.getDefaultImage().head" @error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
</view>
|
||||
<text style="margin-right: 20rpx;"></text>
|
||||
</view>
|
||||
<!-- 账号 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-if="memberInfo.is_edit_username == 1" @click="modifyInfo('username')">
|
||||
<text class="cell-tit">账号</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.number }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- 账号 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" v-else>
|
||||
<text class="cell-tit">{{ $lang('account') }}</text>
|
||||
<text class="cell-tip cell-tip1">{{ memberInfoformData.number }}</text>
|
||||
</view> -->
|
||||
<!-- 昵称 -->
|
||||
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('name')">
|
||||
<text class="cell-tit">昵称</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.nickName }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 真实姓名 -->
|
||||
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('realName')">
|
||||
<text class="cell-tit">姓名</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.realName }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 性别 -->
|
||||
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('sex')">
|
||||
<text class="cell-tit">性别</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.sex }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 生日 -->
|
||||
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('birthday')">
|
||||
<text class="cell-tit">生日</text>
|
||||
<text class="cell-tip">{{ memberInfoformData.birthday }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 手机号 -->
|
||||
<view class="info-list-cell info-list-con" @click="modifyInfo('mobile')">
|
||||
<text class="cell-tit">手机号</text>
|
||||
<text v-if="memberInfoformData.user_tel == ''" class="cell-tip">密码</text>
|
||||
<text v-else class="cell-tip">{{ memberInfoformData.mobile }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- 密码 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('password')">
|
||||
<text class="cell-tit">密码</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- 支付密码 -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('paypassword')">
|
||||
<text class="cell-tit">{{ $lang('paypassword') }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('address')">
|
||||
<text class="cell-tit">所在地址</text>
|
||||
<text class="cell-tip" v-if="memberInfo.full_address">{{ memberInfo.full_address }}
|
||||
{{ memberInfo.address }}</text>
|
||||
<text class="cell-tip" v-else>去设置</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
|
||||
<!-- 注销 -->
|
||||
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="cancellation()">
|
||||
<text class="cell-tit">注销账号</text>
|
||||
<text class="cell-more"></text>
|
||||
</view>
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="cancellation()" v-if="addonIsExist.membercancel && memberConfig.is_enable == 1">
|
||||
<text class="cell-tit">注销账号</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover">
|
||||
<text class="cell-tit">版本号</text>
|
||||
<text class="cell-tip cell-tip1">{{ version }}</text>
|
||||
</view> -->
|
||||
|
||||
<!-- 语言 -->
|
||||
<!-- <view class="info-list-cell info-item info-list-con" hover-class="cell-hover" @click="modifyInfo('language')">
|
||||
<text class="cell-tit">{{ $lang('lang') }}</text>
|
||||
<text class="cell-tip">{{ langList[langIndex].name }}</text>
|
||||
<text class="cell-more"></text>
|
||||
</view> -->
|
||||
<!-- 退出登录 -->
|
||||
<!-- <view class="info-list-cell log-out-btn" >
|
||||
<text class="cell-tit color-base-text"></text>
|
||||
</view> -->
|
||||
<!-- #ifdef H5 -->
|
||||
|
||||
<!-- #endif -->
|
||||
<view class="save-item" @click="logout">
|
||||
<button type="primary">退出登录</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniNavBar from '@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue';
|
||||
import info from './public/js/info.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
version: ''
|
||||
};
|
||||
},
|
||||
mixins: [info],
|
||||
onLoad(data) {
|
||||
this.version = this.$config.version;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
}
|
||||
|
||||
.cell-tit {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.cell-tit {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
color: #fff;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.save-item {
|
||||
margin: 50rpx auto;
|
||||
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
394
pages_tool/member/info_edit.vue
Normal file
394
pages_tool/member/info_edit.vue
Normal file
@@ -0,0 +1,394 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<template v-if="memberInfo">
|
||||
<!-- 修改用户名 -->
|
||||
<view v-if="indent == 'username'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">用户名</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.username" />
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag set-pass-tips">用户名仅可修改一次,请谨慎设置</view>
|
||||
<view class="save-item" @click="save('username')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改昵称 -->
|
||||
<view v-if="indent == 'name'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">昵称</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.nickName" />
|
||||
</view>
|
||||
<view class="save-item" @click="save('name')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改真实姓名 -->
|
||||
<view v-if="indent == 'realName'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">姓名</text>
|
||||
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.realName" />
|
||||
</view>
|
||||
<view class="save-item" @click="save('realName')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改性别 -->
|
||||
<view v-if="indent == 'sex'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">性别</text>
|
||||
<radio-group @change="radioChange" class="edit-sex-list">
|
||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
|
||||
<view>
|
||||
<radio :color="themeStyle.main_color" :value="item.value" :checked="index === formData.sex" />
|
||||
</view>
|
||||
<view>{{ item.name }}</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view class="save-item" @click="save('sex')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改生日 -->
|
||||
<view v-if="indent == 'birthday'" class="edit-info edit-birthday-list">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">生日</text>
|
||||
<picker mode="date" :value="formData.birthday" :start="startDate" :end="endDate" @change="bindDateChange">
|
||||
<view class="uni-input">{{ formData.birthday ? formData.birthday : '请选择生日' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="save-item" @click="save('birthday')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 修改密码 -->
|
||||
<view v-if="indent == 'password'" class="edit-info">
|
||||
<block v-if="memberInfo.password == 0 && memberInfo.mobile == ''">
|
||||
<view class="empty">
|
||||
<view class="empty_img">
|
||||
<image :src="$util.img('public/uniapp/common/common-empty.png')" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="color-tip margin-top margin-bottom">请先绑定手机再执行该操作</view>
|
||||
<button type="primary" size="mini" class="mini button color-base-bg" @click="modifyInfo('mobile')">立即绑定</button>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="edit-info-box" v-if="memberInfo.password">
|
||||
<text class="info-name">原密码</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.currentPassword" />
|
||||
</view>
|
||||
<block v-else>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">新密码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">再次输入</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="passwordMoblieCode()">{{ formData.mobileCodeText }}</button>
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag set-pass-tips">
|
||||
点击“获取动态码”,将会向您已绑定的手机号{{ memberInfoformData.mobile | mobile }}发送验证码</view>
|
||||
</block>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">新密码</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.newPassword" />
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">再次输入</text>
|
||||
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.confirmPassword" />
|
||||
</view>
|
||||
|
||||
<view class="save-item" @click="save('password')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 修改手机号 -->
|
||||
<view v-if="indent == 'mobile'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">手机号</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="11" placeholder="请输入" v-model="formData.mobile" />
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">验证码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha"></image>
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">短信验证码</text>
|
||||
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
|
||||
<button type="primary" class="dynacode" @click="bindMoblieCode()">{{ formData.mobileCodeText }}</button>
|
||||
</view>
|
||||
<view class="save-item" @click="save('mobile')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 绑定手机号 -->
|
||||
<view v-if="indent == 'bind_mobile'" class="edit-info">
|
||||
<view class="save-item bind-mobile">
|
||||
<button type="primary" open-type="getPhoneNumber" @getphonenumber="mobileAuth">一键授权绑定</button>
|
||||
</view>
|
||||
<view class="save-item bind-mobile">
|
||||
<button type="primary" @click="manualBinding">手动绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="indent == 'address'" class="edit-info">
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">所在地区</text>
|
||||
<pick-regions :default-regions="defaultRegions" select-arr="3" @getRegions="handleGetRegions">
|
||||
<text class="select-address " :class="{'color-tip': !formData.fullAddress }">
|
||||
{{ formData.fullAddress ? formData.fullAddress : '请选择省市区县' }}
|
||||
</text>
|
||||
</pick-regions>
|
||||
</view>
|
||||
<view class="edit-info-box">
|
||||
<text class="info-name">详细地址</text>
|
||||
<input class="uni-input info-content" type="text" placeholder="详细地址" v-model="formData.address" />
|
||||
</view>
|
||||
<view class="save-item" @click="save('address')">
|
||||
<button type="primary">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniNavBar from '@/pages_tool/components/uni-nav-bar/uni-nav-bar.vue';
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue';
|
||||
import info from './public/js/info.js';
|
||||
import auth from '@/common/js/auth.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniNavBar,
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad(data) {
|
||||
if (data.type) this.indent = data.type;
|
||||
},
|
||||
mixins: [info, auth],
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.info-head {
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.captcha {
|
||||
width: 170rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.info-list-cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
position: relative;
|
||||
line-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
&:first-child {
|
||||
padding: 28rpx 30rpx;
|
||||
}
|
||||
|
||||
.cell-tip1 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.cell-tit {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.info-list-head {
|
||||
border: 1rpx solid $color-line;
|
||||
width: 82rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.info-list-head image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
// #ifdef MP
|
||||
&.info-item {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
// #endif
|
||||
|
||||
&.info-list-con~&.info-list-con:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
margin-left: auto;
|
||||
color: $color-tip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 470rpx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
margin-left: 10rpx;
|
||||
width: 32rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cell-more:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
|
||||
border: 2rpx solid darken($color-line, 20%) {
|
||||
right-color: transparent;
|
||||
bottom-color: transparent;
|
||||
}
|
||||
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
|
||||
.edit-info-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 40rpx;
|
||||
min-height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.info-name {
|
||||
width: 150rpx;
|
||||
font-size: $font-size-base;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
font-size: $font-size-base;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
margin: 0;
|
||||
padding: 0 10rpx;
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
font-size: $font-size-base;
|
||||
line-height: 60rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.edit-sex-list {
|
||||
display: flex;
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
margin-left: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
uni-radio .uni-radio-input {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.pick-regions {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.set-pass-tips {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.input-len {
|
||||
width: 500rpx !important;
|
||||
}
|
||||
|
||||
.save-item {
|
||||
margin-top: 50rpx;
|
||||
|
||||
button {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bind-mobile {
|
||||
button {
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.empty_img {
|
||||
width: 63%;
|
||||
height: 450rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 190rpx;
|
||||
color: $color-tip;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
276
pages_tool/member/invite_friends.vue
Normal file
276
pages_tool/member/invite_friends.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view v-if="info" style="background-color: #fff;">
|
||||
|
||||
<view class="invite_adv">
|
||||
<image :src="$util.img('public/uniapp/member/invite/top_bg.png')" mode="widthFix"></image>
|
||||
|
||||
<view class="desc" @click="openRulePopup" v-if="info.remark != ''">
|
||||
<text class="iconfont icon-bangzhu"></text>
|
||||
活动说明
|
||||
</view>
|
||||
<image class="font" :src="$util.img('public/uniapp/member/invite/top_font.png')" mode="widthFix"/>
|
||||
<view class="time">
|
||||
活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1) }}
|
||||
</view>
|
||||
|
||||
<view class="btn" :style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }" @click="openSharePopup">立即邀请</view>
|
||||
</view>
|
||||
<view class="content invite-list">
|
||||
<view class="title">我的好友</view>
|
||||
<block v-if="inviteList.length > 0">
|
||||
<view class="invitelist_block">
|
||||
<view class="invitelist">
|
||||
<view class="list-item" v-for="(item, index) in inviteList">
|
||||
<view class="img color-base-border">
|
||||
<image mode="aspectFit" :src="item.headimg == '' ? $util.img($util.getDefaultImage().head) : $util.img(item.headimg)"/>
|
||||
</view>
|
||||
<view class="list-left">
|
||||
<view class="info">
|
||||
<view class="name font-size-tag">{{ item.source_member_nickname }}</view>
|
||||
<view class="time font-size-activity-tag color-tip">
|
||||
{{ $util.timeStampTurnTime(item.create_time) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="prize color-base-text font-size-activity-tag">
|
||||
<block v-if="item.balance > 0">{{ item.balance }}元现金红包</block>
|
||||
<block v-if="(item.point > 0 || item.coupon_num) && item.balance > 0">+</block>
|
||||
<block v-if="item.point > 0">{{ parseInt(item.point) }}积分</block>
|
||||
<block v-if="item.point > 0 && item.balance > 0 && item.coupon_num > 0">+
|
||||
</block>
|
||||
<block v-if="item.coupon_num > 0">{{ item.coupon_num }}张优惠券</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="isClick && total_num > page">
|
||||
查看更多
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</view>
|
||||
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="!isClick && inviteList.length > 5 && total_num <= page">没有更多数据了</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="empty">
|
||||
<view class="tip">您还没有邀请到新朋友哦</view>
|
||||
<view class="tip">邀请好友,赚取好礼。赶紧去试试吧~</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title">邀请好友奖励</view>
|
||||
<view class="invite_active">
|
||||
<view class="list">
|
||||
<view class="item" v-if="$util.inArray('balance', info.type) != -1">
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||||
<view class="desc">
|
||||
<view class="price">
|
||||
<text class="font-size-base">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text>{{ info.balance }}</text>
|
||||
</view>
|
||||
<view class="type">现金红包</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item" v-if="$util.inArray('point', info.type) != -1">
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill"/>
|
||||
<view class="desc">
|
||||
<view class="price">
|
||||
<text>{{ parseInt(info.point) }}</text>
|
||||
</view>
|
||||
<view class="type">积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item margin_right_none" v-if="$util.inArray('coupon', info.type) != -1">
|
||||
<image :src="$util.img('public/uniapp/member/invite/coupon_bg.png')" mode="aspectFill">
|
||||
</image>
|
||||
<view class="desc">
|
||||
<view class="price">
|
||||
<text>{{ info.coupon.split(',').length }}</text>
|
||||
张
|
||||
</view>
|
||||
<view class="type">优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="title_desc color-tip">分享给好友,让好友通过你的分享链接进入并注册登录,可获得以下奖励:</view>
|
||||
<view class="desc_list">
|
||||
<view class="" v-if="$util.inArray('balance', info.type) != -1">
|
||||
<text>●</text>
|
||||
可得{{ info.balance }}元红包奖励
|
||||
</view>
|
||||
<view class="" v-if="$util.inArray('point', info.type) != -1">
|
||||
<text>●</text>
|
||||
可得{{ info.point }}积分
|
||||
</view>
|
||||
<view class="" v-if="$util.inArray('coupon', info.type) != -1">
|
||||
<text>●</text>
|
||||
可得{{ info.coupon.split(',').length }}张优惠券
|
||||
</view>
|
||||
|
||||
<view class="" v-if="info.max_fetch == 0">
|
||||
<text>●</text>
|
||||
可得奖励不受限制
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<text>●</text>
|
||||
奖励上限为{{ info.max_fetch }}人
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title">如何邀请好友</view>
|
||||
<view class="invite_active">
|
||||
<view class="step">
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/fenxiang.png')" mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="text">分享链接给好友</view>
|
||||
</view>
|
||||
<view>
|
||||
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou"></image>
|
||||
</view>
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/shouji.png')" mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="text">好友进入</view>
|
||||
</view>
|
||||
<view>
|
||||
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou"></image>
|
||||
</view>
|
||||
<view>
|
||||
<view class="img">
|
||||
<image :src="$util.img('public/uniapp/member/invite/hongbao.png')" mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="text">好友注册成功获得奖励</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="posterPopup" type="bottom" class="poster-layer">
|
||||
<template v-if="poster != '-1'">
|
||||
<view>
|
||||
<view class="image-wrap">
|
||||
<image :src="$util.img(poster)" mode="widthFix" :show-menu-by-longpress="true" />
|
||||
</view>
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<view class="save" @click="savePoster()">保存图片</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="save">长按保存图片</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="close iconfont icon-close" @click="closePosterPopup()"></view>
|
||||
</template>
|
||||
<view v-else class="msg">{{ posterMsg }}</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
|
||||
<view>
|
||||
<view class="share-title">分享</view>
|
||||
<view class="share-content">
|
||||
<!-- #ifdef MP -->
|
||||
<view class="share-box">
|
||||
<button class="share-btn" :plain="true" open-type="share">
|
||||
<view class="iconfont icon-share-friend"></view>
|
||||
<text>分享给好友</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="share-box" @click="openPosterPopup">
|
||||
<button class="share-btn" :plain="true">
|
||||
<view class="iconfont icon-pengyouquan"></view>
|
||||
<text>生成分享海报</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="share-box" @click="copyUrl">
|
||||
<button class="share-btn" :plain="true">
|
||||
<view class="iconfont icon-fuzhilianjie"></view>
|
||||
<text>复制链接</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="share-footer" @click="closeSharePopup"><text>取消分享</text></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<!-- 弹出规则 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="rulePopup" type="bottom">
|
||||
<view class="tips-layer">
|
||||
<view class="head" @click="closeRulePopup()">
|
||||
<view class="title">活动说明</view>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<view class="body">
|
||||
<view class="detail margin-bottom">{{ info.remark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</view>
|
||||
<ns-empty v-else text="暂无相关数据"></ns-empty>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inviteFriends from './public/js/invite_friends.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inviteList: [],
|
||||
info: null,
|
||||
page: 1,
|
||||
page_size: 5,
|
||||
total_num: 0,
|
||||
isClick: true,
|
||||
poster: '-1', //海报
|
||||
posterMsg: '' //海报错误信息
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getBaseInfo();
|
||||
if (this.storeToken) {
|
||||
this.getList();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/invite_friends');
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
mixins: [inviteFriends],
|
||||
onReady() {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/invite_friends.scss';
|
||||
</style>
|
||||
<style scoped>
|
||||
/deep/ .uni-popup__wrapper.bottom {
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
}
|
||||
|
||||
.poster-layer>>>.uni-popup__wrapper-box {
|
||||
max-height: initial !important;
|
||||
}
|
||||
</style>
|
||||
381
pages_tool/member/level.vue
Normal file
381
pages_tool/member/level.vue
Normal file
@@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="member-level">
|
||||
<view class="level-top">
|
||||
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
||||
</view>
|
||||
<view class="banner-container">
|
||||
<view class="memberInfo" v-if="memberInfo">
|
||||
<image :src="$util.img(memberInfo.headimg)" v-if="memberInfo.headimg" @error="memberInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
|
||||
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill"></image>
|
||||
<view class="member-desc">
|
||||
<view class="font-size-base">{{ memberInfo.nickname }}</view>
|
||||
<view class="font-size-activity-tag">当前等级:{{ memberInfo.member_level_name }}</view>
|
||||
</view>
|
||||
<view class="growth-rules font-size-tag" @click="growthRules">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
成长规则
|
||||
</view>
|
||||
</view>
|
||||
<swiper :style="{ width: '100vw', height: '390rpx' }" class="margin-bottom"
|
||||
:indicator-dots="swiperConfig.indicatorDots" :indicator-color="swiperConfig.indicatorColor"
|
||||
:indicator-active-color="swiperConfig.indicatorActiveColor" :autoplay="false"
|
||||
:interval="swiperConfig.interval" :duration="swiperConfig.duration" :circular="swiperConfig.circular"
|
||||
:previous-margin="swiperConfig.previousMargin" :next-margin="swiperConfig.nextMargin"
|
||||
@change="swiperChange" @animationfinish="animationfinish" :current="curIndex">
|
||||
<swiper-item :class="levelList.length == 1 ? 'image-container-box' : ''" v-for="(item, i) in levelList"
|
||||
:key="i">
|
||||
<view class="image-container" :class="[
|
||||
curIndex === 0
|
||||
? i === listLen - 1
|
||||
? 'item-left'
|
||||
: i === 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
: curIndex === listLen - 1
|
||||
? i === 0
|
||||
? 'item-right'
|
||||
: i === listLen - 2
|
||||
? 'item-left'
|
||||
: 'item-center'
|
||||
: i === curIndex - 1
|
||||
? 'item-left'
|
||||
: i === curIndex + 1
|
||||
? 'item-right'
|
||||
: 'item-center'
|
||||
]">
|
||||
<view class="slide-image" style="background-size: 100% 100%;background-repeat:no-repeat" :style="{
|
||||
transform: curIndex === i ? 'scale(' + scaleX + ',' + scaleY + ')' : 'scale(1,1)',
|
||||
transitionDuration: '.3s',
|
||||
transitionTimingFunction: 'ease'
|
||||
}">
|
||||
<image v-if="levelList[curIndex]['level_picture']" :src="$util.img(levelList[curIndex]['level_picture'])"/>
|
||||
<image v-else :style="{backgroundColor:levelList[curIndex]['bg_color']}"/>
|
||||
|
||||
<view class="info">
|
||||
<view class="level-detail" :style="{color:levelList[curIndex]['level_text_color']}">
|
||||
{{ levelList[curIndex].level_name }}
|
||||
<text class="isnow " :style="{color:levelList[curIndex]['level_text_color']}" v-if="levelId == item.level_id">当前等级</text>
|
||||
</view>
|
||||
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">当前成长值</view>
|
||||
<view class="growr-value" :style="{color:levelList[curIndex]['level_text_color']}">{{ growth }}</view>
|
||||
<block v-if="levelId == item.level_id">
|
||||
<block v-if="levelList[curIndex + 1] != undefined">
|
||||
<ns-progress :progress="levelList[curIndex + 1].rate"></ns-progress>
|
||||
<view class="residue-growr-value"
|
||||
:style="{color:levelList[curIndex]['level_text_color']}">
|
||||
再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0 }}成长值成为{{
|
||||
levelList[curIndex + 1].level_name
|
||||
}}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="residue-growr-value" :style="{color:levelList[curIndex]['level_text_color']}">您现在已经是最高等级</view>
|
||||
</block>
|
||||
</block>
|
||||
<block v-else>
|
||||
<ns-progress :progress="levelList[curIndex].rate" v-if="levelList[curIndex].needGrowth > 0"></ns-progress>
|
||||
<view class="residue-growr-value" v-if="levelList[curIndex].needGrowth > 0" :style="{color:levelList[curIndex]['level_text_color']}">
|
||||
再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="member-equity" v-if="levelList[curIndex].is_free_shipping > 0 || levelList[curIndex].consume_discount > 0 || levelList[curIndex].point_feedback > 0">
|
||||
<view class="equity-title">会员权益</view>
|
||||
<view class="equity-itme" v-if="levelList[curIndex].is_free_shipping > 0">
|
||||
<image :src="$util.img('public/uniapp/level/exemption_postage.png')" mode="aspectFit"></image>
|
||||
<view class="equity-content" :class="{ active: levelList[curIndex].consume_discount > 0 }">
|
||||
<text>包邮服务</text>
|
||||
<text class="equity-desc">提供商品包邮服务</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="equity-itme" v-if="levelList[curIndex].consume_discount > 0">
|
||||
<image :src="$util.img('public/uniapp/level/consumption_discount.png')" mode="aspectFit"></image>
|
||||
<view class="equity-content" :class="{ active: levelList[curIndex].point_feedback > 0 }">
|
||||
<text>享受消费折扣服务</text>
|
||||
<text class="equity-desc" v-if="levelList[curIndex].is_default == 1">不享受任何消费折扣和其他权益</text>
|
||||
<text class="equity-desc" v-else>提供{{ levelList[curIndex].consume_discount }}折消费折扣</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="equity-itme" v-if="levelList[curIndex].point_feedback > 0">
|
||||
<image :src="$util.img('public/uniapp/level/integral_feedback.png')" mode="aspectFit"></image>
|
||||
<view class="equity-content">
|
||||
<text>享受积分回馈服务</text>
|
||||
<text class="equity-desc">提供{{ levelList[curIndex].point_feedback }}倍积分回馈倍率</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="member-gift" v-if="levelList[curIndex].send_balance > 0 || levelList[curIndex].send_balance > 0 || levelList[curIndex].send_coupon">
|
||||
<view class="gift-title">会员礼包</view>
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_point > 0">
|
||||
<image :src="$util.img('public/uniapp/level/integral.png')" mode="aspectFit"></image>
|
||||
<view class="gift-content" :class="{ active: levelList[curIndex].send_balance > 0 }">
|
||||
<text>积分礼包</text>
|
||||
<text class="gift-desc">赠送{{ levelList[curIndex].send_point }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_balance > 0">
|
||||
<image :src="$util.img('public/uniapp/level/red_packet.png')" mode="aspectFit"></image>
|
||||
<view class="gift-content" :class="{ active: levelList[curIndex].send_coupon }">
|
||||
<text>红包礼包</text>
|
||||
<text class="gift-desc">赠送{{ levelList[curIndex].send_balance }}元红包</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gift-itme" v-if="levelList[curIndex].send_coupon" @click="openCoupon(levelList[curIndex].send_coupon)">
|
||||
<image :src="$util.img('public/uniapp/level/coupon.png')" mode="aspectFit"></image>
|
||||
<view class="gift-content">
|
||||
<text>优惠券礼包</text>
|
||||
<text class="gift-desc">赠送{{ levelList[curIndex].coupon_length }}张优惠券</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券 -->
|
||||
<uni-popup ref="couponPopup" type="bottom">
|
||||
<view class="coupon-popup-box">
|
||||
<view class="coupon-popup-title" @click="closeCoupon">
|
||||
优惠券
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<scroll-view class="coupon-popup-content" scroll-y>
|
||||
<view class="coupon-item" v-for="(item, index) in couponPopList" :key="index">
|
||||
<view class="coupon-name">
|
||||
<text class="name">{{ item.coupon_name }}</text>
|
||||
<text class="desc"></text>
|
||||
</view>
|
||||
<view class="coupon-price" v-if="item.type == 'reward'">
|
||||
<text>{{ item.money }}</text>
|
||||
元
|
||||
</view>
|
||||
<view class="coupon-price" v-if="item.type == 'discount'">
|
||||
<text>{{ $util.numberFixed(item.discount, 1) }}</text>
|
||||
折
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsProgress from '@/pages_tool/components/ns-progress/ns-progress.vue';
|
||||
import toTop from '@/components/toTop/toTop.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsProgress,
|
||||
toTop,
|
||||
uniPopup
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
couponPopList: [],
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
remark() {
|
||||
if (this.levelList[this.curIndex]) {
|
||||
return this.levelList[this.curIndex].remark;
|
||||
}
|
||||
},
|
||||
nextIndex() {
|
||||
let num = 0;
|
||||
if (this.curIndex == this.levelList.length - 1) {
|
||||
return this.curIndex;
|
||||
} else {
|
||||
return this.curIndex + 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getLevelRule();
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/level');
|
||||
});
|
||||
} else {
|
||||
this.getLevelList();
|
||||
}
|
||||
// #ifdef MP-ALIPAY
|
||||
this.scaleX = 1
|
||||
this.scaleY = 1
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function() {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
for (var i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].send_coupon) {
|
||||
this.levelList[i].coupon_length = this.levelList[i].send_coupon.split(',')
|
||||
.length;
|
||||
}
|
||||
}
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
if (parseFloat(v.growth) < parseFloat(this.growth)) {
|
||||
v.needGrowth = 0;
|
||||
v.rate = 100;
|
||||
} else {
|
||||
v.needGrowth = (parseFloat(v.growth) - parseFloat(this.growth))
|
||||
.toFixed(2);
|
||||
v.rate = (this.growth / v.growth).toFixed(2) * 100;
|
||||
}
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
growthRules() {
|
||||
this.$util.redirectTo('/pages_tool/member/level_growth_rules');
|
||||
},
|
||||
openCoupon(data) {
|
||||
this.couponPopList = [];
|
||||
this.$api.sendRequest({
|
||||
url: '/coupon/api/coupon/couponbyid',
|
||||
data: {
|
||||
id: data
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.couponPopList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$refs.couponPopup.open();
|
||||
},
|
||||
closeCoupon() {
|
||||
this.$refs.couponPopup.close();
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getLevelList();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/level.scss';
|
||||
</style>
|
||||
275
pages_tool/member/level_growth_rules.vue
Normal file
275
pages_tool/member/level_growth_rules.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="member-level">
|
||||
<view class="grow-explain">
|
||||
<view class="explain-title">
|
||||
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit"></image>
|
||||
成长值说明
|
||||
<image :src="$util.img('public/uniapp/level/growth_that_right.png')" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="explain-table">
|
||||
<view class="explain-tr">
|
||||
<text class="explain-th">等级</text>
|
||||
<text class="explain-th">成长值</text>
|
||||
</view>
|
||||
<view class="explain-tr" v-for="(item, index) in levelList" :key="index">
|
||||
<text class="explain-td">{{ item.level_name }}</text>
|
||||
<text class="explain-td">{{ item.growth }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grow-value">
|
||||
<view class="title">
|
||||
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
|
||||
<text>什么是成长值</text>
|
||||
</view>
|
||||
<view class="content color-tip">成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。</view>
|
||||
</view>
|
||||
<view class="acquisition-grow">
|
||||
<view class="title">
|
||||
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit"></image>
|
||||
<text>如何获得成长值</text>
|
||||
</view>
|
||||
<view class="content color-tip">
|
||||
<text>1、注册会员送x成长值。</text>
|
||||
<text>2、会员充值到余额送x成长值。</text>
|
||||
<text>3、会员签到送x成长值。</text>
|
||||
<text>4、会员消费x元,交易完成即可获得x个成长值。</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nsProgress from '@/pages_tool/components/ns-progress/ns-progress.vue';
|
||||
import toTop from '@/components/toTop/toTop.vue';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
nsProgress,
|
||||
toTop
|
||||
},
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0,
|
||||
descIndex: 0,
|
||||
isDescAnimating: false,
|
||||
scaleX: (634 / 540).toFixed(4),
|
||||
scaleY: (378 / 330).toFixed(4),
|
||||
swiperConfig: {
|
||||
//type==1时的默认参数
|
||||
indicatorDots: false,
|
||||
indicatorColor: 'rgba(255, 255, 255, .4)',
|
||||
indicatorActiveColor: 'rgba(255, 255, 255, 1)',
|
||||
interval: 3000,
|
||||
duration: 300,
|
||||
circular: false,
|
||||
previousMargin: '58rpx',
|
||||
nextMargin: '58rpx'
|
||||
},
|
||||
levelList: [{
|
||||
needGrowth: 0,
|
||||
growth: 0
|
||||
}],
|
||||
levelId: 0,
|
||||
growth: 0,
|
||||
|
||||
nowIndex: 0, //我当前所在等级的index
|
||||
rule: [] //成长值规则
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listLen() {
|
||||
return this.levelList.length;
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
//会员等级
|
||||
this.getLevelList();
|
||||
this.getLevelRule();
|
||||
},
|
||||
onShow() {},
|
||||
filters: {
|
||||
rate(index, list, growth) {
|
||||
let nowGrowth = Number(growth);
|
||||
let minGrouth = Number(list[index].growth);
|
||||
if (index == list.length - 1) {
|
||||
return nowGrowth > minGrouth ? 100 : 0;
|
||||
} else {
|
||||
let maxGrouth = Number(list[index + 1].growth);
|
||||
let num2 = nowGrowth - minGrouth;
|
||||
let num1 = maxGrouth - minGrouth;
|
||||
let num = Math.floor((num2 / num1) * 100);
|
||||
return num > 100 ? 100 : num;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
let that = this;
|
||||
this.curIndex = e.detail.current;
|
||||
this.isDescAnimating = true;
|
||||
let timer = setTimeout(function() {
|
||||
that.descIndex = e.detail.current;
|
||||
clearTimeout(timer);
|
||||
}, 150);
|
||||
},
|
||||
animationfinish(e) {
|
||||
this.isDescAnimating = false;
|
||||
},
|
||||
getBannerDetail(index) {
|
||||
uni.showLoading({
|
||||
title: '将前往详情页面',
|
||||
duration: 2000,
|
||||
mask: true
|
||||
});
|
||||
},
|
||||
getLevelList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberlevel/lists',
|
||||
success: res => {
|
||||
if (res.data && res.code == 0) {
|
||||
this.levelList = res.data;
|
||||
this.levelId = this.memberInfo.member_level;
|
||||
this.growth = this.memberInfo.growth;
|
||||
for (let i = 0; i < this.levelList.length; i++) {
|
||||
if (this.levelList[i].level_id == this.levelId) {
|
||||
this.curIndex = i;
|
||||
this.descIndex = i;
|
||||
this.nowIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.levelList.forEach((v, i) => {
|
||||
let rate = 0;
|
||||
if (i != this.levelList.length - 1) {
|
||||
v.needGrowth = Number(this.levelList[i + 1].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i + 1].growth).toFixed(2) * 100;
|
||||
}
|
||||
} else {
|
||||
v.needGrowth = Number(this.levelList[i].growth) - Number(this.growth); //距离下一阶段需要多少成长值
|
||||
if (v.needGrowth <= 0) {
|
||||
rate = 100;
|
||||
} else {
|
||||
rate = (this.growth / this.levelList[i].growth).toFixed(2) * 100;
|
||||
}
|
||||
}
|
||||
v.rate = rate;
|
||||
});
|
||||
|
||||
this.levelList.forEach(v => {
|
||||
if (v.consume_discount) {
|
||||
v.consume_discount = (v.consume_discount / 10).toFixed(2);
|
||||
}
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getLevelRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/accountrule',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data && res.data.growth) {
|
||||
this.rule = res.data.growth;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.grow-explain {
|
||||
padding: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.explain-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
|
||||
image {
|
||||
margin: 0 20rpx;
|
||||
width: 54rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.explain-tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.explain-th {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
&~.explain-th {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
|
||||
flex: 1;
|
||||
background-color: #f6f1e4;
|
||||
}
|
||||
|
||||
.explain-td {
|
||||
padding: 10rpx 30rpx;
|
||||
|
||||
&~.explain-td {
|
||||
border-left: 4rpx solid #fff;
|
||||
}
|
||||
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
flex: 1;
|
||||
background-color: #fcfbf7;
|
||||
}
|
||||
}
|
||||
|
||||
.grow-value,
|
||||
.acquisition-grow {
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 24rpx;
|
||||
margin-left: 40rpx;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
195
pages_tool/member/modify_face.vue
Normal file
195
pages_tool/member/modify_face.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="nc-modify-content">
|
||||
<view class="modify">
|
||||
<view>
|
||||
<image v-if="newImg == ''" :src="memberImg ? $util.img(memberImg) : $util.getDefaultImage().head" @error="memberImg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
<image v-else :src="$util.img(newImg)" @error="newImg = $util.getDefaultImage().head" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="opection-box">
|
||||
<block v-if="newImg == ''">
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<button type="primary" @click="uploadFace()">点击上传</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-ALIPAY -->
|
||||
<button type="primary" @click="chooseImage()">点击上传</button>
|
||||
<!-- #endif -->
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="opec">
|
||||
<button size="mini" class="mini" type="primary" @click="save()">确认保存</button>
|
||||
<button size="mini" class="mini" type="primary" @click="chooseImage()">重新上传</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<img-cropping selWidth="300" selHeight="300" @upload="myUpload" ref="imgCropping"></img-cropping>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import imgCropping from '@/pages_tool/components/img-cropping/cropping.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
memberImg: '',
|
||||
newImg: '',
|
||||
imgurl: ''
|
||||
};
|
||||
},
|
||||
components: {
|
||||
imgCropping
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/modify_face'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.memberImg = this.memberInfo.headimg;
|
||||
this.imgurl = this.memberInfo.headimg;
|
||||
},
|
||||
methods: {
|
||||
chooseImage() {
|
||||
this.$refs.imgCropping.fSelect();
|
||||
},
|
||||
//上传返回图片
|
||||
myUpload(rsp) {
|
||||
let app_type = 'h5';
|
||||
let app_type_name = 'H5';
|
||||
|
||||
// #ifdef MP
|
||||
app_type = 'weapp';
|
||||
app_type_name = 'weapp';
|
||||
// #endif
|
||||
uni.request({
|
||||
url: this.$config.baseUrl + '/api/upload/headimgBase64',
|
||||
method: 'POST',
|
||||
data: {
|
||||
app_type: app_type,
|
||||
app_type_name: app_type_name,
|
||||
images: rsp.base64
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded;application/json'
|
||||
},
|
||||
dataType: 'json',
|
||||
responseType: 'text',
|
||||
success: res => {
|
||||
if (res.data.code == 0) {
|
||||
this.newImg = res.data.data.pic_path;
|
||||
this.imgurl = res.data.data.pic_path;
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '头像上传失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
previewImage() {
|
||||
uni.previewImage({
|
||||
current: 0,
|
||||
urls: this.images
|
||||
});
|
||||
},
|
||||
save() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/modifyheadimg',
|
||||
data: {
|
||||
headimg: this.imgurl
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.memberInfo.headimg = this.imgurl;
|
||||
this.$store.commit('setMemberInfo', this.memberInfo);
|
||||
this.$util.showToast({
|
||||
title: '头像修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
uploadFace() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
this.$api.upload({
|
||||
url: '/api/upload/headimg',
|
||||
filePath: tempFilePaths[0],
|
||||
fileType: 'image',
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
this.newImg = res.data.pic_path;
|
||||
this.imgurl = res.data.pic_path;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modify {
|
||||
position: relative;
|
||||
padding-top: 50rpx;
|
||||
|
||||
view {
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
background-color: #ffffff;
|
||||
border: 4rpx solid #ffffff;
|
||||
border-radius: 100%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.opection-box {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.opec {
|
||||
width: 100%;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
button {
|
||||
padding: 0 30rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
279
pages_tool/member/pay_password.vue
Normal file
279
pages_tool/member/pay_password.vue
Normal file
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<view class="tips" v-if="step != 0">请输入6位支付密码,建议不要使用重复或连续数字</view>
|
||||
<view class="tips" v-else>验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码</view>
|
||||
<view class="password-wrap">
|
||||
<myp-one :maxlength="step == 0 ? 4 : 6" :is-pwd="step != 0" @input="input" ref="input" :auto-focus="true"></myp-one>
|
||||
<view v-show="step == 0" class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'" @click="sendMobileCode">
|
||||
{{ dynacodeData.codeText }}
|
||||
</view>
|
||||
<view class="action-tips" v-show="step == 0">输入短信验证码</view>
|
||||
<view class="action-tips" v-show="step == 1">请设置支付密码</view>
|
||||
<view class="action-tips" v-show="step == 2">请再次输入</view>
|
||||
<view class="btn color-base-bg color-base-border" :class="{ disabled: !isClick }" @click="confirm">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mypOne from '@/pages_tool/components/myp-one/myp-one.vue';
|
||||
export default {
|
||||
components: {
|
||||
mypOne
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isClick: false,
|
||||
step: 1,
|
||||
key: '', // 短信key
|
||||
code: '', // 动态码
|
||||
password: '', // 密码
|
||||
repassword: '', // 重复密码
|
||||
isSub: false, // 防重复提交
|
||||
back: '', // 返回页
|
||||
dynacodeData: {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取验证码',
|
||||
isSend: false
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.back) this.back = option.back;
|
||||
|
||||
// 判断登录
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo('/pages_tool/login/login');
|
||||
} else {
|
||||
if (this.memberInfo.mobile == '') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设置支付密码需要先绑定手机号,是否立即绑定?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$util.redirectTo('/pages_tool/member/info', {
|
||||
action: 'mobile',
|
||||
back: this.back
|
||||
}, 'redirectTo');
|
||||
} else {
|
||||
if (this.back) this.$util.redirectTo(this.back);
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.step = 0;
|
||||
this.sendMobileCode();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
input(val) {
|
||||
if (this.step == 0) {
|
||||
if (val.length == 4) {
|
||||
this.isClick = true;
|
||||
this.code = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
} else if (this.step == 1) {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.password = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
} else {
|
||||
if (val.length == 6) {
|
||||
this.isClick = true;
|
||||
this.repassword = val;
|
||||
} else {
|
||||
this.isClick = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
if (this.isClick) {
|
||||
if (this.step == 0) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/verifypaypwdcode',
|
||||
data: {
|
||||
code: this.code,
|
||||
key: this.key
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (this.step == 1) {
|
||||
this.$refs.input.clear();
|
||||
this.isClick = false;
|
||||
this.step = 2;
|
||||
} else {
|
||||
if (this.password == this.repassword) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/modifypaypassword',
|
||||
data: {
|
||||
key: this.key,
|
||||
code: this.code,
|
||||
password: this.password
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '修改成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (this.back) this.$util.redirectTo(this.back, {},
|
||||
'redirectTo');
|
||||
else this.$util.redirectTo('/pages/member/index');
|
||||
}, 2000);
|
||||
} else {
|
||||
this.initInfo();
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '两次输入的密码不一致',
|
||||
success: res => {
|
||||
this.initInfo();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initInfo() {
|
||||
this.isClick = false;
|
||||
this.step = 1;
|
||||
this.password = '';
|
||||
this.repassword = '';
|
||||
this.oldpassword = '';
|
||||
this.isSub = false;
|
||||
this.$refs.input.clear();
|
||||
},
|
||||
/**
|
||||
* 发送手机动态码
|
||||
*/
|
||||
sendMobileCode() {
|
||||
if (this.dynacodeData.seconds != 120) return;
|
||||
if (this.dynacodeData.isSend) return;
|
||||
this.dynacodeData.isSend = true;
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/paypwdcode',
|
||||
success: res => {
|
||||
this.dynacodeData.isSend = false;
|
||||
if (res.code >= 0) {
|
||||
this.key = res.data.key;
|
||||
|
||||
if (this.dynacodeData.seconds == 120 && this.dynacodeData.timer == null) {
|
||||
this.dynacodeData.timer = setInterval(() => {
|
||||
this.dynacodeData.seconds--;
|
||||
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: 'request:fail'
|
||||
});
|
||||
this.dynacodeData.isSend = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
mobile(mobile) {
|
||||
return mobile.substring(0, 4 - 1) + '****' + mobile.substring(6 + 1);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'dynacodeData.seconds': {
|
||||
handler(newValue, oldValue) {
|
||||
if (newValue == 0) {
|
||||
clearInterval(this.dynacodeData.timer);
|
||||
this.dynacodeData = {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取动态码',
|
||||
isSend: false
|
||||
};
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
|
||||
.tips {
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
padding-top: 100rpx;
|
||||
}
|
||||
|
||||
.password-wrap {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.action-tips {
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.dynacode {
|
||||
line-height: 1;
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
|
||||
&.disabled {
|
||||
background: #ccc !important;
|
||||
border-color: #ccc !important;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
161
pages_tool/member/point.vue
Normal file
161
pages_tool/member/point.vue
Normal file
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="point">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="custom-navbar" :style="{
|
||||
'padding-top': menuButtonBounding.top + 'px',
|
||||
'height': menuButtonBounding.height + 'px'
|
||||
}"
|
||||
>
|
||||
<view class="navbar-wrap">
|
||||
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
|
||||
<view class="navbar-title">
|
||||
我的积分
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/point/point_bg.png') + ') no-repeat right bottom/ auto 340rpx, linear-gradient(314deg, #F16914 0%, #FEAA4C 100%)' }">
|
||||
<view class="point price-font">{{ pointInfo.point }}</view>
|
||||
<view class="title">当前积分</view>
|
||||
<view class="flex-box">
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ pointInfo.totalPoint }}</view>
|
||||
<view class="font-size-tag">累计积分</view>
|
||||
</view>
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ pointInfo.totalConsumePoint }}</view>
|
||||
<view class="font-size-tag">累计消费</view>
|
||||
</view>
|
||||
<view class="flex-item">
|
||||
<view class="num price-font">{{ pointInfo.todayPoint }}</view>
|
||||
<view class="font-size-tag">今日获得</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-wrap">
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_tool/member/point_detail')">
|
||||
<view class="icon">
|
||||
<image :src="$util.img('public/uniapp/point/point_detail_icon.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title">积分明细</text>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/point/list')">
|
||||
<view class="icon">
|
||||
<image :src="$util.img('public/uniapp/point/point_shop.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title">积分商城</text>
|
||||
</view>
|
||||
</view>
|
||||
<!--
|
||||
<view class="task-wrap">
|
||||
<view class="title">做任务赚积分</view>
|
||||
<view class="task-item" @click="toSign">
|
||||
<view class="icon"><text class="iconfont icon-qiandao1"></text></view>
|
||||
<view class="wrap">
|
||||
<view class="title">每日签到</view>
|
||||
<view class="desc color-tip font-size-tag">连续签到可获得更多积分</view>
|
||||
</view>
|
||||
<view class="btn">去签到</view>
|
||||
</view>
|
||||
<view class="task-item" @click="$util.redirectTo('/pages/index/index')">
|
||||
<view class="icon"><text class="iconfont icon-shangpin"></text></view>
|
||||
<view class="wrap">
|
||||
<view class="title">购买商品</view>
|
||||
<view class="desc color-tip font-size-tag">购买商品可获得积分</view>
|
||||
</view>
|
||||
<view class="btn">去下单</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pointInfo: {
|
||||
point: 0,
|
||||
totalPoint: 0,
|
||||
totalConsumePoint: 0,
|
||||
todayPoint: 0
|
||||
},
|
||||
menuButtonBounding: {} // 小程序胶囊属性
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/point');
|
||||
});
|
||||
} else {
|
||||
this.getMemberPoint();
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef MP
|
||||
this.menuButtonBounding = uni.getMenuButtonBoundingClientRect();
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
toSign() {
|
||||
this.$util.redirectTo('/pages_tool/member/signin');
|
||||
},
|
||||
getMemberPoint() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/point',
|
||||
data: {
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.pointInfo.point = parseInt(res.data.point);
|
||||
this.pointInfo.totalPoint = parseInt(res.data.point_all);
|
||||
this.pointInfo.totalConsumePoint = parseInt(res.data.point_use);
|
||||
this.pointInfo.todayPoint = parseInt(res.data.point_today);
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取充值提现配置
|
||||
*/
|
||||
getMemberrechargeConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberrecharge/api/memberrecharge/config',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.memberrechargeConfig = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getMemberPoint();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/point.scss';
|
||||
</style>
|
||||
342
pages_tool/member/point_detail.vue
Normal file
342
pages_tool/member/point_detail.vue
Normal file
@@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<!-- <view class="tab color-bg">
|
||||
<view class="tab-left">
|
||||
<picker mode="date" :value="searchType.date" @change="bindDateChange" fields="month">
|
||||
<view class="uni-input">
|
||||
{{ date }}
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="tab-right">
|
||||
<picker @change="bindPickerChange" :value="pointIndex" :range="pointType" class="picker" range-key="label">
|
||||
<text class="desc uni-input">{{ pointType[pointIndex].label }}</text>
|
||||
<text class="iconfont icon-iconangledown"></text>
|
||||
</picker>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<mescroll-uni @getData="getData" class="member-point" ref="mescroll">
|
||||
<view slot="list">
|
||||
<block v-if="dataList.length">
|
||||
<view class="detailed-wrap">
|
||||
<view class="cont">
|
||||
<view class="detailed-item" v-for="(item, index) in dataList" :key="index">
|
||||
<view class="info" @click="toFromDetail(item)">
|
||||
<view class="event">{{ item.type_name }}</view>
|
||||
<view class="time-box">
|
||||
<text class="time color-tip">{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num color-base-text" v-if="item.account_data > 0">+{{ parseInt(item.account_data) }}</view>
|
||||
<view class="num " v-else>{{ parseInt(item.account_data) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="cart-empty"><ns-empty></ns-empty></view>
|
||||
</block>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
});
|
||||
return {
|
||||
memberAccount: {
|
||||
point: 0
|
||||
},
|
||||
dataList: [],
|
||||
date: currentDate,
|
||||
searchType: {
|
||||
from_type: 0,
|
||||
date: ''
|
||||
},
|
||||
pointType: [
|
||||
{
|
||||
label: '全部',
|
||||
value: '0'
|
||||
}
|
||||
], //积分类型
|
||||
pointIndex: 0,
|
||||
related_id: 0
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login',
|
||||
{
|
||||
back: '/pages_tool/member/point'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.related_id) this.related_id = option.related_id ? option.related_id : 0;
|
||||
if (option.from_type) this.searchType.from_type = option.from_type;
|
||||
this.getPointType();
|
||||
},
|
||||
methods: {
|
||||
bindDateChange: function(e) {
|
||||
var temp = e.target.value;
|
||||
var tempArr = temp.split('-');
|
||||
this.date = tempArr[0] + '年' + tempArr[1] + '月';
|
||||
this.searchType.date = e.target.value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
if (type === 'start') {
|
||||
year = year - 60;
|
||||
} else if (type === 'end') {
|
||||
year = year + 2;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}年${month}月`;
|
||||
},
|
||||
bindPickerChange(e) {
|
||||
this.pointIndex = e.detail.value;
|
||||
this.searchType.from_type = this.pointType[this.pointIndex].value;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
//获取分类类型
|
||||
getPointType() {
|
||||
var temp = [],
|
||||
that = this;
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/fromType',
|
||||
success: res => {
|
||||
for (var index in res.point) {
|
||||
var obg = {};
|
||||
obg.label = res.point[index].type_name;
|
||||
obg.value = index;
|
||||
that.pointType.push(obg);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
toList() {
|
||||
this.$util.redirectTo('/pages_promotion/point/list');
|
||||
},
|
||||
toOrderList() {
|
||||
this.$util.redirectTo('/pages_promotion/point/order_list');
|
||||
},
|
||||
toFromDetail(item) {
|
||||
if (item.from_type == 'pointexchange') {
|
||||
this.$api.sendRequest({
|
||||
url: '/pointexchange/api/order/info',
|
||||
data: {
|
||||
order_id: item.type_tag
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
var data = res.data;
|
||||
if (data.type == 1 && data.relate_order_id) {
|
||||
switch (data.delivery_type) {
|
||||
case 'store':
|
||||
this.$util.redirectTo('/pages/order/detail_pickup', {
|
||||
order_id: data.relate_order_id
|
||||
});
|
||||
break;
|
||||
case 'local':
|
||||
this.$util.redirectTo('/pages/order/detail_local_delivery', {
|
||||
order_id: data.relate_order_id
|
||||
});
|
||||
break;
|
||||
default:
|
||||
this.$util.redirectTo('/pages/order/detail', {
|
||||
order_id: data.relate_order_id
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$util.redirectTo('/pages/order/detail_point', {
|
||||
order_id: data.order_id
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (item.from_type == 'pointcash') {
|
||||
this.$util.redirectTo('/pages/order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
} else if (item.from_type == 'memberconsume') {
|
||||
// this.$util.redirectTo('/pages/order/detail', {
|
||||
// order_id: item.type_tag
|
||||
// });
|
||||
} else if (item.from_type == 'pointexchangerefund' && parseInt(item.type_tag) != 0) {
|
||||
this.$util.redirectTo('/pages/order/detail_point', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
} else if (item.from_type == 'refund' && parseInt(item.type_tag) != 0) {
|
||||
this.$util.redirectTo('/pages/order/detail', {
|
||||
order_id: item.type_tag
|
||||
});
|
||||
}
|
||||
},
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
account_type: 'point',
|
||||
from_type: this.searchType.from_type,
|
||||
date: this.searchType.date,
|
||||
related_id: this.related_id
|
||||
},
|
||||
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.dataList = []; //如果是第一页需手动制空列表
|
||||
this.related_id = 0;
|
||||
}
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.tab {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 80rpx;
|
||||
background-color: $color-bg;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
.tab-left{
|
||||
display: flex;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.tab-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-empty {
|
||||
margin-top: 208rpx !important;
|
||||
}
|
||||
|
||||
.detailed-wrap {
|
||||
background: #fff;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
padding-top: 20rpx;
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
height: 90rpx;
|
||||
|
||||
& > view {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
padding: 0 $padding;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
.detailed-item {
|
||||
padding: 30rpx 0 32rpx;
|
||||
margin: 0 32rpx;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-right: 180rpx;
|
||||
|
||||
.event {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.time-box {
|
||||
line-height: 1;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: $font-size-activity-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 160rpx;
|
||||
position: absolute;
|
||||
right: 17rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
text-align: right;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
212
pages_tool/member/public/css/balance.scss
Normal file
212
pages_tool/member/public/css/balance.scss
Normal file
@@ -0,0 +1,212 @@
|
||||
.custom-navbar {
|
||||
width: 100vw;
|
||||
padding-bottom: 20rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: unset;
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
background-size: 100% 380rpx;
|
||||
// #endif
|
||||
|
||||
.navbar-wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
left: 30rpx;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-navbar-block {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.head-wrap {
|
||||
// width: 100vw;
|
||||
background-size: 100%;
|
||||
padding: 32rpx 28rpx;
|
||||
box-sizing: border-box;
|
||||
// border-radius: 0 0 100% 100%/0 0 70rpx 70rpx;
|
||||
overflow: hidden;
|
||||
margin: 24rpx 28rpx;
|
||||
border-radius: 24rpx;
|
||||
// #ifdef MP-WEIXIN
|
||||
padding-top: 160rpx;
|
||||
// #endif
|
||||
height: 352rpx;
|
||||
.title {
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
color: #F6F6F6;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.balance {
|
||||
color: var(--btn-text-color);
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
margin-bottom: 20rpx;
|
||||
// font-size: 64rpx;
|
||||
font-size: 80rpx;
|
||||
line-height: 112rpx;
|
||||
font-weight: 500 !important;
|
||||
|
||||
font-family: PingFang SC;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
margin-top: 56rpx;
|
||||
|
||||
.flex-item {
|
||||
flex: 1;
|
||||
|
||||
.num {
|
||||
font-size: 34rpx;
|
||||
margin-bottom: 20rpx;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
view {
|
||||
text-align: left;
|
||||
color: #F6F6F6;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-wrap: nowrap;
|
||||
flex-wrap: nowrap;
|
||||
position: relative;
|
||||
gap: 22rpx;
|
||||
margin-top: 32rpx;
|
||||
.btn{
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
font-family: PingFang SC;
|
||||
border-radius: 180rpx;
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: normal;
|
||||
border: 2rpx solid #fff;
|
||||
:nth-child(2) {
|
||||
background: #fff;
|
||||
color: #4285f8;
|
||||
}
|
||||
}
|
||||
.recharge{
|
||||
background: #fff;
|
||||
color: #4285f8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-wrap {
|
||||
border-radius: 20rpx;
|
||||
margin: 0 24rpx;
|
||||
padding: 0 24rpx;
|
||||
background: #fff;
|
||||
// transform: translateY(-90rpx);
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4rpx 0;
|
||||
|
||||
.icon {
|
||||
height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
margin-right: 20rpx;
|
||||
|
||||
.iconfont {
|
||||
font-size: 46rpx;
|
||||
-webkit-background-clip: text !important;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background: linear-gradient(135deg, #FE7849 0%, #FF1959 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.iconright {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding-bottom: 100rpx;
|
||||
|
||||
view {
|
||||
width: calc(100vw - 64rpx);
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 80rpx;
|
||||
margin: 0 auto 30rpx auto;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.recharge-withdraw {
|
||||
background: #FF4646;
|
||||
}
|
||||
|
||||
.withdraw {
|
||||
border: 4rpx solid #FF4646;
|
||||
box-sizing: border-box;
|
||||
line-height: 72rpx;
|
||||
color: #FF4646;
|
||||
}
|
||||
}
|
||||
670
pages_tool/member/public/css/card.scss
Normal file
670
pages_tool/member/public/css/card.scss
Normal file
@@ -0,0 +1,670 @@
|
||||
.member-level {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
.level-top {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 460rpx;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.banner-container {
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
.memberInfo {
|
||||
width: 100%;
|
||||
height: 140rpx;
|
||||
padding: 40rpx 40rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.growth-rules {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
right: 40rpx;
|
||||
font-size: 24rpx;
|
||||
z-index: 10;
|
||||
.iconfont{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.member-desc {
|
||||
width: calc(100% - 20rpx - 100rpx);
|
||||
height: 100%;
|
||||
padding: 16rpx 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
view {
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: #ffffff;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.expire-time {
|
||||
color: #ccc;
|
||||
font-weight: normal;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.demand {
|
||||
width: 100%;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
.demand-title {
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 39rpx;
|
||||
height: 35rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.demand-info {
|
||||
padding: 10rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 27rpx;
|
||||
border-radius: 10rpx;
|
||||
justify-content: space-between;
|
||||
height: 150rpx;
|
||||
background: #ffffff;
|
||||
.info-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
color: #000;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
color: #959595;
|
||||
}
|
||||
}
|
||||
}
|
||||
progress {
|
||||
margin-top: 39rpx;
|
||||
}
|
||||
.info-size {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: $font-size-tag;
|
||||
color: #959595;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.uni-swiper-dots {
|
||||
bottom: 30rpx !important;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.slide-image {
|
||||
width: 535rpx;
|
||||
height: 300rpx;
|
||||
z-index: 200;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.bg-border{
|
||||
width: calc(100% - 40rpx);
|
||||
height: calc(100% - 40rpx);
|
||||
position: absolute;
|
||||
top: 18rpx;
|
||||
left: 20rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, .2);
|
||||
z-index: 10;
|
||||
border-radius: 10rpx;
|
||||
opacity: .5;
|
||||
|
||||
}
|
||||
.growth-rules{
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 40rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
.info {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
.level-detail {
|
||||
font-size: 52rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
.growr-name {
|
||||
font-size: 24rpx;
|
||||
margin-top: 50rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.growr-value {
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.progress {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.residue-growr-value {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
view {
|
||||
color: #ffffff;
|
||||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
.now_growth {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.pic {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 160rpx;
|
||||
}
|
||||
}
|
||||
.isnow {
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
padding: 2rpx;
|
||||
line-height: 1;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-left {
|
||||
justify-content: flex-end;
|
||||
padding: 56rpx 26rpx 0 0;
|
||||
}
|
||||
|
||||
.image-container-box .item-left {
|
||||
justify-content: center;
|
||||
padding: 56rpx 0 0 0;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
justify-content: flex-start;
|
||||
padding: 56rpx 0 0 26rpx;
|
||||
}
|
||||
|
||||
.item-center {
|
||||
justify-content: center;
|
||||
padding: 56rpx 0 0 0;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 30rpx 20rpx;
|
||||
// padding: 20rpx 30rpx;
|
||||
margin:$margin-updown $margin-both;
|
||||
.gift-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.equity-itme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.equity-content {
|
||||
padding: 20rpx 0;
|
||||
line-height: 1;
|
||||
&.active {
|
||||
border-bottom: 2rpx solid #e5e5e5;
|
||||
}
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.equity-desc {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-top: 16rpx;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-privilege-list{
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.card-privilege-item{
|
||||
width: 33%;
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
.card-privilege-icon{
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
line-height: 1;
|
||||
}
|
||||
.card-privilege-name{
|
||||
color: $color-title;
|
||||
font-size: $font-size-sub;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
.card-privilege-text{
|
||||
color: $color-tip;
|
||||
font-size: $font-size-goods-tag;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.iconfont {
|
||||
font-size: 60rpx;
|
||||
background-image:-webkit-linear-gradient(top,#E3B66B,#F7DAA5);
|
||||
-webkit-background-clip:text;
|
||||
-webkit-text-fill-color:transparent;
|
||||
}
|
||||
.icon-zhekou,.icon-hongbao{
|
||||
font-size: 54rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.member-gift {
|
||||
background-color: #fff;
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
.gift-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.gift-itme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.gift-content {
|
||||
&.active {
|
||||
border-bottom: 2rpx solid #e5e5e5;
|
||||
}
|
||||
padding: 20rpx 0;
|
||||
line-height: 1;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.gift-desc {
|
||||
font-size: 24rpx;
|
||||
margin-top: 16rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.desc-wrap {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
padding: 24rpx 66rpx 0;
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
color: #222222;
|
||||
font-size: $font-size-base;
|
||||
font-family: 'PingFangTC-Regular';
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 4rpx;
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #999999;
|
||||
font-size: $font-size-tag;
|
||||
font-family: 'PingFangTC-Regular';
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes descAnimation {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes descAnimation {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-popup-box {
|
||||
background-color: #f7f7f7;
|
||||
.coupon-popup-title {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 44rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.coupon-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 4rpx;
|
||||
.coupon-name {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.desc {
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #ababab;
|
||||
}
|
||||
}
|
||||
.coupon-price {
|
||||
color: red;
|
||||
text {
|
||||
font-size: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-popup-content {
|
||||
max-height: 390rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.card-content-head{
|
||||
text-align: center;
|
||||
color: $color-title;
|
||||
margin: 20rpx 0;
|
||||
.line-box{
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 35%;
|
||||
margin-top: 26rpx;
|
||||
.line{
|
||||
background-color: $color-title;
|
||||
width: 60rpx;
|
||||
height: 2rpx;
|
||||
}
|
||||
}
|
||||
.card-content-title{
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
font-size: $font-size-base;
|
||||
color: $color-title;
|
||||
}
|
||||
}
|
||||
|
||||
.right{
|
||||
float: right;
|
||||
}
|
||||
.clear{
|
||||
clear: both;
|
||||
}
|
||||
.card-time-list{
|
||||
margin: -7.5rpx;
|
||||
white-space: nowrap;
|
||||
overflow-x: scroll;
|
||||
height: 256rpx;
|
||||
|
||||
.card-item-box{
|
||||
padding: 15rpx;
|
||||
display: inline-block;
|
||||
width: 33.3333%;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.small {
|
||||
width: 32.3%;
|
||||
}
|
||||
|
||||
.card-time-item{
|
||||
border: 2rpx solid #cccccc;
|
||||
border-radius: $border-radius;
|
||||
text-align: center;
|
||||
padding: 25rpx 0 20rpx;
|
||||
|
||||
image{
|
||||
width: 60rpx;
|
||||
}
|
||||
|
||||
.time-name {
|
||||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
.card-time-item.active{
|
||||
border-color: #E3B66B;
|
||||
background: rgba(227, 182, 107, .3);
|
||||
}
|
||||
.time-price{
|
||||
font-size: $font-size-tag;
|
||||
text{
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.action-wrap{
|
||||
height: 140rpx;
|
||||
|
||||
&.have-agreement{
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
&.bottom-safe-area {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
.action {
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
height: 140rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
|
||||
text-align: right;
|
||||
line-height: 100rpx;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.have-agreement{
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
.agreement {
|
||||
text-align: center;
|
||||
font-size: $font-size-tag;
|
||||
line-height: 1;
|
||||
margin-top: 20rpx;
|
||||
|
||||
text {
|
||||
color: #E3B66B;
|
||||
}
|
||||
}
|
||||
|
||||
&.bottom-safe-area {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
color: #7C5711;
|
||||
padding: 0 40rpx;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
margin: 30rpx 0 0 0;
|
||||
border-radius: 10rpx;
|
||||
border: none;
|
||||
background-image:linear-gradient(to top,#F7DAA5,#E3B66B);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title{
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.bold{
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/* 说明弹框 */
|
||||
.tips-layer {
|
||||
background: #fff;
|
||||
z-index: 999;
|
||||
height: 40%;
|
||||
width: 100%;
|
||||
|
||||
.head {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
text {
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
right: 44rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
height: calc(100% - 80rpx);
|
||||
overflow-y: scroll;
|
||||
|
||||
.detail {
|
||||
padding: 20rpx;
|
||||
|
||||
.font-size-base {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
101
pages_tool/member/public/css/collection.scss
Normal file
101
pages_tool/member/public/css/collection.scss
Normal file
@@ -0,0 +1,101 @@
|
||||
.lineheight-clear {
|
||||
line-height: 1;
|
||||
}
|
||||
.goods_list {
|
||||
width: 100%;
|
||||
padding: $padding 0;
|
||||
padding-top: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.goods_li {
|
||||
height: 200rpx;
|
||||
background: #ffffff;
|
||||
overflow: hidden;
|
||||
border-radius: $border-radius;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: 30rpx;
|
||||
|
||||
.pic {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: $border-radius;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.goods_info {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.goods_name {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.goods_opection {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.symbol {
|
||||
font-size: $font-size-tag;
|
||||
color: var(--price-color);
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: $font-size-toolbar;
|
||||
color: var(--price-color);
|
||||
}
|
||||
|
||||
.cars {
|
||||
padding: 0rpx 15rpx;
|
||||
border: 1rpx solid $color-line;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.alike {
|
||||
padding: 0rpx 15rpx;
|
||||
border: 1rpx solid $color-line;
|
||||
border-radius: 24rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
223
pages_tool/member/public/css/footprint.scss
Normal file
223
pages_tool/member/public/css/footprint.scss
Normal file
@@ -0,0 +1,223 @@
|
||||
.empty {
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.lineheight-clear {
|
||||
}
|
||||
|
||||
.head-wrap {
|
||||
width: 100vw;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.goods-list.single-column {
|
||||
margin: 0 $margin-both;
|
||||
|
||||
.checkbox-wrap {
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.iconfont {
|
||||
font-size: 40rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.datetime {
|
||||
line-height: 1.5;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
padding: 26rpx;
|
||||
background: #fff;
|
||||
border-radius: $border-radius;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin: $margin-updown 0;
|
||||
|
||||
&.first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
.goods-img {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
overflow: hidden;
|
||||
border-radius: $border-radius;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-tag{
|
||||
color: #fff;
|
||||
line-height: 1;
|
||||
padding: 8rpx 12rpx;
|
||||
position: absolute;
|
||||
border-top-left-radius: $border-radius;
|
||||
border-bottom-right-radius: $border-radius;
|
||||
top: 26rpx;
|
||||
left: 26rpx;
|
||||
font-size: $font-size-goods-tag;
|
||||
}
|
||||
|
||||
.goods-tag-img {
|
||||
position: absolute;
|
||||
border-top-left-radius: $border-radius;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
top: 26rpx;
|
||||
left: 26rpx;
|
||||
z-index: 5;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: calc(100% - 220rpx);
|
||||
}
|
||||
&.manage{
|
||||
.info-wrap {
|
||||
width: calc(100% - 280rpx);
|
||||
}
|
||||
}
|
||||
|
||||
.name-wrap {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
height: 68rpx;
|
||||
}
|
||||
|
||||
.introduction {
|
||||
line-height: 1;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.discount-price {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin-top: 16rpx;
|
||||
color: var(--price-color);
|
||||
.unit {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pro-info {
|
||||
display: flex;
|
||||
margin-top: auto;
|
||||
|
||||
.delete-price {
|
||||
text-decoration:line-through;
|
||||
flex: 1;
|
||||
|
||||
.unit {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
& > view {
|
||||
line-height: 1;
|
||||
|
||||
&:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-price-tag {
|
||||
display: inline-block;
|
||||
width: 60rpx;
|
||||
line-height: 1;
|
||||
margin-left: 6rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
max-height: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.bottom-wrap {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
bottom: var(--window-bottom);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
|
||||
.all-election {
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
& > .iconfont {
|
||||
font-size: 40rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 30rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
& > .icon-yuan_checkbox {
|
||||
color: $color-disabled;
|
||||
}
|
||||
|
||||
& > text {
|
||||
margin-left: 56rpx;
|
||||
line-height: 100rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
width: 180rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
button {
|
||||
width: 180rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
363
pages_tool/member/public/css/invite_friends.scss
Normal file
363
pages_tool/member/public/css/invite_friends.scss
Normal file
@@ -0,0 +1,363 @@
|
||||
.invite_adv {
|
||||
position: relative;
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.desc {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 10rpx;
|
||||
text-align: right;
|
||||
color: #fff;
|
||||
padding: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
.title_desc {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
font-size: $font-size-tag;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
bottom: 120rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
.font {
|
||||
position: absolute;
|
||||
bottom: 220rpx;
|
||||
text-align: center;
|
||||
width: 333rpx;
|
||||
height: 186rpx;
|
||||
z-index: 5;
|
||||
left: calc((100% - 333rpx) / 2);
|
||||
}
|
||||
.btn {
|
||||
position: absolute;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
text-align: center;
|
||||
width: 610rpx;
|
||||
line-height: 112rpx;
|
||||
height: 126rpx;
|
||||
left: calc((100% - 610rpx) / 2);
|
||||
color: #ff0029;
|
||||
bottom: -24rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.more_invite {
|
||||
text-align: center;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.content {
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
|
||||
.title {
|
||||
font-size: $font-size-toolbar;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.empty {
|
||||
padding: 50rpx;
|
||||
.tip {
|
||||
font-size: $font-size-base;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.invitelist_block {
|
||||
border: 2rpx solid $color-line;
|
||||
border-radius: $border-radius;
|
||||
margin-top: $margin-both;
|
||||
background-color: #fff;
|
||||
}
|
||||
.invitelist {
|
||||
.list-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx 24rpx;
|
||||
|
||||
.img {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 70rpx;
|
||||
border: 2rpx solid;
|
||||
margin-right: $margin-updown;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.list-left {
|
||||
flex: 1;
|
||||
.info {
|
||||
display: flex;
|
||||
|
||||
& > view {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.time {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.prize {
|
||||
}
|
||||
}
|
||||
}
|
||||
.invite_active {
|
||||
.list {
|
||||
display: flex;
|
||||
margin-top: 37rpx;
|
||||
.item {
|
||||
position: relative;
|
||||
width: 232rpx;
|
||||
height: 214rpx;
|
||||
&.margin_right_none {
|
||||
margin: 0;
|
||||
}
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.desc {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
.price {
|
||||
text-align: center;
|
||||
background-image: -webkit-linear-gradient(bottom, #ff2440, #ff7b7b);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
text {
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
.type {
|
||||
font-size: $font-size-tag;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item:last-child {
|
||||
margin-right: 0rpx !important;
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
color: #999999;
|
||||
padding: 30rpx 0;
|
||||
|
||||
.title {
|
||||
color: #999999;
|
||||
font-weight: 400;
|
||||
}
|
||||
.desc_list {
|
||||
view {
|
||||
color: #999999;
|
||||
display: flex;
|
||||
text {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-right: 10rpx;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.step {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 80rpx;
|
||||
padding-bottom: 80rpx;
|
||||
> view {
|
||||
text-align: center;
|
||||
width: 20%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.img {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin: auto;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
.jiantou {
|
||||
width: 40rpx;
|
||||
height: 24rpx;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.invite-list{
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.share-popup,
|
||||
.uni-popup__wrapper-box {
|
||||
.share-title {
|
||||
line-height: 60rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
padding: 15rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.share-content {
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-moz-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
-o-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
padding: 15rpx;
|
||||
|
||||
.share-box {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
.share-btn {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
line-height: 1;
|
||||
height: auto;
|
||||
text {
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
display: block;
|
||||
color: $color-title;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 80rpx;
|
||||
line-height: initial;
|
||||
}
|
||||
.icon-pengyouquan,.icon-fuzhilianjie,.icon-share-friend {
|
||||
color: #07c160;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.share-footer {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-top: 2rpx #f5f5f5 solid;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.poster-layer {
|
||||
.generate-poster {
|
||||
padding: 40rpx 0;
|
||||
.iconfont {
|
||||
font-size: 80rpx;
|
||||
color: #07c160;
|
||||
line-height: initial;
|
||||
}
|
||||
> view {
|
||||
text-align: center;
|
||||
&:last-child {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-wrap {
|
||||
width: 70%;
|
||||
margin: 60rpx auto 40rpx auto;
|
||||
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
|
||||
line-height: 1;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
}
|
||||
}
|
||||
.msg {
|
||||
padding: 40rpx;
|
||||
}
|
||||
.save {
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20rpx;
|
||||
width: 40rpx;
|
||||
height: 80rpx;
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
/* 说明弹框 */
|
||||
.tips-layer {
|
||||
background: #fff;
|
||||
z-index: 999;
|
||||
height: 40%;
|
||||
width: 100%;
|
||||
|
||||
.head {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
text {
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
right: 44rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
height: calc(100% - 80rpx);
|
||||
overflow-y: scroll;
|
||||
|
||||
.detail {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.font-size-base {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
413
pages_tool/member/public/css/level.scss
Normal file
413
pages_tool/member/public/css/level.scss
Normal file
@@ -0,0 +1,413 @@
|
||||
.member-level {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
.level-top {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.banner-container {
|
||||
width: 100vw;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
.memberInfo {
|
||||
width: 100%;
|
||||
height: 140rpx;
|
||||
padding: 40rpx 30rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #ffffff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.growth-rules {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
right: 40rpx;
|
||||
font-size: 24rpx;
|
||||
.iconfont{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.member-desc {
|
||||
width: calc(100% - 20rpx - 100rpx);
|
||||
height: 100%;
|
||||
padding: 13rpx 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
view {
|
||||
line-height: 1.4;
|
||||
color: #ffffff;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.demand {
|
||||
width: 100%;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
.demand-title {
|
||||
font-size: $font-size-toolbar;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 39rpx;
|
||||
height: 35rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.demand-info {
|
||||
padding: 10rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 27rpx;
|
||||
border-radius: 10rpx;
|
||||
justify-content: space-between;
|
||||
height: 150rpx;
|
||||
background: #ffffff;
|
||||
.info-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
color: #000;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
color: #959595;
|
||||
}
|
||||
}
|
||||
}
|
||||
progress {
|
||||
margin-top: 39rpx;
|
||||
}
|
||||
.info-size {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: $font-size-tag;
|
||||
color: #959595;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.uni-swiper-dots {
|
||||
bottom: 30rpx !important;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.slide-image {
|
||||
width: 535rpx;
|
||||
height: 300rpx;
|
||||
z-index: 200;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding: 30rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
.level-detail {
|
||||
font-size: $font-size-toolbar;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.growr-name {
|
||||
font-size: 24rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.growr-value {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.progress {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.residue-growr-value {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
view {
|
||||
color: #ffffff;
|
||||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
.now_growth {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.pic {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 160rpx;
|
||||
}
|
||||
}
|
||||
.isnow {
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
padding: 2rpx 4rpx;
|
||||
line-height: 1;
|
||||
margin-left: 10rpx;
|
||||
border: 2rpx solid #fff;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-left {
|
||||
justify-content: flex-end;
|
||||
padding: 56rpx 26rpx 0 0;
|
||||
}
|
||||
|
||||
.image-container-box .item-left {
|
||||
justify-content: center;
|
||||
padding: 56rpx 0 0 0;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
justify-content: flex-start;
|
||||
padding: 56rpx 0 0 26rpx;
|
||||
}
|
||||
|
||||
.item-center {
|
||||
justify-content: center;
|
||||
padding: 56rpx 0 0 0;
|
||||
}
|
||||
|
||||
.member-equity {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 30rpx 20rpx;
|
||||
// padding: 20rpx 30rpx;
|
||||
margin:$margin-updown $margin-both;
|
||||
.gift-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.equity-itme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.equity-content {
|
||||
padding: 20rpx 0;
|
||||
line-height: 1;
|
||||
&.active {
|
||||
border-bottom: 2rpx solid #e5e5e5;
|
||||
}
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.equity-desc {
|
||||
font-size: $font-size-activity-tag;
|
||||
margin-top: 16rpx;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-gift {
|
||||
background-color: #fff;
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
.gift-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.gift-itme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.gift-content {
|
||||
&.active {
|
||||
border-bottom: 2rpx solid #e5e5e5;
|
||||
}
|
||||
padding: 20rpx 0;
|
||||
line-height: 1;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.gift-desc {
|
||||
font-size: 24rpx;
|
||||
margin-top: 16rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.desc-wrap {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
padding: 24rpx 66rpx 0;
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
color: #222222;
|
||||
font-size: $font-size-base;
|
||||
font-family: 'PingFangTC-Regular';
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.desc {
|
||||
margin-top: 4rpx;
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #999999;
|
||||
font-size: $font-size-tag;
|
||||
font-family: 'PingFangTC-Regular';
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes descAnimation {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes descAnimation {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-popup-box {
|
||||
background-color: #f7f7f7;
|
||||
.coupon-popup-title {
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 44rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.coupon-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 4rpx;
|
||||
.coupon-name {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.desc {
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #ababab;
|
||||
}
|
||||
}
|
||||
.coupon-price {
|
||||
color: red;
|
||||
text {
|
||||
font-size: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-popup-content {
|
||||
max-height: 390rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
207
pages_tool/member/public/css/point.scss
Normal file
207
pages_tool/member/public/css/point.scss
Normal file
@@ -0,0 +1,207 @@
|
||||
.custom-navbar {
|
||||
width: 100vw;
|
||||
padding-bottom: 20rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: unset;
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
background-size: 100% 380rpx;
|
||||
// #endif
|
||||
|
||||
.navbar-wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
left: 30rpx;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-navbar-block {
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.head-wrap {
|
||||
width: 100vw;
|
||||
background-size: 100%;
|
||||
padding: 60rpx 68rpx 140rpx 68rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 100% 100%/0 0 70rpx 70rpx;
|
||||
overflow: hidden;
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
padding-top: 160rpx;
|
||||
// #endif
|
||||
|
||||
.title {
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
color: #F6F6F6;
|
||||
}
|
||||
|
||||
.point {
|
||||
color: var(--btn-text-color);
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 64rpx;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
margin-top: 56rpx;
|
||||
|
||||
.flex-item {
|
||||
flex: 1;
|
||||
|
||||
.num {
|
||||
font-size: 34rpx;
|
||||
margin-bottom: 20rpx;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
view {
|
||||
text-align: left;
|
||||
color: #F6F6F6;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-wrap {
|
||||
border-radius: 20rpx;
|
||||
margin: 0 24rpx;
|
||||
padding: 30rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
transform: translateY(-90rpx);
|
||||
|
||||
.menu-item {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
margin-right: 24rpx;
|
||||
|
||||
image {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.task-wrap {
|
||||
background-color: #fff;
|
||||
margin: 30rpx 24rpx;
|
||||
border-radius: 18rpx;
|
||||
padding: 32rpx;
|
||||
transform: translateY(-90rpx);
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
text-align: left;
|
||||
margin-bottom: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.task-item {
|
||||
border-radius: $border-radius;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 62rpx;
|
||||
height: 62rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 52rpx;
|
||||
-webkit-background-clip: text !important;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background: linear-gradient(135deg, #FE7849 0%, #FF1959 100%);
|
||||
}
|
||||
|
||||
.iconshangpin {
|
||||
font-size: 48rpx;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
flex: 1;
|
||||
padding-left: 26rpx;
|
||||
|
||||
.title {
|
||||
line-height: 1;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.desc {
|
||||
line-height: 1;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
border-radius: 60rpx;
|
||||
text-align: center;
|
||||
width: 140rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
background: linear-gradient(135deg, #FE7849 0%, #FF1959 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
80
pages_tool/member/public/js/collection.js
Normal file
80
pages_tool/member/public/js/collection.js
Normal file
@@ -0,0 +1,80 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
collectionList: [],
|
||||
isShowEmpty: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//跳转至详情页
|
||||
toDetail(e) {
|
||||
this.$util.redirectTo("/pages/goods/detail", {
|
||||
goods_id: e.goods_id
|
||||
});
|
||||
},
|
||||
//请求数据
|
||||
getData(mescroll) {
|
||||
this.isShowEmpty = false;
|
||||
let url = "/api/goodscollect/page"
|
||||
let array = []
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
},
|
||||
async: false,
|
||||
}).then((res) => {
|
||||
let newArr = res.data.list;
|
||||
for (var i = 0; i < newArr.length; i++) {
|
||||
newArr[i].composite_score = Math.floor((parseFloat(newArr[i].shop_desccredit) + parseFloat(newArr[i].shop_servicecredit) + parseFloat(newArr[i].shop_deliverycredit)) / 3).toFixed(1);
|
||||
}
|
||||
array = array.concat(newArr);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.collectionList = []; //如果是第一页需手动制空列表
|
||||
this.collectionList = this.collectionList.concat(newArr); //追加新数据
|
||||
mescroll.endSuccess(array.length);
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
this.isShowEmpty = true;
|
||||
})
|
||||
|
||||
},
|
||||
//监听下拉刷新,初始化页面数据
|
||||
listenRefresh(e) {
|
||||
this.$refs.goodsRecommend.init();
|
||||
},
|
||||
//删除某一项
|
||||
deleteItem(e) {
|
||||
this.$api.sendRequest({
|
||||
url: "/api/goodscollect/delete",
|
||||
data: {
|
||||
goods_id: e
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: "删除成功"
|
||||
})
|
||||
let array = this.collectionList;
|
||||
let newArray = array.filter((v) => {
|
||||
return v.goods_id != e;
|
||||
})
|
||||
this.collectionList = newArray;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
imageError(index) {
|
||||
this.collectionList[index].logo = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
goodsImageError(index) {
|
||||
this.collectionList[index].sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
}
|
||||
}
|
||||
};
|
||||
1034
pages_tool/member/public/js/info.js
Normal file
1034
pages_tool/member/public/js/info.js
Normal file
File diff suppressed because it is too large
Load Diff
115
pages_tool/member/public/js/invite_friends.js
Normal file
115
pages_tool/member/public/js/invite_friends.js
Normal file
@@ -0,0 +1,115 @@
|
||||
export default {
|
||||
methods: {
|
||||
//获取邀请列表
|
||||
getList() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberrecommend/api/memberrecommend/lists',
|
||||
data: {
|
||||
page: this.page,
|
||||
page_size: this.page_size
|
||||
},
|
||||
success: res => {
|
||||
this.inviteList = this.inviteList.concat(res.data.list);
|
||||
this.total_num = res.data.page_count;
|
||||
}
|
||||
});
|
||||
},
|
||||
moreList() {
|
||||
this.page++;
|
||||
this.isClick = false;
|
||||
if (this.page < this.total_num) {
|
||||
this.getList();
|
||||
this.isClick = true;
|
||||
} else if (this.page == this.total_num) {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
getBaseInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/memberrecommend/api/memberrecommend/info',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.info = res.data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openSharePopup() {
|
||||
this.$refs.sharePopup.open();
|
||||
},
|
||||
// 关闭分享弹出层
|
||||
closeSharePopup() {
|
||||
this.$refs.sharePopup.close();
|
||||
},
|
||||
// 打开规则说明弹出层
|
||||
openRulePopup() {
|
||||
this.$refs.rulePopup.open();
|
||||
},
|
||||
// 打开规则说明弹出层
|
||||
closeRulePopup() {
|
||||
this.$refs.rulePopup.close();
|
||||
},
|
||||
copyUrl() {
|
||||
let text = this.$config.h5Domain + '/pages/index/index';
|
||||
if (this.memberInf && this.memberInfo.member_id) text += '?source_member=' + this.memberInfo.member_id;
|
||||
this.$util.copy(text, () => {
|
||||
this.closeSharePopup();
|
||||
});
|
||||
},
|
||||
// 打开海报弹出层
|
||||
openPosterPopup() {
|
||||
this.getPoster();
|
||||
this.$refs.sharePopup.close();
|
||||
this.$refs.posterPopup.open();
|
||||
},
|
||||
// 关闭海报弹出层
|
||||
closePosterPopup() {
|
||||
this.$refs.posterPopup.close();
|
||||
},
|
||||
//生成海报
|
||||
getPoster() {
|
||||
//活动海报信息
|
||||
let qrcode_param = {
|
||||
source_member: this.memberInfo.member_id
|
||||
};
|
||||
this.$api.sendRequest({
|
||||
url: "/memberrecommend/api/memberrecommend/poster",
|
||||
data: {
|
||||
page: '/pages/index/index',
|
||||
qrcode_param: JSON.stringify(qrcode_param)
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.poster = res.data.path + "?time=" + new Date().getTime();
|
||||
} else {
|
||||
this.posterMsg = res.message;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
savePoster() {
|
||||
let url = this.$util.img(this.poster);
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存成功"
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存失败,请稍后重试"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
276
pages_tool/member/public/js/signin.js
Normal file
276
pages_tool/member/public/js/signin.js
Normal file
@@ -0,0 +1,276 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSignDays: [], // 一共展示的天数
|
||||
rule: [{}],
|
||||
hasSign: 0, //今天是否签到
|
||||
signDaysSeries: 0, //连续签到次数
|
||||
MonthData: [], //本月日期信息
|
||||
signList: [],
|
||||
back: '', //返回页
|
||||
redirect: '', //返回方式
|
||||
successTip: {},
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
isActive: "", //判断点击
|
||||
signState: 1,
|
||||
headimg: '',
|
||||
point: 0,
|
||||
growth: 0,
|
||||
signPoint: 0,
|
||||
signGrowth: 0,
|
||||
rewardRuleDay: [],
|
||||
cycle: 0,
|
||||
reward: {}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.membersignin) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启会员签到',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (option.back) this.back = option.back;
|
||||
if (option.redirect) this.redirect = option.redirect;
|
||||
|
||||
this.getSignState();
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_tool/member/signin');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.headimg = this.memberInfo.headimg;
|
||||
this.signDaysSeries = this.memberInfo.sign_days_series;
|
||||
|
||||
this.getSignPointData();
|
||||
this.getSignGrowthData();
|
||||
this.setPublicShare();
|
||||
|
||||
this.getIsSign();
|
||||
},
|
||||
methods: {
|
||||
// 获取签到累积积分
|
||||
getSignPointData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/sum',
|
||||
data: {
|
||||
account_type: 'point',
|
||||
from_type: 'signin'
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.signPoint = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取签到累积成长值
|
||||
getSignGrowthData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberaccount/sum',
|
||||
data: {
|
||||
account_type: 'growth',
|
||||
from_type: 'signin'
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.signGrowth = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 签到是否开启
|
||||
getSignState() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/membersignin/getSignStatus',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.signState = res.data.is_use;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
navigateBack() {
|
||||
if (this.back != '') {
|
||||
this.$util.redirectTo(this.back, {}, this.redirect);
|
||||
} else {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
},
|
||||
//获取rule
|
||||
getRule() {
|
||||
this.rewardRuleDay = [];
|
||||
this.$api.sendRequest({
|
||||
url: '/api/membersignin/award',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
|
||||
this.cycle = res.data.cycle || 0;
|
||||
this.rule = res.data.reward || [];
|
||||
let default_point = 0;
|
||||
if (this.rule.length > 0) {
|
||||
this.rule.forEach((item, index) => {
|
||||
if (item.day == 1) {
|
||||
default_point = item.point;
|
||||
} else {
|
||||
this.rewardRuleDay.push(parseInt(item.day));
|
||||
this.reward[item.day] = item.point;
|
||||
}
|
||||
});
|
||||
}
|
||||
//展示7天
|
||||
var showSignDays = [];
|
||||
var start_day = 1;
|
||||
var end_day = 7;
|
||||
var total_day = res.data.cycle;
|
||||
if (this.signDaysSeries > 5) {
|
||||
start_day = this.signDaysSeries - 5;
|
||||
}
|
||||
if (total_day >= (this.signDaysSeries + 1)) {
|
||||
end_day = this.signDaysSeries + 1;
|
||||
}
|
||||
if (this.signDaysSeries <= 5) {
|
||||
end_day = 8 - start_day;
|
||||
}
|
||||
|
||||
if ((end_day - start_day) < 7 && total_day >= start_day + 6) {
|
||||
end_day = start_day + 6;
|
||||
}
|
||||
if (total_day == this.signDaysSeries) {
|
||||
start_day = this.signDaysSeries - 6;
|
||||
end_day = this.signDaysSeries;
|
||||
}
|
||||
|
||||
for (let i = 1; i <= res.data.cycle; i++) {
|
||||
if (i >= start_day && i <= end_day) {
|
||||
showSignDays.push({
|
||||
day: i,
|
||||
is_last: 0,
|
||||
point: default_point
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (showSignDays && showSignDays.length) {
|
||||
showSignDays[showSignDays.length - 1]['is_last'] = 1;
|
||||
}
|
||||
|
||||
for (let i in showSignDays) {
|
||||
let item = showSignDays[i];
|
||||
if (this.$util.inArray(item.day, this.rewardRuleDay) != -1) {
|
||||
showSignDays[i]['point'] = parseInt(this.reward[item.day]) + parseInt(default_point);
|
||||
}
|
||||
}
|
||||
|
||||
this.showSignDays = showSignDays;
|
||||
this.$refs.loadingCover.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//判断当前是否签到
|
||||
getIsSign() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/membersignin/issign',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.hasSign = res.data;
|
||||
this.getRule();
|
||||
this.getSignPointData();
|
||||
this.getSignGrowthData();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//签到
|
||||
sign() {
|
||||
if (this.signState == 0) {
|
||||
this.$util.showToast({
|
||||
title: '签到未开启'
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.hasSign && this.signState == 1) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/membersignin/signin',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.successTip = res.data;
|
||||
this.$refs.uniPopup.open()
|
||||
this.getRule();
|
||||
this.getSignPointData();
|
||||
this.getSignGrowthData();
|
||||
this.hasSign = 1;
|
||||
this.signDaysSeries = this.signDaysSeries + 1;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$refs.uniPopup.close()
|
||||
},
|
||||
/**
|
||||
* 设置公众号分享
|
||||
*/
|
||||
setPublicShare() {
|
||||
let shareUrl = this.$config.h5Domain + '/pages_tool/member/signin';
|
||||
|
||||
this.$util.setPublicShare({
|
||||
title: '签到有礼',
|
||||
desc: '天天签到,积分好礼送不停',
|
||||
link: shareUrl,
|
||||
imgUrl: ''
|
||||
},
|
||||
res => {
|
||||
// console.log('公众号分享成功');
|
||||
// this.share();
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pointTomorrow: function() {
|
||||
var signDaysSeries = this.signDaysSeries + 1;
|
||||
var point = this.rule[0].point ? parseInt(this.rule[0].point) : 0;
|
||||
for (let i = 1; i < this.rule.length; i++) {
|
||||
let reward = this.rule[i];
|
||||
if (reward.day == signDaysSeries && reward.point) point += parseInt(reward.point);
|
||||
}
|
||||
return point;
|
||||
},
|
||||
showDay: function() {
|
||||
return parseInt(this.signDaysSeries / 7) * 7 + 1;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 自定义分享内容
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
var path = '/pages_tool/member/signin';
|
||||
return {
|
||||
title: '签到有礼,天天签到,积分好礼送不停',
|
||||
imageUrl: '',
|
||||
path: path,
|
||||
success: res => {},
|
||||
fail: res => {},
|
||||
complete: res => {}
|
||||
};
|
||||
}
|
||||
};
|
||||
171
pages_tool/member/withdrawal.vue
Normal file
171
pages_tool/member/withdrawal.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni @getData="getData" class="member-point">
|
||||
<view slot="list">
|
||||
<block v-if="dataList.length">
|
||||
<view class="detailed-wrap">
|
||||
<view class="cont">
|
||||
<view class="detailed-item" v-for="(item, index) in dataList" :key="index" @click="toDetail(item.id)">
|
||||
<view class="info">
|
||||
<view class="event">{{ item.transfer_type_name }}</view>
|
||||
<view>
|
||||
<text class="time">{{ $util.timeStampTurnTime(item.apply_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-wrap">
|
||||
<view class="num color-base-text">¥{{ item.apply_money }}</view>
|
||||
<view class="status-name">{{ item.status_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<ns-empty :isIndex="false" text="暂无提现记录"></ns-empty>
|
||||
</block>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login',
|
||||
{
|
||||
back: '/pages_tool/member/point'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
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.dataList = []; //如果是第一页需手动制空列表
|
||||
this.dataList = this.dataList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal_detail', {
|
||||
id: id
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.account-box {
|
||||
width: 100vw;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.tit {
|
||||
color: #fff;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.iconmn_jifen_fill {
|
||||
font-size: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.point {
|
||||
color: #fff;
|
||||
font-size: 60rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detailed-wrap {
|
||||
.head {
|
||||
display: flex;
|
||||
height: 90rpx;
|
||||
|
||||
& > view {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
padding: 0 $padding;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
background: #fff;
|
||||
|
||||
.detailed-item {
|
||||
padding: $padding 10rpx;
|
||||
margin: 0 $margin-both;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
position: relative;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-right: 180rpx;
|
||||
|
||||
.event {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: $font-size-base;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.right-wrap {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-align: right;
|
||||
|
||||
.num {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
131
pages_tool/member/withdrawal_detail.vue
Normal file
131
pages_tool/member/withdrawal_detail.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view class="money-wrap">
|
||||
<text>-{{ detail.apply_money }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 状态0待审核1.待转账2已转账 -1拒绝' -->
|
||||
<view class="item">
|
||||
<view class="line-wrap">
|
||||
<text class="label">当前状态</text>
|
||||
<text class="value">{{ detail.status_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">交易号</text>
|
||||
<text class="value">{{ detail.withdraw_no }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">手续费</text>
|
||||
<text class="value">¥{{ detail.service_money }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">申请时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.apply_time) }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status">
|
||||
<text class="label">审核时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.audit_time) }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.bank_name">
|
||||
<text class="label">银行名称</text>
|
||||
<text class="value">{{ detail.bank_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">收款账号</text>
|
||||
<text class="value">{{ detail.account_number }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == -1 && detail.refuse_reason">
|
||||
<text class="label">拒绝理由</text>
|
||||
<text class="value">{{ detail.refuse_reason }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == 2">
|
||||
<text class="label">转账方式名称</text>
|
||||
<text class="value">{{ detail.transfer_type_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == 2">
|
||||
<text class="label">转账时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.payment_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: {}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id || 0;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getDetail();
|
||||
} else {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login',
|
||||
{
|
||||
back: '/pages_tool/member/point'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberwithdraw/detail',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.money-wrap {
|
||||
text-align: center;
|
||||
font-size: 50rpx;
|
||||
font-weight: bold;
|
||||
margin: 40rpx;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 40rpx;
|
||||
|
||||
.line-wrap {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
color: $color-tip;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.value {
|
||||
display: inline-block;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user