修改
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!-- 砍价详情 -->
|
||||
<template>
|
||||
<!-- TODO @科举:按照项目的代码风格,调整下这个界面 -->
|
||||
<!-- TODO @科举:挪到 bargain/detail.vue 里 -->
|
||||
<!-- TODO @科举:尽量都迁移完;依赖数据的部分,通过直接在 state 写死状态,不用后端返回,跑通整个界面;不追求 100% 对,但是至少自己观感是 ok 的 -->
|
||||
<!-- TODO @科举:按照项目的代码风格,调整下这个界面 -->
|
||||
<!-- TODO @科举:挪到 bargain/detail.vue 里 -->
|
||||
<!-- TODO @科举:尽量都迁移完;依赖数据的部分,通过直接在 state 写死状态,不用后端返回,跑通整个界面;不追求 100% 对,但是至少自己观感是 ok 的 -->
|
||||
<s-layout title='砍价详情'>
|
||||
<view class='bargain'>
|
||||
<!-- :class="startBargainUid !== userInfo.uid ? 'on' : ''" -->
|
||||
@@ -138,28 +138,18 @@
|
||||
});
|
||||
|
||||
|
||||
function getBargainDetails() {
|
||||
sheep.$api.activity.getBargainActivityDetail({
|
||||
async function getBargainDetails() {
|
||||
let {
|
||||
data,
|
||||
code
|
||||
} = await sheep.$api.activity.getBargainActivityDetail({
|
||||
id: state.id
|
||||
}).then(res => {
|
||||
state.bargainInfo = res.data;
|
||||
state.buyPrice = state.bargainInfo.bargainFirstPrice;
|
||||
// state.pages = '/pages/activity/goods_bargain_details/index?id=' + state.id +
|
||||
// '&startBargainUid=' + state.uid + '&scene=' + state.uid + '&storeBargainId=' + state
|
||||
// .storeBargainId;
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: bargainInfo.name.substring(0, 13) + '...'
|
||||
// })
|
||||
|
||||
// 获得拼团记录
|
||||
// this.gobargainUserInfo();
|
||||
|
||||
//#ifdef H5
|
||||
// this.getImageBase64(bargainInfo.picUrl);
|
||||
//#endif
|
||||
}).catch(function(err) {
|
||||
// 错误了可以跳转回上个页面
|
||||
})
|
||||
if (code == 0) {
|
||||
state.bargainInfo = data;
|
||||
state.buyPrice = state.bargainInfo.bargainFirstPrice;
|
||||
}
|
||||
|
||||
}
|
||||
onLoad(function(options) {
|
||||
if (options.hasOwnProperty('id')) {
|
||||
|
||||
+3
-4
@@ -22,11 +22,10 @@
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<!-- TODO @科举:1)这里已签到的样式不太对;2)最后一天(第 7 天)的大奖样式不太对 -->
|
||||
<view class="item" v-for="(item, index) in state.signConfigList" :key="index">
|
||||
<view
|
||||
:class="
|
||||
(index + 1 === state.signConfigList.length ? 'reward' : '') +
|
||||
(index === state.signConfigList.length ? 'reward' : '') +
|
||||
' ' +
|
||||
(state.signInfo.continuousDay >= item.day ? 'rewardTxt' : '')
|
||||
"
|
||||
@@ -66,7 +65,7 @@
|
||||
<!-- 签到说明 TODO @科举:这里改成【已累计签到】 -->
|
||||
<view class="bg-white ss-m-t-16 ss-p-t-30 ss-p-b-60 ss-p-x-40">
|
||||
<view class="activity-title ss-m-b-30">签到说明</view>
|
||||
<view class="activity-des">1、每天签到,可获得积分或经验</view>
|
||||
<view class="activity-des">1、已累计签到{{state.signInfo.totalDay}}天</view>
|
||||
<view class="activity-des">
|
||||
2、据说连续签到第 {{ state.maxDay }} 天可获得超额积分,一定要坚持签到哦~~~
|
||||
</view>
|
||||
@@ -111,7 +110,7 @@
|
||||
signInfo: {}, // 签到信息
|
||||
|
||||
signConfigList: [], // 签到配置列表
|
||||
maxDay: 0, // 最大的签到天数
|
||||
maxDay: 0, // 最大的签到天数
|
||||
|
||||
showModel: false, // 签到弹框
|
||||
signResult: {}, // 签到结果
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
import {
|
||||
reactive,
|
||||
onBeforeMount,
|
||||
nextTick
|
||||
nextTick,
|
||||
ref
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
@@ -52,7 +53,7 @@
|
||||
const state = reactive({
|
||||
currentValue: '0',
|
||||
});
|
||||
const typeList = [{
|
||||
const typeList = reactive([{
|
||||
// icon: '/static/img/shop/pay/wechat.png',
|
||||
title: '工商银行',
|
||||
value: '0',
|
||||
@@ -67,7 +68,7 @@
|
||||
title: '农业',
|
||||
value: '2',
|
||||
},
|
||||
];
|
||||
])
|
||||
const getWalletAccountInfo = async () => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let res = await sheep.$api.user.account.info({
|
||||
|
||||
+34
-17
@@ -21,29 +21,44 @@
|
||||
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.amount" type="number"
|
||||
placeholder="请输入提现金额" />
|
||||
</view>
|
||||
<view class="card-title">持卡人</view>
|
||||
<view class="input-box ss-flex ss-col-center border-bottom">
|
||||
<view class="card-title" v-show='txfag==1'>持卡人</view>
|
||||
<view class="input-box ss-flex ss-col-center border-bottom" v-show='txfag==1'>
|
||||
<view class="unit"></view>
|
||||
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.name"
|
||||
placeholder="请输入持卡人姓名" />
|
||||
</view>
|
||||
<view class="card-title">卡号</view>
|
||||
<view class="input-box ss-flex ss-col-center border-bottom">
|
||||
<view class="card-title" v-show='txfag==1'>卡号</view>
|
||||
<view class="input-box ss-flex ss-col-center border-bottom" v-show='txfag==1'>
|
||||
<view class="unit"></view>
|
||||
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.accountNo"
|
||||
placeholder="请输卡号" />
|
||||
</view>
|
||||
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30">
|
||||
<view class="card-title">收款码</view>
|
||||
<view class="input-box ss-flex ss-col-center border-bottom">
|
||||
<view class="unit"></view>
|
||||
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.accountQrCodeUrl"
|
||||
placeholder="请输收款码地址" />
|
||||
</view>
|
||||
|
||||
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" style='display:block'>
|
||||
<view class="name">选择提现方式:</view>
|
||||
<!-- <view class="bank-list ss-flex ss-col-center" style="margin-left:auto" >
|
||||
<view class="empty-text">请选择提现方式</view>
|
||||
<text class="cicon-forward"></text>
|
||||
</view> -->
|
||||
<uni-section title="单选" type="line">
|
||||
<view class="uni-px-5 uni-pb-5" style='font-size:28rpx'>
|
||||
<uni-data-checkbox v-model="txfag" :localdata="txList"></uni-data-checkbox>
|
||||
</view>
|
||||
</uni-section>
|
||||
</view>
|
||||
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" v-show='txfag==1'>
|
||||
<view class="name">选择银行</view>
|
||||
<view class="bank-list ss-flex ss-col-center" @tap="onAccountSelect(true)">
|
||||
<view v-if="!state.accountInfo.type" class="empty-text">请选择提现方式</view>
|
||||
<view v-if="state.accountInfo.type === '0'" class="empty-text">工商银行</view>
|
||||
<view v-if="state.accountInfo.type === '1'" class="empty-text">建设银行</view>
|
||||
<view v-if="state.accountInfo.type === '2'" class="empty-text">农业银行</view>
|
||||
<!-- <view v-if="!state.accountInfo.type" class="empty-text">请选择提现方式</view>
|
||||
<view v-if="state.accountInfo.type === 'wechat'" class="empty-text">微信零钱</view>
|
||||
<view v-if="state.accountInfo.type === 'alipay'" class="empty-text">支付宝账户</view>
|
||||
<view v-if="state.accountInfo.type === 'bank'" class="empty-text">银行卡转账</view> -->
|
||||
<text class="cicon-forward"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -51,10 +66,6 @@
|
||||
<view class="placeholder-text" v-if="state.accountInfo.account_name">
|
||||
{{ state.accountInfo.account_header }}|{{ state.accountInfo.account_name }}
|
||||
</view>
|
||||
<!-- <view class="placeholder-text" v-else>暂无提现账户</view>
|
||||
<button class="add-btn ss-reset-button" @tap="onAccountEdit(true)">
|
||||
{{ state.accountInfo.account_name ? '修改' : '添加' }}
|
||||
</button> -->
|
||||
</view>
|
||||
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
|
||||
确认提现
|
||||
@@ -91,7 +102,7 @@
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
onBeforeMount
|
||||
onBeforeMount,ref
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import accountTypeSelect from './components/account-type-select.vue';
|
||||
@@ -130,7 +141,11 @@
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
let txfag=ref(1)
|
||||
const txList=[{text:'银行卡提现',value:1},{text:'微信提现',value:2},{text:'支付宝提现',value:3}]
|
||||
function tixian(v){
|
||||
console.log(v)
|
||||
}
|
||||
const userStore = sheep.$store('user');
|
||||
const userInfo = computed(() => userStore.userInfo);
|
||||
const state = reactive({
|
||||
@@ -152,6 +167,7 @@
|
||||
methods: [],
|
||||
},
|
||||
rulesList: [],
|
||||
accountQrCodeUrl:''
|
||||
});
|
||||
|
||||
const onAccountEdit = (e) => {
|
||||
@@ -167,8 +183,9 @@
|
||||
accountNo: state.accountNo,
|
||||
name: state.name,
|
||||
bankName: state.accountInfo.type,
|
||||
type: '2',
|
||||
price: state.amount * 100
|
||||
type: txfag.value,
|
||||
price: state.amount * 100,
|
||||
accountQrCodeUrl:state.accountQrCodeUrl
|
||||
};
|
||||
console.log(payload);
|
||||
// return;
|
||||
|
||||
Reference in New Issue
Block a user