diff --git a/changelog.txt b/changelog.txt
index cc915bc..33aefa6 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,10 @@
+##v0.14.3
+ * F 实训文件内容获取失败(文件path错误)
+ * F 个人信息性别设置bug
+ * D 删除实名认证界面
+
##v0.14.2
+ * F 签到界面无权限访问提示
* F 更改头像界面图片初次加载失败
* F 电脑端用户界面图标及文字位置不正确
diff --git a/miniprogram/account/pages/authentication/authentication.js b/miniprogram/account/pages/authentication/authentication.js
index 757ce5d..1d10057 100644
--- a/miniprogram/account/pages/authentication/authentication.js
+++ b/miniprogram/account/pages/authentication/authentication.js
@@ -16,6 +16,7 @@ Page({
})
},
onGenderChange({detail:{value}}){
+ value = parseInt(value);
this.setData({ gender: value });
},
onSubmit(e){
@@ -23,6 +24,7 @@ Page({
let {detail:{value}} = e;
if(!this.checkInput(value)) return;
value.attachment_ids[0] = parseInt(value.attachment_ids[0]);
+ value.gender = parseInt(value.gender);
app.api("users.accounts.authentication_apply")(value)
.then(res=>{
let db = wx.cloud.database();
diff --git a/miniprogram/account/pages/profile/profile.js b/miniprogram/account/pages/profile/profile.js
index b5a8130..e074d5e 100644
--- a/miniprogram/account/pages/profile/profile.js
+++ b/miniprogram/account/pages/profile/profile.js
@@ -67,6 +67,7 @@ Page({
},
onGenderChange({detail:{value}}){
console.log("gender change", value);
+ value = parseInt(value);
this.setData({gender:value});
},
onLocationChange(e){
@@ -197,6 +198,7 @@ Page({
},
saveInfo(value){
+ value.gender = parseInt(value.gender);
app.api("users.accounts", { method: "PUT" })(value)
.then(res => {
app.syncUser({refresh:1});
diff --git a/miniprogram/app.json b/miniprogram/app.json
index bdef28c..b5f56c0 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -24,7 +24,6 @@
"pages/profile/profile",
"pages/account/account",
"pages/profile/school_select/school_select",
- "pages/authentication/authentication",
"pages/pro_authentication/pro_authentication",
"pages/accounts/accounts",
"pages/user_info/user_info"
@@ -41,7 +40,6 @@
"pages": [
"pages/course/course",
"pages/course_invite/course_invite",
- "pages/course_setting/course_setting",
"pages/attendance_detail/attendance_detail",
"modules/attendance/attendance",
"pages/attendances/attendances"
diff --git a/miniprogram/components/head-tip/head-tip.js b/miniprogram/components/head-tip/head-tip.js
new file mode 100644
index 0000000..02de105
--- /dev/null
+++ b/miniprogram/components/head-tip/head-tip.js
@@ -0,0 +1,14 @@
+const app = getApp();
+Component({
+ properties: {
+
+ },
+
+ data: {
+
+ },
+
+ methods: {
+
+ }
+})
diff --git a/miniprogram/components/head-tip/head-tip.json b/miniprogram/components/head-tip/head-tip.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/miniprogram/components/head-tip/head-tip.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/miniprogram/components/head-tip/head-tip.wxml b/miniprogram/components/head-tip/head-tip.wxml
new file mode 100644
index 0000000..0cd05ff
--- /dev/null
+++ b/miniprogram/components/head-tip/head-tip.wxml
@@ -0,0 +1 @@
+{{message}}
\ No newline at end of file
diff --git a/miniprogram/components/head-tip/head-tip.wxss b/miniprogram/components/head-tip/head-tip.wxss
new file mode 100644
index 0000000..00ba139
--- /dev/null
+++ b/miniprogram/components/head-tip/head-tip.wxss
@@ -0,0 +1 @@
+/* components/head-tip/head-tip.wxss */
\ No newline at end of file
diff --git a/miniprogram/components/require-login/require-login.js b/miniprogram/components/require-login/require-login.js
index 1d66801..0167f6c 100644
--- a/miniprogram/components/require-login/require-login.js
+++ b/miniprogram/components/require-login/require-login.js
@@ -1,3 +1,4 @@
+import { deprecate} from "../../js/utils";
const app = getApp();
Component({
properties: {
@@ -13,6 +14,9 @@ Component({
value:"#0080f0"
}
},
+ attached(){
+ deprecate("require-login");
+ },
pageLifetimes:{
show:function(){
app.syncUser()
diff --git a/miniprogram/components/rich-md/rich-md.js b/miniprogram/components/rich-md/rich-md.js
index b228dd3..6699aba 100644
--- a/miniprogram/components/rich-md/rich-md.js
+++ b/miniprogram/components/rich-md/rich-md.js
@@ -10,17 +10,18 @@ Component({
this.process(nodes);
}
},
- data_key:{
+ datakey:{
type:String,
observer:function(key){
- console.log("data_key",key);
+ console.log("data_key",key, this.data);
wx.getStorage({
key,
success: res=>{
//console.log("getStorage", res);
this.setData({_nodes:res.data});
},
- })
+ });
+ return key;
}
},
theme:{
@@ -43,11 +44,9 @@ Component({
methods: {
handleTap(e){
//console.log(this.data);
- console.log("handleTap",e);
- if(this.data.data_key)
- return;
+ console.log("handleTap",e, this.data,this);
var {target:{dataset:{data}}} = e;
- var key = "RICH-MD-KEY";
+ var key = "RICHMDKEY";
//console.log(data);
if(data&&data._e.tag=="code")
data={attr:{class:"h2w__pre"},child:[data],tag:"view",type:"tag",_e:{type:"tag",attr:{},tag:"pre", child:[data]}}
@@ -56,7 +55,7 @@ Component({
wx.setStorage({
key,data,success:res=>{
wx.navigateTo({
- url: `/components/rich-md/rich-md?data_key=${key}&type=html`
+ url: `/components/rich-md/rich-md?datakey=${key}&type=html`
})
}
})
diff --git a/miniprogram/config.js b/miniprogram/config.js
index 1b2b8a7..531f700 100644
--- a/miniprogram/config.js
+++ b/miniprogram/config.js
@@ -5,9 +5,10 @@ const developUrl = "https://test-newweb.educoder.net";
const trialUrl = "https://pre-newweb.educoder.net";
const releaseUrl = "https://www.educoder.net";
-let _version = "0.14.2";
+let _version = "0.14.3";
var eduUrl = releaseUrl;
/**
+ *
*/
export function switchEnv(env) {
diff --git a/miniprogram/course/pages/attendance_detail/attendance_detail.js b/miniprogram/course/pages/attendance_detail/attendance_detail.js
index 42a6eab..c88bada 100644
--- a/miniprogram/course/pages/attendance_detail/attendance_detail.js
+++ b/miniprogram/course/pages/attendance_detail/attendance_detail.js
@@ -50,6 +50,9 @@ Component({
navBack(){
if(getCurrentPages().length<=1){
let {course_identity, course_id} = this.data;
+ let {code,message} = this.data;
+ if(code!=200&&message)
+ return app.reLaunch({url:"{main}"});//@todo
app.redirectTo({
url: `{attendance}?course_identity=${course_identity}&course_id=${course_id}`
});
@@ -130,15 +133,17 @@ Component({
app.api("weapps.attendances")({attendance_id})
.then(res=>{
this.setData(res);
- this.setData({status:200});
+ this.setData({status:200, message:""});
if(course_identity<5&&res.mode=="QRCODE"){
let code_url = getWXACodeUrl({url: this.route, scene: this.getScene()});
this.setData({code_url});
}
}).catch(e=>{
- console.error(e);
- app.showError(e)
- this.setData({status: e.code});
+ //console.error(e);
+ if(e.code==402)
+ e.message = "你没有访问权限";
+ app.showError(e);
+ this.setData({status: e.code, message:e.message});
})
}else{
this.refreshIdentity()
diff --git a/miniprogram/course/pages/attendance_detail/attendance_detail.wxml b/miniprogram/course/pages/attendance_detail/attendance_detail.wxml
index e4c6b80..1cac438 100644
--- a/miniprogram/course/pages/attendance_detail/attendance_detail.wxml
+++ b/miniprogram/course/pages/attendance_detail/attendance_detail.wxml
@@ -2,6 +2,7 @@
+{{message}}
{{name}}
签到时间:
@@ -40,7 +41,7 @@
{{mode=='QRCODE'?'请扫二维码签到':mode=='NUMBER'?'请输入签到码签到':mode=='QUICK'?'点击签到按钮,快速签到':''}}
-
+
diff --git a/miniprogram/course/pages/attendance_detail/attendance_detail.wxss b/miniprogram/course/pages/attendance_detail/attendance_detail.wxss
index 028b0d6..edffda7 100644
--- a/miniprogram/course/pages/attendance_detail/attendance_detail.wxss
+++ b/miniprogram/course/pages/attendance_detail/attendance_detail.wxss
@@ -1,3 +1,9 @@
+.err-msg{
+ background: #00b0f0;
+ color: white;
+ padding: 6px;
+ text-align: center;
+}
.input-wrap{
display: flex;
padding: 4px 12px;
diff --git a/miniprogram/course/pages/course_invite/course_invite.js b/miniprogram/course/pages/course_invite/course_invite.js
index 32c0e52..857b30c 100644
--- a/miniprogram/course/pages/course_invite/course_invite.js
+++ b/miniprogram/course/pages/course_invite/course_invite.js
@@ -66,13 +66,15 @@ Page({
return `course_id=${course_id}`
},
pull_course(){
- app.api("weapps.courses.basic_info")({ course_id:this.data.course_id })
- .then(({course}) => {
- this.setData({ course, status: 200});
- }).catch(e=>{
- app.showError(e);
- this.setData({status:-1})
- });
+ app.syncUser().then(res=>{
+ app.api("weapps.courses.basic_info")({ course_id: this.data.course_id })
+ .then(({ course }) => {
+ this.setData({ course, status: 200 });
+ }).catch(e => {
+ app.showError(e);
+ this.setData({ status: -1 })
+ });
+ })
},
onLoad: function (options) {
console.log("onLoad", options);
diff --git a/miniprogram/dev/pages/dev/dev.js b/miniprogram/dev/pages/dev/dev.js
index acc2fff..7f65cd3 100644
--- a/miniprogram/dev/pages/dev/dev.js
+++ b/miniprogram/dev/pages/dev/dev.js
@@ -7,7 +7,9 @@ Page({
data: {
},
-
+ onScanCode(e){
+ console.log(e);
+ },
/**
* 生命周期函数--监听页面加载
*/
diff --git a/miniprogram/dev/pages/dev/dev.wxml b/miniprogram/dev/pages/dev/dev.wxml
index 1e8c4e9..e69de29 100644
--- a/miniprogram/dev/pages/dev/dev.wxml
+++ b/miniprogram/dev/pages/dev/dev.wxml
@@ -1,3 +0,0 @@
-
-miniprogram/dev/pages/dev/dev.wxml
-
diff --git a/miniprogram/dev/pages/dev/dev.wxss b/miniprogram/dev/pages/dev/dev.wxss
index 6882e7e..5f42582 100644
--- a/miniprogram/dev/pages/dev/dev.wxss
+++ b/miniprogram/dev/pages/dev/dev.wxss
@@ -1,52 +1,4 @@
-@font-face {
- font-family: 'iconfont';
- /* project id 706535 */
- src: url('//at.alicdn.com/t/font_706535_gcxl9md3eyj.eot');
- src: url('//at.alicdn.com/t/font_706535_gcxl9md3eyj.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_706535_gcxl9md3eyj.woff') format('woff'), url('//at.alicdn.com/t/font_706535_gcxl9md3eyj.ttf') format('truetype'), url('//at.alicdn.com/t/font_706535_gcxl9md3eyj.svg#iconfont') format('svg');
-}
-.iconfont {
- font-family: "iconfont" !important;
- font-size: 16px;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.icon_back::before {
- content: "\e62c";
-}
-
-.icon_close::before {
- content: "\e628";
-}
-
-.icon_refresh::before {
- content: "\e732";
-}
-
-.icon_jiantou_bottom::before {
- content: "\e605"
-}
-
-.icon_jiantou_top::before {
- content: "\e733"
-}
-
-.icon_bill::before {
- content: "\e627";
-}
-
-.icon_edit::before {
- content: "\e63b";
-}
-
-.icon_edit_pen::before {
- content: "\e609";
-}
-
-.icon_right_jiantou::before {
- content: "\e7a5"
-}
-.icon_back::before {
- content: "\e7a5"
+#cam{
+ width: 100%;
+ height: 40vh;
}
\ No newline at end of file
diff --git a/miniprogram/js/client.js b/miniprogram/js/client.js
index d0864e6..03c5940 100644
--- a/miniprogram/js/client.js
+++ b/miniprogram/js/client.js
@@ -70,8 +70,8 @@ export default class Client{
})
}
getTidingInfo({login}={}){
+ this.tidingGet = 1;
const handler = {
- success: res=>{this.tidingGet =1},
fail: res=>{this.tidingGet=0}
};
return this.api("users.unread_message_info")({login}).then(res => {
@@ -82,7 +82,7 @@ export default class Client{
else{
wx.removeTabBarBadge({index:1});
wx.hideTabBarRedDot({index:1});
- this.tidingGet = 1;
+
}
}).catch(e => {
console.error("getTidingInfo", e);
diff --git a/miniprogram/js/utils.js b/miniprogram/js/utils.js
index 5d119e6..14c16df 100644
--- a/miniprogram/js/utils.js
+++ b/miniprogram/js/utils.js
@@ -1,5 +1,10 @@
export function deprecate(name=""){
- console.warn(name + "这个方法或界面被弃用了");
+ try{
+ throw new Error(name + "这个方法或界面被弃用了");
+ }catch(e){
+ console.info(e);
+ }
+
}
export function getFormatDate(date){
date = date||new Date();
diff --git a/miniprogram/pages/home/home.js b/miniprogram/pages/home/home.js
index 8888863..eac6411 100644
--- a/miniprogram/pages/home/home.js
+++ b/miniprogram/pages/home/home.js
@@ -14,7 +14,6 @@ Page({
console.log(e);
},
enterPage({ target: { dataset: { path } } }) {
- console.log("enterPage");
if (!path) return;
let { id } = this.data.user;
if (!id || id == 2)
@@ -98,8 +97,6 @@ Page({
logout: function ({ showToast = 1 }) {
app.callApi({
name: "accounts.logout", success: res => {
- console.log("注销成功");
- console.log(res);
if (showToast)
app.showMsg(res);
this.onShow();
@@ -130,9 +127,9 @@ Page({
},
onShow() {
app.syncUser().then(res => {
- if (res.user.user_id != 2)
+ if (res.user.user_id != 2){
this.refresh();
- else
+ }else
this.setData({ user: {}, currentLogin:"" })
});
},
@@ -159,7 +156,7 @@ Page({
} else {
var currentLogin = "";
}
- this.setData({ currentLogin });
+ this.setData({ currentLogin, profile_completed: app.user().profile_completed});
},
tapAutoAttendence() {
this.setData({ auto_attendance: !this.data.auto_attendance });
diff --git a/miniprogram/pages/home/home.wxml b/miniprogram/pages/home/home.wxml
index bac5b8b..64463bc 100644
--- a/miniprogram/pages/home/home.wxml
+++ b/miniprogram/pages/home/home.wxml
@@ -12,6 +12,7 @@
+ 完善个人信息
@@ -36,10 +37,10 @@
修改密码
-
+
职业认证
diff --git a/miniprogram/pages/home/home.wxss b/miniprogram/pages/home/home.wxss
index c9c7314..7b5d856 100644
--- a/miniprogram/pages/home/home.wxss
+++ b/miniprogram/pages/home/home.wxss
@@ -18,17 +18,23 @@
align-items: center;
position: relative;
}
+.user-info>.enter,
.nav>.enter{
right: 12px;
}
.nav>.icon{
margin-right: 10px;
}
+.user-info>.tip,
.nav>.tip{
right: 36px;
color: dimgray;
font-size: 12px;
}
+.user-info>.enter,
+.user-info>.tip{
+ position: absolute;
+}
.nav>.enter, .nav>.tip{
position: absolute;
top:50%;
@@ -82,10 +88,7 @@ navigator[hidden] {
align-items: center;
position: relative;
}
-.user-info>.enter{
- position: absolute;
- right: 12px;
-}
+
.user-detail{
margin-left: 20px;
diff --git a/miniprogram/pages/main/my_course/my_course.js b/miniprogram/pages/main/my_course/my_course.js
index 19a2ffe..6a4559b 100644
--- a/miniprogram/pages/main/my_course/my_course.js
+++ b/miniprogram/pages/main/my_course/my_course.js
@@ -47,6 +47,8 @@ Component({
this.pullCourses({ refresh: 1 });
},
addCourse() {
+ return this.setData({ showModal: 1 });
+ /*
if (app.user().user_identity == "学生") {
this.setData({ showModal: 1 });
} else {
@@ -61,6 +63,7 @@ Component({
}
})
}
+ */
},
enter_course: function (event) {
console.log(event);
diff --git a/miniprogram/shixun/pages/shixun/shixun.wxml b/miniprogram/shixun/pages/shixun/shixun.wxml
index dea6e84..9eae05a 100644
--- a/miniprogram/shixun/pages/shixun/shixun.wxml
+++ b/miniprogram/shixun/pages/shixun/shixun.wxml
@@ -43,6 +43,6 @@
-
+
\ No newline at end of file
diff --git a/miniprogram/task/components/test_set/test_set.wxss b/miniprogram/task/components/test_set/test_set.wxss
index 4e227db..718f3cd 100644
--- a/miniprogram/task/components/test_set/test_set.wxss
+++ b/miniprogram/task/components/test_set/test_set.wxss
@@ -44,6 +44,7 @@
}
.detail{
transition: 0.8s all ease;
+ max-height: 100vh;
}
.output-info{
background: #111c24;
@@ -57,7 +58,7 @@
padding: 0 8px;
}
.hidden{
- height: 0px;
+ max-height: 0px;
overflow: hidden;
}
.different{
diff --git a/miniprogram/task/pages/task/task.js b/miniprogram/task/pages/task/task.js
index 0897784..569c59f 100644
--- a/miniprogram/task/pages/task/task.js
+++ b/miniprogram/task/pages/task/task.js
@@ -37,9 +37,13 @@ Page({
}
this.content = value;
},
+ processPath(path){
+ return path.replace(/[;;]$/,"");
+ },
async updateFile({ evaluate=0}={}){
var {content} = this;
var {path} = this.data.challenge;
+ path = this.processPath(path);
var {identifier} = this.data.myshixun;
var {id:game_id} = this.data.game;
if(this.modified||evaluate)
@@ -109,6 +113,7 @@ Page({
},
async pullContent(){
let {path} = this.data.challenge;
+ path = this.processPath(path);
let {identifier} = this.data;
let {content} = await app.api("tasks.rep_content")({identifier,path});
this.setData({content});
diff --git a/miniprogram/task/pages/task/task.wxss b/miniprogram/task/pages/task/task.wxss
index 5732cca..c2863bf 100644
--- a/miniprogram/task/pages/task/task.wxss
+++ b/miniprogram/task/pages/task/task.wxss
@@ -28,7 +28,7 @@
font: 14px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
white-space: pre;
padding: 4px 12px;
- height: calc(100vh - 56px);
+ height: calc(100vh - 51px);
flex: auto;
}
.operations{
diff --git a/project.config.json b/project.config.json
index fc08e28..7dfed1f 100644
--- a/project.config.json
+++ b/project.config.json
@@ -143,7 +143,7 @@
"id": 11,
"name": "course/pages/attendance_detail/attendance_detail",
"pathName": "course/pages/attendance_detail/attendance_detail",
- "query": "course_identity=2&course_id=5141&code=&mode=&attendance_id=956",
+ "query": "course_identity=5&course_id=5141&code=&mode=&attendance_id=956",
"scene": null
},
{