学习强国
This commit is contained in:
@@ -1,37 +1,76 @@
|
||||
<template>
|
||||
<div class="AppGreatPowerIntegral">
|
||||
<div class="myIntegral">
|
||||
<span>824</span>
|
||||
<p>{{ data['integral'] + data['learningIntegral'] }}</p>
|
||||
<label>我的积分</label>
|
||||
</div>
|
||||
<div class="tabs"></div>
|
||||
<div class="tabs">
|
||||
<div class="item">
|
||||
<p>{{ data['integral'] }}</p>
|
||||
<label>个人积分</label>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>{{ data['familySurplusIntegral'] }}</p>
|
||||
<label>家庭积分</label>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>{{ data['learningIntegral'] }}</p>
|
||||
<label>学习强国</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<div class="editBtn" @click="$linkTo(`./editIntegral?partyMemberId=${user.partyId}&id=${user.id}`)">修改学习强国</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
export default {
|
||||
name: 'AppGreatPowerIntegral',
|
||||
appName: '学习强国',
|
||||
data() {
|
||||
return {
|
||||
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
methods: {}
|
||||
onShow() {
|
||||
this.getIntegral()
|
||||
uni.$on('update', ()=>{
|
||||
this.getIntegral()
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
methods: {
|
||||
getIntegral() {
|
||||
this.$instance.post('/app/appparty/getPartyIntegralDetail',null,{
|
||||
params: {
|
||||
id: this.user.id,
|
||||
}
|
||||
}).then((res) => {
|
||||
if(res?.data) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppGreatPowerIntegral {
|
||||
.myIntegral {
|
||||
position: relative;
|
||||
padding-top: 30px;
|
||||
box-sizing: border-box;
|
||||
height: 344px;
|
||||
width: 100%;
|
||||
background: #4181FF;
|
||||
text-align: center;
|
||||
span {
|
||||
p {
|
||||
font-size: 100px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
@@ -41,5 +80,49 @@ export default {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.tabs {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
left: 35px;
|
||||
top: 250px;
|
||||
height: 176px;
|
||||
width: 90%;
|
||||
background: #FFF;
|
||||
border-radius: 32px;
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 30px 0;
|
||||
p {
|
||||
font-size: 50px;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
label {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
padding: 16px 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
background: #F3F6F9;
|
||||
.editBtn {
|
||||
flex: 1;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
113
project/sanjianxi/AppGreatPowerIntegral/editIntegral.vue
Normal file
113
project/sanjianxi/AppGreatPowerIntegral/editIntegral.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div class="editIntegral">
|
||||
<div class="item">
|
||||
<div class="title"><span>*</span>学习强国</div>
|
||||
<div class="inp">
|
||||
<u-input v-model="learningIntegral" :type="number" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<div class="submitBtn" @click="submit">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'editIntegral',
|
||||
appName: '修改学习强国',
|
||||
data() {
|
||||
return {
|
||||
learningIntegral: '',
|
||||
partyMemberId: '',
|
||||
id: '',
|
||||
flag: false,
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.partyMemberId = o.partyMemberId
|
||||
this.id = o.id
|
||||
},
|
||||
methods: {
|
||||
getIntegral() {
|
||||
this.$instance.post('/app/appparty/getPartyIntegralDetail',{
|
||||
params: {
|
||||
id: this.id,
|
||||
}
|
||||
}).then((res) => {
|
||||
if(res?.data) {
|
||||
this.learningIntegral = { ...res.data.learningIntegral }
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
if(!this.learningIntegral) {
|
||||
return this.$u.toast('请输入学习强国积分')
|
||||
}
|
||||
this.flag = true
|
||||
this.$instance.post('/app/appparty/editLearningIntegral',null,{
|
||||
params: {
|
||||
partyMemberId: this.partyMemberId,
|
||||
learningIntegral: this.learningIntegral,
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('修改成功')
|
||||
setTimeout(() => {
|
||||
uni.$emit('update')
|
||||
uni.navigateBack()
|
||||
},600)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.editIntegral {
|
||||
padding: 0 30px;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30px 0;
|
||||
.title {
|
||||
width: 200px;
|
||||
span {
|
||||
color:#FF4466;
|
||||
}
|
||||
}
|
||||
|
||||
.inp {
|
||||
width: calc(100% - 200px);
|
||||
::v-deep .u-input .u-input__input {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
padding: 16px 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
background: #F3F6F9;
|
||||
.submitBtn {
|
||||
flex: 1;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -22,6 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'familyInfo',
|
||||
appName: '家庭详情',
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
<div class="contactInfo">
|
||||
<h2>联络信息</h2>
|
||||
<div class="item">
|
||||
<span>联系方式</span><span>{{ data.phone || '' }}</span>
|
||||
<span>联系方式</span>
|
||||
<span style="color: #4181FF" @click="callPhone(data.phone)">{{ data.phone || '' }}</span>
|
||||
</div>
|
||||
<div class="items">
|
||||
<p>现住址</p>
|
||||
@@ -94,6 +95,11 @@ export default {
|
||||
this.id = o.id
|
||||
},
|
||||
methods: {
|
||||
callPhone(phone) {
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: phone,
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
this.$instance.post('/app/appresident/detailForWx',null,{
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user