123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="info" v-if="type=='0'">
- <view class="one">
- <view class="left">返现金额</view>
- <view class="right"><text>{{info.source=='-2'||info.source=='-1'?'-':'+'}}</text> {{info.money||0}}
- </view>
- </view>
- <view class="two">
- <view class="left">状态</view>
- <view class="right">{{info.zhStatus||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">返现时间</view>
- <view class="right">{{info.time||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">推荐人</view>
- <view class="right">{{info.inviter_name||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">来源</view>
- <view class="right">{{info.zhSource||'暂无'}}</view>
- </view>
- </view>
- <view class="info" v-else>
- <view class="one">
- <view class="left">提现金额</view>
- <view class="right">-{{info.money||0}}</view>
- </view>
- <view class="two">
- <view class="left">真实姓名</view>
- <view class="right">{{info.card_name||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">所属银行</view>
- <view class="right">{{info.card_bank||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">银行卡号</view>
- <view class="right">{{info.card||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">审核处理人</view>
- <view class="right">{{info.person_name||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">申请时间</view>
- <view class="right">{{info.apply_time||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">审核时间</view>
- <view class="right">{{info.exam_time||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">申请理由</view>
- <view class="right">{{info.apply_reason||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">审核理由</view>
- <view class="right">{{info.exam_reason||'暂无'}}</view>
- </view>
- <view class="two">
- <view class="left">审核状态</view>
- <view class="right">{{info.zhStatus||'暂无'}}</view>
- </view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- // 类型
- type: '',
- user: {},
- info: {},
- // 收益状态
- statusList: [],
- // 提现状态
- cashstatusList: [],
- // 来源
- sourceList: [],
- };
- },
- onLoad: async function(e) {
- const that = this;
- that.$set(that, `id`, e.id || '');
- that.$set(that, `type`, e.type || '');
- await that.searchOther();
- await that.watchLogin();
- },
- methods: {
- // 查询其他信息
- async searchOther() {
- const that = this;
- let res;
- res = await that.$api(`/dictData`, 'GET', {
- code: "cashBack_status"
- });
- if (res.errcode == '0') {
- that.$set(that, `statusList`, res.data)
- }
- res = await that.$api(`/dictData`, 'GET', {
- code: "cashBack_source"
- });
- if (res.errcode == '0') {
- that.$set(that, `sourceList`, res.data)
- }
- res = await that.$api(`/dictData`, 'GET', {
- code: "withdrawal_exam_status"
- });
- if (res.errcode == '0') {
- that.$set(that, `cashstatusList`, res.data)
- }
- },
- // 监听用户是否登录
- watchLogin() {
- const that = this;
- uni.getStorage({
- key: 'token',
- success: async function(res) {
- let user = that.$jwt(res.data);
- if (user) {
- that.$set(that, `user`, user);
- if (that.id) {
- if (that.type == '0') {
- // 收益记录
- let arr = await that.$api(`/cashBack/${that.id}`, 'GET')
- if (arr.errcode == '0') {
- let status = that.statusList.find(i => i.value == arr.data.status)
- if (status) arr.data.zhStatus = status.label;
- let source = that.sourceList.find(i => i.value == arr.data.source)
- if (source) arr.data.zhSource = source.label;
- // 查询推荐人信息
- let res = await that.$api(`/user/${arr.data.inviter}`, 'GET');
- if (res.errcode == '0') arr.data.inviter_name = res.data.name
- that.$set(that, `info`, arr.data)
- }
- } else {
- // 提现记录
- let arr = await that.$api(`/cashOut/${that.id}`, 'GET')
- if (arr.errcode == '0') {
- let status = that.cashstatusList.find(i => i.value == arr.data.status)
- if (status) arr.data.zhStatus = status.label;
- // 审核处理人信息
- let res = await that.$api(`/admin/${arr.data.deal_person}`, 'GET');
- if (res.errcode == '0') arr.data.person_name = res?.data?.name
- that.$set(that, `info`, arr.data)
- }
- }
- }
- }
- },
- fail: function(err) {
- uni.navigateTo({
- url: `/pages/login/index`
- })
- }
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .info {
- padding: 2vw;
- .one {
- display: flex;
- justify-content: space-between;
- padding: 10vw 2vw;
- border-bottom: 0.5vw solid var(--f1Color);
- .left {
- color: #696969;
- font-size: var(--font14Size);
- }
- .right {
- font-size: var(--font16Size);
- font-weight: bold;
- }
- }
- .two {
- display: flex;
- justify-content: space-between;
- padding: 2vw;
- .left {
- color: #696969;
- font-size: var(--font14Size);
- }
- .right {
- color: #A9A9A9;
- font-size: var(--font14Size);
- }
- }
- }
- }
- </style>
|