This commit is contained in:
yangtao 2024-04-09 17:52:17 +08:00
parent 2e5079df27
commit d7c6076353
5 changed files with 106 additions and 53 deletions

View File

@ -34,7 +34,10 @@
<script> <script>
export default { export default {
props:{ props:{
show_key:Boolean, show_key:{
type: Boolean,
default: false
},
price:String, price:String,
show_subTitle:{ show_subTitle:{
default:true default:true
@ -91,16 +94,13 @@
}, },
// //
closeFuc () { closeFuc () {
this.show_key=false;
console.log('关闭支付页面');
this.$emit("closeFuc",false) this.$emit("closeFuc",false)
}, },
// //
forgetFuc () { forgetFuc () {
console.log('找回密码'); uni.navigateTo({
// uni.navigateTo({ url:'/pages/users/user_pay_pwd/index'
// url:'/pages/mine/myWallet/changezfPwd/changezfPwd' })
// })
} }
} }
} }

View File

@ -59,8 +59,15 @@
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view> <view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">绑定手机号</view>
</view> </view>
</view> </view>
<view class="num-wrapper skeleton-rect"> <view class="num-wrapper skeleton-rect" style="justify-content: flex-end;">
<view class="num-item" >
<text class="num">{{userInfo.member_value || 0}}</text>
<view class="txt">成长值</view>
</view>
<view class="num-item" >
<text class="num">{{userInfo.member_value || 0}}</text>
<view class="txt">累积成长值</view>
</view>
</view> </view>
<view class="num-wrapper skeleton-rect"> <view class="num-wrapper skeleton-rect">
<view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')"> <view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
@ -71,10 +78,7 @@
<text class="num">{{userInfo.total_collect_store || 0}}</text> <text class="num">{{userInfo.total_collect_store || 0}}</text>
<view class="txt">关注店铺</view> <view class="txt">关注店铺</view>
</view> </view>
<view class="num-item" >
<text class="num">{{userInfo.member_value || 0}}</text>
<view class="txt">成长值</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')"> <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.total_coupon || 0}}</text> <text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">优惠券</view> <view class="txt">优惠券</view>
@ -761,7 +765,7 @@ import { setTimeout } from 'timers';
margin: 30rpx 20rpx 0; margin: 30rpx 20rpx 0;
color: #fff; color: #fff;
.num-item { .num-item {
width: 20%; width: 25%;
text-align: center; text-align: center;
.num { .num {
font-size: 42rpx; font-size: 42rpx;

View File

@ -86,7 +86,16 @@
card_back:this.image2[0], card_back:this.image2[0],
} }
await userReal(data1).then((res)=>{ await userReal(data1).then((res)=>{
console.log('res: ',res); uni.showToast({
icon:'success',
title: res
});
uni.redirectTo({
url: '/pages/user/index',
success: res => {},
fail: () => {},
complete: () => {}
});
}).catch((err)=>{ }).catch((err)=>{
uni.showToast({ uni.showToast({

View File

@ -45,36 +45,25 @@
</view> </view>
</view> </view>
<view v-if="integral_status" class='list2' :hidden='current!=1'> <view v-if="integral_status" class='list2' :hidden='current!=1'>
<navigator class='item acea-row row-between-wrapper' open-type='switchTab' hover-class='none' url='/pages/index/index'> <view class="list-item">
<view class='pictrue'> <text>姓名</text>
<image :src='`${domain}/static/images/score.png`'></image> <input type="text" v-model="presentExp.name" />
</view> </view>
<view class='name'>购买商品可获得积分奖励</view> <view class="list-item">
<view class='earn'>赚积分</view> <text>手机号</text>
</navigator> <input type="number" v-model="presentExp.phone"/>
<navigator class='item acea-row row-between-wrapper' hover-class='none' url='/pages/users/user_sgin/index'>
<view class='pictrue'>
<image :src='`${domain}/static/images/score.png`'></image>
</view> </view>
<view class='name'>每日签到可获得积分奖励</view> <view class="list-item">
<view class='earn'>赚积分</view> <text>身份证</text>
</navigator> <input type="text" v-model="presentExp.id_number"/>
<!--#ifndef APP-PLUS-->
<view class='item acea-row row-between-wrapper' @click="shareIntegral">
<view class='pictrue'>
<image :src='`${domain}/static/images/score.png`'></image>
</view> </view>
<view class='name'>邀请好友可获得积分奖励</view> <view class="list-item">
<view class='earn'>赚积分</view> <text>积分</text>
<input type="text" v-model="presentExp.integral"/>
</view> </view>
<!--#endif--> <view class="list-btn" @click="giveaway">
<!-- <navigator class='item acea-row row-between-wrapper' hover-class='none' url='/pages/users/user_luckyDraw/index'> 确认赠送
<view class='pictrue'>
<image :src='`${domain}/static/images/score.png`'></image>
</view> </view>
<view class='name'>轮盘抽奖可获得积分奖励</view>
<view class='earn'>去抽奖</view>
</navigator> -->
</view> </view>
</view> </view>
</view> </view>
@ -87,11 +76,12 @@
</view> </view>
</view> </view>
</view> </view>
<pay :show_key="payShow" :show_subTitle="false" :mix="true" @pay="payFunc" @closeFuc="closeFunc"></pay>
</view> </view>
</template> </template>
<script> <script>
import pay from "@/components/pay/index.vue"
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js'; import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
@ -103,16 +93,18 @@
components: { components: {
emptyPage, emptyPage,
"jyf-parser": parser, "jyf-parser": parser,
pay,
}, },
data() { data() {
return { return {
payShow:false,
domain: HTTP_REQUEST_URL, domain: HTTP_REQUEST_URL,
navList: [{ navList: [{
'name': '分值明细', 'name': '分值明细',
'icon': 'icon-mingxi' 'icon': 'icon-mingxi'
}, },
{ {
'name': '分值提升', 'name': '积分赠送',
'icon': 'icon-tishengfenzhi' 'icon': 'icon-tishengfenzhi'
} }
], ],
@ -131,6 +123,12 @@
video: 'width:100%;' video: 'width:100%;'
}, },
integral_status: true, integral_status: true,
presentExp:{
name:'',
phone:'',
id_number:'',
integral:'',
}
}; };
}, },
computed: mapGetters(['isLogin','viewColor']), computed: mapGetters(['isLogin','viewColor']),
@ -149,6 +147,16 @@
this.getIntegralList(); this.getIntegralList();
}, },
methods: { methods: {
closeFunc(val){
this.payShow=val;
},
payFunc(val){
console.log('val: ',val);
this.payShow=false;
},
giveaway(){
this.payShow=true;
},
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getIntegralInfo().then(function(res) { getIntegralInfo().then(function(res) {
@ -336,6 +344,37 @@
.integral-details .wrapper .list2 { .integral-details .wrapper .list2 {
background-color: #fff; background-color: #fff;
padding: 24rpx 0; padding: 24rpx 0;
display: flex;
flex-direction: column;
grid-gap: 20rpx;
.list-item{
width: 90%;
height: 120rpx;
border-radius: 20rpx;
margin: 0 auto;
background: #f2f2f2;
display: flex;
flex-direction: row;
align-items: center;
padding:0 20rpx;
text{
flex: 1;
}
input{
flex: 4;
}
}
.list-btn{
margin: 0 auto;
width: 90%;
border-radius: 20rpx;
text-align: center;
line-height: 100rpx;
color: white;
font-size: 32rpx;
height: 100rpx;
background-color:var(--view-theme);
}
} }
.integral-details .wrapper .list2 .item { .integral-details .wrapper .list2 .item {
background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%); background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);

View File

@ -24,7 +24,7 @@
<!-- <view class='num' :class='item.is_sgin ? "on" : ""'>+{{item.value.sign_integral}}</view> --> <!-- <view class='num' :class='item.is_sgin ? "on" : ""'>+{{item.value.sign_integral}}</view> -->
</view> </view>
</view> </view>
<button class='but b-color on' v-if="is_sign" @click="go">已签到</button> <button class='but b-color on' v-if="is_sign">已签到</button>
<form @submit="goSign" report-submit='true' v-else> <form @submit="goSign" report-submit='true' v-else>
<button class='but b-color' :class="disabled ? 'disabled' : ''" formType="submit">立即签到</button> <button class='but b-color' :class="disabled ? 'disabled' : ''" formType="submit">立即签到</button>
</form> </form>
@ -104,9 +104,9 @@
closeBox(){ closeBox(){
this.treasureShow=false; this.treasureShow=false;
}, },
go(){ // go(){
this.treasureShow=true; // this.treasureShow=true;
}, // },
/** /**
* 去签到记录页面 * 去签到记录页面
* *
@ -123,7 +123,7 @@
res.data.integral = parseInt(res.data.integral); res.data.integral = parseInt(res.data.integral);
let sum_sgin_day = res.data.count; let sum_sgin_day = res.data.count;
that.$set(that,'signConfig',res.data.title); that.$set(that,'signConfig',res.data.title);
that.$set(that,'is_sign',res.data.is_sign); // that.$set(that,'is_sign',res.data.is_sign);
that.$set(that,'userInfo',res.data.userInfo); that.$set(that,'userInfo',res.data.userInfo);
that.signCount = that.PrefixInteger(sum_sgin_day, 4); that.signCount = that.PrefixInteger(sum_sgin_day, 4);
that.sign_index = res.data.sign_num; that.sign_index = res.data.sign_num;
@ -169,7 +169,8 @@
if (that.userInfo.is_day_sgin) return this.$util.Tips({title:'您今日已签到!'}); if (that.userInfo.is_day_sgin) return this.$util.Tips({title:'您今日已签到!'});
that.disabled = true; that.disabled = true;
setSignIntegral().then(res=>{ setSignIntegral().then(res=>{
that.active = true; that.treasureShow=true;
// that.active = true;
that.integral = res.data.integral; that.integral = res.data.integral;
that.sign_index = (that.sign_index + 1) > that.signConfig.title.length ? 1 : that.sign_index + 1; that.sign_index = (that.sign_index + 1) > that.signConfig.title.length ? 1 : that.sign_index + 1;
that.signCount = that.PrefixInteger(sum_sgin_day + 1, 4); that.signCount = that.PrefixInteger(sum_sgin_day + 1, 4);