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
49cc3560
Commit
49cc3560
authored
Sep 08, 2023
by
李萌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
86889619
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
452 additions
and
222 deletions
+452
-222
pages/bslbrecord/bslbrecord.js
+1
-1
pages/bslbrecord/bslbrecord.wxml
+1
-1
pages/dati/dati.js
+49
-13
pages/dati03/dati03.js
+49
-17
pages/dati04/dati04.js
+2
-1
pages/dati05/dati05.js
+62
-26
pages/dati06/dati06.js
+120
-57
pages/dati08/dati08.js
+65
-26
pages/info/info.js
+17
-6
pages/info/info.wxml
+60
-62
pages/info1/info1.js
+23
-10
pages/record/record.js
+3
-2
No files found.
pages/bslbrecord/bslbrecord.js
View file @
49cc3560
...
...
@@ -75,7 +75,7 @@ Page({
}
wx
.
setStorageSync
(
'tplbDetail'
,
tplbDetail
)
wx
.
navigateTo
({
url
:
'/pages/info1/info1
'
,
url
:
'/pages/info1/info1
?paramTopenid='
+
e
.
currentTarget
.
dataset
.
topenid
,
})
},
time
(
timestamp
)
{
...
...
pages/bslbrecord/bslbrecord.wxml
View file @
49cc3560
...
...
@@ -9,7 +9,7 @@
<!-- <scroll-view scroll-y style="height: {{winH}}px;"> -->
<block>
<view class="list no_line">
<view class='record_1' wx:for="{{result}}" wx:for-item="item" bindtap='test' data-measure_id_t="{{item.measure_id_t}}" data-name="{{item.name}}" data-t_openid="{{item.t_openid}}" data-z_openid="{{item.z_openid}}" data-time="{{item.time01}}" data-t="{{item.g_time}}" data-img="{{item.headimgurl}}" data-measure_name_t="{{item.measure_name_t}}" data-idx="{{item.id}}" wx:for-index="index" wx:key="key">
<view class='record_1' wx:for="{{result}}" wx:for-item="item" bindtap='test' data-measure_id_t="{{item.measure_id_t}}" data-
topenid="{{item.t_openid}}" data-
name="{{item.name}}" data-t_openid="{{item.t_openid}}" data-z_openid="{{item.z_openid}}" data-time="{{item.time01}}" data-t="{{item.g_time}}" data-img="{{item.headimgurl}}" data-measure_name_t="{{item.measure_name_t}}" data-idx="{{item.id}}" wx:for-index="index" wx:key="key">
<view class='pho'>
<image src='{{item.headimgurl}}'></image>
<view class='t-round'>{{item.lb_num}}</view>
...
...
pages/dati/dati.js
View file @
49cc3560
...
...
@@ -277,14 +277,27 @@ Page({
var
lb_descript
=
wx
.
getStorageSync
(
'lb_descript'
);
var
liangbiaoCon
=
wx
.
getStorageSync
(
'liangbiaoCon'
);
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
var
data
=
{
user_stime
:
time
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
user_number
:
lb_descript
.
desc
.
z_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'
;
}
data
.
unitid
=
lb_descript
.
desc
.
unitid
;
// if (lb_tz == '1') {
// var data = { user_stime: time, user_answer: answer.score, answer: answer.answer, user_number: lb_descript.desc.z_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
stoUser
=
wx
.
getStorageSync
(
'user'
);
var
ndata
=
{
measure_id
:
lb_descript
.
id
[
0
],
user_stime
:
time
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
stoUser
.
openid
?
stoUser
.
openid
:
''
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
};
var
url
=
Api
.
HOST_xlxl
+
'amedical.php/gauge/pcAddData'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
ndata
.
submit_type
=
2
;
ndata
.
t_openid
=
wx
.
getStorageSync
(
'param_t_openid'
);
var
uploadData
=
setTimeout
(
function
()
{
wx
.
hideLoading
()
wx
.
showToast
({
icon
:
'none'
,
title
:
'您当前的网络不稳定,请检查网络重新提交'
,
duration
:
2000
})
...
...
@@ -292,17 +305,28 @@ Page({
flag
:
true
})
},
5000
)
Api
.
fetchPostN
(
url
,
data
,
(
err
,
res
)
=>
{
var
formdata
=
wx
.
getStorageSync
(
'allUserinfo'
);
let
newdata
=
Object
.
assign
({...
ndata
,...
formdata
});
newdata
=
this
.
removeEmptyProperties
(
newdata
);
Api
.
fetchPostN
(
url
,
newdata
,
(
err
,
res
)
=>
{
clearTimeout
(
uploadData
)
if
(
Number
(
res
.
code
)
==
-
1
)
{
wx
.
hideLoading
();
Api
.
alert
(
res
.
msg
)
that
.
setData
({
flag
:
true
})
return
;
}
var
liangbiaoCon
=
wx
.
getStorageSync
(
'liangbiaoCon'
);
var
data1
=
{};
var
urls
=
Api
.
HOST
+
'wechat.php?s=Home/del_vip'
;
// 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.res_id = res;
data1
.
user_stime
=
time
;
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
...
...
@@ -359,7 +383,10 @@ Page({
wx
.
switchTab
({
url
:
'/pages/record/record?lbtype=-1'
,
success
:
function
()
{
wx
.
removeStorageSync
(
'lb_descript'
)
wx
.
removeStorageSync
(
'lb_descript'
);
wx
.
removeStorageSync
(
'allUserinfo'
);
wx
.
removeStorageSync
(
'g_id'
);
wx
.
removeStorageSync
(
'param_t_openid'
);
}
})
}
...
...
@@ -367,6 +394,15 @@ Page({
})
}
},
removeEmptyProperties
:
function
(
obj
)
{
// 将对象转换为 [key, value] 数组
const
entries
=
Object
.
entries
(
obj
);
// 过滤掉属性值为空字符串的属性
const
filteredEntries
=
entries
.
filter
(([
key
,
value
])
=>
value
!==
""
&&
value
!=
0
&&
value
!=
'undefined'
&&
value
!=
null
&&
value
!=
'null'
&&
value
!=
'NULL'
);
// 将过滤后的数组转换回对象
const
filteredObj
=
Object
.
fromEntries
(
filteredEntries
);
return
filteredObj
;
},
/**
* 自定义函数---上一个
* 功能:返回上一个
...
...
pages/dati03/dati03.js
View file @
49cc3560
...
...
@@ -147,12 +147,9 @@ Page({
tijiao
:
function
()
{
let
that
=
this
;
if
(
this
.
data
.
flag
)
{
this
.
setData
({
flag
:
false
})
// 计算答题时间
var
startTime2
=
wx
.
getStorageSync
(
'startTime2'
);
var
timeArr2
=
wx
.
getStorageSync
(
'timeArr2'
);
...
...
@@ -170,16 +167,28 @@ Page({
console
.
log
(
time
,
'time'
)
var
liangbiaoCon
=
wx
.
getStorageSync
(
'liangbiaoCon'
);
var
answer
=
wx
.
getStorageSync
(
'answerData_rw'
);
var
user
=
wx
.
getStorageSync
(
'user'
);
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'
;
}
data
.
unitid
=
lb_descript
.
desc
.
unitid
;
// 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
],
user_stime
:
time
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
user
.
openid
?
user
.
openid
:
''
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
};
var
url
=
Api
.
HOST_huaiji
+
'amedical.php/gauge/pcAddData'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
ndata
.
submit_type
=
2
;
ndata
.
t_openid
=
wx
.
getStorageSync
(
'param_t_openid'
);
var
uploadData
=
setTimeout
(
function
()
{
wx
.
hideLoading
()
wx
.
showToast
({
icon
:
'none'
,
title
:
'您当前的网络不稳定,请检查网络重新提交'
,
duration
:
2000
})
...
...
@@ -187,17 +196,28 @@ Page({
flag
:
true
})
},
5000
)
Api
.
fetchPostN
(
url
,
data
,
(
err
,
res
)
=>
{
var
formdata
=
wx
.
getStorageSync
(
'allUserinfo'
);
let
newdata
=
Object
.
assign
({...
ndata
,...
formdata
});
newdata
=
this
.
removeEmptyProperties
(
newdata
);
Api
.
fetchPostN
(
url
,
newdata
,
(
err
,
res
)
=>
{
clearTimeout
(
uploadData
)
if
(
Number
(
res
.
code
)
==
-
1
)
{
wx
.
hideLoading
();
Api
.
alert
(
res
.
msg
)
that
.
setData
({
flag
:
true
})
return
;
}
var
liangbiaoCon
=
wx
.
getStorageSync
(
'liangbiaoCon'
);
var
data1
=
{};
var
urls
=
Api
.
HOST
+
'wechat.php?s=Home/del_vip'
;
// 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.res_id = res;
data1
.
user_stime
=
time
;
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
...
...
@@ -259,7 +279,10 @@ Page({
url
:
'/pages/record/record?lbtype=-1'
,
success
:
function
()
{
that
.
setData
({
flag
:
true
})
wx
.
removeStorageSync
(
'lb_descript'
)
wx
.
removeStorageSync
(
'lb_descript'
);
wx
.
removeStorageSync
(
'allUserinfo'
);
wx
.
removeStorageSync
(
'g_id'
);
wx
.
removeStorageSync
(
'param_t_openid'
);
}
})
}
...
...
@@ -267,6 +290,15 @@ Page({
})
}
},
removeEmptyProperties
:
function
(
obj
)
{
// 将对象转换为 [key, value] 数组
const
entries
=
Object
.
entries
(
obj
);
// 过滤掉属性值为空字符串的属性
const
filteredEntries
=
entries
.
filter
(([
key
,
value
])
=>
value
!==
""
&&
value
!=
0
&&
value
!=
'undefined'
&&
value
!=
null
&&
value
!=
'null'
&&
value
!=
'NULL'
);
// 将过滤后的数组转换回对象
const
filteredObj
=
Object
.
fromEntries
(
filteredEntries
);
return
filteredObj
;
},
preve
:
function
(
e
)
{
var
num
=
e
.
currentTarget
.
dataset
.
num
;
num
=
Number
(
num
)
-
2
;
...
...
pages/dati04/dati04.js
View file @
49cc3560
...
...
@@ -1152,7 +1152,7 @@ Page({
var
data1
=
{};
// var urls = Api.HOST + 'wechat.php?s=Home/del_vip';
var
urls
=
Api
.
HOST
+
'wechat.php?s=Home/del_vips'
;
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'
);
...
...
@@ -1261,6 +1261,7 @@ Page({
})
wx
.
removeStorageSync
(
'lb_descript'
);
wx
.
removeStorageSync
(
'allUserinfo'
);
wx
.
removeStorageSync
(
'g_id'
);
wx
.
removeStorageSync
(
'param_t_openid'
);
}
})
...
...
pages/dati05/dati05.js
View file @
49cc3560
...
...
@@ -499,27 +499,39 @@ Page({
var
lb_descript
=
wx
.
getStorageSync
(
'lb_descript'
);
var
swiper_arr
=
wx
.
getStorageSync
(
'swiper_arr'
);
var
lb_tp
=
wx
.
getStorageSync
(
'lb_tz'
)
if
(
lb_tp
==
'1'
)
{
var
data
=
{
user_stime
:
time
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
user_number
:
lb_descript
.
desc
.
z_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
],
g_id
:
wx
.
getStorageSync
(
'g_id'
)
};
var
url
=
Api
.
HOST_xinli
+
'xinli/index.php/Api/add_res'
;
}
data
.
unitid
=
lb_descript
.
desc
.
unitid
;
// if (lb_tp == '1') {
// var data = {
// user_stime: time,
// user_answer: answer.score,
// answer: answer.answer,
// user_number: lb_descript.desc.z_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],
// g_id: wx.getStorageSync('g_id')
// };
// var url = Api.HOST_xinli + 'xinli/index.php/Api/add_res';
// }
var
stoUser
=
wx
.
getStorageSync
(
'user'
);
var
ndata
=
{
measure_id
:
lb_descript
.
id
[
0
],
user_stime
:
time
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
stoUser
.
openid
?
stoUser
.
openid
:
''
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
};
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
ndata
.
submit_type
=
2
;
ndata
.
t_openid
=
wx
.
getStorageSync
(
'param_t_openid'
);
var
uploadData
=
setTimeout
(
function
()
{
wx
.
hideLoading
()
wx
.
showToast
({
...
...
@@ -531,23 +543,34 @@ Page({
flag
:
true
})
},
5000
)
Api
.
fetchPostN
(
url
,
data
,
(
err
,
res
)
=>
{
var
formdata
=
wx
.
getStorageSync
(
'allUserinfo'
);
let
newdata
=
Object
.
assign
({...
ndata
,...
formdata
});
newdata
=
this
.
removeEmptyProperties
(
newdata
);
Api
.
fetchPostN
(
url
,
newdata
,
(
err
,
res
)
=>
{
clearTimeout
(
uploadData
)
if
(
Number
(
res
)
==
0
)
{
Api
.
alert
(
"提交失败,请重新提交。"
)
return
;
}
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 + '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.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'
);
...
...
@@ -644,7 +667,10 @@ Page({
that
.
setData
({
flag
:
true
})
wx
.
removeStorageSync
(
'lb_descript'
)
wx
.
removeStorageSync
(
'lb_descript'
);
wx
.
removeStorageSync
(
'allUserinfo'
);
wx
.
removeStorageSync
(
'g_id'
);
wx
.
removeStorageSync
(
'param_t_openid'
);
}
})
},
2000
)
...
...
@@ -653,4 +679,13 @@ Page({
})
}
},
removeEmptyProperties
:
function
(
obj
)
{
// 将对象转换为 [key, value] 数组
const
entries
=
Object
.
entries
(
obj
);
// 过滤掉属性值为空字符串的属性
const
filteredEntries
=
entries
.
filter
(([
key
,
value
])
=>
value
!==
""
&&
value
!=
0
&&
value
!=
'undefined'
&&
value
!=
null
&&
value
!=
'null'
&&
value
!=
'NULL'
);
// 将过滤后的数组转换回对象
const
filteredObj
=
Object
.
fromEntries
(
filteredEntries
);
return
filteredObj
;
},
})
\ No newline at end of file
pages/dati06/dati06.js
View file @
49cc3560
This diff is collapsed.
Click to expand it.
pages/dati08/dati08.js
View file @
49cc3560
...
...
@@ -274,32 +274,46 @@ Page({
mask
:
true
});
var
user
=
wx
.
getStorageSync
(
'user'
);
var
lb_descript
=
wx
.
getStorageSync
(
'lb_descript'
);
var
lb_tp
=
wx
.
getStorageSync
(
'lb_tz'
);
var
user_stime
=
formatSeconds
(
this
.
data
.
takeTime
)
if
(
lb_tp
==
'1'
)
{
var
data
=
{
user_stime
:
user_stime
,
user_answer
:
sendDataScore
,
answer
:
sendDataOption
,
user_number
:
lb_descript
.
desc
.
z_openid
,
measure_id
:
lb_descript
.
id
[
0
]
};
}
else
{
var
data
=
{
user_stime
:
user_stime
,
user_answer
:
sendDataScore
,
answer
:
sendDataOption
,
user_number
:
user
.
openid
,
measure_id
:
lb_descript
.
id
[
0
],
g_id
:
wx
.
getStorageSync
(
'g_id'
)
};
}
//
if (lb_tp == '1') {
//
var data = {
//
user_stime: user_stime,
//
user_answer: sendDataScore,
//
answer: sendDataOption,
//
user_number: lb_descript.desc.z_openid,
//
measure_id: lb_descript.id[0]
//
};
//
} else {
//
var data = {
//
user_stime: user_stime,
//
user_answer: sendDataScore,
//
answer: sendDataOption,
//
user_number: user.openid,
//
measure_id: lb_descript.id[0],
//
g_id: wx.getStorageSync('g_id')
//
};
//
}
console
.
log
(
data
);
//
console.log(data);
data
.
unitid
=
lb_descript
.
desc
.
unitid
;
// data.unitid = lb_descript.desc.unitid;
var
user
=
wx
.
getStorageSync
(
'user'
);
var
ndata
=
{
measure_id
:
lb_descript
.
id
[
0
],
user_stime
:
user_stime
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
user
.
openid
?
user
.
openid
:
''
,
user_answer
:
sendDataScore
,
answer
:
sendDataOption
,
};
var
url
=
Api
.
HOST_xlxl
+
'amedical.php/gauge/pcAddData'
;
ndata
.
unitid
=
lb_descript
.
desc
.
unitid
;
ndata
.
uid
=
6
;
ndata
.
submit_type
=
2
;
ndata
.
t_openid
=
wx
.
getStorageSync
(
'param_t_openid'
);
var
uploadData
=
setTimeout
(()
=>
{
wx
.
hideLoading
();
wx
.
showToast
({
...
...
@@ -311,7 +325,10 @@ Page({
flag
:
true
})
},
5000
);
var
url
=
HOST_xinli
+
'xinli/index.php/Api/add_res'
;
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
)
=>
{
clearTimeout
(
uploadData
);
if
(
+
res
==
0
)
{
...
...
@@ -321,13 +338,21 @@ Page({
})
return
;
}
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.res_id = res;
data1
.
user_stime
=
user_stime
;
var
lb_tz
=
wx
.
getStorageSync
(
'lb_tz'
);
if
(
lb_tz
==
'1'
)
{
...
...
@@ -346,7 +371,8 @@ Page({
data1
.
unitid
=
lb_descript
.
desc
.
unitid
;
data1
.
measure_id
=
lb_descript
.
id
[
0
];
}
var
urls
=
HOST
+
'wechat.php?s=Home/del_vip'
// 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
)
{
...
...
@@ -411,7 +437,10 @@ Page({
that
.
setData
({
flag
:
true
})
wx
.
removeStorageSync
(
'lb_descript'
)
wx
.
removeStorageSync
(
'lb_descript'
);
wx
.
removeStorageSync
(
'allUserinfo'
);
wx
.
removeStorageSync
(
'g_id'
);
wx
.
removeStorageSync
(
'param_t_openid'
);
}
})
},
2000
)
...
...
@@ -421,5 +450,14 @@ Page({
})
})
}
}
},
removeEmptyProperties
:
function
(
obj
)
{
// 将对象转换为 [key, value] 数组
const
entries
=
Object
.
entries
(
obj
);
// 过滤掉属性值为空字符串的属性
const
filteredEntries
=
entries
.
filter
(([
key
,
value
])
=>
value
!==
""
&&
value
!=
0
&&
value
!=
'undefined'
&&
value
!=
null
&&
value
!=
'null'
&&
value
!=
'NULL'
);
// 将过滤后的数组转换回对象
const
filteredObj
=
Object
.
fromEntries
(
filteredEntries
);
return
filteredObj
;
},
})
\ No newline at end of file
pages/info/info.js
View file @
49cc3560
...
...
@@ -43,7 +43,7 @@ Page({
select4
:
0
,
select5
:
0
,
select6
:
0
,
username1
:
''
,
ask_department
:
''
,
//单位
grade
:
''
,
//年级
classGrade
:
''
,
//班级
hosiptiaFlag
:
true
,
...
...
@@ -90,6 +90,17 @@ Page({
},
onLoad
:
function
(
options
)
{
var
that
=
this
;
console
.
log
(
'options'
,
options
)
if
(
options
.
otype
&&
options
.
otype
==
'1'
)
{
console
.
log
(
options
.
otype
)
wx
.
setNavigationBarTitle
({
title
:
'测评介绍'
})
}
else
{
wx
.
setNavigationBarTitle
({
title
:
'录入信息'
})
}
var
user
=
wx
.
getStorageSync
(
"user"
);
that
.
setData
({
ishow
:
options
...
...
@@ -127,7 +138,7 @@ Page({
})
}
wx
.
setStorageSync
(
'g_id'
,
options
.
g_id
)
}
else
if
(
otype
==
'1'
)
{
}
else
if
(
otype
==
'1'
||
otype
==
'3'
)
{
wx
.
setStorageSync
(
'g_id'
,
options
.
g_id
)
that
.
setData
({
is_yzm
:
options
.
is_yzm
...
...
@@ -431,7 +442,7 @@ Page({
data
.
sheqvNumber
=
that
.
data
.
sheqvNumber
;
data
.
workNumber
=
that
.
data
.
workNumber
;
data
.
idCard
=
that
.
data
.
idCard
||
''
;
data
.
username1
=
that
.
data
.
username1
||
''
;
data
.
ask_department
=
that
.
data
.
ask_department
||
''
;
data
.
select
=
that
.
data
.
select
||
0
;
if
(
that
.
data
.
is_yzm
==
1
)
{
data
.
yzm
=
that
.
data
.
yzm
;
...
...
@@ -439,7 +450,7 @@ Page({
// 新添加学历功能
data
.
edu
=
that
.
data
.
index
||
0
;
console
.
log
(
'data'
,
data
)
if
(
data
.
name
==
''
||
data
.
name
==
'null'
||
data
.
sex
==
"null"
||
data
.
sex
==
""
||
data
.
birthday
==
''
||
data
.
birthday
==
'null'
||
data
.
edu
==
0
||
data
.
idCard
==
""
||
data
.
username1
==
""
||
data
.
select
==
0
){
if
(
data
.
name
==
''
||
data
.
name
==
'null'
||
data
.
sex
==
"null"
||
data
.
sex
==
""
||
data
.
birthday
==
''
||
data
.
birthday
==
'null'
||
data
.
edu
==
0
||
data
.
idCard
==
""
||
data
.
ask_department
==
""
||
data
.
select
==
0
){
that
.
setData
({
payInfo
:
true
})
...
...
@@ -631,7 +642,7 @@ Page({
that
.
setData
({
username
:
res
.
info
.
name
||
''
,
usernumber
:
essentialData
.
usernumber
||
''
,
username1
:
essentialData
.
username1
||
''
,
ask_department
:
essentialData
.
ask_department
||
''
,
select
:
essentialData
.
select
||
0
,
idCard
:
essentialData
.
idCard
||
''
,
index
:
res
.
info
.
cultural
||
0
,
...
...
@@ -780,7 +791,7 @@ Page({
// 单位名称
inputChange1
:
function
(
e
)
{
this
.
setData
({
username1
:
e
.
detail
.
value
,
ask_department
:
e
.
detail
.
value
,
})
},
inputChange3
:
function
(
e
)
{
...
...
pages/info/info.wxml
View file @
49cc3560
...
...
@@ -7,7 +7,8 @@
<text wx:if="{{unitid==1311}}" style="color:red;font-size:30rpx;">\n您所填写的内容绝对保密,不会对您的生活、学习、工作造成任何的影响,请您放心作答。 </text>
</view>
</view>
<view wx:if='{{hosiptiaFlag}}'>
<view hidden="{{ishow.otype == 1}}">
<view wx:if='{{hosiptiaFlag}}'>
<view class="content" wx:if='{{unitid ==1018}}'>
<view class="partyone">工号
<input type='text' placeholder='请输入您的工号' bindinput="inputjobnumber" value='{{jobnumber}}'></input>
...
...
@@ -116,7 +117,7 @@
</view>
<view class="partyone">
<block>单位名称</block>
<input type='text' placeholder='请输入' bindinput="inputChange1" value='{{
username1
}}'></input>
<input type='text' placeholder='请输入' bindinput="inputChange1" value='{{
ask_department
}}'></input>
</view>
<view class="partyone">
身份证号
...
...
@@ -176,74 +177,73 @@
value='{{workNumber}}'></input>
</view>
</view>
</view>
<view wx:else>
<view class="content">
<view class="partyone">你的姓名
<input type='text' placeholder='请输入您的姓名' bindinput="inputChange" value='{{username}}'></input>
</view>
<view class="partyone">性别
<radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for="{{items}}" wx:key="key">
<radio value="{{item.name}}" checked="{{item.name==sex?true : false}}" color='#37c0b8' />{{item.value}}
</label>
</radio-group>
</view>
<view class="partyone">年龄
<view class="section">
<picker mode="date" value="{{date}}" start="{{startTime}}" end="{{endTime}}" bindchange="bindDateChange">
<view class="">
{{date}}
<!-- <image src="../../images/down.png"></image> -->
</view>
<view wx:else>
<view class="content">
<view class="partyone">你的姓名
<input type='text' placeholder='请输入您的姓名' bindinput="inputChange" value='{{username}}'></input>
</view>
<view class="partyone">性别
<radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for="{{items}}" wx:key="key">
<radio value="{{item.name}}" checked="{{item.name==sex?true : false}}" color='#37c0b8' />{{item.value}}
</label>
</radio-group>
</view>
<view class="partyone">年龄
<view class="section">
<picker mode="date" value="{{date}}" start="{{startTime}}" end="{{endTime}}" bindchange="bindDateChange">
<view class="">
{{date}}
<!-- <image src="../../images/down.png"></image> -->
</view>
</picker>
</view>
</picker>
</view>
</view>
<view class='partyone'>年级
<view class="section">
<view class="section__title"></view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="picker">
{{array[index]}}
<view class='partyone'>年级
<view class="section">
<view class="section__title"></view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="picker">
{{array[index]}}
</view>
</picker>
</view>
</view>
<view class="partyone">父亲年龄
<input type='number' placeholder='请输入您父亲的年龄' bindinput="fage" value='{{fage}}'></input>
</view>
<view class="partyone">父亲职业
<input type='text' placeholder='请输入您父亲的职业' bindinput="foccupation" value='{{foccupation}}'></input>
</view>
<view class="partyone">父亲文化程度
<input type='text' placeholder='请输入您父亲的文化程度' bindinput="fdegree" value='{{fdegree}}'></input>
</view>
<view class="partyone">母亲年龄
<input type='number' placeholder='请输入您母亲的年龄' bindinput="mage" value='{{mage}}'></input>
</view>
<view class="partyone">母亲职业
<input type='text' placeholder='请输入您母亲的职业' bindinput="moccupation" value='{{moccupation}}'></input>
</view>
<view class="partyone">母亲文化程度
<input type='text' placeholder='请输入您母亲的文化程度' bindinput="mdegree" value='{{mdegree}}'></input>
</view>
<view class='con-box clearfix' style='margin-top: 40rpx;'>
<view class='con-box-title'>家庭类型</view>
<view class='con-box-con'>
<radio-group class="radio-group-six" bindchange="radioChangeHelp">
<label class="radio" wx:for="{{helpArr}}" wx:key="key">
<radio value="{{item.name}}" checked="{{item.name==home?true : false}}" color='#fbb040' />{{item.value}}
</label>
</radio-group>
</view>
</picker>
</view>
</view>
<view class="partyone">父亲年龄
<input type='number' placeholder='请输入您父亲的年龄' bindinput="fage" value='{{fage}}'></input>
</view>
<view class="partyone">父亲职业
<input type='text' placeholder='请输入您父亲的职业' bindinput="foccupation" value='{{foccupation}}'></input>
</view>
<view class="partyone">父亲文化程度
<input type='text' placeholder='请输入您父亲的文化程度' bindinput="fdegree" value='{{fdegree}}'></input>
</view>
<view class="partyone">母亲年龄
<input type='number' placeholder='请输入您母亲的年龄' bindinput="mage" value='{{mage}}'></input>
</view>
<view class="partyone">母亲职业
<input type='text' placeholder='请输入您母亲的职业' bindinput="moccupation" value='{{moccupation}}'></input>
</view>
<view class="partyone">母亲文化程度
<input type='text' placeholder='请输入您母亲的文化程度' bindinput="mdegree" value='{{mdegree}}'></input>
</view>
<view class='con-box clearfix' style='margin-top: 40rpx;'>
<view class='con-box-title'>家庭类型</view>
<view class='con-box-con'>
<radio-group class="radio-group-six" bindchange="radioChangeHelp">
<label class="radio" wx:for="{{helpArr}}" wx:key="key">
<radio value="{{item.name}}" checked="{{item.name==home?true : false}}" color='#fbb040' />{{item.value}}
</label>
</radio-group>
</view>
</view>
</view>
</view>
<view class="footer" bindtap="submit">
<button >开始</button>
</view>
<view class='bottom-line'></view>
</block>
<view class='model-warp' hidden="{{hidden}}">
...
...
@@ -252,7 +252,6 @@
<view class='model-txt-per model-t76'>
欢迎进入2020年度富士施乐员工心理健康体检
</view>
<view class='model-btn-per' bindtap='confirm'>确定</view>
</view>
</view>
\ No newline at end of file
pages/info1/info1.js
View file @
49cc3560
...
...
@@ -61,6 +61,12 @@ Page({
idCard
:
''
},
onLoad
:
function
(
options
)
{
if
(
options
.
g_id
)
{
wx
.
setStorageSync
(
'g_id'
,
options
.
g_id
);
}
if
(
options
.
paramTopenid
)
{
wx
.
setStorageSync
(
'param_t_openid'
,
options
.
paramTopenid
);
}
var
that
=
this
;
var
info
=
wx
.
getStorageSync
(
'tplbDetail'
);
if
(
info
.
unitid
==
737
)
{
...
...
@@ -239,16 +245,23 @@ Page({
})
},
submit
:
function
()
{
var
userOpenid
=
wx
.
getStorageSync
(
'user'
).
openid
;
if
(
userOpenid
==
''
||
userOpenid
==
'undefined'
||
userOpenid
==
null
)
{
Api
.
alert
(
"数据异常,请尝试重新进入小程序"
);
return
false
;
}
var
paramtOpenid
=
wx
.
getStorageSync
(
'param_t_openid'
);
if
(
paramtOpenid
==
''
||
paramtOpenid
==
'undefined'
||
paramtOpenid
==
null
)
{
Api
.
alert
(
"请重新扫码"
);
return
false
;
}
var
that
=
this
;
if
(
this
.
data
.
payInfo
)
{
this
.
setData
({
payInfo
:
false
})
var
unitid
=
wx
.
getStorageSync
(
'data'
).
unitid
;
// var authorize = wx.getStorageSync("weiLb");
var
urlt
=
Api
.
HOST
+
'wechat.php?s=Home/stinfo_two'
;
var
data
=
{};
var
itemData
=
wx
.
getStorageSync
(
"itemData"
);
...
...
@@ -315,10 +328,11 @@ Page({
wx
.
showLoading
({
title
:
'请稍后'
,
})
Api
.
fetchPost
(
urlt
,
data
,
(
err
,
res
)
=>
{
wx
.
setStorageSync
(
"allUserinfo"
,
data
);
// Api.fetchPost(urlt, data, (err, res) => {
wx
.
hideLoading
()
clearTimeout
(
timer1
)
if
(
res
.
ret
==
1
)
{
//
if (res.ret == 1) {
if
(
that
.
data
.
lb_tz
==
'1'
)
{
wx
.
navigateTo
({
url
:
'/pages/dati01/dati01?tplb=1'
,
...
...
@@ -342,11 +356,10 @@ Page({
}
})
}
}
else
{
Api
.
alert
(
res
.
msg
);
}
});
// } else {
// Api.alert(res.msg);
// }
// });
}
},
onUnload
()
{},
...
...
pages/record/record.js
View file @
49cc3560
...
...
@@ -68,8 +68,9 @@ Page({
})
},
lbTest
(
e
)
{
wx
.
setStorageSync
(
'param_t_openid'
,
e
.
currentTarget
.
dataset
.
t_openid
);
let
that
=
this
;
console
.
log
(
this
.
data
.
payInfo
)
//
console.log(this.data.payInfo)
if
(
this
.
data
.
payInfo
)
{
this
.
setData
({
payInfo
:
false
})
var
id
=
e
.
currentTarget
.
dataset
.
id
;
...
...
@@ -96,7 +97,7 @@ Page({
Api
.
fetchPost
(
urls
,
data2
,
(
err
,
res
)
=>
{
if
(
this
.
data
.
delbtn
==
-
1
)
{
wx
.
navigateTo
({
url
:
'/pages/info/info?otype=
1
&otype1=1&ishow=0&g_id='
+
res
.
info
.
g_id
+
'&is_yzm='
+
res
.
info
.
is_yzm
,
url
:
'/pages/info/info?otype=
3
&otype1=1&ishow=0&g_id='
+
res
.
info
.
g_id
+
'&is_yzm='
+
res
.
info
.
is_yzm
,
success
:
function
()
{
setTimeout
(
function
()
{
that
.
setData
({
payInfo
:
true
})
...
...
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