123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409 |
- <template>
- <view class="mypoints">
- <navbar ref="navbar" :config="config" backColor="#666"></navbar>
- <view class="top">
- <view class="top-item">
- <view class="own">
- <!-- <view class="image" v-if="myMsg.head_photo">
- <image :src="myMsg.head_photo" mode=""></image>
- </view>
- <view class="image" v-else>
- <image :src="imgUrl+'/head-on.png'" mode=""></image>
- </view> -->
- <view class="name">
- {{myMsg.nickname}}
- </view>
- <view class="detailed" @click="goTodetailed()">
- <text class="iconfont"></text>
- <div>积分明细</div>
- </view>
- </view>
- <view class="available">
- <view class="available-name">
- 可使用积分
- </view>
- <view class="available-number">
- <text>{{ integralNum }}</text>积分
- </view>
- </view>
- </view>
- </view>
- <view class="content">
- <view class="content-top">
- <view class="task">
- 积分任务
- </view>
- <view class="line">
- </view>
- <view class="do">
- 做任务赚积分
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 购买商品
- </view>
- <view class="introduce">
- 购买商品越多,积分返利越多
- </view>
- </view>
- <view class="complete" @click="goToHomePage()">
- 立即完成
- </view>
- </view>
- <!-- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 浏览作品/文章
- </view>
- <view class="introduce">
- {{integral.browse}}分/次,每天上限{{integral.browse_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToRecommend()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 点赞作品/文章
- </view>
- <view class="introduce">
- {{integral.like}}分/次,每天上限{{integral.like_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToRecommend()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 转发作品/文章
- </view>
- <view class="introduce">
- {{integral.share}}分/次,每天上限{{integral.share_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToRecommend()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 评论作品/文章
- </view>
- <view class="introduce">
- {{integral.comment}}分/每次提交评论,每天上限{{integral.comment_limit }}分
- </view>
- </view>
- <view class="complete" @click="goToRecommend()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 作品被浏览
- </view>
- <view class="introduce">
- {{integral.by_browse}}分/次,单个作品/每天 上限{{integral.by_browse_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToCommunity()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 作品被点赞
- </view>
- <view class="introduce">
- {{integral.by_like}}分/次,单个作品/每天 上限{{integral.by_like_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToCommunity()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 作品被评论
- </view>
- <view class="introduce">
- {{integral.by_comment}}分/每次提交评论,单个作品/每天 上限{{integral.by_comment_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToCommunity()">
- 立即完成
- </view>
- </view>
- <view class="content-item">
- <view class="purchase">
- <view class="purchase-commodity">
- 作品被转发
- </view>
- <view class="introduce">
- {{integral.by_share}}分/次,单个作品/每天 上限{{integral.by_share_limit}}分
- </view>
- </view>
- <view class="complete" @click="goToCommunity()">
- 立即完成
- </view>
- </view> -->
- </view>
- </view>
- </template>
- <script>
- import {
- recordInfo
- } from "../../../api/notice.js"
- import {
- getAccountInfo
- } from "@/api/login.js"
- import {
- myUserInfo
- } from "@/api/government.js"
- export default {
- data() {
- return {
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '我的积分',
- color: '#1A1A1A',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#FFFFFF"],
- statusBarFontColor: '#1A1A1A',
- },
- myMsg: {}, //我的个人信息
- integral: {}, //我的积分
- imgUrl: this.$mConfig.staticUrl,
- id: 0,
- integralNum: 0
- }
- },
- onShow() {
- this.getMyList()
- this.getMyMsg()
- this.getuserInfo()
- },
- methods: {
- getuserInfo() {
- let shop = uni.getStorageSync('shop')
- this.$http.get('/account/getAccountInfo/' + shop.id).then(async res => {
- if (res && res.code == 200) {
- this.id = res.data.id
- }
- })
- myUserInfo().then(res => {
- this.integralNum = res.data.integralAble
- })
- },
- // integralNum
- //跳个人主页
- goToCommunity() {
- let that = this
- uni.navigateTo({
- url: "/pages/research/community/homepage?user_id=" + that.id
- })
- },
- //跳研吧
- goToRecommend() {
- // uni.navigateTo({
- // url:"/pages/index/recommend"
- // })
- },
- //跳主页
- goToHomePage() {
- uni.redirectTo({
- url: "/pages/index/lidaPage"
- })
- },
- //跳转积分明细
- goTodetailed() {
- uni.navigateTo({
- url: "./pointsDetails"
- })
- },
- //获取积分接口
- getMyList() {
- this.$http.get(recordInfo).then(res => {
- if (res && res.code == 200) {
- this.integral = res.data
- console.log(this.integral)
- }
- })
- },
- //获取我的信息
- getMyMsg() {
- this.$http.get(getAccountInfo).then(res => {
- if (res && res.code == 200) {
- this.myMsg = res.data
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .content {
- background-color: #ffffff;
- border-radius: 40rpx 40rpx 0 0;
- padding: 38rpx 30rpx 0;
- .content-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #E6E6E6;
- padding-bottom: 36rpx;
- .purchase {
- .purchase-commodity {
- margin-top: 30rpx;
- font-size: 28rpx;
- color: #1A1A1A;
- font-weight: 400;
- }
- .introduce {
- font-size: 24rpx;
- margin-top: 17rpx;
- color: #999999;
- font-weight: 400;
- line-height: 30rpx;
- }
- }
- .complete {
- color: #ffffff;
- font-size: 28rpx;
- font-weight: 500;
- padding: 12rpx 35rpx;
- border-radius: 32rpx;
- background-color: rgb(64, 194, 213);
- }
- }
- .content-top {
- display: flex;
- align-items: center;
- .task {
- font-size: 36rpx;
- color: #1A1A1A;
- font-weight: 700;
- }
- .line {
- width: 1rpx;
- height: 32rpx;
- background-color: #707070;
- margin: 16rpx;
- }
- .do {
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- }
- }
- }
- .mypoints {
- background-color: #F5F5F5;
- }
- .top {
- // margin: 25rpx 30rpx 0 30rpx ;
- padding: 25rpx 30rpx 0;
- .top-item {
- background-color: rgb(64, 194, 213);
- // background-repeat: no-repeat;
- // border-radius: 18rpx;
- border-top-right-radius: 18rpx;
- border-top-left-radius: 18rpx;
- padding: 30rpx 20rpx;
- .available {
- text-align: center;
- color: #ffffff;
- // margin-top: 50rpx;
- .available-name {
- margin-bottom: 6rpx;
- font-size: 30rpx;
- font-weight: 400;
- line-height: 24rpx;
- // text-shadow: 0rpx 11rpx 49rpx #2A0709;
- }
- .available-number {
- font-size: 28rpx;
- font-weight: 700;
- color: #FFFFFF;
- text {
- font-size: 50rpx;
- }
- }
- }
- .own {
- display: flex;
- align-items: center;
- .image {
- image {
- width: 86rpx;
- height: 86rpx;
- border-radius: 50%;
- }
- }
- .name {
- flex: 1;
- margin-left: 20rpx;
- font-size: 36rpx;
- font-weight: 400;
- color: #ffffff;
- }
- .detailed {
- font-size: 24rpx;
- // line-height: 30rpx;
- color: rgb(64, 194, 213);
- font-weight: 400;
- // padding: 10rpx 30rpx 14rpx ;
- background-color: #ffffff;
- border-radius: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 195rpx;
- height: 55rpx;
- .iconfont {
- font-size: 30rpx;
- margin-right: 16rpx;
- }
- }
- }
- }
- }
- </style>
|