Compare commits

...

7 Commits
main ... main

Author SHA1 Message Date
liqianjin 728c118fd4 【增加】注册后弹窗奖励 2023-04-24 13:40:30 +08:00
liqianjin 2c8ca40458 【修改】取消最小提现金额显示 2023-03-31 10:37:27 +08:00
liqianjin a68b87d440 【增加】修改 2023-03-27 14:32:27 +08:00
liqianjin 1fe5e4705c 【增加】转赠 2023-03-08 18:02:53 +08:00
liqianjin a96208cabb 【修改】个人中心 2023-03-08 09:04:52 +08:00
liqianjin 20861b0ea5 【修改】个人中心 2023-03-07 16:36:15 +08:00
liqianjin f0e189bb7f 【修改】个人中心 2023-03-07 13:33:36 +08:00
31 changed files with 2773 additions and 251 deletions

View File

@ -144,48 +144,41 @@
v-show="value.style == 2" v-show="value.style == 2"
:style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }" :style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }"
> >
<view class="account-item" @click="redirect('/pages_tool/member/balance')"> <view>
<view class="value price-font">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view> <view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill',{type: 'points'})">
<view class="title">消费券</view> <view class="value price-font" style="font-size: 38rpx;">{{ fenxiaoInfo && fenxiaoInfo.points != undefined ? fenxiaoInfo.points : '--' }}</view>
</view> <view class="title" style="font-size: 30rpx;">积分</view>
<view class="solid"></view> </view>
<view class="account-item" @click="redirect('/pages_tool/member/point')"> <view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill',{type: 'contribution'})">
<view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point).toFixed(2) : '--' }}</view> <view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.contribution != undefined ? fenxiaoInfo.contribution : '--' }}</view>
<view class="title">兑换券</view> <view class="title">贡献值</view>
</view> </view>
<view class="solid"></view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.points != undefined ? fenxiaoInfo.points : '--' }}</view>
<view class="title">积分</view>
</view> </view>
<view class="solid"></view> <view class="solid"></view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')"> <view>
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.contribution != undefined ? fenxiaoInfo.contribution : '--' }}</view> <view class="account-item" @click="redirect('/pages_tool/member/balance')">
<view class="title">贡献值</view> <view class="value price-font" style="font-size: 38rpx;">{{ memberInfo ? (parseFloat(memberInfo.balance) + parseFloat(memberInfo.balance_money)).toFixed(2) : '--' }}</view>
<view class="title" style="font-size: 30rpx;">消费券</view>
</view>
<view class="account-item" @click="redirect('/pages_tool/member/point')">
<view class="value price-font">{{ memberInfo ? parseFloat(memberInfo.point).toFixed(2) : '--' }}</view>
<view class="title">兑换券</view>
</view>
</view> </view>
<view class="solid"></view> </view>
<view class="account-item" @click="redirect('/pages_promotion/fenxiao/bill')">
<view
class="account-info"
v-show="value.style == 2"
:style="{ 'margin-left': parseInt(value.infoMargin) * 2 + 'rpx', 'margin-right': parseInt(value.infoMargin) * 2 + 'rpx' }"
>
<view class="account-item" @click="redirect('/pages_tool/member/goufang')">
<view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.house_purchase != undefined ? fenxiaoInfo.house_purchase : '--' }}</view> <view class="value price-font">{{ fenxiaoInfo && fenxiaoInfo.house_purchase != undefined ? fenxiaoInfo.house_purchase : '--' }}</view>
<view class="title">购房券</view> <view class="title">购房券</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 会员码 -->
<uni-popup ref="erWeiPopup" type="center">
<view class="member-code-popup" v-if="memberCode">
<view class="popup-top">
<view class="popup-top-title">
<view class="iconfont icon-erweima"></view>
<view class="popup-top-title-txt">会员码</view>
</view>
<view class="popup-top-tiao"><image :src="$util.img(memberCode.barcode)" mode=""></image></view>
<view class="popup-top-erwei"><image :src="$util.img(memberCode.qrcode)" mode=""></image></view>
<view class="popup-top-text">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
</view>
<view class="popup-bottom"><text class="iconfont iconfont-delete icon-close-guanbi" @click="closeMemberQrcode"></text></view>
</view>
</uni-popup>
<!-- 完善会员资料 --> <!-- 完善会员资料 -->
<view @touchmove.prevent.stop class="member-complete-info-popup"> <view @touchmove.prevent.stop class="member-complete-info-popup">
@ -391,57 +384,18 @@ export default {
}); });
}, },
/** /**
* 跳转 * 跳转
* @param {Object} url * @param {Object} url
*/ * @param param
redirect(url) { */
redirect(url, param = {}) {
if (!uni.getStorageSync('token')) { if (!uni.getStorageSync('token')) {
this.$refs.login.open(url); this.$refs.login.open(url);
} else { } else {
this.$util.redirectTo(url); this.$util.redirectTo(url, param);
} }
}, },
/**
* 显示会员码
*/
showMemberQrcode() {
if (!this.memberInfo.mobile && !this.memberInfo.member_code) {
uni.showModal({
title: '提示',
content: '使用会员码需先绑定手机号,是否绑定手机号?',
success: res => {
if (res.confirm) {
this.$util.redirectTo('/pages_tool/member/info_edit', { action: 'mobile' });
}
}
});
return;
}
if (this.memberCode) {
this.$refs.erWeiPopup.open();
}
this.$api.sendRequest({
url: '/api/member/membereqrcode',
data: {
page: ''
},
success: res => {
if (res.code == 0) {
this.memberCode = {
barcode: res.bar_code,
qrcode: res.data.path
};
this.$refs.erWeiPopup.open();
}
}
});
},
/**
* 关闭会员码
*/
closeMemberQrcode() {
this.$refs.erWeiPopup.close();
},
/** /**
* 跳转之前需先进行授权 * 跳转之前需先进行授权
* @param {Object} url * @param {Object} url
@ -737,9 +691,9 @@ export default {
} }
.account-info { .account-info {
display: flex; display: flex;
padding: 40rpx 0; padding: 20rpx 0;
align-items: center; align-items: center;
justify-content: center; justify-content: space-evenly;
view { view {
color: #fff; color: #fff;
} }
@ -756,7 +710,7 @@ export default {
.value { .value {
font-size: 34rpx; font-size: 34rpx;
font-weight: bold !important; font-weight: bold !important;
margin-bottom: 4rpx; //margin-bottom: 4rpx;
line-height: 1.3; line-height: 1.3;
} }
.title { .title {
@ -794,10 +748,12 @@ export default {
} }
.account-item { .account-item {
.value { .value {
color: #000000; color: #ee691c;
//color: #000000;
} }
.title { .title {
color: #666666; color: #ee691c;
//color: #666666;
} }
} }
} }

View File

@ -58,23 +58,23 @@
</view> </view>
<view class="title">待使用</view> <view class="title">待使用</view>
</view> </view>
<view class="item-wrap" @click="redirect('/pages_tool/order/activist')"> <!-- <view class="item-wrap" @click="redirect('/pages_tool/order/activist')">-->
<view class="icon-block"> <!-- <view class="icon-block">-->
<template v-if="value.style == 3"> <!-- <template v-if="value.style == 3">-->
<image :src="$util.img('public/uniapp/member/order/refunding.png')" mode="widthFix"></image> <!-- <image :src="$util.img('public/uniapp/member/order/refunding.png')" mode="widthFix"></image>-->
<view class="icon-shade" :style="'-webkit-mask-image: url(' + $util.img('public/uniapp/member/order/refunding_shade.png') + ')'"></view> <!-- <view class="icon-shade" :style="'-webkit-mask-image: url(' + $util.img('public/uniapp/member/order/refunding_shade.png') + ')'"></view>-->
</template> <!-- </template>-->
<template v-else> <!-- <template v-else>-->
<diy-icon <!-- <diy-icon-->
:icon="value.icon.refunding.icon" <!-- :icon="value.icon.refunding.icon"-->
v-if="value.icon.refunding" <!-- v-if="value.icon.refunding"-->
:value="value.icon.refunding.style ? value.icon.refunding.style : null" <!-- :value="value.icon.refunding.style ? value.icon.refunding.style : null"-->
></diy-icon> <!-- ></diy-icon>-->
</template> <!-- </template>-->
<text v-if="orderNum.refunding > 0" class="order-num color-base-bg price-font">{{ orderNum.refunding > 99 ? '99+' : orderNum.refunding }}</text> <!-- <text v-if="orderNum.refunding > 0" class="order-num color-base-bg price-font">{{ orderNum.refunding > 99 ? '99+' : orderNum.refunding }}</text>-->
</view> <!-- </view>-->
<view class="title">售后</view> <!-- <view class="title">售后</view>-->
</view> <!-- </view>-->
</view> </view>
</view> </view>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>

View File

@ -403,7 +403,10 @@ export default {
}); });
this.$refs.completeInfoPopup.close(); this.$refs.completeInfoPopup.close();
this.$store.commit('setBottomNavHidden', false); // this.$store.commit('setBottomNavHidden', false); //
if (res.data.is_register) this.$refs.registerReward.open(); // if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{
this.$refs.registerReward.open();
})
} else { } else {
this.isSub = false; this.isSub = false;
this.getCaptcha(); this.getCaptcha();
@ -464,7 +467,11 @@ export default {
this.cancelCompleteInfo(); this.cancelCompleteInfo();
} }
}); });
if (res.data.is_register) this.$refs.registerReward.open(); // if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{
this.$refs.registerReward.open();
})
} else { } else {
this.$util.showToast({ title: res.message }); this.$util.showToast({ title: res.message });
} }
@ -496,7 +503,11 @@ export default {
success: () => { success: () => {
this.$store.dispatch('getCartNumber'); this.$store.dispatch('getCartNumber');
this.$store.commit('setToken', res.data.token); this.$store.commit('setToken', res.data.token);
if (res.data.is_register) this.$refs.registerReward.open(); // if (res.data.is_register) this.$refs.registerReward.open();
this.$nextTick(()=>{
this.$refs.registerReward.open();
})
this.cancelCompleteInfo(); this.cancelCompleteInfo();
} }
}); });

View File

@ -1,76 +1,92 @@
<template> <template>
<view> <view>
<view @touchmove.prevent.stop v-if="reward" class="reward-popup"> <view @touchmove.prevent.stop v-if="reward" class="reward-popup">
<uni-popup ref="registerReward" type="center" :maskClick="false"> <!-- <uni-popup ref="registerReward" type="center" :maskClick="false">-->
<view class="reward-wrap"> <!-- <view class="reward-wrap">-->
<image :src="$util.img('public/uniapp/register_reward/register_reward_img.png')" mode="widthFix" class="bg-img-head"></image> <!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_img.png')" mode="widthFix" class="bg-img-head"></image>-->
<image :src="$util.img('public/uniapp/register_reward/register_reward_money.png')" mode="widthFix" class="bg-img-money"></image> <!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_money.png')" mode="widthFix" class="bg-img-money"></image>-->
<image :src="$util.img('public/uniapp/register_reward/register_reward_head.png')" mode="widthFix" class="bg-img"></image> <!-- <image :src="$util.img('public/uniapp/register_reward/register_reward_head.png')" mode="widthFix" class="bg-img"></image>-->
<view class="wrap"> <!-- <view class="wrap">-->
<view> <!-- <view>-->
<scroll-view scroll-y="true" class="register-box"> <!-- <scroll-view scroll-y="true" class="register-box">-->
<view class="reward-content"> <!-- <view class="reward-content">-->
<view class="reward-item" v-if="reward.point > 0"> <!-- <view class="reward-item" v-if="reward.point > 0">-->
<view class="head">兑换券奖励</view> <!-- <view class="head">兑换券奖励</view>-->
<view class="content"> <!-- <view class="content">-->
<view class="info"> <!-- <view class="info">-->
<view> <!-- <view>-->
<text class="num">{{ reward.point }}</text> <!-- <text class="num">{{ reward.point }}</text>-->
<text class="type">兑换券</text> <!-- <text class="type">兑换券</text>-->
</view> <!-- </view>-->
<view class="desc">用于下单时抵现或兑换商品等</view> <!-- <view class="desc">用于下单时抵现或兑换商品等</view>-->
</view> <!-- </view>-->
<view class="tip" @click="closeRewardPopup('point')">立即查看</view> <!-- <view class="tip" @click="closeRewardPopup('point')">立即查看</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="reward-item" v-if="reward.growth > 0"> <!-- <view class="reward-item" v-if="reward.growth > 0">-->
<view class="head">成长值</view> <!-- <view class="head">成长值</view>-->
<view class="content"> <!-- <view class="content">-->
<view class="info"> <!-- <view class="info">-->
<view> <!-- <view>-->
<text class="num">{{ reward.growth }}</text> <!-- <text class="num">{{ reward.growth }}</text>-->
<text class="type">成长值</text> <!-- <text class="type">成长值</text>-->
</view> <!-- </view>-->
<view class="desc">用于提升会员等级</view> <!-- <view class="desc">用于提升会员等级</view>-->
</view> <!-- </view>-->
<view class="tip" @click="closeRewardPopup('growth')">立即查看</view> <!-- <view class="tip" @click="closeRewardPopup('growth')">立即查看</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="reward-item" v-if="reward.balance > 0"> <!-- <view class="reward-item" v-if="reward.balance > 0">-->
<view class="head">红包奖励</view> <!-- <view class="head">红包奖励</view>-->
<view class="content"> <!-- <view class="content">-->
<view class="info"> <!-- <view class="info">-->
<view> <!-- <view>-->
<text class="num">{{ reward.balance }}</text> <!-- <text class="num">{{ reward.balance }}</text>-->
<text class="type"></text> <!-- <text class="type"></text>-->
</view> <!-- </view>-->
<view class="desc">不可提现下单时可用</view> <!-- <view class="desc">不可提现下单时可用</view>-->
</view> <!-- </view>-->
<view class="tip" @click="closeRewardPopup('balance')">立即查看</view> <!-- <view class="tip" @click="closeRewardPopup('balance')">立即查看</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="reward-item" v-if="reward.coupon_list.length > 0"> <!-- <view class="reward-item" v-if="reward.coupon_list.length > 0">-->
<view class="head">优惠券奖励</view> <!-- <view class="head">优惠券奖励</view>-->
<view class="content" v-for="(item, index) in reward.coupon_list" :key="index"> <!-- <view class="content" v-for="(item, index) in reward.coupon_list" :key="index">-->
<view class="info"> <!-- <view class="info">-->
<view> <!-- <view>-->
<text class="num coupon-name">{{ item.coupon_name }}</text> <!-- <text class="num coupon-name">{{ item.coupon_name }}</text>-->
</view> <!-- </view>-->
<view class="desc" v-if="item.at_least > 0"> <!-- <view class="desc" v-if="item.at_least > 0">-->
{{ item.at_least }}{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }} <!-- {{ item.at_least }}{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}-->
</view> <!-- </view>-->
<view class="desc" v-else>无门槛{{ item.type == 'discount' ? '' + item.discount + '' : '' + item.money }}</view> <!-- <view class="desc" v-else>无门槛{{ item.type == 'discount' ? '' + item.discount + '' : '' + item.money }}</view>-->
</view> <!-- </view>-->
<view class="tip" @click="closeRewardPopup('coupon')">立即查看</view> <!-- <view class="tip" @click="closeRewardPopup('coupon')">立即查看</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</scroll-view> <!-- </scroll-view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="close-btn" @click="closeRewardPopup()"><text class="iconfont icon-close"></text></view> <!-- <view class="close-btn" @click="closeRewardPopup()"><text class="iconfont icon-close"></text></view>-->
</view> <!-- </view>-->
</uni-popup> <!-- </uni-popup>-->
<!-- 版本更新弹窗弹窗 -->
<uni-popup ref="registerReward" type="center" :maskClick="false">
<view class="version-popup-content">
<image class="img" :src="$util.img('app/shop/view/public/img/login/new_member.png')" mode="widthFix"></image>
<!-- <view class="title" >版本更新</view>-->
<view class="text">
恭喜你获得新人专属福利<br>
现送给你
</view>
<view class="jifen">
<view class="num">{{newuser_points}}</view>
<view class="jifen_text">积分</view>
</view>
<view class="button_img" @click="$refs.registerReward.close()">立即领取</view>
</view>
</uni-popup>
</view> </view>
</view> </view>
</template> </template>
@ -87,7 +103,8 @@ export default {
data() { data() {
return { return {
reward: null, reward: null,
back: '' back: '',
newuser_points: ''
}; };
}, },
created() { created() {
@ -98,11 +115,12 @@ export default {
}, },
open(back) { open(back) {
if (back) this.back = back; if (back) this.back = back;
if (this.addonIsExist.memberregister) { // if (this.addonIsExist.memberregister) {
this.getFenxiaoBasics();
this.getRegisterReward(); this.getRegisterReward();
} else { // } else {
this.closeRewardPopup(); // this.closeRewardPopup();
} // }
}, },
cancel() { cancel() {
this.$refs.registerReward.close(); this.$refs.registerReward.close();
@ -116,14 +134,37 @@ export default {
success: res => { success: res => {
if (res.code >= 0) { if (res.code >= 0) {
let data = res.data; let data = res.data;
if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) { // if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) {
this.reward = data.value; this.reward = data.value;
setTimeout(()=> { setTimeout(()=> {
this.$refs.registerReward.open(); this.$refs.registerReward.open();
}) })
} else { // } else {
this.closeRewardPopup(); // this.closeRewardPopup();
} // }
} else {
this.closeRewardPopup();
}
}
});
},
/**
* 获取新人礼配置
*/
getFenxiaoBasics() {
this.$api.sendRequest({
url: '/fenxiao/api/config/basics',
success: res => {
if (res.code >= 0) {
let data = res.data;
// if (data.is_use == 1 && (data.value.point > 0 || data.value.balance > 0 || data.value.growth > 0 || data.value.coupon_list.length > 0)) {
this.newuser_points = data.newuser_points;
// setTimeout(()=> {
// this.$refs.registerReward.open();
// })
// } else {
// this.closeRewardPopup();
// }
} else { } else {
this.closeRewardPopup(); this.closeRewardPopup();
} }
@ -283,4 +324,80 @@ export default {
} }
} }
} }
.version-popup-content{
.img{
width: 580rpx;
left: -5rpx;
}
.title{
position: absolute;
top: 68rpx;
left: 0;
right: 0;
margin: auto;
text-align: center;
font-size: large;
font-weight: 900;
color: white;
}
.con_title{
margin-top: 44rpx;
//margin-bottom: 14rpx;
font-size: 44rpx;
font-weight: 900;
color: #B6634F;
}
.text{
font-size: 36rpx;
color: #ffeed2;
line-height: 1.5;
position: absolute;
top: 300rpx;
left: 0;
right: 0;
margin: auto;
width: 400rpx;
text-align: center;
}
.jifen{
margin: auto;
display: flex;
position: absolute;
top: 400rpx;
width: 400rpx;
left: 0;
right: 0;
align-items: baseline;
justify-content: center;
.num{
font-size: 88rpx;
color: #ffeed2;
line-height: 1.5;
text-align: center;
}
.jifen_text{
font-size: 36rpx;
color: #ffeed2;
line-height: 1.5;
text-align: center;
}
}
.button_img{
//background: url("./public/img/index/friend-farm-button.png");
top: 590rpx;
width: 240rpx;
left: 0;
right: 0;
margin: auto;
position: absolute;
background-size: cover;
height: 80rpx;
font-size: 35rpx;
text-align: center;
font-weight: 900;
color: #e63c3d;
line-height: 80rpx;
}
}
</style> </style>

View File

@ -1,21 +0,0 @@
@font-face {font-family: "iconfont";
src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); /* IE9 */
src: url('~@/components/sx-rate/sx-rate/iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),
url('~@/components/sx-rate/sx-rate/iconfont.woff?t=1574760464482') format('woff'),
url('~@/components/sx-rate/sx-rate/iconfont.ttf?t=1574760464482') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('~@/components/sx-rate/sx-rate/iconfont.svg?t=1574760464482#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: inherit;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-star:before {
content: "\e6e3";
}

View File

@ -1006,6 +1006,22 @@
// #endif // #endif
} }
}, },
{
"path": "member/integral/transfer",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{
"path": "member/balance_transfer",
"style": {
// #ifdef H5
"navigationStyle": "custom"
// #endif
}
},
{ {
"path": "member/account", "path": "member/account",
"style": { "style": {
@ -1036,6 +1052,18 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "member/goufang",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "member/goufang_to_balance",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "member/balance_detail", "path": "member/balance_detail",
"style": { "style": {

View File

@ -72,11 +72,11 @@
.split('.')[1] .split('.')[1]
}} }}
</text> </text>
<view class="member-price-wrap"> <!-- <view class="member-price-wrap">-->
<text class="unit price-font">原价</text> <!-- <text class="unit price-font">原价</text>-->
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text> <!-- <text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>-->
<text class="money price-font">{{ goodsSkuDetail.price }}</text> <!-- <text class="money price-font">{{ goodsSkuDetail.price }}</text>-->
</view> <!-- </view>-->
</template> </template>
<template v-else> <template v-else>
<text class="price price-font"> <text class="price price-font">

View File

@ -204,16 +204,16 @@
</view> </view>
</view> </view>
<view class="goods-action"> <!-- <view class="goods-action">-->
<block v-if="orderData.is_enable_refund"> <!-- <block v-if="orderData.is_enable_refund">-->
<view @click="goRefund(goodsItem.order_goods_id)" v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)"> <!-- <view @click="goRefund(goodsItem.order_goods_id)" v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">-->
<view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}</view> <!-- <view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}</view>-->
</view> <!-- </view>-->
</block> <!-- </block>-->
<view @click="goRefundDetail(goodsItem.order_goods_id)" v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1"> <!-- <view @click="goRefundDetail(goodsItem.order_goods_id)" v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">-->
<view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view> <!-- <view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> </view>
</view> </view>
</view> </view>

View File

@ -28,7 +28,8 @@ export default {
data() { data() {
return { return {
accountList: {}, accountList: {},
showEmpty: true showEmpty: true,
type: ''
}; };
}, },
onShow() { onShow() {
@ -47,8 +48,12 @@ export default {
}, 1000); }, 1000);
}, },
onLoad(res){
this.type = res.type
},
methods: { methods: {
getData(mescroll) { getData(mescroll) {
// this.type = this.$route.query.type;
if (mescroll.num == 1) { if (mescroll.num == 1) {
this.accountList = []; this.accountList = [];
} }
@ -56,7 +61,8 @@ export default {
url: '/fenxiao/api/account/page', url: '/fenxiao/api/account/page',
data: { data: {
page: mescroll.num, page: mescroll.num,
page_size: mescroll.size page_size: mescroll.size,
type: this.type
}, },
success: res => { success: res => {
let newArr = []; let newArr = [];

View File

@ -150,24 +150,24 @@
<view class="desc">{{ fenxiaoWords.concept }}商品</view> <view class="desc">{{ fenxiaoWords.concept }}商品</view>
</view> </view>
</view> </view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'profit'})"> <!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'profit'})">-->
<view class="icon-wrap"> <!-- <view class="icon-wrap">-->
<image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image> <!-- <image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image>-->
</view> <!-- </view>-->
<view class="info"> <!-- <view class="info">-->
<view class="title">{{ fenxiaoWords.account }}排行</view> <!-- <view class="title">{{ fenxiaoWords.account }}排行</view>-->
<view class="desc">您的排名为第{{profitRanking}}</view> <!-- <view class="desc">您的排名为第{{profitRanking}}</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'invited_num'})"> <!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'invited_num'})">-->
<view class="icon-wrap"> <!-- <view class="icon-wrap">-->
<image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image> <!-- <image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image>-->
</view> <!-- </view>-->
<view class="info"> <!-- <view class="info">-->
<view class="title">推广人排行</view> <!-- <view class="title">推广人排行</view>-->
<view class="desc">您的排名为{{ invitedNumRanking }}</view> <!-- <view class="desc">您的排名为{{ invitedNumRanking }}</view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length"> <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length">
<view class="icon-wrap"> <view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image>

View File

@ -88,7 +88,7 @@
<script> <script>
import validate from 'common/js/validate.js'; import validate from 'common/js/validate.js';
import mypOne from '@/components/myp-one/myp-one.vue'; import mypOne from '../member/public/myp-one/myp-one.vue';
export default { export default {
components: { components: {
mypOne mypOne

View File

@ -34,8 +34,11 @@
</view> </view>
</view> </view>
<view class="desc"> <view class="desc">
<text>最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}</text> <!-- <text>最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}</text>-->
<text>手续费为{{ withdrawInfo.config.rate + '%' }}</text> <text>手续费为{{ withdrawInfo.config.rate + '%' }}</text>
</view>
<view class="desc">
<text>提现金额需为100的整数倍</text>
</view> </view>
</view> </view>

View File

@ -24,10 +24,10 @@
<view class="num price-font">{{ balanceInfo.balance_money|moneyFormat }}</view> <view class="num price-font">{{ balanceInfo.balance_money|moneyFormat }}</view>
<view class="font-size-tag">现金消费券</view> <view class="font-size-tag">现金消费券</view>
</view> </view>
<view class="flex-item"> <!-- <view class="flex-item">-->
<view class="num price-font">{{ balanceInfo.balance|moneyFormat }}</view> <!-- <view class="num price-font">{{ balanceInfo.balance|moneyFormat }}</view>-->
<view class="font-size-tag">储值消费券</view> <!-- <view class="font-size-tag">储值消费券</view>-->
</view> <!-- </view>-->
</view> </view>
</view> </view>
@ -55,6 +55,9 @@
<view class="withdraw " v-if="addonIsExist.memberwithdraw && withdrawConfig && withdrawConfig.is_use" @click="toWithdrawal"> <view class="withdraw " v-if="addonIsExist.memberwithdraw && withdrawConfig && withdrawConfig.is_use" @click="toWithdrawal">
{{ $lang('withdrawal') }} {{ $lang('withdrawal') }}
</view> </view>
<view class="withdraw " @click="toGoufang">
转赠
</view>
</view> </view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
</view> </view>
@ -90,6 +93,9 @@ export default {
// #endif // #endif
}, },
methods: { methods: {
toGoufang() {
this.$util.redirectTo('/pages_tool/member/balance_transfer');
},
toWithdrawal() { toWithdrawal() {
this.$util.redirectTo('/pages_tool/member/apply_withdrawal'); this.$util.redirectTo('/pages_tool/member/apply_withdrawal');
}, },

View File

@ -0,0 +1,360 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">会员账号</view>
<view class="money-wrap">
<input type="text" class="withdraw-money" style="font-size: 16px;" placeholder="请输入会员账号" v-model="username" />
<view class="delete" @click="removeUsername" v-if="username">
<image :src="$util.img('upload/picture/member/apply_withdrawal/close.png')" mode="widthFix"></image>
</view>
</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('upload/picture/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>
</view>
</view>
<view class="desc">
<text>转账金额需为100的整数倍</text>
</view>
</view>
<view class="empty-box"></view>
<!-- <view class="withdraw-wrap">-->
<!-- <view class="withdraw-wrap-title">支付密码</view>-->
<!-- <view class="money-wrap">-->
<!-- <input type="digit" class="withdraw-money" v-model="buy_password" />-->
<!-- </view>-->
<!-- </view>-->
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 || username==''}" @click="withdraw">
确认转账
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
data() {
return {
username:'',
withdrawInfo: {
config: {
is_use: 0,
min: 1,
rate: 0
},
member_info: {
balance_money: 0,
balance_withdraw: 0,
balance_withdraw_apply: 0
}
},
bankAccountInfo: {},
withdrawMoney: '',
buy_password: '',
isSub: false
};
},
onShow() {
//
this.$langConfig.refresh();
if (uni.getStorageSync('token')) {
this.getWithdrawInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login');
}
},
methods: {
//
remove() {
this.withdrawMoney = '';
},
removeUsername(){
this.username = '';
},
/**
* 获取提现信息
*/
getWithdrawInfo() {
let _this = this;
this.$api.sendRequest({
url: '/api/memberwithdraw/info',
success: res => {
if (res.code >= 0 && res.data) {
this.withdrawInfo = res.data;
if (this.withdrawInfo.config.is_user_transfer == 0) {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
}
// if (this.withdrawInfo.member_info.is_pay_password == 0) {
// uni.showModal({
// title: '',
// content: '',
// success: function (res) {
// if (res.confirm) {
// _this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
// } else if (res.cancel) {
// _this.isSub = false;
// console.log('');
// }
// }
// });
// }
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
verify() {
if (this.username == '') {
this.$util.showToast({
title: '请输入转入账号'
});
return false;
}
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)) {
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.verify()) {
if (this.isSub) return;
this.isSub = true;
let _this = this;
uni.showModal({
title: '温馨提示',
content: '您的账号消费券将转让他人账号!',
success: function (res) {
if (res.confirm) {
_this.$api.sendRequest({
url: '/api/memberwithdraw/balanceTransfer',
data: {
username: _this.username,
apply_money: _this.withdrawMoney,
// password: _this.buy_password,
},
success: res => {
if (res.code >= 0) {
_this.$util.showToast({
title: '转账成功'
});
setTimeout(() => {
_this.$util.redirectTo('/pages_tool/member/balance', {}, 'redirectTo');
}, 1500);
} else {
_this.isSub = false;
if (res.code == -801) {
// uni.showModal({
// title: '',
// content: '',
// success: function (res) {
// if (res.confirm) {
// _this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
// } else if (res.cancel) {
// _this.isSub = false;
// console.log('');
// }
// }
// });
} else {
_this.$util.showToast({
title: res.data || res.message
});
}
}
},
fail: res => {
_this.isSub = false;
}
});
}
else if (res.cancel) {
_this.isSub = false;
console.log('用户点击取消');
}
}
});
}
}
},
filters: {
/**
* 金额格式化输出
* @param {Object} money
*/
moneyFormat(money) {
return parseFloat(money).toFixed(2);
}
}
};
</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: 1px 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: 1px solid #eee;
display: flex;
.unit {
font-size: 60rpx;
line-height: 1;
}
.withdraw-money {
height: 60rpx;
line-height: 1;
min-height: 60rpx;
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>

View File

@ -0,0 +1,192 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="balance">
<!-- #ifdef MP -->
<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') + ') no-repeat right bottom/ auto 340rpx, linear-gradient(314deg, #FE7849 0%, #FF1959 100%)' }">
<view class="balance price-font">{{ fenxiaoInfo && fenxiaoInfo.house_purchase != undefined ? fenxiaoInfo.house_purchase : '--' }}</view>
<view class="title">账户购房券</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>
<view class="menu-wrap">
<view class="menu-item" @click="toBalanceDetail">
<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" v-if="addonIsExist.memberrecharge && memberrechargeConfig && memberrechargeConfig.is_use">-->
<!-- <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">
转赠
</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
export default {
data() {
return {
balanceInfo: {
balance: 0,
balance_money: 0
},
withdrawConfig: null,
memberrechargeConfig: null,
menuButtonBounding: {}, //
fenxiaoInfo: null
};
},
async onShow() {
this.getWithdrawConfig();
this.getMemberrechargeConfig();
if (!uni.getStorageSync('token')) {
setTimeout(() => {
this.$refs.login.open('/pages_tool/member/balance');
});
} else {
this.getUserInfo();
this.getFenxiaoInfo();
}
},
onLoad() {
// #ifdef MP
this.menuButtonBounding = uni.getMenuButtonBoundingClientRect();
// #endif
},
methods: {
toWithdrawal() {
this.$util.redirectTo('/pages_tool/member/integral/transfer');
},
toOrderList() {
this.$util.redirectTo('/pages_tool/recharge/order_list');
},
toBalanceDetail() {
this.$util.redirectTo('/pages_promotion/fenxiao/bill',{type: 'house_purchase'});
},
toList() {
this.$util.redirectTo('/pages_tool/recharge/list');
},
getFenxiaoInfo(){
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.code >= 0) {
this.fenxiaoInfo=res.data;
}
}
});
},
//
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();
}
}
},
computed: {
storeToken() {
return this.$store.state.token;
}
}
};
</script>
<style lang="scss">
@import './public/css/balance.scss';
</style>

View File

@ -0,0 +1,450 @@
<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">可转换{{ type_name }}{{ $lang('common.currencySymbol') }}{{ showAmount | 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 class="desc">
<text>转换金额需为100的整数倍</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,
type: 'goufang_to_balance',
type_name : '购房券',
fenxiaoInfo: null,
showAmount : 0
};
},
onLoad(res){
this.type = res.type
switch (this.type){
case "goufang_to_balance":
this.type_name = '购房券'
break
case "balance_to_goufang":
this.type_name = '消费券'
break
}
},
onShow() {
if (uni.getStorageSync('token')) {
this.getWithdrawInfo();
this.getFenxiaoInfo();
this.getBankAccountInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_tool/member/apply_withdrawal'
});
}
},
methods: {
getFenxiaoInfo(){
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.code >= 0) {
this.fenxiaoInfo=res.data;
switch (this.type){
case "goufang_to_balance":
this.showAmount = this.fenxiaoInfo.house_purchase;
break
}
}
}
});
},
toWithdrawal() {
this.$util.redirectTo('/pages_tool/member/withdrawal');
},
//
allTx() {
this.withdrawMoney = this.showAmount;
},
//
remove() {
this.withdrawMoney = '';
},
/**
* 获取提现信息
*/
getWithdrawInfo() {
this.$api.sendRequest({
url: '/api/memberwithdraw/info',
success: res => {
if (res.code >= 0 && res.data) {
this.withdrawInfo = res.data;
switch (this.type){
case "balance_to_goufang":
this.showAmount = this.withdrawInfo.member_info.balance_money;
break
}
if (this.withdrawInfo.config.is_use == 0) {
this.$util.redirectTo('/pages/member/index');
}
}
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;
},
goufangverify() {
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({
title: '请输入转换金额'
});
return false;
}
if (parseFloat(this.withdrawMoney) > parseFloat(this.fenxiaoInfo.house_purchase)) {
this.$util.showToast({
title: '转换金额超出可转换金额'
});
return false;
}
if (parseFloat(this.withdrawMoney) <= parseFloat(0)) {
this.$util.showToast({
title: '转换金额小于最低转换金额'
});
return false;
}
return true;
},
withdraw() {
// if (!this.bankAccountInfo.withdraw_type) {
// this.$util.showToast({
// title: ''
// });
// return;
// }
switch (this.type){
case "goufang_to_balance":
if (!this.goufangverify()) {
return;
}
break
case "balance_to_goufang":
if (!this.verify()) {
return
}
break
}
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/fenxiao/api/account/goufang_to_balance',
data: {
apply_money: this.withdrawMoney,
type: this.type, //
},
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '转换成功'
});
setTimeout(() => {
switch (this.type){
case "goufang_to_balance":
this.$util.redirectTo('/pages_tool/member/goufang', {}, 'redirectTo');
break
case "balance_to_goufang":
this.$util.redirectTo('/pages_tool/member/balance', {}, 'redirectTo');
break
}
}, 1500);
} else {
this.isSub = false;
this.$util.showToast({
title: res.message
});
}
},
fail: res => {
this.isSub = false;
}
});
},
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>

View File

@ -0,0 +1,415 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="empty-box"></view>
<view class="withdraw-wrap" :class="{'ios': !$util.isAndroid()}">
<view class="title">桑果将{{ fenxiaoWords.withdraw }}到余额</view>
<view class="money-wrap">
<text class="unit">¥</text>
<input type="digit" class="withdraw-money" v-model="withdrawMoney"/>
</view>
<view class="bootom">
<view>
<text class="color-tip">
{{ fenxiaoWords.withdraw }}桑果¥{{ fenxiaoInfo.integral_money | moneyFormat }}
</text>
</view>
</view>
</view>
<view class="desc">
<text>最小{{ fenxiaoWords.withdraw }}桑果为¥{{ withdrawConfig.co_money | moneyFormat }}</text>
</view>
<view class="btn color-base-bg color-base-border" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
{{ fenxiaoWords.withdraw }}到余额
</view>
<view class="withdraw-list btn" @click="$util.redirectTo('/pages_tool/member/integral/apply_record',{key:'integral_money'})">
<view class="color-tip">桑果明细</view>
</view>
<!--加载动画-->
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import fenxiaoWords from 'common/js/fenxiao-words.js';
export default {
data() {
return {
fenxiaoInfo: {
account: 0
},
withdrawConfig: {
withdraw: 0
},
withdrawMoney: '',
isSub: false,
list: [],
};
},
components: {},
mixins: [fenxiaoWords],
onShow() {
//
if (this.fenxiaoWords && this.fenxiaoWords.withdraw) this.$langConfig.title('桑果' + this.fenxiaoWords.withdraw);
//
if (uni.getStorageSync('token')) {
this.getFenxiaoInfo();
this.getWithdrawConfig();
} else {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_tool/member/integral/apply'
});
}
},
methods: {
//
withdraw() {
if (this.verify()) {
if (this.isSub) return;
this.isSub = true;
this.$api.sendRequest({
url: '/fenxiao/api/withdraw/integral_money_apply',
data: {
money: this.withdrawMoney
},
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '提现申请成功'
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/member/point',{key:'integral_money'});
}, 1500);
} else {
this.isSub = false;
this.$util.showToast({ title: res.message });
}
},
fail: res => {
this.isSub = false;
}
});
}
},
verify() {
console.log(this.fenxiaoInfo,this.withdrawConfig)
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({ title: '请输入提现金额' });
return false;
}
if (parseFloat(this.withdrawMoney) > parseFloat(this.fenxiaoInfo.co_money)) {
this.$util.showToast({ title: '提现桑果超出可提现数量' });
return false;
}
if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawConfig.co_money)) {
this.$util.showToast({ title: '提现金额小于最低提现金额' });
return false;
}
if(this.withdrawConfig.withdraw_multiple==2&&(parseFloat(this.withdrawMoney)%this.withdrawConfig.co_money)!=0){
this.$util.showToast({ title: '提现金额为最低提现金额倍数' });
return false;
}
return true;
},
//
getWithdrawConfig() {
this.$api.sendRequest({
url: '/fenxiao/api/config/withdraw',
success: res => {
if (res.code >= 0) {
this.withdrawConfig = res.data;
}
}
});
},
//
getFenxiaoInfo() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.code >= 0 && res.data) {
this.fenxiaoInfo = res.data;
this.$refs.loadingCover.hide();
}
}
});
},
},
onReady() {
this.$refs.loadingCover.hide();
}
};
</script>
<style lang="scss">
.container {
width: 100vw;
height: 100vh;
background: $color-bg;
}
.align-right {
text-align: right;
}
.withdraw-wrap {
margin: 20rpx 30rpx 0;
padding: 30rpx;
border-radius: 10rpx;
background-color: #fff;
.title {
font-size: $font-size-base;
color: $color-tip;
}
.money-wrap {
padding: 20rpx 0;
border-bottom: 1rpx solid $color-line;
display: flex;
align-items: center;
.unit {
font-size: 60rpx;
line-height: 1;
}
.withdraw-money {
height: 70rpx;
line-height: 70rpx;
min-height: 70rpx;
padding-left: 20rpx;
font-size: 60rpx;
flex: 1;
font-weight: 500;
vertical-align: top;
display: block;
}
}
&.ios{
.money-wrap {
.unit {
margin-top: 10rpx;
}
}
}
.bootom {
display: flex;
padding-top: 30rpx;
& > view {
font-size: $font-size-base;
line-height: 1;
flex: 1;
}
}
}
.btn {
margin: 0 30rpx;
margin-top: 60rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: $border-radius;
color: var(--btn-text-color);
text-align: center;
&.disabled {
background: #ccc;
border-color: #ccc;
color: var(--btn-text-color);
}
}
.desc {
margin: 20rpx 40rpx;
font-size: $font-size-tag;
color: $color-tip;
}
.withdraw-list {
border: 2rpx solid $color-disabled;
text-align: center;
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
/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;
}
.account-box {
width: 100%;
box-sizing: border-box;
position: relative;
> image {
width: 100%;
position: absolute;
top: 0;
z-index: 1;
}
.accout-btn {
display: flex;
margin-top: 30rpx;
view {
width: 170rpx;
height: 44rpx;
border-radius: 22rpx;
border: 2rpx solid rgba(255, 255, 255, 0.4);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin-right: 44rpx;
}
}
.account-text {
position: relative;
padding: 50rpx 30rpx 34rpx 30rpx;
display: flex;
align-items: center;
z-index: 9;
.headimg {
width: 100rpx;
height: 100rpx;
background: #fff;
border: 4rpx solid #fff;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.point {
margin-left: 30rpx;
color: #fff;
font-size: 36rpx;
}
.iconjifen1 {
color: #fff;
margin-left: 8rpx;
}
}
}
.detailed-wrap {
background: #fff;
position: relative;
z-index: 9;
padding-top: 80rpx;
.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;
}
}
}
}
/deep/ .increase-number{
color: #07c160!important;
}
/deep/ .reduce-number{
color: #ee0a24!important;
}
</style>

