Commit 15f42ea0 by 梁建民

css

parent 8daa2125
......@@ -9,7 +9,7 @@
"pages/person/agreement/index",
"pages/person/successfully/index",
"pages/tab/home/home",
"pages/form/good/index",
"pages/form/good/index",
"pages/tab/good/good",
"pages/tab/price/price",
"pages/form/bj/index",
......@@ -29,7 +29,8 @@
"pages/person/certification/addcertification/index",
"pages/person/certification/certificationmanage/index",
"pages/person/company/index",
"pages/person/editcompany/index"
"pages/person/editcompany/index",
"pages/person/welfare/index"
],
"window": {
"backgroundTextStyle": "light",
......
......@@ -15,56 +15,56 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
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 () {
},
/**
......@@ -86,6 +86,9 @@ Page({
data: res.data.access_token
});
//登录环信帐号
getApp().getImUser();
wx.switchTab({
url: '/pages/tab/home/home'
});
......@@ -99,4 +102,4 @@ Page({
});
}
}
})
})
\ No newline at end of file
......@@ -229,6 +229,11 @@ Page({
data: res.data.user_id
});
//登录环信帐号
getApp().getImUser();
wx.switchTab({
url: '/pages/tab/home/home'
})
......
......@@ -36,67 +36,67 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
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 () {
},
/**
* 获取验证码
*/
getCode: function() {
getCode: function () {
let self = this;
let currentTime = this.data.currentTime;
let interval = setInterval(function() {
let interval = setInterval(function () {
currentTime--;
......@@ -120,7 +120,7 @@ Page({
/**
* 发送验证码
*/
getVerificationCode: function(e) {
getVerificationCode: function (e) {
//验证必填手机号
if (this.data.formData.mobile) {
......@@ -130,7 +130,7 @@ Page({
//是否填写了验证码
if (this.data.captcha) {
http.getData(apis.getRegistCode,'GET',{
http.getData(apis.getRegistCode, 'GET', {
captchaUuid: this.data.captchaUuid,
captcha: this.data.captcha,
mobile: this.data.formData.mobile,
......@@ -180,13 +180,13 @@ Page({
/**
* 刷新图形验证码
*/
refreshVerification: function() {
refreshVerification: function () {
this.setData({
vcode: true
});
http.getData(apis.captchaInfo,'GET',null, (res) => {
http.getData(apis.captchaInfo, 'GET', null, (res) => {
this.setData({
captchaUrl: res.captchaUrl,
captchaUuid: res.captchaUuid
......@@ -196,7 +196,7 @@ Page({
/**
* 校验字段
*/
bindinputFn: function(e) {
bindinputFn: function (e) {
let value = e.detail.value
let reg_mobile = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
let reg_pwd = /^[0-9A-Za-z]{6,}$/;
......@@ -274,7 +274,7 @@ Page({
/**
* 校验字段
*/
calcForm: function(val, type) {
calcForm: function (val, type) {
let mobile = val.mobile;
let code = val.code;
let password = val.password;
......@@ -346,7 +346,7 @@ Page({
/**
*注册
*/
formSubmit: function(e) {
formSubmit: function (e) {
if (this.calcForm(e.detail.value)) {
......@@ -355,7 +355,7 @@ Page({
loading: true
});
http.getData(apis.authRegister,'POST', e.detail.value, (res) => {
http.getData(apis.authRegister, 'POST', e.detail.value, (res) => {
if (res.err_code === 0) {
//注入token
......@@ -364,11 +364,16 @@ Page({
data: res.data.access_token
});
//登录环信帐号
getApp().getImUser();
wx.navigateTo({
url: '/pages/person/successfully/index'
});
}else if(res.err_code === 500){
} else if (res.err_code === 500) {
//图形验证码不正确的时候
this.refreshVerification();
wx.showToast({
......@@ -383,7 +388,7 @@ Page({
duration: 2000
});
}
this.setData({
disabledBtn: false,
loading: false
......@@ -394,7 +399,7 @@ Page({
/**
* 密码是否可见
*/
toggleFn: function(e) {
toggleFn: function (e) {
if (this.data['visiblePwd']) {
......@@ -412,4 +417,4 @@ Page({
}
}
})
})
\ No newline at end of file
......@@ -32,67 +32,67 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
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 () {
},
/**
* 获取验证码
*/
getCode: function() {
getCode: function () {
let self = this;
let currentTime = this.data.currentTime;
let interval = setInterval(function() {
let interval = setInterval(function () {
currentTime--;
......@@ -116,7 +116,7 @@ Page({
/**
* 发送验证码
*/
getVerificationCode: function(e) {
getVerificationCode: function (e) {
//验证必填手机号
if (this.data.formData.mobile) {
......@@ -176,7 +176,7 @@ Page({
/**
* 刷新图形验证码
*/
refreshVerification: function() {
refreshVerification: function () {
this.setData({
vcode: true
......@@ -192,24 +192,24 @@ Page({
/**
* 校验字段
*/
bindinputFn: function(e) {
bindinputFn: function (e) {
let value = e.detail.value
let reg_mobile = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
if (e.currentTarget.dataset.type == 1) {
if (value) {
this.setData({
error: true,
errorText: '请填写正确的手机号',
mobileFlag: true
});
if (reg_mobile.test(value)) {
wx.hideKeyboard();
this.setData({
'formData.mobile': value,
'formData.mobile': value,
error: false,
errorText: '',
mobileFlag: false
......@@ -245,7 +245,7 @@ Page({
/**
* 校验字段
*/
calcForm: function(val, type) {
calcForm: function (val, type) {
let mobile = val.mobile;
let code = val.code;
let reg_mobile = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
......@@ -293,7 +293,7 @@ Page({
/**
* 登录
*/
formSubmit: function(e) {
formSubmit: function (e) {
if (this.calcForm(e.detail.value)) {
......@@ -311,6 +311,9 @@ Page({
data: res.data.access_token
});
//登录环信帐号
getApp().getImUser();
wx.switchTab({
url: '/pages/tab/home/home'
})
......@@ -337,4 +340,4 @@ Page({
});
}
}
})
})
\ No newline at end of file
// pages/person/welfare/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "福利中心"
}
\ No newline at end of file
This diff could not be displayed because it is too large.
<view class="welfare" hover-class="none" hover-stop-propagation="false">
<view class="head row verCenter bothSide boxsiz">
<view class="column">
<view class="red-text">
<text class="icon iconfont iconiconxiantiaoshouji27"></text>
<text class="t1">我的红包</text>
</view>
<view class="num">
<text class="t1">10.93</text>
<text class="t2">元</text>
</view>
<view class="code-text">
<text class="t1">红包码:</text>
<text class="t2">RDD23423</text>
</view>
</view>
<view class="column">
<text class="rule">查看规则</text>
<view class="exchange row verCenter ">
<text class="t1">兑换记录</text>
<view class="t2 row verCenter rowCenter">
<text class="icon iconfont iconiconxiantiaoshouji28"></text>
<text>提现兑换</text>
</view>
</view>
</view>
</view>
<view class="list">
</view>
</view>
\ No newline at end of file
This diff could not be displayed because it is too large.
......@@ -48,7 +48,7 @@
"list": []
},
"miniprogram": {
"current": 8,
"current": 9,
"list": [
{
"id": -1,
......@@ -110,6 +110,13 @@
"id": -1,
"name": "pages/tab/me/me",
"pathName": "pages/tab/me/me",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/person/welfare/index",
"pathName": "pages/person/welfare/index",
"scene": null
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment