Commit 69cbf090 by biao

1111

parent 4f711408
......@@ -33,6 +33,7 @@ $userMst = $userList[0];
$result["name"] = $userMst->name;
$result["headerImg"] = $userMst->header_img;
$result["abilityPoint"] = $userMst->ability_point;
$result["age"] = $userMst->child_age;
$result["servicePoint"] = $userMst->service_point;
ErrorLogger::doOutput("Compass...ajax_get_my_top_dat.php....End.", 0);
......
......@@ -4,7 +4,7 @@
require_once ("../user_include.inc");
$unionId = ParamUtil::getRequestString("unionId", 0);
$age = ParamUtil::getRequestNumber("age", 1);
$age = ParamUtil::getRequestNumber("age", 0);
ErrorLogger::doOutput("Compass...ajax_update_user_age.php....Start.", 0);
ErrorLogger::doOutput("Compass...ajax_update_user_age.php....unionId=" . $unionId, 0);
......@@ -17,12 +17,6 @@ if(empty($unionId)) {
responseNG($result);
}
//年龄段参数
$tmpObj = ChildAgeRange::getById($age);
if(empty($tmpObj)) {
responseNG("参数错误!");
}
//检索用户是否存在
$param['unionid'] = $unionId;
$param['delete_flg'] = false;
......@@ -39,7 +33,7 @@ ErrorLogger::doOutput("Compass...ajax_update_user_age.php....End.", 0);
$result["recommend"] = false;
//已经是会员不用购买
if($userMst.is_member==false && ($userMst.role==1 || $userMst.role==2 || $userMst.role==3|| $userMst.role==5|| $userMst.role==6)) {
if($user->is_member==false && ($user->role==1 || $user->role==2 || $user->role==3|| $user->role==5|| $user->role==6)) {
$result["recommend"] = true;
}
$result["message"] = "更新成功!";
......
......@@ -6,13 +6,20 @@ Page({
* 页面的初始数据
*/
data: {
age:1
age:1,
frommy:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (options && options.frommy) {
this.setData({
frommy: options.frommy,
age: options.age,
})
}
},
/**
......
......@@ -5,6 +5,7 @@
<text>请选择您的孩子的年龄段</text>
<view style="background:{{age==1?'#3AAB69':'#fff'}}" bindtap='selectAge' data-index="1">3~6岁</view>
<view style="background:{{age==2?'#3AAB69':'#fff'}}" bindtap='selectAge' data-index="2">7岁以上</view>
<view style="background:{{age==0?'#3AAB69':'#fff'}}" bindtap='selectAge' data-index="0">暂不选择</view>
<view class='button' style='border:none'>
<view style="width:100%;height:100%;background:#0D76ED;color:#fff" bindtap="updateAge">提交</view>
</view>
......
......@@ -8,13 +8,28 @@ Page({
data: {
active: 2,
name:'',
headerImg:''
headerImg:'',
age:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function () {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
var that = this;
var config = wx.getStorageSync('config');
wx.request({
......@@ -29,8 +44,9 @@ Page({
console.log(res)
if (res.statusCode == 200) {
that.setData({
name:res.data.result.name,
headerImg:res.data.result.headerImg
name: res.data.result.name,
headerImg: res.data.result.headerImg,
age: res.data.result.age,
})
}
},
......@@ -40,20 +56,6 @@ Page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
......@@ -92,6 +94,11 @@ Page({
title: '我的证书'
})
},
ageChange() {
wx: wx.navigateTo({
url: '../ageChange/ageChange?frommy=1&age=' + this.data.age
})
},
quanzi(){
wx.reLaunch({
url: '../circle/circle',
......
......@@ -31,6 +31,13 @@
</view>
<text></text>
</view>
<view class='con_mineList' bindtap='ageChange'>
<image src='../../img/huodong.png'></image>
<view>
服务年龄<image src='../../img/left.png'></image>
</view>
<text></text>
</view>
<view class='con_mineList' bindtap='xiaoxi'>
<image src='../../img/xiaoxi.png'></image>
<view>
......
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 to comment