Browse Source

勋章页面

h5_css
蟑螂恶霸 3 years ago
parent
commit
cf4290a46d
  1. 2
      pages/my/my.vue
  2. 19
      static/base_css.css
  3. BIN
      static/images/bg_medal.jpg
  4. BIN
      static/images/medal_1.png
  5. BIN
      static/images/medal_1g.png
  6. BIN
      static/images/medal_act1.png
  7. BIN
      static/images/medal_act1g.png
  8. BIN
      static/images/medal_act2.png
  9. BIN
      static/images/medal_act2g.png
  10. BIN
      static/images/medal_act3.png
  11. BIN
      static/images/medal_act3g.png
  12. BIN
      static/images/medal_act4.png
  13. BIN
      static/images/medal_act4g.png
  14. BIN
      static/images/medal_act5.png
  15. BIN
      static/images/medal_act5g.png
  16. BIN
      static/images/medal_act6.png
  17. BIN
      static/images/medal_act6g.png
  18. BIN
      static/images/medal_lv1.png
  19. BIN
      static/images/medal_lv1g.png
  20. BIN
      static/images/medal_lv2.png
  21. BIN
      static/images/medal_lv2g.png
  22. BIN
      static/images/medal_lv3.png
  23. BIN
      static/images/medal_lv3g.png
  24. BIN
      static/images/medal_lv4.png
  25. BIN
      static/images/medal_lv4g.png
  26. BIN
      static/images/medal_lv5.png
  27. BIN
      static/images/medal_lv5g.png
  28. BIN
      static/images/medal_lv6.png
  29. BIN
      static/images/medal_lv6g.png
  30. BIN
      static/images/medal_lv7.png
  31. BIN
      static/images/medal_lv7g.png
  32. BIN
      static/images/medal_un1.png
  33. BIN
      static/images/medal_un1g.png
  34. BIN
      static/images/medal_un2.png
  35. BIN
      static/images/medal_un2g.png
  36. BIN
      static/images/medal_un3.png
  37. BIN
      static/images/medal_un3g.png
  38. BIN
      static/images/medal_un4.png
  39. BIN
      static/images/medal_un4g.png
  40. BIN
      static/images/medal_un5.png
  41. BIN
      static/images/medal_un5g.png
  42. BIN
      static/images/medal_un6.png
  43. BIN
      static/images/medal_un6g.png
  44. BIN
      static/images/medal_un7.png
  45. BIN
      static/images/medal_un7g.png
  46. BIN
      static/images/medal_un8.png
  47. BIN
      static/images/medal_un8g.png
  48. BIN
      static/images/medal_un9.png
  49. BIN
      static/images/medal_un9g.png
  50. 11
      subpkg/about/about.vue
  51. 2
      subpkg/address/address.vue
  52. 11
      subpkg/agreement/agreement.vue
  53. 4
      subpkg/feedback/feedback.vue
  54. 11
      subpkg/knowledgeInfo/knowledgeInfo.vue
  55. 302
      subpkg/medal/medal.vue
  56. 13
      subpkg/message/message.vue
  57. 7
      subpkg/messageInfo/messageInfo.vue
  58. 11
      subpkg/privacy/privacy.vue

2
pages/my/my.vue

@ -7,7 +7,7 @@
<view class="myitem"> <span @click="showMedal()">勋章{{medalNum}}<i :style="{'background-color':active == 0 ?'red':'none'}"></i></span> <span>挑战历史{{challengeNum}}</span> </view>
</view>
</view>
<view class="banbox_sec perinfo">
<view class="banbox_sec">
<swiper style="height: 100%;" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :circular="true">
<swiper-item v-for="(item, i) in swiperList" :key="i">
<navigator style="height: 100%;" class="swiper-item">

19
static/base_css.css

