diff --git a/pages/bind/binduser.js b/pages/bind/binduser.js
index 3951b94..f00bf73 100644
--- a/pages/bind/binduser.js
+++ b/pages/bind/binduser.js
@@ -10,6 +10,7 @@ Page({
password:'',
mpopenid:'',
isExists:false,
+ userInfo:null,
msg:''
},
usernameChange: function (e) {
@@ -23,7 +24,8 @@ Page({
var postdata = {
username: that.data.username,
password: that.data.password,
- mpopenid: getApp().globalData.userInfo.mpopenid
+ mpopenid: getApp().globalData.userInfo.mpopenid,
+ userinfo: that.data.userInfo
}
wx.request({
url: getApp().globalData.serverUrl + 'bindmp',
@@ -127,11 +129,27 @@ Page({
},
onGetInfo:function(e){
+
this.setData({
userInfo:e.detail.userInfo
})
this.denglu()
},
+ getUserProfile: function(e){
+ wx.getUserProfile({
+ desc: '获取头像和昵称', //
+ success: (res) => {
+ this.setData({
+ userInfo: res.userInfo
+ })
+ this.denglu()
+ },
+ fail:(res)=>{
+ this.denglu()
+ }
+ })
+
+ },
onGetInfo2:function(e){
this.setData({
userInfo:e.detail.userInfo
diff --git a/pages/bind/binduser.wxml b/pages/bind/binduser.wxml
index e3cada6..1e79616 100644
--- a/pages/bind/binduser.wxml
+++ b/pages/bind/binduser.wxml
@@ -25,7 +25,7 @@
-
+
账号错误或忘记密码?
diff --git a/pages/examtest/rate.js b/pages/examtest/rate.js
index 0976922..987af6d 100644
--- a/pages/examtest/rate.js
+++ b/pages/examtest/rate.js
@@ -33,8 +33,8 @@ Page({
*/
onShow: function () {
var that = this;
- that.getRatelist(1)
this.data.page = 1;
+ that.getRatelist()
},
/**
@@ -56,9 +56,10 @@ Page({
*/
onPullDownRefresh: function () {
var that = this;
- that.getRatelist(1);
- wx.stopPullDownRefresh();
this.data.page = 1;
+ that.getRatelist();
+ wx.stopPullDownRefresh();
+
},
/**
@@ -77,9 +78,9 @@ Page({
onShareAppMessage: function () {
},
- getRatelist: function (page) {
+ getRatelist: function () {
var that = this;
- if (page != 1) { page = that.data.page }
+ let page = that.data.page
wx.showLoading({
title: '加载中',
}),
@@ -108,7 +109,7 @@ Page({
} else {
let list
if (page == 1) {
- list = res.data.rows.slice(0,10)
+ list = res.data.rows
} else {
list = this.data.ratelist.concat(res.data.rows)
}
diff --git a/pages/examtest/result.js b/pages/examtest/result.js
index 01898f4..7f0c8fa 100644
--- a/pages/examtest/result.js
+++ b/pages/examtest/result.js
@@ -82,8 +82,9 @@ Page({
})
},
showRate: function () {
- wx.navigateTo({
- url: 'rate?examtestid=' + this.data.examtestid,
- })
+ wx.navigateTo({
+ url: 'rate?examtestid=' + this.data.examtestid,
+ })
+
}
})
\ No newline at end of file
diff --git a/pages/totalrate/index2.js b/pages/totalrate/index2.js
index a39d2f7..26e0b7c 100644
--- a/pages/totalrate/index2.js
+++ b/pages/totalrate/index2.js
@@ -99,9 +99,9 @@ Page({
onShareAppMessage: function () {
},
- getRatelist: function (page) {
+ getRatelist: function () {
var that = this;
- if (page != 1) { page = that.data.page }
+ let page = that.data.page
wx.showLoading({
title: '加载中',
}),
@@ -113,7 +113,6 @@ Page({
},
success: res => {
if (res.statusCode === 200) {
- console.log(res.data)
if (res.data.rows.length == 0) {
if (page == 1) {
this.setData({