Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
XAMJW-Hospita
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wechatminiprogram
XAMJW-Hospita
Commits
309d76f5
Commit
309d76f5
authored
Apr 18, 2024
by
李萌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
70e885fd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
454 additions
and
236 deletions
+454
-236
pages/dati/dati.js
+80
-40
pages/dati03/dati03.js
+94
-52
pages/dati04/dati04.js
+0
-0
pages/dati05/dati05.js
+124
-49
pages/dati06/dati06.js
+0
-0
pages/dati08/dati08.js
+112
-38
pages/fenxiang/fenxiang.js
+33
-34
pages/info/info.js
+0
-12
pages/liangbiao/liangbiao.js
+2
-2
utils/util.js
+9
-9
No files found.
pages/dati/dati.js
View file @
309d76f5
...
...
@@ -293,6 +293,12 @@ Page({
user_answer
:
answer
.
score
,
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'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
...
...
@@ -317,41 +323,7 @@ Page({
flag
:
true
})
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
{
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
})
...
...
@@ -363,10 +335,7 @@ Page({
wx
.
removeStorageSync
(
'timeArr'
)
wx
.
removeStorageSync
(
'lbCon'
)
wx
.
removeStorageSync
(
'liangbiaoCon'
)
// wx.removeStorageSync('lb_descript')
// console.log(res)
if
(
res
==
1
)
{
if
(
res
.
data
.
charactersStatus
==
1
)
{
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
wx
.
reLaunch
({
...
...
@@ -378,7 +347,7 @@ Page({
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
})
}
}
else
if
(
re
s
==
0
)
{
}
else
if
(
res
.
data
.
charactersStatu
s
==
0
)
{
wx
.
removeStorageSync
(
'tplbDetail'
)
wx
.
removeStorageSync
(
'weiLb'
)
wx
.
switchTab
({
...
...
@@ -391,7 +360,78 @@ Page({
}
})
}
})
}
// 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');
// }
// })
// }
// })
})
}
},
...
...
pages/dati03/dati03.js
View file @
309d76f5
...
...
@@ -72,7 +72,7 @@ Page({
var
num
=
e
.
currentTarget
.
dataset
.
num
;
var
answer
=
e
.
currentTarget
.
dataset
.
answer
;
var
score
=
e
.
currentTarget
.
dataset
.
score
;
console
.
log
(
num
,
'idnidnidn'
)
//
console.log(num, 'idnidnidn')
this
.
setData
({
num
:
num
})
...
...
@@ -104,13 +104,13 @@ Page({
},
next
:
function
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
let
that
=
this
;
var
lb_rw
=
wx
.
getStorageSync
(
'lb_rw'
);
var
answerData_rw
=
wx
.
getStorageSync
(
'answerData_rw'
);
if
(
lb_rw
.
length
<=
answerData_rw
.
score
.
length
)
{
console
.
log
(
this
.
data
.
num
<
lb_rw
.
length
,
'1'
)
//
console.log(this.data.num < lb_rw.length, '1')
if
(
this
.
data
.
num
<
lb_rw
.
length
)
{
var
len
=
lb_rw
[
e
].
answer
.
length
==
6
?
1
:
2
;
this
.
setData
({
...
...
@@ -162,19 +162,12 @@ Page({
}
var
thisTime
=
Date
.
parse
(
new
Date
());
var
cha
=
thisTime
-
startTime2
+
chaTime2
;
console
.
log
(
cha
,
'cha'
)
//
console.log(cha, 'cha')
var
time
=
Api
.
reversalTime
(
cha
)
console
.
log
(
time
,
'time'
)
//
console.log(time, 'time')
var
liangbiaoCon
=
wx
.
getStorageSync
(
'liangbiaoCon'
);
var
answer
=
wx
.
getStorageSync
(
'answerData_rw'
);
var
lb_descript
=
wx
.
getStorageSync
(
'lb_descript'
);
// if (liangbiaoCon.talp == '1') {
// var data = { user_stime: time, user_answer: answer.score, answer: answer.answer, user_number: user.openid, measure_id: lb_descript.id[0], };
// var url = Api.HOST_xinli + 'xinli/index.php/Api/add_res';
// } else {
// var data = { user_stime: time, user_answer: answer.score, answer: answer.answer, user_number: user.openid, measure_id: lb_descript.id[0], };
// var url = Api.HOST_xinli + 'xinli/index.php/Api/add_res';
// }
var
user
=
wx
.
getStorageSync
(
'user'
);
var
ndata
=
{
measure_id
:
lb_descript
.
id
[
0
],
...
...
@@ -184,7 +177,13 @@ Page({
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
};
var
url
=
Api
.
HOST_huaiji
+
'amedical.php/gauge/pcAddData'
;
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'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
ndata
.
submit_type
=
2
;
...
...
@@ -208,40 +207,7 @@ Page({
flag
:
true
})
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
;
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
})
...
...
@@ -252,10 +218,7 @@ Page({
wx
.
removeStorageSync
(
'timeArr2'
)
wx
.
removeStorageSync
(
'lbCon'
)
wx
.
removeStorageSync
(
'liangbiaoCon'
)
console
.
log
(
res
)
if
(
res
==
1
)
{
if
(
res
.
data
.
charactersStatus
==
1
)
{
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
wx
.
reLaunch
({
...
...
@@ -273,7 +236,7 @@ Page({
}
})
}
}
else
if
(
re
s
==
0
)
{
}
else
if
(
res
.
data
.
charactersStatu
s
==
0
)
{
wx
.
removeStorageSync
(
'tplbDetail'
)
wx
.
removeStorageSync
(
'weiLb'
)
wx
.
reLaunch
({
...
...
@@ -287,7 +250,86 @@ Page({
}
})
}
})
}
// 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;
// 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.removeStorageSync('answerData_rw')
// wx.removeStorageSync('chaTime2')
// wx.removeStorageSync('endTime')
// wx.removeStorageSync('startTime2')
// wx.removeStorageSync('timeArr2')
// wx.removeStorageSync('lbCon')
// wx.removeStorageSync('liangbiaoCon')
// console.log(res)
// if (res == 1) {
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// wx.reLaunch({
// url: '/pages/info1/info1?otype=1&otype1=1',
// success: function () {
// that.setData({ flag: true })
// }
// })
// } else {
// var g_id = wx.getStorageSync('g_id');
// wx.reLaunch({
// url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`,
// success: function () {
// that.setData({ flag: true })
// }
// })
// }
// } else if (res == 0) {
// wx.removeStorageSync('tplbDetail')
// wx.removeStorageSync('weiLb')
// wx.reLaunch({
// url: '/pages/record/record?lbtype=-1',
// success: function () {
// that.setData({ flag: true })
// wx.removeStorageSync('lb_descript');
// wx.removeStorageSync('allUserinfo');
// wx.removeStorageSync('g_id');
// wx.removeStorageSync('param_t_openid');
// }
// })
// }
// })
})
}
},
...
...
pages/dati04/dati04.js
View file @
309d76f5
This diff is collapsed.
Click to expand it.
pages/dati05/dati05.js
View file @
309d76f5
...
...
@@ -528,6 +528,12 @@ Page({
user_answer
:
answer
.
score
,
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'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
...
...
@@ -552,58 +558,18 @@ Page({
if
(
Number
(
res
)
==
0
)
{
Api
.
alert
(
"提交失败,请重新提交。"
)
return
;
}
if
(
Number
(
res
.
code
)
==
-
1
)
{
}
else
if
(
Number
(
res
.
code
)
==
-
1
)
{
wx
.
hideLoading
();
Api
.
alert
(
res
.
msg
)
that
.
setData
({
flag
:
true
})
return
;
}
var
swiper_arr
=
wx
.
getStorageSync
(
'swiper_arr'
);
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
=
swiper_arr
[
0
].
measure_name
;
var
lb_descript
=
wx
.
getStorageSync
(
"lb_descript"
);
var
authorize
=
wx
.
getStorageSync
(
'weiLb'
);
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
;
data1
.
characters_id
=
authorize
.
characters_id
?
authorize
.
characters_id
:
authorize
.
record_id
;
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
var
unitid
=
wx
.
getStorageSync
(
"unitid"
);
var
tp_characters_id
=
wx
.
getStorageSync
(
"tplbDetail"
);
data1
.
unitid
=
unitid
;
data1
.
characters_id
=
tp_characters_id
.
g_id
;
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
;
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
];
}
// clearTimeout(timer)
Api
.
fetchPost
(
urls
,
data1
,
(
err
,
res
)
=>
{
if
(
err
)
{
that
.
setData
({
flag
:
true
})
}
that
.
setData
({
flag
:
true
})
if
(
res
==
1
||
res
==
0
)
{
if
(
res
.
data
.
charactersStatus
==
1
||
res
.
data
.
charactersStatus
==
0
)
{
wx
.
removeStorageSync
(
'answer_swiper'
)
wx
.
removeStorageSync
(
'swiper_arr'
)
wx
.
removeStorageSync
(
'chaTime'
)
...
...
@@ -612,7 +578,6 @@ Page({
wx
.
removeStorageSync
(
'timeArr'
)
wx
.
removeStorageSync
(
'lb_swiper_con'
)
wx
.
hideLoading
();
}
else
{
wx
.
hideLoading
()
wx
.
showToast
({
...
...
@@ -621,8 +586,7 @@ Page({
duration
:
2000
})
}
if
(
res
==
1
)
{
// clearTimeout(timer)
if
(
res
.
data
.
charactersStatus
==
1
)
{
wx
.
showToast
({
title
:
'上传成功'
,
icon
:
'success'
,
...
...
@@ -652,8 +616,7 @@ Page({
})
}
},
2000
)
}
else
if
(
res
==
0
)
{
// clearTimeout(timer)
}
else
if
(
res
.
data
.
charactersStatus
==
0
)
{
wx
.
showToast
({
title
:
'上传成功'
,
icon
:
'success'
,
...
...
@@ -663,7 +626,6 @@ Page({
wx
.
removeStorageSync
(
'tplbDetail'
)
wx
.
removeStorageSync
(
'weiLb'
)
wx
.
reLaunch
({
// url: '/pages/end/end?lbtype=-1',
url
:
'/pages/record/record'
,
success
:
function
()
{
that
.
setData
({
...
...
@@ -677,7 +639,120 @@ Page({
})
},
2000
)
}
})
}
// var swiper_arr = wx.getStorageSync('swiper_arr');
// var data1 = {};
// var urls = Api.HOST_xlxl + 'wechat.php?s=Home/del_vips';
// var ti_title = swiper_arr[0].measure_name;
// var lb_descript = wx.getStorageSync("lb_descript");
// var authorize = wx.getStorageSync('weiLb');
// data1.g_time = lb_descript.desc.g_time || lb_descript.desc.time;
// data1.measure_name = ti_title;
// data1.user_stime = time;
// data1.characters_id = authorize.characters_id ? authorize.characters_id : authorize.record_id;
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// var unitid = wx.getStorageSync("unitid");
// var tp_characters_id = wx.getStorageSync("tplbDetail");
// data1.unitid = unitid;
// data1.characters_id = tp_characters_id.g_id;
// 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;
// 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
// })
// if (res == 1 || res == 0) {
// wx.removeStorageSync('answer_swiper')
// wx.removeStorageSync('swiper_arr')
// wx.removeStorageSync('chaTime')
// wx.removeStorageSync('endTime')
// wx.removeStorageSync('startTime')
// wx.removeStorageSync('timeArr')
// wx.removeStorageSync('lb_swiper_con')
// wx.hideLoading();
// } else {
// wx.hideLoading()
// wx.showToast({
// title: '请稍后再试',
// icon: 'none',
// duration: 2000
// })
// }
// if (res == 1) {
// // clearTimeout(timer)
// wx.showToast({
// title: '上传成功',
// icon: 'success',
// duration: 2000
// })
// wx.removeStorageSync('canvas')
// setTimeout(function () {
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// wx.reLaunch({
// url: '/pages/info1/info1?otype=1&otype1=1',
// success: function () {
// that.setData({
// flag: true
// })
// }
// })
// } else {
// var g_id = wx.getStorageSync('g_id');
// wx.reLaunch({
// url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`,
// success: function () {
// that.setData({
// flag: true
// })
// }
// })
// }
// }, 2000)
// } else if (res == 0) {
// // clearTimeout(timer)
// wx.showToast({
// title: '上传成功',
// icon: 'success',
// duration: 2000
// })
// setTimeout(function () {
// wx.removeStorageSync('tplbDetail')
// wx.removeStorageSync('weiLb')
// wx.reLaunch({
// // url: '/pages/end/end?lbtype=-1',
// url: '/pages/record/record',
// success: function () {
// that.setData({
// flag: true
// })
// wx.removeStorageSync('lb_descript');
// wx.removeStorageSync('allUserinfo');
// wx.removeStorageSync('g_id');
// wx.removeStorageSync('param_t_openid');
// }
// })
// }, 2000)
// }
// })
})
}
},
...
...
pages/dati06/dati06.js
View file @
309d76f5
This diff is collapsed.
Click to expand it.
pages/dati08/dati08.js
View file @
309d76f5
...
...
@@ -7,6 +7,7 @@ import {
sendAnswerOption
}
from
'../../utils/scale/dati08.js'
import
datiTestData
from
'../../utils/scale/dati08TestData'
var
Api
=
require
(
'../../utils/api.js'
);
Page
({
data
:
{
currentIndex
:
0
,
...
...
@@ -309,6 +310,12 @@ Page({
user_answer
:
sendDataScore
,
answer
:
sendDataOption
,
};
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'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
...
...
@@ -328,8 +335,7 @@ Page({
var
formdata
=
wx
.
getStorageSync
(
'allUserinfo'
);
let
newdata
=
Object
.
assign
({...
ndata
,...
formdata
});
newdata
=
this
.
removeEmptyProperties
(
newdata
);
// var url = HOST_xinli + 'xinli/index.php/Api/add_res';
fetchPostN
(
url
,
data
,(
err
,
res
)
=>
{
fetchPostN
(
url
,
newdata
,(
err
,
res
)
=>
{
clearTimeout
(
uploadData
);
if
(
+
res
==
0
)
{
wx
.
showModal
({
...
...
@@ -337,45 +343,15 @@ Page({
title
:
"提交失败,请重新提交。"
})
return
;
}
if
(
Number
(
res
.
code
)
==
-
1
)
{
}
else
if
(
Number
(
res
.
code
)
==
-
1
)
{
wx
.
hideLoading
();
Api
.
alert
(
res
.
msg
)
that
.
setData
({
flag
:
true
})
return
;
}
var
data1
=
{};
var
ti_title
=
this
.
data
.
scaleData
.
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
=
user_stime
;
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
;
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
];
}
// var urls = HOST + 'wechat.php?s=Home/del_vip'
var
urls
=
Api
.
HOST_xlxl
+
'wechat.php?s=Home/del_vips'
fetchPost
(
urls
,
data1
,(
err
,
res
)
=>
{
if
(
res
==
1
||
res
==
0
)
{
if
(
res
.
data
.
charactersStatus
==
1
||
res
.
data
.
charactersStatus
==
0
)
{
wx
.
removeStorageSync
(
'lb_swiper_con'
);
//删除答题记录缓存
wx
.
removeStorageSync
(
'answerRecordCache05'
)
...
...
@@ -393,8 +369,7 @@ Page({
flag
:
true
})
}
if
(
res
==
1
)
{
// clearTimeout(timer)
if
(
res
.
data
.
charactersStatus
==
1
)
{
wx
.
showToast
({
title
:
'上传成功'
,
icon
:
'success'
,
...
...
@@ -423,7 +398,7 @@ Page({
})
}
},
2000
)
}
else
if
(
re
s
==
0
)
{
}
else
if
(
res
.
data
.
charactersStatu
s
==
0
)
{
wx
.
showToast
({
title
:
'上传成功'
,
icon
:
'success'
,
...
...
@@ -448,7 +423,106 @@ Page({
}
else
{
}
})
}
// var data1 = {};
// var ti_title = this.data.scaleData.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.user_stime = user_stime;
// 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;
// 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];
// }
// var urls = Api.HOST_xlxl + 'wechat.php?s=Home/del_vips'
// fetchPost(urls,data1,(err,res)=>{
// if (res == 1 || res == 0) {
// wx.removeStorageSync('lb_swiper_con');
// //删除答题记录缓存
// wx.removeStorageSync('answerRecordCache05')
// //删除计时
// wx.removeStorageSync('takeTime05')
// wx.hideLoading();
// }else {
// wx.hideLoading()
// wx.showToast({
// title: '请稍后再试',
// icon: 'none',
// duration: 2000
// })
// that.setData({
// flag: true
// })
// }
// if (res == 1) {
// // clearTimeout(timer)
// wx.showToast({
// title: '上传成功',
// icon: 'success',
// duration: 2000
// })
// setTimeout(function () {
// var lb_tz = wx.getStorageSync('lb_tz');
// if (lb_tz == '1') {
// wx.reLaunch({
// url: '/pages/info1/info1?otype=1&otype1=1',
// success: function () {
// that.setData({
// flag: true
// })
// }
// })
// } else {
// var g_id = wx.getStorageSync('g_id');
// wx.reLaunch({
// url: `/pages/info/info?otype=1&otype1=1&ishow=1&g_id=${g_id}`,
// success: function () {
// that.setData({
// flag: true
// })
// }
// })
// }
// }, 2000)
// } else if (res == 0) {
// wx.showToast({
// title: '上传成功',
// icon: 'success',
// duration: 2000
// })
// setTimeout(function () {
// wx.removeStorageSync('tplbDetail')
// wx.removeStorageSync('weiLb')
// wx.reLaunch({
// url: '/pages/record/record',
// success: function () {
// that.setData({
// flag: true
// })
// wx.removeStorageSync('lb_descript');
// wx.removeStorageSync('allUserinfo');
// wx.removeStorageSync('g_id');
// wx.removeStorageSync('param_t_openid');
// }
// })
// }, 2000)
// } else {
// }
// })
})
}
},
...
...
pages/fenxiang/fenxiang.js
View file @
309d76f5
...
...
@@ -377,40 +377,39 @@ Page({
}
},
local
()
{
var
that
=
this
var
data
=
wx
.
getStorageSync
(
'data'
);
if
(
!
data
)
{
this
.
main
();
}
var
BMap
=
new
bmap
.
BMapWX
({
ak
:
'ex35RMokKmaz0qyifXBl88IClsom3IdZ'
});
var
str
=
''
;
wx
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
var
latitude
=
res
.
latitude
var
longitude
=
res
.
longitude
var
str
=
latitude
+
','
+
longitude
BMap
.
regeocoding
({
// fail: fail,
location
:
str
,
success
:
function
(
res
)
{
var
s
=
res
.
originalData
.
result
.
addressComponent
.
city
;
that
.
register
(
s
)
},
fail
:
function
()
{
console
.
log
(
'解析地址失败'
)
}
});
},
fail
:
function
()
{
let
str
=
''
that
.
register
(
str
);
}
})
},
// local() {
// var that = this
// var data = wx.getStorageSync('data');
// if (!data) {
// this.main();
// }
// var BMap = new bmap.BMapWX({
// ak: 'ex35RMokKmaz0qyifXBl88IClsom3IdZ'
// });
// var str = '';
// wx.getLocation({
// type: 'wgs84',
// success: function (res) {
// var latitude = res.latitude
// var longitude = res.longitude
// var str = latitude + ',' + longitude
// BMap.regeocoding({
// location: str,
// success: function (res) {
// var s = res.originalData.result.addressComponent.city;
// that.register(s)
// },
// fail: function () {
// console.log('解析地址失败')
// }
// });
// },
// fail: function () {
// let str = ''
// that.register(str);
// }
// })
// },
queding
:
function
()
{
var
data
=
wx
.
getStorageSync
(
'data'
);
if
(
!
data
)
{
...
...
pages/info/info.js
View file @
309d76f5
...
...
@@ -496,13 +496,10 @@ Page({
}
wx
.
setStorageSync
(
"judgeSex"
,
judgeSex
);
wx
.
setStorageSync
(
"allUserinfo"
,
data
);
// Api.fetchPost(urlt, data, (err, res) => {
wx
.
hideLoading
()
clearTimeout
(
timer1
)
// if (res.ret == 1) {
if
(
that
.
data
.
otype
==
0
&&
that
.
data
.
lb_tz
==
'-1'
)
{
wx
.
navigateTo
({
// url: '/pages/swiper/swiper?otype=11',
url
:
'/pages/dati04/dati04?otype=11'
,
success
:
function
()
{
wx
.
hideLoading
()
...
...
@@ -588,15 +585,6 @@ Page({
}
})
}
// } else {
// Api.alert(res.msg, function () {
// that.setData({
// payInfo: true
// })
// });
// }
// });
}
}
})
...
...
pages/liangbiao/liangbiao.js
View file @
309d76f5
...
...
@@ -152,7 +152,7 @@ Page({
* a 接受的参数 数组
**/
dealData
(
a
)
{
console
.
log
(
a
,
'a'
)
//
console.log(a, 'a')
let
classification
=
[]
let
arr1
=
[];
for
(
var
i
in
a
)
{
...
...
@@ -180,7 +180,7 @@ Page({
if
(
arr1
[
i
].
arr
.
length
!=
0
)
{
arr2
.
push
(
arr1
[
i
])
}
console
.
log
(
arr2
,
"arr2s"
)
//
console.log(arr2,"arr2s")
this
.
setData
({
arr
:
arr2
,
})
...
...
utils/util.js
View file @
309d76f5
...
...
@@ -57,14 +57,14 @@ function formatNumber(n) {
return
n
[
1
]
?
n
:
'0'
+
n
}
function
getLoc
(
callback
)
{
wx
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
callback
(
res
)
}
})
}
//
function getLoc(callback) {
//
wx.getLocation({
//
type: 'wgs84',
//
success: function (res) {
//
callback(res)
//
}
//
})
//
}
function
stripTags
(
str
,
r_str
=
""
)
{
//去掉所有的html标记
...
...
@@ -358,7 +358,7 @@ function validateIdCard(idCard) {
module
.
exports
=
{
base64src
:
base64src
,
formatTime
:
formatTime
,
getLoc
:
getLoc
,
//
getLoc: getLoc,
stripTags
:
stripTags
,
imageUtil
:
imageUtil
,
Base64
:
Base64
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment