main
hcj 3 months ago
parent bb49e55e75
commit 6e750da2c6
  1. 42
      components/levelTag/index.vue
  2. 28
      pages.json
  3. 7
      pages/index/index.vue
  4. 46
      pages/index/testcrowdsourc/crowdsourcingdetails.vue
  5. 8
      pages/index/testcrowdsourc/testcrowdsourc.vue
  6. 9
      pages/index/testtraining/onLineCourse.vue
  7. 169
      pages/personal/grade/gradeRules.vue
  8. 144
      pages/personal/grade/gradeTask.vue
  9. 360
      pages/personal/grade/gradeValue.vue
  10. 77
      pages/personal/grade/growInfo.vue
  11. 57
      pages/personal/personal.vue
  12. 4
      pages/personal/setup/accountoverview.vue
  13. 4
      utils/http.js
  14. 56
      utils/userlevel.js
  15. 2
      uview-ui/libs/css/style.mp.scss

@ -0,0 +1,42 @@
<template>
<span>
<!-- <span v-show="level ==>{{ level }}</span> -->
<span v-show="level == 1" class="levelTag v1">V{{ level }}</span>
<span v-show="level == 2" class="levelTag v2">V{{ level }}</span>
<span v-show="level == 3" class="levelTag v3">V{{ level }}</span>
</span>
</template>
<script>
export default {
props: {
level: Number
},
}
</script>
<style scoped>
.levelTag {
padding: 5rpx 6rpx;
border-radius: 50%;
color: #FFFFFF;
font-family: PingFang SC;
font-weight: 500;
font-size: 12px;
margin-left: 10rpx;
line-height: 23px;
}
.v1 {
background: linear-gradient(0deg, #29F19C, #02A1F9);
}
.v2 {
background: linear-gradient(0deg, #015EEA, #00C0FA);
}
.v3 {
background: linear-gradient(0deg, #FACC22, #F83600);
}
</style>

@ -332,6 +332,34 @@
"navigationBarBackgroundColor": "#284CD1" "navigationBarBackgroundColor": "#284CD1"
} }
}, },
{
"path": "pages/personal/grade/gradeValue",
"style": {
"navigationBarTitleText": "我的等级",
"navigationBarBackgroundColor": "#284CD1"
}
},
{
"path": "pages/personal/grade/growInfo",
"style": {
"navigationBarTitleText": "成长值明细",
"navigationBarBackgroundColor": "#284CD1"
}
},
{
"path": "pages/personal/grade/gradeRules",
"style": {
"navigationBarTitleText": "等级规则",
"navigationBarBackgroundColor": "#284CD1"
}
},
{
"path": "pages/personal/grade/gradeTask",
"style": {
"navigationBarTitleText": "任务列表",
"navigationBarBackgroundColor": "#284CD1"
}
},
{ {
"path": "pages/index/testcrowdsourc/companyInfo", "path": "pages/index/testcrowdsourc/companyInfo",
"style": { "style": {

@ -248,7 +248,7 @@
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image> style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
</view> </view>
<view style="width:58vw;"> <view style="width:58vw;">
<p class="leop" style="margin:0;justify-content: initial;">{{ item.projectName }}</p> <p class="leop" style="margin:0;justify-content: initial;">{{ item.projectName }} <levelTag :level="item.level"></levelTag> </p>
<!-- <p class="typej">类型静态测试</p> --> <!-- <p class="typej">类型静态测试</p> -->
<p class="typej"> <p class="typej">
类型{{ findLabelValueByPropnew(tasktypelist, item.testType, 'dictValue', 'dictLabel') }}</p> 类型{{ findLabelValueByPropnew(tasktypelist, item.testType, 'dictValue', 'dictLabel') }}</p>
@ -350,12 +350,13 @@ import { findLabelValueByPropnew } from '@/utils/util.js'
import mixin from '@/utils/mixin/index.js' import mixin from '@/utils/mixin/index.js'
import onLineCourseItem from '@/components/onLineCourseItem/index.vue' import onLineCourseItem from '@/components/onLineCourseItem/index.vue'
import poster from '@/components/poster/index.vue' import poster from '@/components/poster/index.vue'
import { dateFormat } from '../../utils/util'; import levelTag from '@/components/levelTag/index.vue'
// import { dateFormat } from '../../utils/util';
export default { export default {
mixins: [mixin], mixins: [mixin],
components: { components: {
onLineCourseItem,poster onLineCourseItem,poster,levelTag
}, },
data() { data() {
return { return {

@ -3,7 +3,10 @@
<view class="schedule" style="padding:25rpx 0"> <view class="schedule" style="padding:25rpx 0">
<view style="margin:0 25rpx 36rpx 25rpx"> <view style="margin:0 25rpx 36rpx 25rpx">
<view style="display:flex;font-size:35rpx;font-weight:bold;justify-content: space-between;"> <view style="display:flex;font-size:35rpx;font-weight:bold;justify-content: space-between;">
<p style='color: #333333;'>{{crowddata.task.project_name}} </p> <p style='color: #333333;'>{{ crowddata.task.project_name }} <levelTag
:level="crowddata.task.level">
</levelTag>
</p>
<p v-if="crowddata.task.price == 0" style="color:#FD461A;">面议</p> <p v-if="crowddata.task.price == 0" style="color:#FD461A;">面议</p>
<p v-else style="color:#FD461A;">¥{{ crowddata.task.price }}</p> <p v-else style="color:#FD461A;">¥{{ crowddata.task.price }}</p>
</view> </view>
@ -81,7 +84,8 @@
<div style='display:flex;align-items: center;margin-bottom: 10px;' <div style='display:flex;align-items: center;margin-bottom: 10px;'
v-for="(it, index) in crowddata.task.attachment.split(',')"> v-for="(it, index) in crowddata.task.attachment.split(',')">
<img style="width:17px;height:20px;margin-right:5px;" src="/static/crowd/upload.png" alt="" /> <img style="width:17px;height:20px;margin-right:5px;" src="/static/crowd/upload.png" alt="" />
<p @click="openurl(it)" style="color:#1578ED;font-size: 12px;cursor: pointer;">项目附件{{index+1}} <p @click="openurl(it)" style="color:#1578ED;font-size: 12px;cursor: pointer;">项目附件{{ index + 1
}}
</p> </p>
</div> </div>
</template> </template>
@ -269,8 +273,11 @@
findLabelValueByPropnew findLabelValueByPropnew
} from '@/utils/util.js' } from '@/utils/util.js'
import mixin from '@/utils/mixin/index.js' import mixin from '@/utils/mixin/index.js'
import levelTag from '@/components/levelTag/index.vue'
import { getLevel } from '@/utils/userlevel';
export default { export default {
mixins: [mixin], mixins: [mixin],
components: { levelTag },
data() { data() {
return { return {
base: this.http.baseUrl, base: this.http.baseUrl,
@ -492,11 +499,38 @@
errorUpfile(data, index) { errorUpfile(data, index) {
}, },
application() { async application() {
this.userinform = uni.getStorageSync('wxUserInfo'); this.userinform = uni.getStorageSync('wxUserInfo');
let accessToken = uni.getStorageSync('accessToken'); let accessToken = uni.getStorageSync('accessToken');
console.log('open', this.userinform, this.crowddata.task); await this.http.quickGet('/getInfo', true).then(res => {
if (!accessToken) { const { growthValue } = res.data.user
const {level,_} = getLevel(growthValue)
if (this.crowddata.task.level && this.crowddata.task.level > level) {
uni.showModal({
title: `提示`,
content: '当前等级不满足竞标资格,去看看其他任务吧',
showCancel: false,
confirmText: '确定',
// success: function (res) {
// if (res.confirm) {
// uni.setClipboardData({
// data: url,
// success: function () {
// uni.showToast({
// title: '',
// })
// },
// fail: function () {
// uni.showToast({
// title: '',
// })
// },
// })
// console.log('')
// }
// },
})
} else if (!accessToken) {
this.tokenshow = true this.tokenshow = true
} else { } else {
this.http.quickGet(`/tester/cert/apply/${this.userinform.userId}`, true).then(res => { this.http.quickGet(`/tester/cert/apply/${this.userinform.userId}`, true).then(res => {
@ -529,6 +563,8 @@
}) })
} }
})
}, },
open() { open() {
// console.log('open'); // console.log('open');

@ -106,11 +106,13 @@
<view style="width: 58vw;"> <view style="width: 58vw;">
<p class="leop" style="margin:-10px 0;justify-content: initial;"> <p class="leop" style="margin:-10px 0;justify-content: initial;">
{{ item.projectName | ellipsis }} {{ item.projectName | ellipsis }}
<levelTag :level="item.level"></levelTag>
</p> </p>
<!-- <p class="typej" v-if="item.testType=='static'">类型静态测试</p> --> <!-- <p class="typej" v-if="item.testType=='static'">类型静态测试</p> -->
<p class="typej fiextypej"> <p class="typej fiextypej">
<view class="lefttypej"> <view class="lefttypej">
类型{{findLabelValueByPropnew(tasktypelist, item.testType, 'dictValue', 'dictLabel')}} 类型{{ findLabelValueByPropnew(tasktypelist, item.testType, 'dictValue',
'dictLabel')}}
</view> </view>
</p> </p>
<p class="typej">工期{{ item.period }} I <p class="typej">工期{{ item.period }} I
@ -160,11 +162,15 @@
findLabelValueByPropnew findLabelValueByPropnew
} from '@/utils/util.js' } from '@/utils/util.js'
import mixin from '@/utils/mixin/index.js' import mixin from '@/utils/mixin/index.js'
import levelTag from '@/components/levelTag/index.vue'
// import { // import {
// plist, // plist,
// clist // clist
// } from '@/static/cityjson.js' // } from '@/static/cityjson.js'
export default { export default {
components: {
levelTag
},
mixins: [mixin], mixins: [mixin],
data() { data() {
return { return {

@ -153,6 +153,15 @@ export default {
}, },
toPay() { toPay() {
const userinform = uni.getStorageSync('wxUserInfo'); const userinform = uni.getStorageSync('wxUserInfo');
if (!userinform) {
uni.showToast({ title: '登录失效,请重新登录', icon: 'none', duration: 1000 });
setTimeout(() => {
uni.navigateTo({
url: '/pages/personal/login'
})
}, 1000)
return
}
const id = userinform.userId const id = userinform.userId
// const data = { // const data = {
// courseId: this.tooldetilsdata.tool.toolId, // courseId: this.tooldetilsdata.tool.toolId,

@ -0,0 +1,169 @@
<template>
<view class="rulesWrap">
<view class="rulesImage">
<img src="http://image.bjkeyware.com/static/index/rulesBanner.png" alt="">
</view>
<view class="rulesGroup">
<view class="rulesTitle">等级及对应成长值</view>
<u-table width="100%">
<u-tr style="font-size: 25rpx;">
<u-th style="width: 11%;">等级</u-th>
<u-th style="width: 30%;">对应成长值</u-th>
<u-th style="width: 59%;">权益等级</u-th>
</u-tr>
<u-tr v-for="(item, index) in scoreArray" :key="index" style="" v-show="index != scoreArray.length -1">
<u-td style="width: 11%;">{{ scoreComputed(item.minScore, index,
'myLevel') }}</u-td>
<u-td style=" width: 30%;">
<view>{{
scoreComputed(item.minScore, index,
'scoreRange') }}</view>
</u-td>
<u-td style="width: 59%;">
<view> 新增竞标 <span :style="{
text: 'left',
color: scoreComputed(item.minScore, index,
'myGradeEquity') != '无门槛' ? '#FF5A4D' : ''
}">{{ scoreComputed(item.minScore, index,
'myGradeEquity') }}</span> 的众包任务的资格</view>
</u-td>
</u-tr>
</u-table>
</view>
<view class="rulesGroup">
<view class="rulesTitle">成长值获取途径</view>
<view class="growWays">
<view v-for="(item, index) in staticWays" :key="index">
<view class="waysTitle">{{ index + 1 }}. {{ item.split(' ')[0] }}</view>
<view class="waysInfo">{{ item.split(' ')[1] }}</view>
</view>
</view>
</view>
<view class="moreWays">更多获取途径敬请期待</view>
</view>
</template>
<script>
const staticWays = [
'实名认证 通过在我的页面完成实名认证,可获取50成长值',
'云员工认证 通过去PC端https://bjkeyware.com/ability/user完成云员工认证可获得300成长值',
'竞标任务 竞标成功后,实施验收通过后,可自动获取到200成长值'
]
import { scoreStrategies, getLevel } from '@/utils/userlevel';
const scoreArray = JSON.parse(JSON.stringify(scoreStrategies)).reverse()
export default {
data() {
return {
scoreArray: scoreArray,
staticWays: staticWays
}
},
computed: {
scoreComputed() {
return (min, index, tag) => {
const { level, equity } = getLevel(min)
if (tag == 'myLevel') {
return 'L' + level
} else if (tag == 'myGradeEquity') {
return equity
} else {
if (index == this.scoreArray.length - 1) {
return `X ≥ ${this.scoreArray[index].minScore}`
}
const max = this.scoreArray[index + 1].minScore
return `${min} ≤X<${max} `
}
}
}
}
}
</script>
<style lang="scss">
.u-td view {
text-align: start;
font-size: 24rpx;
}
.u-th view {
text-align: start !important;
font-size: 23rpx;
padding-left: 15rpx;
background-color: #EAF1FD !important;
}
.u-td {
text-align: start !important;
flex: none !important;
}
.u-th {
font-size: 26rpx;
text-align: start !important;
padding-left: 15rpx;
background-color: #EAF1FD !important;
flex: none !important;
}
.rulesWrap {
padding: 35rpx 25rpx;
font-family: PingFang SC;
font-weight: 500;
.rulesImage {
img {
height: 200rpx;
width: 100%;
}
}
.rulesGroup {
margin: 30rpx auto;
background: #FFFFFF;
border-radius: 10rpx;
padding: 0 20rpx;
font-family: PingFang SC;
font-weight: 500;
padding: 30rpx 25rpx 30rpx 25rpx;
margin: 25rpx 0;
.rulesTitle {
font-size: 28rpx;
color: #000000;
font-weight: bold;
line-height: 50rpx;
margin-bottom: 10rpx;
}
.growWays {
line-height: 42rpx;
font-size: 24rpx;
.waysTitle {
color: #333333;
}
.waysInfo {
color: #666666;
}
}
}
.moreWays {
margin-top: 40rpx;
text-align: center;
font-size: 28rpx;
color: #5F6975;
line-height: 25rpx;
}
}
</style>

@ -0,0 +1,144 @@
<template>
<view class="taskWrap">
<view class="taskItem" v-for="(task, index) in taskArrays" :key="index">
<view>
<view class="taskItemTitle">{{ task.lable }}</view>
<view class="taskItemInfo"><span style="margin-right: 15rpx;color: #FC4A4A;">+{{ task.score }}
</span>成长值
</view>
</view>
<view v-if="!task.state" class="taskBtn missonSuccess" @click="dropTo(task.url)">
{{ '去完成' }}
</view>
<view v-else class="taskBtn missonFaild">
{{ '已完成' }}
</view>
</view>
</view>
</template>
<script>
const taskArrays = [
{ lable: '实名认证', score: '50', url: '/pages/personal/setup/certification', state: false },
{ lable: '云员工认证', score: '300', url: 'cloud', state: false },
{ lable: '去竞标任务', score: '200', url: '', state: false },
]
export default {
data() {
return {
taskArrays: taskArrays,
phoneuserinfo: null
}
},
onShow() {
this.phoneuserinfo = uni.getStorageSync('wxUserInfo');
this.http.quickGet('/getInfo', true).then(res => {
const { testerStatus } = res.data.user
if (testerStatus == 1) {
this.taskArrays[0].state = true
} else if (testerStatus == 2) {
this.taskArrays[0].state = true
this.taskArrays[1].state = true
} else if (testerStatus == 0) {
this.taskArrays[0].state = false
}
})
},
methods: {
dropTo(url) {
if (url == 'cloud') {
uni.showModal({
title: `云员工认证请前往PC端`,
content: 'PC端网址:https://bjkeyware.com',
showCancel: false,
confirmText: '复制网址',
success: function (res) {
if (res.confirm) {
uni.setClipboardData({
data: url,
success: function () {
uni.showToast({
title: '复制成功',
})
},
fail: function () {
uni.showToast({
title: '复制失败',
})
},
})
}
},
})
return
}
if (url) {
uni.navigateTo({
url: `${url}`
})
return
}
uni.switchTab({
url: '/pages/index/testcrowdsourc/testcrowdsourc',
})
}
}
}
</script>
<style lang="scss" scoped>
.taskWrap {
padding: 35rpx 0;
.taskItem {
width: 700rpx;
height: 150rpx;
background: linear-gradient(90deg, #E2EDFD, #E5E4FE);
box-shadow: 0rpx 1rpx 10rpx 1rpx rgba(32, 37, 44, 0.2);
border-radius: 10rpx;
margin: 0 auto 30rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 35rpx;
font-family: PingFang SC;
font-weight: 500;
.taskItemTitle {
font-family: PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #000;
line-height: 38rpx;
}
.taskItemInfo {
margin-top: 20rpx;
font-size: 26rpx;
color: #666666;
line-height: 38rpx;
}
.taskBtn {
width: 130rpx;
height: 46rpx;
border-radius: 23rpx;
text-align: center;
color: #fff;
line-height: 46rpx;
}
.missonSuccess {
background: linear-gradient(90deg, #39DA8C, #2B8EFE);
}
.missonFaild {
background: linear-gradient(90deg, #FAD126, #FF544F);
}
}
}
</style>

@ -0,0 +1,360 @@
<template>
<view>
<view class="gradeWrap">
<view style="margin: 0 50rpx;display: flex;align-items: center;">
<view @click="gouserHome">
<img style='width:55px;height:55px;border-radius: 50%' v-if='avatar'
:src="avatar && avatar.indexOf('http') == 0 ? avatar : base + avatar" alt="">
<img v-else style='width:55px;height:55px;border-radius: 50%'
src="../../../static/crowd/defaultAva.jpg" alt="">
</view>
<p v-if='phoneuserinfo.companyName' style='margin-bottom:5px;font-size:17px;font-weight:600;'>
{{ phoneuserinfo.companyName }}
</p>
<p v-else style='margin-bottom:5px;font-size:17px;font-weight:600;margin-left: 10rpx;'>{{ nickName }}
</p>
</view>
<view class="gradeSwiperWrap">
<swiper class="gradeSwiper" previous-margin="30rpx" next-margin="30rpx">
<swiper-item v-for="(index) in scoreArray.length - 1" :key="index">
<view class="swiper-item gradeSwiperItem">
<view class="bothSide">
<view>
<view class="currentState">{{ currentGrade(scoreArray[index].minScore, index, true)
}}</view>
<view class="currentLevel">Lv. {{ index }}</view>
</view>
<view @click="toToggle('gradeTask')"
v-show="currentGrade(scoreArray[index].minScore, index, true) == '当前等级'"
class="toGrow">去升级
</view>
</view>
<view class="grailLayout">
<view>Lv. {{ index }}</view>
<view style="font-size: 24rpx;color: #666666;">已获得{{ myScore }}成长值</view>
<view>Lv. {{ index + 1 }}</view>
</view>
<view class="splitLine">
<view class="progress" :style="{ width: progressWidth(index) }"></view>
</view>
<view class="grailLayout">
<view>{{ scoreArray[index].minScore }}</view>
<view
v-if="'currentGrow1' == stateMap[currentGrade(scoreArray[index].minScore, index, true)]"
class="currentGrow1">{{ currentGrade(scoreArray[index].minScore, index, false) }}
</view>
<view
v-if="'currentGrow2' == stateMap[currentGrade(scoreArray[index].minScore, index, true)]"
class="currentGrow2">{{ currentGrade(scoreArray[index].minScore, index, false) }}
</view>
<view
v-if="'currentGrow3' == stateMap[currentGrade(scoreArray[index].minScore, index, true)]"
class="currentGrow3">{{ currentGrade(scoreArray[index].minScore, index, false) }}
</view>
<view>{{ index == scoreArray.length - 1 ? scoreArray[scoreArray.length - 1].minScore :
scoreArray[index + 1]['minScore'] }}
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<view class="newRight"><img src="http://image.bjkeyware.com/static/index/myRight.png" alt=""> 新增权益</view>
<view class="rightInfo">新增竞标 <span :style="{ color: levelColor[level] }">{{ level }}</span> 的众包任务的资格</view>
</view>
<view class="rulesGroup">
<view @click="toToggle('growInfo')">
<view>成长值明细</view><img src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view>
<view @click="toToggle('gradeRules')">
<view>等级规则</view><img src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view>
</view>
</view>
</template>
<script>
const levelColor = {
'V1': '#6740E5',
'V2': '#E86914',
'V3': '#9752FF',
}
import { scoreStrategies, getLevel } from '@/utils/userlevel';
const scoreArray = JSON.parse(JSON.stringify(scoreStrategies)).reverse()
export default {
data() {
return {
scoreArray: Object.freeze(scoreArray),
myScore: '1900',
avatar: '',
phoneuserinfo: '',
nickName: '',
stateMap: Object.freeze({
'未达成': 'currentGrow3',
'已达成': 'currentGrow1',
'当前等级': 'currentGrow2'
}),
levelColor: Object.freeze(levelColor)
}
},
methods: {
toToggle(url) {
uni.navigateTo({
url: `./${url}`
})
}
},
onShow() {
this.http.quickGet('/getInfo',true).then(res=>{
const {growthValue} = res.data.user
this.myScore = growthValue || 0
})
this.phoneuserinfo = uni.getStorageSync('wxUserInfo');
this.avatar = uni.getStorageSync('avatar');
this.nickName = uni.getStorageSync('nickName');
},
created() {
console.log(this.scoreArray);
},
computed: {
level() {
const { _, equity } = getLevel(this.myScore)
return equity
},
currentGrade() {
return (min, index, tag) => {
// if (index == this.scoreArray.length - 1) {
// return ''
// }
const max = this.scoreArray[index + 1]['minScore']
if (this.myScore >= max) {
return '已达成'
} else if (this.myScore <= max && this.myScore >= min) {
let result = ''
result = tag ? '当前等级' : `还差${max - this.myScore}可升级`
return result
} else {
return '未达成'
}
}
},
progressWidth() {
return (index) => {
const max = this.scoreArray[index + 1]['minScore']
if (this.myScore > max) {
return '100%'
} else if (this.myScore < this.scoreArray[index]['minScore']) {
return '0%'
} else {
return (((this.myScore - this.scoreArray[index]['minScore']) / (max - this.scoreArray[index]['minScore'])) * 100).toFixed(2) + "%"
}
}
}
}
}
</script>
<style lang="scss" scoped>
.gradeWrap {
background-color: #e3e6fe;
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
padding: 20rpx 0;
.gradeSwiperWrap {
.gradeSwiper {
height: 300rpx;
box-sizing: border-box;
.gradeSwiperItem {
padding: 22rpx 0rpx;
box-shadow: 0rpx 2rpx 18rpx 0rpx rgba(30, 66, 111, 0.15);
border-radius: 10rpx;
margin: 0 10rpx;
background: url('http://image.bjkeyware.com/static/index/gradeBg.png') no-repeat 0 0;
background-size: 100% 100%;
}
.bothSide {
display: flex;
justify-content: space-between;
font-family: PingFang SC;
position: relative;
.toGrow {
width: 130rpx;
height: 46rpx;
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
border-radius: 23rpx;
text-align: center;
font-weight: 500;
font-size: 26rpx;
color: #FFFFFF;
line-height: 46rpx;
position: absolute;
bottom: 10rpx;
right: 30rpx;
}
.currentState {
width: 150rpx;
line-height: 46rpx;
font-weight: 500;
font-size: 26rpx;
color: #333333;
background: #EAF1FD;
text-align: center;
border-radius: 0rpx 23rpx 23rpx 0rpx;
}
.currentLevel {
margin: 30rpx 40rpx;
height: 28rpx;
font-weight: 800;
font-size: 36rpx;
color: #000000;
line-height: 38rpx;
}
}
.splitLine {
margin: 10rpx auto;
width: 572rpx;
height: 10rpx;
// background: #98C5FB;
background: #FFFFFF;
border-radius: 5rpx;
position: relative;
.progress {
position: absolute;
height: 10rpx;
width: 15%;
background: #98C5FB;
border-radius: 5rpx;
}
}
.grailLayout {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
margin: 0 40rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #333333;
line-height: 38rpx;
.currentGrow1 {
background: url('http://image.bjkeyware.com/static/index/currentState1.png') no-repeat 0 0;
min-width: 10rpx;
padding: 0 20rpx;
height: 50rpx;
line-height: 58rpx;
background-size: 100% 100%;
text-align: center;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
.currentGrow2 {
background: url('http://image.bjkeyware.com/static/index/currentState2.png') no-repeat 0 0;
min-width: 10rpx;
padding: 0 20rpx;
height: 50rpx;
line-height: 58rpx;
background-size: 100% 100%;
text-align: center;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
.currentGrow3 {
background: url('http://image.bjkeyware.com/static/index/currentState3.png') no-repeat 0 0;
min-width: 10rpx;
padding: 0 20rpx;
height: 50rpx;
line-height: 58rpx;
background-size: 100% 100%;
text-align: center;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
&:last-child {
border: none;
}
}
}
}
.newRight {
height: 29rpx;
font-family: PingFang SC;
font-weight: bold;
font-size: 30rpx;
color: #000000;
line-height: 38rpx;
margin: 30rpx 50rpx 20rpx 50rpx;
display: flex;
align-items: center;
img {
width: 41rpx;
height: 37rpx;
}
}
.rightInfo {
margin: 0rpx 50rpx;
padding-bottom: 20rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #4D4D4D;
}
}
.rulesGroup {
width: 683rpx;
height: 180rpx;
margin: 30rpx auto;
background: #FFFFFF;
border-radius: 10rpx;
padding: 0 40rpx;
img {
width: 13rpx;
height: 21rpx;
}
>view {
height: 50%;
line-height: 90rpx;
border-bottom: 1px solid #EDEDED;
;
display: flex;
justify-content: space-between;
align-items: center;
&:last-child {
border: none;
}
}
}
</style>

@ -0,0 +1,77 @@
<template>
<view class="rulesGroupWrap">
<view class="rulesGroup">
<view v-for="(item, index) in growthDetail" :key="index">
<view class="rulesItem">
<view>{{ item.title }}</view>
<view><span style="color: #FC4A4A;margin-right: 15rpx;">+{{ item.growthValue }} </span> 成长值</view>
</view>
<view class="rulesTime">{{ item.date }}</view>
</view>
<view v-if="growthDetail.length == 0">暂无信息</view>
</view>
</view>
</template>
<script>
export default {
onShow() {
this.http.quickGet('/getInfo', true).then(res => {
console.log(res.data.user.growthDetail);
this.growthDetail = JSON.parse(res.data.user.growthDetail)
})
console.log(this.growthDetail);
},
data() {
return {
growthDetail: []
}
}
}
</script>
<style lang="scss" scoped>
.rulesGroupWrap {
padding: 30rpx 0;
.rulesGroup {
width: 683rpx;
margin: 0rpx auto;
background: #FFFFFF;
border-radius: 10rpx;
padding: 0 40rpx;
font-family: PingFang SC;
font-weight: 500;
padding: 5rpx 25rpx 55rpx 25rpx;
img {
width: 13rpx;
height: 21rpx;
}
>view {
border-bottom: 1px solid #EDEDED;
padding: 25rpx 0;
.rulesItem {
font-size: 30rpx;
color: #1A1A1A;
line-height: 38rpx;
line-height: 50rpx;
width: 100%;
display: flex;
justify-content: space-between;
}
.rulesTime {
margin-top: 10rpx;
font-size: 24rpx;
color: #808080;
line-height: 38rpx;
}
}
}
}
</style>

@ -108,7 +108,8 @@
</view> </view>
</view> </view>
<view class="cycontentit" @click="servier('bcrowd')"> <view class="cycontentit" @click="servier('bcrowd')">
<image style="width: 45rpx;height: 45rpx;" src="http://image.bjkeyware.com/static/index/renliwb/newmy2.png" class="cycontentitimg" <image style="width: 45rpx;height: 45rpx;"
src="http://image.bjkeyware.com/static/index/renliwb/newmy2.png" class="cycontentitimg"
mode=""></image> mode=""></image>
<view class="cycontentittext"> <view class="cycontentittext">
我的众包 我的众包
@ -196,6 +197,13 @@
</view> </view>
</view> </view>
</view> </view>
<view class="changyong changyong1" style="min-height: 90rpx;line-height: 90rpx;">
<view class="myGradeWrap">
<view class="grade"><img src="http://image.bjkeyware.com/static/index/myGrade.png" alt=""> 我的等级</view>
<view class="getGrowVal" @click="myGradeValue">领取成长值<img
src="http://image.bjkeyware.com/static/index/xia.png" alt=""></view>
</view>
</view>
<view style="height:15px"> </view> <view style="height:15px"> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下' <u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下'
@ -454,6 +462,17 @@ export default {
} else { } else {
this.tokenshow = true this.tokenshow = true
} }
},
//
myGradeValue() {
let accessToken = uni.getStorageSync('accessToken');
if (!accessToken) {
this.tokenshow = true
} else {
uni.navigateTo({
url: './grade/gradeValue'
})
}
} }
} }
} }
@ -568,6 +587,42 @@ export default {
color: #4D4D4D; color: #4D4D4D;
} }
.myGradeWrap {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
font-family: PingFang SC;
font-weight: bold;
.grade {
font-size: 30rpx;
color: #000000;
display: flex;
align-items: center;
img {
margin: 0 10rpx;
width: 27rpx;
height: 34rpx;
}
}
.getGrowVal {
font-weight: 500;
font-size: 28rpx;
color: #1578ED;
display: flex;
align-items: center;
img {
margin: 0 10rpx;
width: 13rpx;
height: 20rpx;
}
}
}
.changyong { .changyong {
width: 700rpx; width: 700rpx;
min-height: 230rpx; min-height: 230rpx;

@ -140,7 +140,7 @@
</div> </div>
</view> </view>
<view v-show="motify"> <view v-if="motify">
<u-form :model="accountform" ref="accountform" label-position='left' label-width='140' <u-form :model="accountform" ref="accountform" label-position='left' label-width='140'
border-bottom='false'> border-bottom='false'>
<view v-if="accountform.paytype == '支付宝' && accountdata.alipay"> <view v-if="accountform.paytype == '支付宝' && accountdata.alipay">
@ -407,6 +407,8 @@ export default {
}); });
} else { } else {
this.$refs.accountform.validate((valid) => { this.$refs.accountform.validate((valid) => {
console.log('1');
if (valid) { if (valid) {
let data = {}; let data = {};
if (this.accountform.paytype == '支付宝') { if (this.accountform.paytype == '支付宝') {

@ -1,8 +1,8 @@
import comstemutil from "./comstemutil"; import comstemutil from "./comstemutil";
//es6 //es6
const baseUrl = 'http://192.168.0.229:9999'; // const baseUrl = 'http://192.168.0.229:9999';
// const baseUrl = 'https://www.bjkeyware.com/test-api'; const baseUrl = 'https://www.bjkeyware.com/test-api';
// const baseUrl = 'https://www.bjkeyware.com/prod-api'; // const baseUrl = 'https://www.bjkeyware.com/prod-api';
// const baseUrl = 'http://172.16.36.180:9999'; // const baseUrl = 'http://172.16.36.180:9999';

@ -0,0 +1,56 @@
/* 使if else
* 若等级规则增加给scoreStrategies数组添加对象即可 所有和等级相关的都会随之更改
* 食用方式
* const { level, equity} = getLevel(score)
* level:等级 equity:权益
*/
export const scoreStrategies = [
{ minScore: 5000, level: "4" },
{ minScore: 2000, level: "3" },
{ minScore: 500, level: "2" },
{ minScore: 100, level: "1" },
{ minScore: 0, level: "0" },
];
export const gradeEquity = function (level) {
return `${level * 1 === 0 ? "无门槛" : "V" + level}`;
};
export function getLevel(score) {
for (let i = 0; i < scoreStrategies.length; i++) {
if (score >= scoreStrategies[i].minScore) {
return {
level: scoreStrategies[i].level,
equity: gradeEquity(`${scoreStrategies[i].level}`),
};
}
}
console.error(`score=${score},无法确定等级`);
return "无法确定等级";
/*
strategyV1: function (score) {
return score >= 0 && score <= 600 ? "V1" : null;
},
strategyV2: function (score) {
return score >= 0 && score <= 600 ? "V1" : null;
},
strategyV3: function (score) {
return score >= 0 && score <= 600 ? "V1" : null;
},
strategyV4: function (score) {
return score >= 0 && score <= 600 ? "V1" : null;
},
};
*/
// const levelMap = {};
// for (let strategy in scoreStrategies) {
// const level = scoreStrategies(strategy)(score);
// if (level) {
// return level;
// }
// }
// console.error(`score=${score},无法确定等级`);
// return "无法确定等级";
}

@ -1,7 +1,7 @@
/* start--微信小程序编译后页面有组件名的元素,特别处理--start */ /* start--微信小程序编译后页面有组件名的元素,特别处理--start */
/* #ifdef MP-WEIXIN || MP-QQ */ /* #ifdef MP-WEIXIN || MP-QQ */
u-td, u-th { u-td, u-th {
flex: 1; // flex: 1;
align-self: stretch; align-self: stretch;
} }

Loading…
Cancel
Save