修改
This commit is contained in:
parent
2e86312ba6
commit
619abedc69
@ -1,8 +1,8 @@
|
||||
import request from "../../request.js"
|
||||
|
||||
export function prizeExchangelist(data, region) {
|
||||
export function scorelist(data) {
|
||||
return request({
|
||||
url: `/applet/score/prizeExchange/list`,
|
||||
url: `/applet/score/list`,
|
||||
method: 'get',
|
||||
data: data,
|
||||
header: {
|
||||
@ -10,3 +10,13 @@ export function prizeExchangelist(data, region) {
|
||||
}
|
||||
})
|
||||
}
|
||||
//总积分
|
||||
export function scoretotal(cardNo) {
|
||||
return request({
|
||||
url: `/applet/score/total/${cardNo}`,
|
||||
method: 'get',
|
||||
header: {
|
||||
region: uni.getStorageSync('region'),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import request from "../../request.js"
|
||||
|
||||
export function prizelist(data, region) {
|
||||
export function prizelist(data) {
|
||||
return request({
|
||||
url: `/applet/score/prize/list`,
|
||||
method: 'get',
|
||||
@ -10,3 +10,14 @@ export function prizelist(data, region) {
|
||||
}
|
||||
})
|
||||
}
|
||||
//兑换奖品
|
||||
export function prizeExchangesave(data) {
|
||||
return request({
|
||||
url: `/applet/score/prizeExchange/save`,
|
||||
method: 'post',
|
||||
data: data,
|
||||
header: {
|
||||
region: uni.getStorageSync('region'),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import request from "@/api/request.js"
|
||||
|
||||
// 获取区划列表
|
||||
export function arealist(pid, region) {
|
||||
export function arealist(pid) {
|
||||
return request({
|
||||
url: `/applet/signinfo/area/list/${pid}`,
|
||||
method: 'get',
|
||||
@ -12,7 +12,7 @@ export function arealist(pid, region) {
|
||||
}
|
||||
|
||||
//提交签约
|
||||
export function applysave(data, region) {
|
||||
export function applysave(data) {
|
||||
return request({
|
||||
url: `/applet/sign/apply/save`,
|
||||
method: 'post',
|
||||
@ -24,7 +24,7 @@ export function applysave(data, region) {
|
||||
}
|
||||
|
||||
//人群
|
||||
export function getCrowd(identity, region) {
|
||||
export function getCrowd(identity) {
|
||||
return request({
|
||||
url: `/applet/signinfo/getCrowd/${identity}`,
|
||||
method: 'get',
|
||||
@ -35,7 +35,7 @@ export function getCrowd(identity, region) {
|
||||
}
|
||||
|
||||
//服务包
|
||||
export function getPackageByCrowdNo(data, region) {
|
||||
export function getPackageByCrowdNo(data) {
|
||||
return request({
|
||||
url: `/applet/signinfo/getPackageByCrowdNo`,
|
||||
method: 'post',
|
||||
|
||||
@ -316,7 +316,8 @@
|
||||
"path": "exchangerecords/exchangerecords",
|
||||
"style": {
|
||||
"navigationBarTitleText": "兑换记录",
|
||||
"enablePullDownRefresh": false
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
"path": "familymemberdetail/familymemberdetail",
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
margin: 0 auto;
|
||||
.content {
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 319rpx;
|
||||
@ -43,7 +44,6 @@
|
||||
width: 90%;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
@ -54,7 +54,6 @@
|
||||
}
|
||||
.number {
|
||||
font-size: 56rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
@ -66,26 +65,21 @@
|
||||
}
|
||||
}
|
||||
.bottomitem{
|
||||
position: relative;
|
||||
background-color: #FFF;
|
||||
margin: 0 auto;
|
||||
|
||||
padding-bottom: 100rpx;
|
||||
.item{
|
||||
position: relative;
|
||||
}
|
||||
.Establishingarchives{
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 38rpx;
|
||||
padding: 8px 10px 5px 18px;
|
||||
}
|
||||
.integraltwo{
|
||||
position: absolute;
|
||||
top: 75%;
|
||||
right: 3%;
|
||||
color: red;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: red !important;
|
||||
}
|
||||
.integral{
|
||||
position: absolute;
|
||||
@ -98,7 +92,6 @@
|
||||
}
|
||||
.timeone{
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 38rpx;
|
||||
@ -107,7 +100,6 @@
|
||||
}
|
||||
.PointsRecord {
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
line-height: 33rpx;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<image src="/static/pagesB/Behave.png" mode=""></image>
|
||||
<view class="name">我的积分
|
||||
</view>
|
||||
<view class="number">1000
|
||||
<view class="number">{{score?score:0}}
|
||||
</view>
|
||||
<view class="PointsMall" @tap='gointegral'>
|
||||
积分商城
|
||||
@ -18,32 +18,31 @@
|
||||
<view class="PointsRecord">
|
||||
积分记录
|
||||
</view>
|
||||
<view class="" v-if="list&&list.length>0">
|
||||
<view class="item" v-for="item in list">
|
||||
<view class="Establishingarchives">
|
||||
建立档案
|
||||
{{item.actName}}
|
||||
</view>
|
||||
<view class="integral">
|
||||
+20000
|
||||
<view class="integral" v-if="item.score>0">
|
||||
{{'+'+item.score}}
|
||||
</view>
|
||||
<view class="integral integraltwo" v-else>
|
||||
{{item.score}}
|
||||
</view>
|
||||
<view class="timeone">
|
||||
2023-03-09 13:23:12
|
||||
</view>
|
||||
<view class="Establishingarchives">
|
||||
兑换商品
|
||||
</view>
|
||||
<view class="integraltwo">
|
||||
-2000000000
|
||||
</view>
|
||||
<view class="timeone">
|
||||
2023-03-09 13:23:12
|
||||
{{item.scoreDate}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-empty v-else mode="list" icon-size='220' text='暂无积分记录'></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
prizeExchangelist
|
||||
scorelist,
|
||||
scoretotal
|
||||
} from '@/api/pagesB/Behaviorpoints/index.js'
|
||||
// import {
|
||||
// mapActions
|
||||
@ -52,20 +51,27 @@
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
identity: '372325195905293621',
|
||||
identity: uni.getStorageSync('userinfo').cardNo,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
list: [],
|
||||
list: null,
|
||||
total: 0,
|
||||
score: 0,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.info();
|
||||
this.scoretotalinfo();
|
||||
},
|
||||
methods: {
|
||||
scoretotalinfo() {
|
||||
scoretotal(this.query.identity).then(res => {
|
||||
this.score = res.data
|
||||
})
|
||||
},
|
||||
info() {
|
||||
prizeExchangelist(this.query, '2').then(res => {
|
||||
scorelist(this.query).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
@ -98,7 +104,7 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.query.pageNum++
|
||||
prizeExchangelist(this.query, '1').then(res => {
|
||||
scorelist(this.query).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
|
||||
@ -1,45 +1,66 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="contents" v-if="list&&list.length>0">
|
||||
<view class="content" v-for="item in list">
|
||||
<image :src="item.attachment" mode=""></image>
|
||||
<view class="servename">
|
||||
{{item.prizeName}}
|
||||
{{item.prizeName?item.prizeName:''}}
|
||||
</view>
|
||||
<view class="PointsRecord">
|
||||
{{item.score}}
|
||||
{{item.score?item.score:''}}积分
|
||||
</view>
|
||||
<view class="button" @tap="goexchange">
|
||||
<view class="button" @tap="goexchange(item)">
|
||||
兑换
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 48%;" v-if="list.length%2!=0">
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
prizelist
|
||||
prizelist,
|
||||
prizeExchangesave
|
||||
} from '@/api/pagesB/PointsMall/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
identity: '372325195905293621',
|
||||
identity: uni.getStorageSync('userinfo').cardNo,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
list: [],
|
||||
list: null,
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
goexchange() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/exchangerecords/exchangerecords'
|
||||
});
|
||||
goexchange(item) {
|
||||
var obj = {
|
||||
identity: this.query.identity,
|
||||
prizeId: item.prizeId
|
||||
}
|
||||
prizeExchangesave(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '兑换成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
info() {
|
||||
prizelist(this.query, '2').then(res => {
|
||||
prizelist(this.query).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
@ -51,7 +72,7 @@
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.query.pageNum++
|
||||
prizelist(this.query, '1').then(res => {
|
||||
prizelist(this.query).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
@ -72,13 +93,16 @@
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
background-color: #F7F5F5;
|
||||
::v-deep .u-empty{
|
||||
margin-top: 25vh !important;
|
||||
}
|
||||
.contents {
|
||||
padding-top: 10rpx;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 514rpx;
|
||||
|
||||
@ -1,43 +1,83 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="content">
|
||||
<view class="" v-if="list&&list.length>0">
|
||||
<view class="content" v-for="item in list">
|
||||
<view class="time">
|
||||
2023-08-13 23:43:49
|
||||
{{item.exchangeDate?item.exchangeDate:''}}
|
||||
<span>
|
||||
2000积分
|
||||
{{item.score?item.score:0}} 积分
|
||||
</span>
|
||||
</view>
|
||||
<view class="imageitem">
|
||||
<image src="../../static/pagesB/Behave.png" mode=""></image>
|
||||
</view>
|
||||
<image :src="item.prizeBase64" mode=""></image>
|
||||
<view class="servename">
|
||||
服务名称
|
||||
{{item.prizeName?item.prizeName:''}}
|
||||
</view>
|
||||
<view class="servetime">
|
||||
服务时间:2023-12-12 08:30
|
||||
<view class="servetime" v-if='item.useDate'>
|
||||
服务时间:{{item.useDate}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else mode="list" icon-size='220' text='暂无兑换记录'></u-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
prizeExchangelist
|
||||
} from '@/api/pagesB/exchangerecords/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
query: {
|
||||
identity: uni.getStorageSync('userinfo').cardNo,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
list: [],
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.info()
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
prizeExchangelist(this.query).then(res => {
|
||||
this.list = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.list.length >= this.total) {} else {
|
||||
this.query.pageNum++
|
||||
prizeExchangelist(this.query).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
this.list.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
this.query.pageNum = 1;
|
||||
this.info();
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
text-align: justify;
|
||||
background-color: #F7F5F5;
|
||||
padding: 25rpx 0 30rpx 0;
|
||||
|
||||
::v-deep .u-empty{
|
||||
margin-top: 25vh !important;
|
||||
}
|
||||
.content {
|
||||
width: 90%;
|
||||
height: 321rpx;
|
||||
@ -48,21 +88,18 @@
|
||||
position: relative;
|
||||
|
||||
.servetime {
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #959595;
|
||||
line-height: 38rpx;
|
||||
position: absolute;
|
||||
bottom: 23%;
|
||||
left: 35%;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.servename {
|
||||
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 38rpx;
|
||||
@ -74,21 +111,18 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.imageitem {
|
||||
image {
|
||||
position: absolute;
|
||||
left: 3%;
|
||||
top: 28%;
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
text-align: justify;
|
||||
padding: 25rpx 0 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
line-height: 38rpx;
|
||||
@ -100,7 +134,6 @@
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
position: absolute;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #26A888;
|
||||
line-height: 38rpx;
|
||||
|
||||
@ -164,8 +164,7 @@
|
||||
},
|
||||
// 签约信息
|
||||
detailinfo() {
|
||||
// detail(uni.getStorageSync('userinfo').cardNo, this.region).then(res => {
|
||||
detail('372424194703207523', '1').then(res => {
|
||||
detail(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.list = res.data
|
||||
this.list.rescindType = null
|
||||
|
||||
@ -349,14 +349,14 @@
|
||||
this.query.county = e[0].value
|
||||
this.query.countyName = e[0].label
|
||||
const pid = this.countylist.find(m => m.areaCode === e[0].value).id
|
||||
this.arealistinfo(pid, '1', 'Township')
|
||||
this.arealistinfo(pid, 'Township')
|
||||
},
|
||||
//选择乡镇
|
||||
Townshipconfirm(e) {
|
||||
this.query.town = e[0].value
|
||||
this.query.townName = e[0].label
|
||||
const pid = this.Townshiplist.find(m => m.streetCode === e[0].value).id
|
||||
this.arealistinfo(pid, '1', 'village')
|
||||
this.arealistinfo(pid, 'village')
|
||||
},
|
||||
//选择村
|
||||
villageconfirm(e) {
|
||||
@ -364,8 +364,8 @@
|
||||
this.query.committeeName = e[0].label
|
||||
},
|
||||
//区县list
|
||||
arealistinfo(code, code2, list) {
|
||||
arealist(code, code2).then(res => {
|
||||
arealistinfo(code, list) {
|
||||
arealist(code).then(res => {
|
||||
if (list == 'county') {
|
||||
this.countylist = res.data
|
||||
} else if (list == 'Township') {
|
||||
@ -442,7 +442,7 @@
|
||||
},
|
||||
//人群list
|
||||
getCrowdinfo() {
|
||||
getCrowd('370882199909092123', '1').then(res => {
|
||||
getCrowd(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.checked = false
|
||||
})
|
||||
@ -515,7 +515,7 @@
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.arealistinfo('371400000000 ', '1', 'county');
|
||||
this.arealistinfo('371400000000 ', 'county');
|
||||
this.getCrowdinfo();
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
|
||||
@ -190,14 +190,12 @@
|
||||
this.signatureshow = false
|
||||
},
|
||||
info() {
|
||||
getSignProtocol(this.cardNo, '1').then(res => {
|
||||
getSignProtocol(uni.getStorageSync('userinfo').cardNo, '1').then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.cardNo = options.cardNo
|
||||
this.cardNo = '372424194703207523'
|
||||
this.info();
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user