Commit 309d76f5 by 李萌

no message

parent 70e885fd
...@@ -293,6 +293,12 @@ Page({ ...@@ -293,6 +293,12 @@ Page({
user_answer: answer.score, user_answer: answer.score,
answer: answer.answer, answer: answer.answer,
}; };
var lb_tz = wx.getStorageSync('lb_tz');
if (lb_tz == '1') {
ndata.is_type = 0;
} else {
ndata.is_type = 1;
}
var url = Api.HOST_xlxl + 'amedical.php/gauge/pcAddData'; var url = Api.HOST_xlxl + 'amedical.php/gauge/pcAddData';
ndata.unitid = lb_descript.desc.unitid; ndata.unitid = lb_descript.desc.unitid;
ndata.uid = 6; ndata.uid = 6;
...@@ -317,81 +323,115 @@ Page({ ...@@ -317,81 +323,115 @@ Page({
flag: true flag: true
}) })
return; return;
}
var liangbiaoCon = wx.getStorageSync('liangbiaoCon');
var data1 = {};
// var urls = Api.HOST + 'wechat.php?s=Home/del_vip';
var urls = Api.HOST_xlxl + 'wechat.php?s=Home/del_vips';
var ti_title = liangbiaoCon.res[0].measure_name;
var lb_descript = wx.getStorageSync("lb_descript");
data1.g_time = lb_descript.desc.g_time || lb_descript.desc.time;
data1.measure_name = ti_title;
// data1.res_id = res;
data1.user_stime = time;
var lb_tz = wx.getStorageSync('lb_tz');
if (lb_tz == '1') {
var unitid = wx.getStorageSync("unitid");
data1.unitid = unitid;
data1.z_openid = lb_descript.desc.z_openid;
data1.t_openid = lb_descript.desc.t_openid;
data1.openid = lb_descript.desc.z_openid;
data1.is_type = 0;
// console.log(lb_descript.desc.measure_id)
data1.measure_id = lb_descript.id[0];
} else { } else {
data1.z_openid = user.openid;
data1.t_openid = lb_descript.desc.t_openid;
data1.openid = user.openid;
data1.is_type = 1;
data1.unitid = lb_descript.desc.unitid;
data1.measure_id = lb_descript.id[0];
}
Api.fetchPost(urls, data1, (err, res) => {
if (err) {
that.setData({ that.setData({
flag: true flag: true
}) })
} wx.hideLoading()
that.setData({ wx.removeStorageSync('answerData')
flag: true wx.removeStorageSync('chaTime')
}) wx.removeStorageSync('endTime')
wx.hideLoading() wx.removeStorageSync('startTime')
wx.removeStorageSync('answerData') wx.removeStorageSync('timeArr')
wx.removeStorageSync('chaTime') wx.removeStorageSync('lbCon')
wx.removeStorageSync('endTime') wx.removeStorageSync('liangbiaoCon')
wx.removeStorageSync('startTime') if (res.data.charactersStatus == 1) {
wx.removeStorageSync('timeArr') var lb_tz = wx.getStorageSync('lb_tz');
wx.removeStorageSync('lbCon') if (lb_tz == '1') {
wx.removeStorageSync('liangbiaoCon') wx.reLaunch({
// wx.removeStorageSync('lb_descript') url: '/pages/info1/info1?otype=1&otype1=1'
// console.log(res) })
} else {
if (res == 1) { var g_id = wx.getStorageSync('g_id');
var lb_tz = wx.getStorageSync('lb_tz'); wx.reLaunch({
if (lb_tz == '1') { url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`,
wx.reLaunch({ })
url: '/pages/info1/info1?otype=1&otype1=1' }
}) } else if (res.data.charactersStatus == 0) {
} else { wx.removeStorageSync('tplbDetail')
var g_id = wx.getStorageSync('g_id'); wx.removeStorageSync('weiLb')
wx.reLaunch({ wx.switchTab({
url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`, url: '/pages/record/record?lbtype=-1',
}) success: function () {
} wx.removeStorageSync('lb_descript');
} else if (res == 0) { wx.removeStorageSync('allUserinfo');
wx.removeStorageSync('tplbDetail') wx.removeStorageSync('g_id');
wx.removeStorageSync('weiLb') wx.removeStorageSync('param_t_openid');
wx.switchTab({ }
url: '/pages/record/record?lbtype=-1', })
success: function () {
wx.removeStorageSync('lb_descript');
wx.removeStorageSync('allUserinfo');
wx.removeStorageSync('g_id');
wx.removeStorageSync('param_t_openid');
} }
}) }
} // var liangbiaoCon = wx.getStorageSync('liangbiaoCon');
}) // var data1 = {};
// var urls = Api.HOST + 'wechat.php?s=Home/del_vip';
// var urls = Api.HOST_xlxl + 'wechat.php?s=Home/del_vips';
// var ti_title = liangbiaoCon.res[0].measure_name;
// var lb_descript = wx.getStorageSync("lb_descript");
// data1.g_time = lb_descript.desc.g_time || lb_descript.desc.time;
// data1.measure_name = ti_title;
// data1.res_id = res;
// data1.user_stime = time;
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// var unitid = wx.getStorageSync("unitid");
// data1.unitid = unitid;
// data1.z_openid = lb_descript.desc.z_openid;
// data1.t_openid = lb_descript.desc.t_openid;
// data1.openid = lb_descript.desc.z_openid;
// data1.is_type = 0;
// // console.log(lb_descript.desc.measure_id)
// data1.measure_id = lb_descript.id[0];
// } else {
// data1.z_openid = user.openid;
// data1.t_openid = lb_descript.desc.t_openid;
// data1.openid = user.openid;
// data1.is_type = 1;
// data1.unitid = lb_descript.desc.unitid;
// data1.measure_id = lb_descript.id[0];
// }
// Api.fetchPost(urls, data1, (err, res) => {
// if (err) {
// that.setData({
// flag: true
// })
// }
// that.setData({
// flag: true
// })
// wx.hideLoading()
// wx.removeStorageSync('answerData')
// wx.removeStorageSync('chaTime')
// wx.removeStorageSync('endTime')
// wx.removeStorageSync('startTime')
// wx.removeStorageSync('timeArr')
// wx.removeStorageSync('lbCon')
// wx.removeStorageSync('liangbiaoCon')
// if (res == 1) {
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// wx.reLaunch({
// url: '/pages/info1/info1?otype=1&otype1=1'
// })
// } else {
// var g_id = wx.getStorageSync('g_id');
// wx.reLaunch({
// url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`,
// })
// }
// } else if (res == 0) {
// wx.removeStorageSync('tplbDetail')
// wx.removeStorageSync('weiLb')
// wx.switchTab({
// url: '/pages/record/record?lbtype=-1',
// success: function () {
// wx.removeStorageSync('lb_descript');
// wx.removeStorageSync('allUserinfo');
// wx.removeStorageSync('g_id');
// wx.removeStorageSync('param_t_openid');
// }
// })
// }
// })
}) })
} }
}, },
......
...@@ -377,40 +377,39 @@ Page({ ...@@ -377,40 +377,39 @@ Page({
} }
}, },
local() { // local() {
var that = this // var that = this
var data = wx.getStorageSync('data'); // var data = wx.getStorageSync('data');
if (!data) { // if (!data) {
this.main(); // this.main();
} // }
var BMap = new bmap.BMapWX({ // var BMap = new bmap.BMapWX({
ak: 'ex35RMokKmaz0qyifXBl88IClsom3IdZ' // ak: 'ex35RMokKmaz0qyifXBl88IClsom3IdZ'
}); // });
var str = ''; // var str = '';
wx.getLocation({ // wx.getLocation({
type: 'wgs84', // type: 'wgs84',
success: function (res) { // success: function (res) {
var latitude = res.latitude // var latitude = res.latitude
var longitude = res.longitude // var longitude = res.longitude
var str = latitude + ',' + longitude // var str = latitude + ',' + longitude
BMap.regeocoding({ // BMap.regeocoding({
// fail: fail, // location: str,
location: str, // success: function (res) {
success: function (res) { // var s = res.originalData.result.addressComponent.city;
var s = res.originalData.result.addressComponent.city; // that.register(s)
that.register(s) // },
}, // fail: function () {
fail: function () { // console.log('解析地址失败')
console.log('解析地址失败') // }
} // });
}); // },
}, // fail: function () {
fail: function () { // let str = ''
let str = '' // that.register(str);
that.register(str); // }
} // })
}) // },
},
queding: function () { queding: function () {
var data = wx.getStorageSync('data'); var data = wx.getStorageSync('data');
if (!data) { if (!data) {
......
...@@ -496,13 +496,10 @@ Page({ ...@@ -496,13 +496,10 @@ Page({
} }
wx.setStorageSync("judgeSex", judgeSex); wx.setStorageSync("judgeSex", judgeSex);
wx.setStorageSync("allUserinfo", data); wx.setStorageSync("allUserinfo", data);
// Api.fetchPost(urlt, data, (err, res) => {
wx.hideLoading() wx.hideLoading()
clearTimeout(timer1) clearTimeout(timer1)
// if (res.ret == 1) {
if (that.data.otype == 0 && that.data.lb_tz == '-1') { if (that.data.otype == 0 && that.data.lb_tz == '-1') {
wx.navigateTo({ wx.navigateTo({
// url: '/pages/swiper/swiper?otype=11',
url: '/pages/dati04/dati04?otype=11', url: '/pages/dati04/dati04?otype=11',
success: function () { success: function () {
wx.hideLoading() wx.hideLoading()
...@@ -588,15 +585,6 @@ Page({ ...@@ -588,15 +585,6 @@ Page({
} }
}) })
} }
// } else {
// Api.alert(res.msg, function () {
// that.setData({
// payInfo: true
// })
// });
// }
// });
} }
} }
}) })
......
...@@ -152,7 +152,7 @@ Page({ ...@@ -152,7 +152,7 @@ Page({
* a 接受的参数 数组 * a 接受的参数 数组
**/ **/
dealData(a) { dealData(a) {
console.log(a, 'a') // console.log(a, 'a')
let classification = [] let classification = []
let arr1 = []; let arr1 = [];
for (var i in a) { for (var i in a) {
...@@ -180,7 +180,7 @@ Page({ ...@@ -180,7 +180,7 @@ Page({
if (arr1[i].arr.length != 0) { if (arr1[i].arr.length != 0) {
arr2.push(arr1[i]) arr2.push(arr1[i])
} }
console.log(arr2,"arr2s") // console.log(arr2,"arr2s")
this.setData({ this.setData({
arr: arr2, arr: arr2,
}) })
......
...@@ -57,14 +57,14 @@ function formatNumber(n) { ...@@ -57,14 +57,14 @@ function formatNumber(n) {
return n[1] ? n : '0' + n return n[1] ? n : '0' + n
} }
function getLoc(callback) { // function getLoc(callback) {
wx.getLocation({ // wx.getLocation({
type: 'wgs84', // type: 'wgs84',
success: function (res) { // success: function (res) {
callback(res) // callback(res)
} // }
}) // })
} // }
function stripTags(str, r_str = "") { function stripTags(str, r_str = "") {
//去掉所有的html标记 //去掉所有的html标记
...@@ -358,7 +358,7 @@ function validateIdCard(idCard) { ...@@ -358,7 +358,7 @@ function validateIdCard(idCard) {
module.exports = { module.exports = {
base64src:base64src, base64src:base64src,
formatTime: formatTime, formatTime: formatTime,
getLoc: getLoc, // getLoc: getLoc,
stripTags: stripTags, stripTags: stripTags,
imageUtil: imageUtil, imageUtil: imageUtil,
Base64: Base64, Base64: Base64,
......
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