@ -385,10 +385,10 @@ h3.contit span {
}
.perinfo {
position: relative;
margin: 3%;
height: 8.5rem;
width: 94%;
position: relative;
margin: 10% 3% 1%;
height: 7.5rem;
width: 94%;
}
.perinfo .type-name {
@ -407,7 +407,6 @@ h3.contit span {
.perinfo .dycd {
float: left;
display: inline-block;
margin: 3.5% 5%;
width: calc(80% - 5rem);
color: #333;
@ -417,16 +416,18 @@ h3.contit span {
}
.myname {
display: block;
margin: 0 0 5%;
font-size: 1rem;
display: block;
margin: 0 0 7.5%;
color: #000;
font-size: 1.25rem;
font-weight: 600;
}
.myitem span {
position: relative;
margin: 1% 10% 0 0;
padding-right: 0.6rem;
font-size: 0.8rem;
font-size: 0.9rem;
color: #666;
}

BIN
static/images/bg_medal.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
static/images/medal_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 115 KiB

BIN
static/images/medal_1g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
static/images/medal_act1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
static/images/medal_act1g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
static/images/medal_act2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
static/images/medal_act2g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
static/images/medal_act3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
static/images/medal_act3g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
static/images/medal_act4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
static/images/medal_act4g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
static/images/medal_act5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
static/images/medal_act5g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
static/images/medal_act6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
static/images/medal_act6g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
static/images/medal_lv1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
static/images/medal_lv1g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/images/medal_lv2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
static/images/medal_lv2g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
static/images/medal_lv3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
static/images/medal_lv3g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
static/images/medal_lv4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
static/images/medal_lv4g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
static/images/medal_lv5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
static/images/medal_lv5g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
static/images/medal_lv6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

BIN
static/images/medal_lv6g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
static/images/medal_lv7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
static/images/medal_lv7g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
static/images/medal_un1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
static/images/medal_un1g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
static/images/medal_un2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
static/images/medal_un2g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
static/images/medal_un3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
static/images/medal_un3g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
static/images/medal_un4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
static/images/medal_un4g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
static/images/medal_un5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
static/images/medal_un5g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
static/images/medal_un6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
static/images/medal_un6g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
static/images/medal_un7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
static/images/medal_un7g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
static/images/medal_un8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
static/images/medal_un8g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
static/images/medal_un9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
static/images/medal_un9g.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

11
subpkg/about/about.vue

@ -1,9 +1,13 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title">关于我们</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
@ -43,7 +47,4 @@
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

2
subpkg/address/address.vue

@ -2,7 +2,7 @@
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label>
<!-- <view class="title">消息中心</view> -->
<view class="title">联系地址</view>
</view>
<view class="cart-container">
<!-- 选择收货地址的盒子 -->

11
subpkg/agreement/agreement.vue

@ -1,9 +1,13 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title">用户协议</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
@ -43,7 +47,4 @@
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

4
subpkg/feedback/feedback.vue

@ -1,7 +1,9 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title">建议与意见反馈</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view class="table_index">

11
subpkg/knowledgeInfo/knowledgeInfo.vue

@ -1,9 +1,13 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title"></view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
@ -42,7 +46,4 @@
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

302
subpkg/medal/medal.vue

@ -2,10 +2,68 @@
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"> <label class="back" @click="back()"></label>
<view class="title">演练回顾</view>
<view class="title">我的勋章</view>
</view>
<view class="index-background">
<image src="/static/medal_top.jpg"></image>
<view class="mainwrap2">
<view class="perinfo"> <span class="type-name"><img :src="avatarUrl"></img></span>
<view class="dycd"> <span class="myname">盛大鹏</span>
的勋章墙
</view>
<view class="medtop">已获得<label>2</label>枚勋章</view>
</view>
<view class="subwrap">
<view class="medbox">
<view class="medtit">成就勋章<label class="actcount">已点亮2次</label></view>
<view class="medlist">
<view class="meditem"><label class="medicon-img active-img"><image src="../../static/images/medal_1.png"></image></label>2023.10.22获得</view>
<view class="meditem"><label class="medicon-img active-img"><image src="../../static/images/medal_1.png"></image></label>2023.10.22获得</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_1g.png"></image></label>成就勋章</view>
</view>
</view>
<view class="medbox">
<view class="medtit">等级勋章<label class="actcount"></label></view>
<view class="medlist">
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv1g.png"></image></label>LV1(青铜)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv2g.png"></image></label>LV2(白银)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv3g.png"></image></label>LV3(黄金)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv4g.png"></image></label>LV4(铂金)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv5g.png"></image></label>LV5(紫金)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv6g.png"></image></label>LV6(钻石)</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_lv7g.png"></image></label>LV7(星钻)</view>
</view>
</view>
<view class="medbox">
<view class="medtit">活动勋章1<label class="actcount"></label></view>
<view class="medlist">
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act1g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act2g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act3g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act4g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act5g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_act6g.png"></image></label>勋章名称</view>
</view>
</view>
<view class="medbox">
<view class="medtit">活动勋章2<label class="actcount"></label></view>
<view class="medlist">
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un1g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un2g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un3g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un4g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un5g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un6g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un7g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un8g.png"></image></label>勋章名称</view>
<view class="meditem"><label class="medicon-img"><image src="../../static/images/medal_un9g.png"></image></label>勋章名称</view>
</view>
</view>
</view>
<!-- <view class="index-background">
<view class="panel-list">
<view class="panel">
<view class="panel-body">
@ -18,29 +76,34 @@
</view>
</view>
</view>
</view>
<!-- 任务奖章区域 -->
<view class="nav-list" v-if="showMedal == true" style="width: 1000rpx;">
</view> -->
<!-- 任务奖章区域 -->
<!-- <view class="nav-list" v-if="showMedal == true" style="width: 1000rpx;">
<view class="nav-item" v-for="(item, i) in taskMedalList" :key="i">
<image :src="item" class="nav-img"></image>
</view>
</view>
<!-- 任务奖章区域 -->
<view class="nav-list" v-else="showMedal == false">
</view> -->
<!-- 任务奖章区域 -->
<!-- <view class="nav-list" v-else="showMedal == false">
<view class="nav-item" v-for="(item, i) in myMedalList" :key="i">
<image :src="item" class="nav-img"></image>
</view>
</view> -->
</view>
</view>
</view>
</template>
<script>
import { mapState, mapMutations, mapGetters } from 'vuex'
import {
mapState,
mapMutations,
mapGetters
} from 'vuex'
export default {
data() {
return {
showMedal:true,
showMedal: true,
//
taskMedalList: [],
//
@ -51,58 +114,177 @@
...mapState('m_user', ['userId'])
},
onLoad() {
this.getMedalList();
this.getMyMedalList()
this.getMedalList();
this.getMyMedalList()
},
methods: {
async getMedalList() {
const {
data: res
} = await uni.$http.post('/small/project/medal/listAll')
if (!res.success) return uni.$showMsg()
res.data.forEach(item => {
item.iconPath = uni.$http.baseUrl + item.iconPath
this.taskMedalList.push(item.iconPath)
})
// uni.$showMsg('')
},
async getMyMedalList() {
const {
data: res
} = await uni.$http.post('/small/wechat/showMyMedal', {
guid: this.userId,
})
if (!res.success) return uni.$showMsg()
res.data.forEach(item => {
item.iconPath = uni.$http.baseUrl + item.iconPath
this.myMedalList.push(item.iconPath)
})
// uni.$showMsg('')
},
taskMedal() {
this.showMedal = true
},
myMedal() {
this.showMedal = false
},
back() {
uni.navigateBack({
delta: 1, //2
})
},
methods: {
async getMedalList() {
const {
data: res
} = await uni.$http.post('/small/project/medal/listAll')
if (!res.success) return uni.$showMsg()
res.data.forEach(item=>{
item.iconPath = uni.$http.baseUrl +item.iconPath
this.taskMedalList.push(item.iconPath)
})
// uni.$showMsg('')
},
async getMyMedalList() {
const {
data: res
} = await uni.$http.post('/small/wechat/showMyMedal',{
guid:this.userId,
})
if (!res.success) return uni.$showMsg()
res.data.forEach(item=>{
item.iconPath = uni.$http.baseUrl +item.iconPath
this.myMedalList.push(item.iconPath)
})
// uni.$showMsg('')
},
taskMedal(){
this.showMedal = true
},
myMedal(){
this.showMedal = false
},
back(){
uni.navigateBack({
delta:1,//2
})
},
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.secbar {
background-color: transparent;
}
.mainwrap2 {
top: 0;
height: calc(100% - 90rpx);
background: #fff url("/static/images/bg_medal.jpg") no-repeat left top;
background-size: 110% auto;
}
.perinfo {
top: 30rpx;
height: 450rpx;
}
.perinfo .type-name,
.perinfo .dycd {
float: none;
}
.perinfo .dycd {
margin: 0 5.5%;
color: #999;
font-size: 0.8rem;
}
.myname {
margin: 0 0 3.5% 0;
font-size: 1.5rem;
font-weight: 500;
}
.medtop {
position: relative;
z-index: 1;
margin: 1% 0 0 5.5%;
width: 90%;
color: #666;
label {
color: #333;
font-size: 1.5rem;
margin: 0 10rpx;
}
}
.medtop::after {
content: "";
position: absolute;
left: -6rpx;
bottom: -2rpx;
z-index: -1;
width: 42%;
height: 20rpx;
border-radius: 10rpx;
background-color: #fbc678;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
.headpic {
display: block;
margin: 0 5%;
width: 150rpx;
height: 150rpx;
background-color: #d9e9f9;
border-radius: 50%;
border: 4rpx solid #fff;
}
.subwrap {
height: calc(90% - 450rpx);
}
.medbox {
width: 100%;
height: auto;
}
.medtit {
position: relative;
margin: 5% 2% 0;
color: #333;
font-size: 32rpx;
font-weight: bold;
.actcount {
position: absolute;
top: 8rpx;
right: 0;
font-size: 0.8rem;
font-weight: 500;
}
}
.meditem {
display: inline-block;
margin: 2% 0;
width: 33%;
color: #999;
text-align: center;
}
.medicon-img {
display: block;
margin: 0 auto;
width: 150rpx;
height: 150rpx;
image {
width: 100%;
height: 100%;
}
}
/*
.nav-list {
display: flex;
@ -160,5 +342,5 @@
}
}
}
</style>
*/
</style>

13
subpkg/message/message.vue

@ -1,7 +1,9 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title">消息</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view class="message-list">
@ -67,14 +69,7 @@
<style lang="scss">
@import url("@/static/base_css.css");
.title {
margin-top: 0;
padding-top: 16rpx;
}
.mainwrap2 {
height: calc(100% - 300rpx);
}
.artlist {
margin: 2% 0 3.5%;
padding: 4% 3%;

7
subpkg/messageInfo/messageInfo.vue

@ -2,8 +2,10 @@
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view class="mainwrap2">
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
@ -43,7 +45,4 @@
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

11
subpkg/privacy/privacy.vue

@ -1,9 +1,13 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view class="secbar"><label class="back" @click="back()"></label>
<view class="title">隐私政策</view>
</view>
<view class="mainwrap2">
<view class="subwrap">
<view v-html="content"></view>
</view>
</view>
</view>
</template>
@ -43,7 +47,4 @@
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 4% 3%;
}
</style>

Loading…
Cancel
Save