|
|
@@ -27,6 +27,12 @@
|
|
|
</scroll-view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
+ <view class="bottom-box">
|
|
|
+ <button class="add-btn up" @click="confirmShow">积分转佣金</button>
|
|
|
+ <navigator url="./setintegral">
|
|
|
+ <button class="add-btn yue" >积分转账</button>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -35,13 +41,21 @@
|
|
|
import { integrallist } from '@/api/functionalUnit.js';
|
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
import empty from '@/components/empty';
|
|
|
+import {
|
|
|
+ getUserInfo
|
|
|
+ } from '@/api/user.js';
|
|
|
+import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
+ import { setMoney } from '@/api/new.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
empty,
|
|
|
uniLoadMore
|
|
|
},
|
|
|
- onReady() {
|
|
|
-
|
|
|
+ computed: {
|
|
|
+ ...mapState('user', ['userInfo'])
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -61,8 +75,45 @@ export default {
|
|
|
onShow() {
|
|
|
// 载入积分数据
|
|
|
this.loadData();
|
|
|
+ this.loadBaseData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations('user', ['setUserInfo']),
|
|
|
+ // 重新获取用户数据
|
|
|
+ loadBaseData() {
|
|
|
+ getUserInfo({})
|
|
|
+ .then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ console.log(data.nickname)
|
|
|
+ this.setUserInfo(data);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirmShow(){
|
|
|
+ uni.showModal({
|
|
|
+ title: '积分转佣金',
|
|
|
+ editable: true,
|
|
|
+ placeholderText:'请输入要转换的积分',
|
|
|
+ success: res => {
|
|
|
+ if(res.confirm){
|
|
|
+ setMoney({
|
|
|
+ brokerage:+res.content/10
|
|
|
+ }).then((e)=>{
|
|
|
+ uni.showToast({
|
|
|
+ title: '积分转佣金完成'
|
|
|
+ });
|
|
|
+ }).catch((err)=>{
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
// 页面跳转
|
|
|
navto(e) {
|
|
|
uni.navigateTo({
|
|
|
@@ -197,4 +248,104 @@ page {
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
+.bottom-box{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left:0;
|
|
|
+ right:0;
|
|
|
+ padding-bottom: 30rpx;
|
|
|
+}
|
|
|
+.add-btn {
|
|
|
+ color:#FFF;
|
|
|
+ &.yue{
|
|
|
+ background-color: #FFF;
|
|
|
+ color: #6B4216;
|
|
|
+ }
|
|
|
+ &.up {
|
|
|
+ background: linear-gradient(-90deg, #FAC545, #FFE000);
|
|
|
+ }
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 604rpx;
|
|
|
+ height: 90rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ font-size: $font-lg;
|
|
|
+ border-radius: 10rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ .popup-box {
|
|
|
+ width: 522rpx;
|
|
|
+ height: 605rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ position: relative;
|
|
|
+ .title{
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .mian {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ // padding: 32rpx 32rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 0 0 20rpx 20rpx;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .delivery {
|
|
|
+ font-size: 40rpx;
|
|
|
+ color: #333333;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ image {
|
|
|
+ margin-top: 48rpx;
|
|
|
+ width: 172rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .nocancel {
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #333333;
|
|
|
+ margin-top: 14rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm-box {
|
|
|
+ margin-top: 52rpx;
|
|
|
+ display: flex;
|
|
|
+ // margin-bottom: 32rpx;
|
|
|
+
|
|
|
+ // justify-content: space-around;
|
|
|
+ .cancel {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 197rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ border: 1px solid #dcc786;
|
|
|
+ border-radius: 38rpx;
|
|
|
+
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #605128;
|
|
|
+ }
|
|
|
+
|
|
|
+ .comfirm {
|
|
|
+ margin-left: 32rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 197rpx;
|
|
|
+ height: 74rpx;
|
|
|
+ background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
|
|
|
+ border-radius: 38px;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #605128;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|