-
竞标日期:{{userprogramme.apply_time?userprogramme.apply_time.slice(0,10):'无'}}
-
竞标工期:{{userprogramme.period?userprogramme.period+'天':'无'}}
-
竞标优势:{{userprogramme.competition_edge?userprogramme.competition_edge:'无'}}
+
竞标日期:{{ userprogramme.apply_time ? userprogramme.apply_time.slice(0, 10) : '无' }}
+
竞标工期:{{ userprogramme.period ? userprogramme.period + '天' : '无' }}
+
竞标优势:{{ userprogramme.competition_edge ? userprogramme.competition_edge : '无' }}
竞标附件:
项目附件
@@ -173,7 +177,7 @@
-
已竞标
@@ -254,7 +258,7 @@
+ @cancel='tokenshow = false'>
\ No newline at end of file
diff --git a/pages/index/testtraining/onLineCourse.vue b/pages/index/testtraining/onLineCourse.vue
index 248c7f1..f12fe39 100644
--- a/pages/index/testtraining/onLineCourse.vue
+++ b/pages/index/testtraining/onLineCourse.vue
@@ -153,6 +153,15 @@ export default {
},
toPay() {
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 data = {
// courseId: this.tooldetilsdata.tool.toolId,
diff --git a/pages/personal/grade/gradeRules.vue b/pages/personal/grade/gradeRules.vue
new file mode 100644
index 0000000..875a7f1
--- /dev/null
+++ b/pages/personal/grade/gradeRules.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+ 等级及对应成长值:
+
+
+ 等级
+ 对应成长值
+ 权益等级
+
+
+ {{ scoreComputed(item.minScore, index,
+ 'myLevel') }}
+
+ {{
+ scoreComputed(item.minScore, index,
+ 'scoreRange') }}
+
+
+ 新增竞标 {{ scoreComputed(item.minScore, index,
+ 'myGradeEquity') }} 的众包任务的资格
+
+
+
+
+
+
+ 成长值获取途径:
+
+
+ {{ index + 1 }}. {{ item.split(' ')[0] }}
+ {{ item.split(' ')[1] }}
+
+
+
+ 更多获取途径敬请期待
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/personal/grade/gradeTask.vue b/pages/personal/grade/gradeTask.vue
new file mode 100644
index 0000000..6d5a84b
--- /dev/null
+++ b/pages/personal/grade/gradeTask.vue
@@ -0,0 +1,144 @@
+
+
+
+
+ {{ task.lable }}
+ +{{ task.score }}
+ 成长值
+
+
+
+ {{ '去完成' }}
+
+
+ {{ '已完成' }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/personal/grade/gradeValue.vue b/pages/personal/grade/gradeValue.vue
new file mode 100644
index 0000000..2756264
--- /dev/null
+++ b/pages/personal/grade/gradeValue.vue
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+
+
+
+ {{ phoneuserinfo.companyName }}
+
+ {{ nickName }}
+
+
+
+
+
+
+
+
+ {{ currentGrade(scoreArray[index].minScore, index, true)
+ }}
+ Lv. {{ index }}
+
+ 去升级
+
+
+
+ Lv. {{ index }}
+ 已获得{{ myScore }}成长值
+ Lv. {{ index + 1 }}
+
+
+
+
+
+ {{ scoreArray[index].minScore }}
+ {{ currentGrade(scoreArray[index].minScore, index, false) }}
+
+ {{ currentGrade(scoreArray[index].minScore, index, false) }}
+
+ {{ currentGrade(scoreArray[index].minScore, index, false) }}
+
+ {{ index == scoreArray.length - 1 ? scoreArray[scoreArray.length - 1].minScore :
+ scoreArray[index + 1]['minScore'] }}
+
+
+
+
+
+
+ 新增权益
+ 新增竞标 {{ level }} 的众包任务的资格
+
+
+
+
+ 成长值明细
+
+
+ 等级规则
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/personal/grade/growInfo.vue b/pages/personal/grade/growInfo.vue
new file mode 100644
index 0000000..fe06143
--- /dev/null
+++ b/pages/personal/grade/growInfo.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+ {{ item.title }}
+ +{{ item.growthValue }} 成长值
+
+ {{ item.date }}
+
+ 暂无信息
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/personal/personal.vue b/pages/personal/personal.vue
index 284cd98..8d7674c 100644
--- a/pages/personal/personal.vue
+++ b/pages/personal/personal.vue
@@ -108,7 +108,8 @@
-
我的众包
@@ -196,6 +197,13 @@
+
+
+ 我的等级
+ 领取成长值
+
+
-
+
@@ -407,6 +407,8 @@ export default {
});
} else {
this.$refs.accountform.validate((valid) => {
+ console.log('1');
+
if (valid) {
let data = {};
if (this.accountform.paytype == '支付宝') {
diff --git a/utils/http.js b/utils/http.js
index a6ddb9f..918dd29 100644
--- a/utils/http.js
+++ b/utils/http.js
@@ -1,8 +1,8 @@
import comstemutil from "./comstemutil";
//es6
-const baseUrl = 'http://192.168.0.229:9999';
-// const baseUrl = 'https://www.bjkeyware.com/test-api';
+// const baseUrl = 'http://192.168.0.229:9999';
+const baseUrl = 'https://www.bjkeyware.com/test-api';
// const baseUrl = 'https://www.bjkeyware.com/prod-api';
// const baseUrl = 'http://172.16.36.180:9999';
diff --git a/utils/userlevel.js b/utils/userlevel.js
new file mode 100644
index 0000000..617f878
--- /dev/null
+++ b/utils/userlevel.js
@@ -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 "无法确定等级";
+}
diff --git a/uview-ui/libs/css/style.mp.scss b/uview-ui/libs/css/style.mp.scss
index ca1d3e0..aac37d8 100644
--- a/uview-ui/libs/css/style.mp.scss
+++ b/uview-ui/libs/css/style.mp.scss
@@ -1,7 +1,7 @@
/* start--微信小程序编译后页面有组件名的元素,特别处理--start */
/* #ifdef MP-WEIXIN || MP-QQ */
u-td, u-th {
- flex: 1;
+ // flex: 1;
align-self: stretch;
}