View File

@ -0,0 +1,262 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="image-wrap">
<mescroll-uni @getData="applyRecord" class="member-point" ref="mescroll">
<view slot="list">
<block v-if="Object.keys(list).length > 0">
<view class="detailed-wrap">
<view class="cont">
<view class="detailed-item" v-for="(item, index) in list" :key="index">
<view class="info">
<view class="event">申请提现{{ item.money }}桑果</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="parseInt(item.status) === 1">待审核</view>
<view class="num increase-number color-base-text" v-else-if="parseInt(item.status) === 2">已通过</view>
<view class="num reduce-number" v-else>已拒绝</view>
</view>
</view>
</view>
</block>
<block v-else>
<view class="cart-empty">
<ns-empty></ns-empty>
</view>
</block>
</view>
</mescroll-uni>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
};
},
computed: {},
onLoad(data) {},
onReady() {},
onShow() {
if (!uni.getStorageSync('token')) {
this.$util.redirectTo('/pages_tool/login/login', {
back: '/pages_promotion/co2/lo2log'
});
}
},
onReachBottom() {},
methods: {
//
applyRecord(mescroll) {
let _this = this;
if(!mescroll) return false;
_this.$api.sendRequest({
url: '/fenxiao/api/withdraw/integralMoneyApply',
data: {
page: mescroll.num
},
success: res => {
if(parseInt(res.code) === 0){
let list = res.data.list;
mescroll.endSuccess(list.length);
//
if (parseInt(mescroll.num) === 1) this.list = []; //
this.list = this.list.concat(list); //
}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();
}
});
},
}
};
</script>
<style scoped 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;
}
.account-box {
width: 100%;
box-sizing: border-box;
position: relative;
> image {
width: 100%;
position: absolute;
top: 0;
z-index: 1;
}
.accout-btn {
display: flex;
margin-top: 30rpx;
view {
width: 170rpx;
height: 44rpx;
border-radius: 22rpx;
border: 2rpx solid rgba(255, 255, 255, 0.4);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin-right: 44rpx;
}
}
.account-text {
position: relative;
padding: 50rpx 30rpx 34rpx 30rpx;
display: flex;
align-items: center;
z-index: 9;
.headimg {
width: 100rpx;
height: 100rpx;
background: #fff;
border: 4rpx solid #fff;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.point {
margin-left: 30rpx;
color: #fff;
font-size: 36rpx;
}
.iconjifen1 {
color: #fff;
margin-left: 8rpx;
}
}
}
.detailed-wrap {
background: #fff;
position: relative;
z-index: 9;
.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;
}
}
}
}
/deep/ .increase-number{
color: #07c160!important;
}
/deep/ .reduce-number{
color: #ee0a24!important;
}
</style>

View File

@ -0,0 +1,353 @@
<!--分销商积分明细列表-->
<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 iconiconangledown"></text>
</view>
</picker>
</view>
<!--选择类型-->
<view class="tab-right">
<picker @change="bindPickerChange" :value="type_index" :range="type_list" class="picker" range-key="label">
<text class="desc uni-input">{{ type_list[type_index].label }}</text>
<text class="iconfont iconiconangledown"></text>
</picker>
</view>
</view>
<!--明细列表-->
<mescroll-uni @getData="getAccountInfo" class="member-point" ref="mescroll">
<view slot="list">
<block v-if="Object.keys(list).length > 0">
<view class="detailed-wrap">
<view class="cont">
<view class="detailed-item" v-for="(item, index) in list" :key="index">
<view class="info">
<view class="event">{{ item.remarks }}</view>
<view class="time-box">
<text class="time color-tip">{{ $util.timeStampTurnTime(item.create_time) }}</text>
</view>
</view>
<view class="num increase-number color-base-text" v-if="parseInt(item.status) === 1">+{{ item.money }}</view>
<view class="num reduce-number" v-else>{{ item.money }}</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 {
date: currentDate,
//
searchType: {
account_type: 0,
date: ''
},
//
type_index: 0,
type_list: [
{label: '积分', value: '0', type: 'integral'},
{label: '桑果', value: '1', type: 'integral_money'},
],
//
memberInfo: {},
//
list: [],
};
},
onShow() {
if (!uni.getStorageSync('token')) {
this.$util.redirectTo(
'/pages_tool/login/login',
{
back: '/pages_tool/member/point'
},
'redirectTo'
);
}
this.getMemberInfo();
},
onLoad(option) {
let integral_type = option.integral_type;
if(integral_type === 'integral') this.type_index = 0;
else if(integral_type === 'integral_money') this.type_index = 1;
},
computed: {},
methods: {
//
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}`;
},
//
getMemberInfo() {
this.$api.sendRequest({
url: '/api/member/info',
success: res => {
if (res.code >= 0) {
this.token = uni.getStorageSync('token');
this.memberInfo = res.data;
this.getAccountInfo();
} else {
this.token = null;
}
}
});
},
//
getAccountInfo(mescroll) {
let _this = this;
if(!mescroll) return false;
_this.$api.sendRequest({
url: '/fenxiao/api/account/account_list',
data: {
page: mescroll.num,
account_type: _this.type_list[_this.type_index].type,
date: _this.searchType.date,
},
success: res => {
if(parseInt(res.code) === 0){
let list = res.data.list;
mescroll.endSuccess(list.length);
//
if (parseInt(mescroll.num) === 1) this.list = []; //
this.list = this.list.concat(list); //
}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();
}
});
},
//
bindPickerChange(e) {
this.type_index = e.detail.value;
this.searchType.account_type = this.type_list[this.type_index].type;
this.$refs.mescroll.refresh();
},
}
};
</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;
}
.account-box {
width: 100%;
box-sizing: border-box;
position: relative;
> image {
width: 100%;
position: absolute;
top: 0;
z-index: 1;
}
.accout-btn {
display: flex;
margin-top: 30rpx;
view {
width: 170rpx;
height: 44rpx;
border-radius: 22rpx;
border: 2rpx solid rgba(255, 255, 255, 0.4);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin-right: 44rpx;
}
}
.account-text {
position: relative;
padding: 50rpx 30rpx 34rpx 30rpx;
display: flex;
align-items: center;
z-index: 9;
.headimg {
width: 100rpx;
height: 100rpx;
background: #fff;
border: 4rpx solid #fff;
border-radius: 50%;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.point {
margin-left: 30rpx;
color: #fff;
font-size: 36rpx;
}
.iconjifen1 {
color: #fff;
margin-left: 8rpx;
}
}
}
.detailed-wrap {
background: #fff;
position: relative;
z-index: 9;
padding-top: 80rpx;
.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;
}
}
}
}
/deep/ .increase-number{
color: #07c160!important;
}
/deep/ .reduce-number{
color: #ee0a24!important;
}
</style>

View File

@ -0,0 +1,363 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">会员账号</view>
<view class="money-wrap">
<input type="text" class="withdraw-money" style="font-size: 16px;" placeholder="请输入会员账号" v-model="username" />
<view class="delete" @click="removeUsername" v-if="username">
<image :src="$util.img('upload/picture/member/apply_withdrawal/close.png')" mode="widthFix"></image>
</view>
</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('upload/picture/member/apply_withdrawal/close.png')" mode="widthFix"></image>
</view>
</view>
<view class="bootom">
<view>
<text class="color-tip">可用购房券{{ withdrawInfo.house_purchase | moneyFormat }}</text>
</view>
</view>
<!-- <view class="desc">-->
<!-- <view>1.同一关系链上的用户可以互转,可向上或向下转赠</view>-->
<!-- <view>2.手续费规则直接关系互转免除手续费用例如转给直推下级或直推上级非直属互转{{withdrawConfig.co_money_rate+'%'}}手续费</view>-->
<!-- <view>3.购房券转赠最少{{withdrawConfig.co_money_transfer_multiple}}转赠数量为{{withdrawConfig.co_money_transfer_multiple}}的整数倍;</view>-->
<!-- <view>4.会员账号支持会员登录账号或者用户绑定的手机号</view>-->
<!-- </view>-->
<view class="desc">
<text>转账金额需为100的整数倍</text>
</view>
</view>
<view class="empty-box"></view>
<!-- <view class="withdraw-wrap">-->
<!-- <view class="withdraw-wrap-title">支付密码</view>-->
<!-- <view class="money-wrap">-->
<!-- <input type="digit" class="withdraw-money" v-model="buy_password" />-->
<!-- </view>-->
<!-- </view>-->
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 || username==''}" @click="withdraw">
确认转账
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
export default {
data() {
return {
username:'',
withdrawConfig:{
is_use: 0,
min: 1,
rate: 0
},
withdrawInfo: {},
bankAccountInfo: {},
withdrawMoney: '',
buy_password: '',
isSub: false
};
},
onShow() {
//
this.$langConfig.refresh();
this.getWithdrawConfig();
if (uni.getStorageSync('token')) {
this.getWithdrawInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login');
}
},
methods: {
getWithdrawConfig(){
this.$api.sendRequest({
url: '/fenxiao/api/config/withdraw',
success: res => {
console.log(res);
if (res.code >= 0 && res.data) {
this.withdrawConfig=res.data;
}
}
});
},
//
remove() {
this.withdrawMoney = '';
},
removeUsername(){
this.username = '';
},
//
getWithdrawInfo() {
let _this=this;
this.$api.sendRequest({
url: '/fenxiao/api/account/info',
success: res => {
console.log(res);
if (res.code >= 0 && res.data) {
this.withdrawInfo = res.data;
// if (this.withdrawInfo.config.is_user_transfer == 0) {
// this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
// }
}
// if (this.withdrawInfo.is_pay_password == 0) {
// uni.showModal({
// title: '',
// content: '',
// success: function (res) {
// if (res.confirm) {
// _this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
// } else if (res.cancel) {
// _this.isSub = false;
// console.log('');
// }
// }
// });
// }
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
verify() {
if (this.username == '') {
this.$util.showToast({
title: '请输入转入账号'
});
return false;
}
if (this.withdrawMoney == '' || this.withdrawMoney <= 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({
title: '请输入购房券'
});
return false;
}
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.house_purchase)) {
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.verify()) {
if (this.isSub) return;
this.isSub = true;
let _this=this;
uni.showModal({
title: '温馨提示',
content: '您的账号购房券将转让他人账号!',
success: function (res) {
if (res.confirm) {
_this.$api.sendRequest({
url: '/fenxiao/api/withdraw/integralMoneyTransfer',
data: {
username:_this.username,
apply_money: _this.withdrawMoney,
password: _this.buy_password,
},
success: res => {
console.log(res)
if (res.code >= 0) {
_this.$util.showToast({
title: '转账成功'
});
_this.isSub = false;
_this.getWithdrawInfo();
setTimeout(() => {
_this.$util.redirectTo('/pages_tool/member/goufang', {}, 'redirectTo');
}, 1500);
} else {
_this.isSub = false;
if (res.code == -801) {
// uni.showModal({
// title: '',
// content: '',
// success: function (res) {
// if (res.confirm) {
// _this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
// } else if (res.cancel) {
// _this.isSub = false;
// console.log('');
// }
// }
// });
} else {
_this.$util.showToast({
title: res.data || res.message
});
}
}
},
fail: res => {
_this.isSub = false;
}
});
} else if (res.cancel) {
_this.isSub = false;
console.log('用户点击取消');
}
}
});
}
}
},
filters: {
/**
* 金额格式化输出
* @param {Object} money
*/
moneyFormat(money) {
return parseFloat(money).toFixed(2);
}
}
};
</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: 1px 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: 1px solid #eee;
display: flex;
.unit {
font-size: 60rpx;
line-height: 1;
}
.withdraw-money {
height: 60rpx;
line-height: 1;
min-height: 60rpx;
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>

View File

@ -17,7 +17,7 @@
</template> </template>
<script> <script>
import mypOne from '@/components/myp-one/myp-one.vue'; import mypOne from './public/myp-one/myp-one.vue';
export default { export default {
components: { components: {
mypOne mypOne

View File

@ -75,7 +75,7 @@
</template> </template>
<script> <script>
import sxRate from '@/components/sx-rate/index.vue'; import sxRate from './public/sx-rate/index.vue';
import evaluate from './public/js/evaluate.js'; import evaluate from './public/js/evaluate.js';
export default { export default {
components: { components: {

View File

@ -0,0 +1,21 @@
/*@font-face {font-family: "iconfont";*/
/* src: url('~@/pages_tool/order/public/sx-rate/sx-rate/iconfont.eot?t=1574760464482'); !* IE9 *!*/
/* src: url('./iconfont.eot?t=1574760464482#iefix') format('embedded-opentype'), !* IE6-IE8 *!*/
/* url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABnAAAAJwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gQgBNgIkAwgLBgAEIAWEbQcuG6wFyA4lTcHACOEZBUg8fL/2O3f3fTHEkoh28SSayCSxkkgQG6Uz3UvYITu9Qr5K0Vh6Ij6f+8CXKzVBHDvWa6d0lSfK57mc3gQ6kGt8oBz3ojUG9QLqxYEU6B4YRVYqecPYBS7hMYG6QWF0dlOycoGxxFoViFuxkALGuYAksXRVKNccTOJdSTV7zbSAt/D78Y8XxmRKOavq5CZZAOK+7u2svLVode0TggR0vIQc84BEXNQmjugJxumpJ/SNAvsqD77ui8K3i71aBPvrrNIm6IfSe5K58ltNZ3BbU40Blkf9OmKsIW/Un1qddc4dcSma3ArIX7PPXdlxK5l2zJ+aD6TXnQqmu330wqpeWkYN/OnNm/0trU+YvqNR4UN99f+x/tApIFTfR7u39X4gKPnb9pOX5RAQB6DYyc/zOKCD4OUp6KiiPeqnapbAp56NdegrdhLo5wKq+3UG/0fWcyDpCsuWJVVWO5oZO29bXR0FwJ4uV2ONvTeTCVW9I1wVAylyVeNkYudR0rCOsqoN1M1JPd7QDdMTqYZZXQChwwYybT6Q63BIJvYSJX1eUNYReqi7CrsLGyZDbJqIEUWQAPLroJhWKhjHQUyj8mwkrJJROKsI+XyENeIw5LI4xXQqUiA8xxZNtZBHCAMZrJTDFPAcksmUUIWVEkQTlogQVQSbzdS9iUUr5cDUDgyhEIgAxFcHEqMpKTD+eMK09PlsiFAVGQpu6atJ5kMwDfHsEBcLpweZqlX06ruXVzSqCfEQBANiYEpyUAqYh8jIKEGq+nkSCI1gEY2IqURg28OYvlrW+nr5152AOsuUhV2fSy+EwgAAAA==') format('woff2'),*/
/* url('./iconfont.woff?t=1574760464482') format('woff'),*/
/* url('./iconfont.ttf?t=1574760464482') format('truetype'), !* chrome, firefox, opera, Safari, Android, iOS 4.2+ *!*/
/* url('./iconfont.svg?t=1574760464482#iconfont') format('svg'); !* iOS 4.1- *!*/
/*}*/
.iconfont {
font-family: "iconfont" !important;
font-size: inherit;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-star:before {
content: "\e6e3";
}

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB