仓库地址修改
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
spinShow: false,
|
||||
userName: '',
|
||||
password: '',
|
||||
},
|
||||
formSubmit: function(e) {
|
||||
let _this = this
|
||||
_this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
wx.login({
|
||||
success(wxres) {
|
||||
if (wxres.code) {
|
||||
e.detail.value.code = wxres.code
|
||||
app.formPost('/api/wx/student/auth/bind', e.detail.value)
|
||||
.then(res => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
if (res.code == 1) {
|
||||
wx.setStorageSync('token', res.response)
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
});
|
||||
} else {
|
||||
app.message(res.message, 'error')
|
||||
}
|
||||
}).catch(e => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
app.message(e, 'error')
|
||||
})
|
||||
} else {
|
||||
app.message(res.errMsg, 'error')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
register: function(e) {
|
||||
wx.navigateTo({
|
||||
url: "../register/index"
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"i-button": "/component/iView/button/index",
|
||||
"i-panel": "/component/iView/panel/index",
|
||||
"i-input": "/component/iView/input/index",
|
||||
"i-message": "/component/iView/message/index",
|
||||
"i-spin": "/component/iView/spin/index"
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<!--pages/user/bind/index.wxml-->
|
||||
<view class="card-image-container">
|
||||
<image src="/assets/logo2.png" style="width:175px;height:147px"></image>
|
||||
</view>
|
||||
|
||||
<form bindsubmit='formSubmit'>
|
||||
<i-panel title="用户名">
|
||||
<i-input value="{{ userName }}" name="userName" maxlength="-1" />
|
||||
</i-panel>
|
||||
|
||||
<i-panel title="密码">
|
||||
<i-input value="{{ password }}" name="password" maxlength="-1" />
|
||||
</i-panel>
|
||||
|
||||
<view>
|
||||
<button class="i-btn i-btn- i-btn-primary i-btn-square" form-type='submit'>登录</button>
|
||||
</view>
|
||||
<view style="padding:font-size: 26rpx;color: #606266;padding: 20rpx 50rpx;">
|
||||
学之思是一款学校考试系统,仅供学校内部学生使用,需要提供账号密码。没有账号?
|
||||
<text bindtap="register" style="color:#4399fc">马上注册</text>
|
||||
</view>
|
||||
<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
|
||||
</form>
|
||||
|
||||
<i-message id="message" />
|
||||
@@ -1,7 +0,0 @@
|
||||
/* pages/user/bind/index.wxss */
|
||||
|
||||
.card-image-container {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
Reference in New Issue
Block a user