优化登录体验、反馈判断,新增绑定错误解决入口
在小程序加载时判断是否有学号的缓存,有就直接进入主页,没有就进入登录界面,可以增加时间判断,明天写,在个人信息页加入了绑定错误的解决入口,优化反馈判断过程。
This commit is contained in:
parent
321a3dceca
commit
1ee3712add
11
app.js
11
app.js
@ -1,5 +1,7 @@
|
||||
var daraObj=require("data/data.js")
|
||||
|
||||
import {
|
||||
DBPost
|
||||
} from 'db/DBpost.js';
|
||||
|
||||
|
||||
|
||||
@ -9,6 +11,13 @@ App({
|
||||
* 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
|
||||
*/
|
||||
onLaunch: function () {
|
||||
var dbPost = new DBPost();
|
||||
var chose = dbPost.getxuehaoData();
|
||||
if (chose) {
|
||||
wx.switchTab({
|
||||
url: 'pages/post/post'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
2
app.json
2
app.json
@ -15,7 +15,7 @@
|
||||
"pages/user/user"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#0061bf"
|
||||
"navigationBarBackgroundColor": "#003b97"
|
||||
},
|
||||
"tabBar": {
|
||||
"borderStyle": "white",
|
||||
|
@ -148,9 +148,11 @@ Page({
|
||||
console.log("qq", qqNUm_ok)
|
||||
wx.showLoading();
|
||||
wx.hideLoading();
|
||||
wx.switchTab({
|
||||
url: '../user/user'
|
||||
})
|
||||
if(qqNUm_ok&&feedBack_ok){
|
||||
wx.switchTab({
|
||||
url: '../user/user'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"navigationBarBackgroundColor": "#10aeff",
|
||||
"navigationBarBackgroundColor": "#003b97",
|
||||
"navigationBarTitleText": "反馈中心"
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
/* pages/feedBack/feedBack.wxss */
|
||||
|
||||
.w {
|
||||
width:95%;
|
||||
margin:auto;
|
||||
@ -13,7 +12,7 @@
|
||||
.top .title,.cen .title {
|
||||
height: 60rpx;
|
||||
font-size: 25rpx;
|
||||
color: #10aeff;
|
||||
color: #003b97;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
@ -34,7 +33,7 @@
|
||||
.top .chose .box1,.top .chose .box2 {
|
||||
height:60rpx;
|
||||
width:30%;
|
||||
border:1px #10aeff solid;
|
||||
border:1px #003b97 solid;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
border-radius: 6rpx;
|
||||
@ -42,13 +41,13 @@
|
||||
}
|
||||
|
||||
.top .chose .box1 {
|
||||
background-color: #10aeff;
|
||||
background-color: #003b97;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top .chose .box2 {
|
||||
background-color: #fff;
|
||||
color: #10aeff;
|
||||
color: #003b97;
|
||||
}
|
||||
|
||||
.cen {
|
||||
@ -57,7 +56,7 @@
|
||||
|
||||
.cen .item {
|
||||
height: 300rpx;
|
||||
border:1rpx #10aeff solid;
|
||||
border:1rpx #003b97 solid;
|
||||
color: #999;
|
||||
padding: 25rpx 10rpx 25rpx 10rpx;
|
||||
border-radius: 5rpx;
|
||||
@ -67,7 +66,7 @@
|
||||
|
||||
.cen .item_2 {
|
||||
height: 50rpx;
|
||||
border:1rpx #10aeff solid;
|
||||
border:1rpx #003b97 solid;
|
||||
color: #999;
|
||||
padding: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
@ -88,7 +87,7 @@
|
||||
.foot view {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
background-color: #10aeff;
|
||||
background-color: #003b97;
|
||||
border-radius: 5px;
|
||||
width:95%;
|
||||
height: 35px;
|
||||
|
@ -72,4 +72,28 @@ Page({
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
bangDingError(){
|
||||
wx.showModal({
|
||||
title: '联系客服',
|
||||
content: 'QQ:1144131090',
|
||||
confirmText: '复制',
|
||||
confirmColor: '#003b97',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.setClipboardData({
|
||||
data: '1144131090',
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log('用户点击确定')
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
@ -30,4 +30,5 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='foot' bindtap='bangDingError'>绑定错误?快速戳我!</view>
|
||||
</view>
|
@ -95,3 +95,14 @@ page{
|
||||
.kongbai{
|
||||
margin-bottom: 200rpx;
|
||||
}
|
||||
|
||||
.foot {
|
||||
font-size: 25rpx;
|
||||
color: #003b97;
|
||||
text-align: center;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
position: fixed;
|
||||
bottom: 15px;
|
||||
width:100%;
|
||||
}
|
@ -1,90 +1,92 @@
|
||||
// welcome/login/login.js
|
||||
import { DBPost } from '../../db/DBpost.js';
|
||||
import {
|
||||
DBPost
|
||||
} from '../../db/DBpost.js';
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
xuehao:0,
|
||||
|
||||
xuehao: 0,
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
onHide: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
onUnload: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
onPullDownRefresh: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
onReachBottom: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
onShareAppMessage: function() {
|
||||
|
||||
},
|
||||
zhuce:function(){
|
||||
zhuce: function() {
|
||||
wx.navigateTo({
|
||||
url: '../signin/signin'
|
||||
})
|
||||
},
|
||||
denglu: function () {
|
||||
denglu: function() {
|
||||
wx.showLoading({
|
||||
title: '登录中',
|
||||
})
|
||||
var that = this;
|
||||
var dbPost = new DBPost();
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.code) {
|
||||
wx.request({
|
||||
url: 'https://powerrain.cn/rcs/API/login.php',
|
||||
data: {
|
||||
code: res.code
|
||||
},
|
||||
success: function (result) {
|
||||
success: function(result) {
|
||||
console.log(result);
|
||||
if (result.data != null) {
|
||||
dbPost.newxuehao(result.data.xueHao);
|
||||
@ -104,7 +106,7 @@ Page({
|
||||
confirmText: '注册账号',
|
||||
cancelText: '联系客服',
|
||||
confirmColor: '#10aeff',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '../signin/signin'
|
||||
@ -116,11 +118,11 @@ Page({
|
||||
content: 'QQ:1144131090',
|
||||
confirmText: '复制',
|
||||
confirmColor: '#10aeff',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.setClipboardData({
|
||||
data: '1144131090',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
wx.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success'
|
||||
@ -138,8 +140,7 @@ Page({
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
wx.hideLoading()
|
||||
wx.switchTab({
|
||||
url: '../../pages/post/post'
|
||||
@ -162,6 +163,6 @@ Page({
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user