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
9aef76a5
Commit
9aef76a5
authored
Sep 20, 2023
by
李萌
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'limeng-info' 到 'master'
Limeng info 查看合并请求
!1
parents
3acb8711
f0960ce9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
506 additions
and
154 deletions
+506
-154
pages/bslbrecord/bslbrecord.js
+4
-1
pages/bslbrecord/bslbrecord.wxml
+1
-1
pages/dati/dati.js
+51
-14
pages/dati03/dati03.js
+51
-18
pages/dati04/dati04.js
+63
-26
pages/dati05/dati05.js
+60
-22
pages/dati06/dati06.js
+0
-0
pages/dati08/dati08.js
+65
-25
pages/info/info.js
+95
-25
pages/info/info.wxml
+3
-5
pages/info1/info1.js
+93
-12
pages/info1/info1.wxml
+4
-2
pages/record/record.js
+3
-2
project.private.config.json
+8
-0
utils/api.js
+5
-1
No files found.
pages/bslbrecord/bslbrecord.js
View file @
9aef76a5
...
...
@@ -74,8 +74,11 @@ Page({
measure_id_t
:
measure_id_t
,
name
:
name
,
time
:
time1
,
t_openid
:
t_openid
,
z_openid
:
z_openid
,
g_id
:
g_id
,
unitid
:
unitid
}
wx
.
setStorageSync
(
'tplbDetail'
,
tplbDetail
)
// wx.navigateTo({
// url: '/pages/info1/info1?paramTopenid='+e.currentTarget.dataset.topenid,
// })
wx
.
navigateTo
({
url
:
'/pages/info1/info1'
,
url
:
'/pages/info1/info1?g_id='
+
e
.
currentTarget
.
dataset
.
gid
+
'&showInfo=1'
+
'¶mTopenid='
+
e
.
currentTarget
.
dataset
.
topenid
,
})
},
time
(
timestamp
)
{
...
...
pages/bslbrecord/bslbrecord.wxml
View file @
9aef76a5
...
...
@@ -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-
gid="{{item.g_id}}" 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 @
9aef76a5
...
...
@@ -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'
)
{
...
...
@@ -349,8 +373,9 @@ Page({
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'
,
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
})
}
}
else
if
(
res
==
0
)
{
...
...
@@ -359,7 +384,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 +395,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 @
9aef76a5
...
...
@@ -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'
)
{
...
...
@@ -245,8 +265,9 @@ Page({
}
})
}
else
{
var
g_id
=
wx
.
getStorageSync
(
'g_id'
);
wx
.
reLaunch
({
url
:
'/pages/info/info?otype=1&otype1=1&ishow=1'
,
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
success
:
function
()
{
that
.
setData
({
flag
:
true
})
}
...
...
@@ -259,7 +280,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 +291,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 @
9aef76a5
...
...
@@ -1085,27 +1085,40 @@ Page({
answer
.
score
.
unshift
(
wx
.
getStorageSync
(
'canvas'
));
answer
.
answer
.
unshift
(
0
);
}
if
(
lb_tp
==
'1'
)
{
var
data
=
{
user_stime
:
time
,
user_answer
:
answer
.
score
,
answer
:
answer
.
answer
,
user_number
:
lb_descript
.
desc
.
z_openid
,
// 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
],
};
var
url
=
Api
.
HOST_xinli
+
'xinli/index.php/Api/add_res'
;
}
else
{
var
data
=
{
user_stime
:
time
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
stoUser
.
openid
?
stoUser
.
openid
:
''
,
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
;
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
({
...
...
@@ -1117,24 +1130,34 @@ Page({
flag
:
true
})
},
5000
)
Api
.
fetchPostN
(
url
,
data
,
(
err
,
res
)
=>
{
console
.
log
(
res
,
'resllo'
)
var
formdata
=
wx
.
getStorageSync
(
'allUserinfo'
);
let
newdata
=
Object
.
assign
({...
ndata
,...
formdata
});
newdata
=
this
.
removeEmptyProperties
(
newdata
);
Api
.
fetchPostN
(
url
,
newdata
,
(
err
,
res
)
=>
{
// console.log(res, 'resllo')
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'
);
...
...
@@ -1158,7 +1181,7 @@ Page({
}
// clearTimeout(timer)
Api
.
fetchPost
(
urls
,
data1
,
(
err
,
res
)
=>
{
console
.
log
(
'5555555555555'
,
res
)
//
console.log('5555555555555', res)
if
(
err
)
{
that
.
setData
({
flag
:
true
...
...
@@ -1186,7 +1209,7 @@ Page({
})
}
console
.
log
(
'res'
,
res
)
//
console.log('res', res)
if
(
res
==
1
)
{
// clearTimeout(timer)
...
...
@@ -1208,8 +1231,9 @@ Page({
}
})
}
else
{
var
g_id
=
wx
.
getStorageSync
(
'g_id'
);
wx
.
reLaunch
({
url
:
'/pages/info/info?otype=1&otype1=1&ishow=1'
,
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
success
:
function
()
{
that
.
setData
({
flag
:
true
...
...
@@ -1235,7 +1259,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
)
...
...
@@ -1381,4 +1408,13 @@ Page({
},
200
)
}
},
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/dati05/dati05.js
View file @
9aef76a5
...
...
@@ -499,27 +499,40 @@ 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
,
// 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
],
};
var
url
=
Api
.
HOST_xinli
+
'xinli/index.php/Api/add_res'
;
}
else
{
var
data
=
{
user_stime
:
time
,
g_id
:
wx
.
getStorageSync
(
'g_id'
),
openid
:
stoUser
.
openid
?
stoUser
.
openid
:
''
,
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
;
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
({
...
...
@@ -531,23 +544,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'
);
...
...
@@ -617,8 +641,9 @@ Page({
}
})
}
else
{
var
g_id
=
wx
.
getStorageSync
(
'g_id'
);
wx
.
reLaunch
({
url
:
'/pages/info/info?otype=1&otype1=1&ishow=1'
,
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
success
:
function
()
{
that
.
setData
({
flag
:
true
...
...
@@ -644,7 +669,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 +681,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 @
9aef76a5
This diff is collapsed.
Click to expand it.
pages/dati08/dati08.js
View file @
9aef76a5
...
...
@@ -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
=
{
// 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);
// 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
,
user_number
:
user
.
openid
,
measure_id
:
lb_descript
.
id
[
0
],
g_id
:
wx
.
getStorageSync
(
'g_id'
)
};
}
console
.
log
(
data
)
;
data
.
unitid
=
lb_descript
.
desc
.
unitid
;
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
)
{
...
...
@@ -386,8 +412,9 @@ Page({
}
})
}
else
{
var
g_id
=
wx
.
getStorageSync
(
'g_id'
);
wx
.
reLaunch
({
url
:
'/pages/info/info?otype=1&otype1=1&ishow=1'
,
url
:
`/pages/info/info?otype=1&otype1=1&ishow=1&g_id=
${
g_id
}
`
,
success
:
function
()
{
that
.
setData
({
flag
:
true
...
...
@@ -411,7 +438,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 +451,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 @
9aef76a5
...
...
@@ -6,7 +6,7 @@ Page({
data
:
{
title
:
"录入信息"
,
array
:
[
'请选择'
,
'小学'
,
'初中'
,
'高中(包括中专和普通高中)'
,
'大学(包括高职、大专及本科)'
,
'研究生及以上'
,
'文盲'
],
date
:
'1980-01-01'
,
date
:
'1980-01-01'
,
//生日
time
:
'请选择时间'
,
items
:
[{
name
:
'男'
,
...
...
@@ -22,7 +22,7 @@ Page({
usernumber
:
''
,
sheqvNumber
:
''
,
workNumber
:
''
,
index
:
0
,
index
:
0
,
//文化程度
title1
:
""
,
// 答题
content
:
''
,
otype
:
-
2
,
...
...
@@ -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
...
...
@@ -205,7 +216,10 @@ Page({
})
});
}
else
{
wx
.
setStorageSync
(
'weiLb'
,
res
)
wx
.
setStorageSync
(
'weiLb'
,
res
);
if
(
res
.
t_openid
)
{
wx
.
setStorageSync
(
'param_t_openid'
,
res
.
t_openid
);
}
// 是否有未做完的题
if
(
res
.
unitid
==
737
)
{
that
.
setData
({
...
...
@@ -388,6 +402,21 @@ Page({
wx
.
setStorageSync
(
'lb_swiper_con'
,
lb_swiper_con
);
},
submit
:
function
()
{
var
userOpenid
=
wx
.
getStorageSync
(
'user'
).
openid
;
if
(
userOpenid
==
''
||
userOpenid
==
'undefined'
||
userOpenid
==
null
||
userOpenid
==
'null'
||
userOpenid
==
'NULL'
)
{
Api
.
alert
(
"数据异常,请尝试重新进入小程序"
);
return
false
;
}
var
paramtOpenid
=
wx
.
getStorageSync
(
'param_t_openid'
);
if
(
paramtOpenid
==
''
||
paramtOpenid
==
'undefined'
||
paramtOpenid
==
null
||
paramtOpenid
==
'null'
||
paramtOpenid
==
'NULL'
)
{
Api
.
alert
(
"请重新扫码"
);
return
false
;
}
var
paramtGid
=
wx
.
getStorageSync
(
'g_id'
);
if
(
paramtGid
==
''
||
paramtGid
==
'undefined'
||
paramtGid
==
null
||
paramtGid
==
'null'
||
paramtGid
==
'NULL'
)
{
Api
.
alert
(
"请重新扫码"
);
return
false
;
}
var
that
=
this
;
if
(
this
.
data
.
measure_id
==
86
)
{
that
.
cmi
();
...
...
@@ -405,28 +434,28 @@ Page({
var
user
=
wx
.
getStorageSync
(
'user'
);
var
unitid
=
wx
.
getStorageSync
(
'data'
).
unitid
;
var
authorize
=
wx
.
getStorageSync
(
"weiLb"
);
var
urlt
=
Api
.
HOST
+
'wechat.php?s=Home/stinfo_two'
;
//
var urlt = Api.HOST + 'wechat.php?s=Home/stinfo_two';
var
data
=
{};
data
.
characters_id
=
authorize
.
characters_id
?
authorize
.
characters_id
:
authorize
.
record_id
;
data
.
unitid
=
unitid
?
unitid
:
''
;
data
.
openid
=
user
.
openid
;
data
.
name
=
that
.
data
.
username
;
//姓名
data
.
sex
=
that
.
data
.
sex
;
//性别
data
.
birthday
=
that
.
data
.
date
;
//
年龄
data
.
birthday
=
that
.
data
.
date
;
//
生日
data
.
usernumber
=
that
.
data
.
usernumber
//手机号
data
.
jobnumber
=
that
.
data
.
jobnumber
;
//工号
data
.
sheqvNumber
=
that
.
data
.
sheqvNumber
;
data
.
workNumber
=
that
.
data
.
workNumber
;
data
.
idCard
=
that
.
data
.
idCard
||
''
;
data
.
username1
=
that
.
data
.
username1
||
''
;
data
.
select
=
that
.
data
.
select
||
0
;
data
.
ask_department
=
that
.
data
.
ask_department
||
''
;
data
.
hunfou
=
that
.
data
.
select
||
0
;
//婚姻状况
if
(
that
.
data
.
is_yzm
==
1
)
{
data
.
yzm
=
that
.
data
.
yzm
;
}
// 新添加学历功能
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
.
hunfou
==
0
){
that
.
setData
({
payInfo
:
true
})
...
...
@@ -466,10 +495,11 @@ Page({
judgeSex
=
1
;
}
wx
.
setStorageSync
(
"judgeSex"
,
judgeSex
);
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
.
otype
==
0
&&
that
.
data
.
lb_tz
==
'-1'
)
{
wx
.
navigateTo
({
// url: '/pages/swiper/swiper?otype=11',
...
...
@@ -559,14 +589,14 @@ Page({
})
}
}
else
{
Api
.
alert
(
res
.
msg
,
function
()
{
that
.
setData
({
payInfo
:
true
})
});
}
});
//
} else {
//
Api.alert(res.msg, function () {
//
that.setData({
//
payInfo: true
//
})
//
});
//
}
//
});
}
}
})
...
...
@@ -579,6 +609,7 @@ Page({
// 获取授权 上传头像昵称 得到这个用户的信息
// var url = Api.HOST + 'wechat.php?s=Home/getinfo_two';
var
url
=
Api
.
HOST
+
'wechat.php?s=Home/getinfo'
;
// var url = Api.HOST + 'wechat.php?s=Home/getinfos';
var
data
=
{};
var
user
=
wx
.
getStorageSync
(
'user'
);
var
authorize
=
wx
.
getStorageSync
(
'weiLb'
);
...
...
@@ -598,6 +629,43 @@ Page({
});
}
}
if
(
res
.
info
)
{
wx
.
setStorageSync
(
'userInfo'
,
res
.
info
)
}
if
(
wx
.
getStorageSync
(
'allUserinfo'
))
{
console
.
log
(
'用的缓存用户信息'
);
var
storageUserinfo
=
wx
.
getStorageSync
(
'allUserinfo'
);
if
(
storageUserinfo
.
edu
==
''
)
{
storageUserinfo
.
edu
=
0
;
}
else
{
storageUserinfo
.
edu
=
storageUserinfo
.
edu
?
storageUserinfo
.
edu
:
0
;
}
if
(
!
storageUserinfo
.
birthday
)
{
storageUserinfo
.
birthday
=
"请选择"
;
}
else
{
storageUserinfo
.
birthday
=
storageUserinfo
.
birthday
;
}
that
.
setData
({
username
:
storageUserinfo
.
name
?
storageUserinfo
.
name
:
''
,
usernumber
:
storageUserinfo
.
usernumber
?
storageUserinfo
.
usernumber
:
''
,
ask_department
:
storageUserinfo
.
ask_department
?
storageUserinfo
.
ask_department
:
''
,
select
:
storageUserinfo
.
hunfou
?
storageUserinfo
.
hunfou
:
0
,
idCard
:
storageUserinfo
.
idCard
?
storageUserinfo
.
idCard
:
''
,
index
:
storageUserinfo
.
edu
,
date
:
storageUserinfo
.
birthday
,
sex
:
storageUserinfo
.
sex
,
home
:
storageUserinfo
.
house
,
// 家庭类型
fage
:
storageUserinfo
.
fage
,
// 父亲年龄
foccupation
:
storageUserinfo
.
foccupation
,
//父亲职业
fdegree
:
storageUserinfo
.
fdegree
,
//父亲文化程度
mage
:
storageUserinfo
.
mage
,
// 母亲年龄
moccupation
:
storageUserinfo
.
moccupation
,
//母亲职业
mdegree
:
storageUserinfo
.
mdegree
,
//母亲文化程度
jobnumber
:
storageUserinfo
.
jobnumber
?
storageUserinfo
.
jobnumber
:
''
,
//工号
yzm
:
that
.
data
.
is_yzm
==
1
?
storageUserinfo
.
yzm
:
''
});
}
else
{
console
.
log
(
'用的后端接口用户信息'
)
;
if
(
res
.
info
)
{
if
(
res
.
info
.
cultural
==
''
)
{
res
.
info
.
cultural
=
0
;
...
...
@@ -613,14 +681,14 @@ Page({
if
(
res
.
info
.
essential_information
)
{
essentialData
=
JSON
.
parse
(
res
.
info
.
essential_information
);
}
wx
.
setStorageSync
(
'userInfo'
,
res
.
info
)
//
wx.setStorageSync('userInfo', res.info)
that
.
setData
({
username
:
res
.
info
.
name
||
''
,
usernumber
:
essentialData
.
usernumber
||
''
,
username1
:
essentialData
.
username1
||
''
,
select
:
essentialData
.
select
||
0
,
ask_department
:
essentialData
.
ask_department
||
''
,
select
:
res
.
info
.
hunfou
||
0
,
idCard
:
essentialData
.
idCard
||
''
,
index
:
res
.
info
.
cultural
||
0
,
index
:
res
.
info
.
cultural
||
0
,
//文化程度-接口返回的是cultural,前端用的是edu
date
:
res
.
info
.
birthday
,
sex
:
res
.
info
.
xingbie
,
home
:
res
.
info
.
house
,
// 家庭类型
...
...
@@ -634,6 +702,8 @@ Page({
yzm
:
that
.
data
.
is_yzm
==
1
?
essentialData
.
yzm
:
''
});
}
}
});
},
onUnload
()
{},
...
...
@@ -766,7 +836,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 @
9aef76a5
...
...
@@ -7,6 +7,7 @@
<text wx:if="{{unitid==1311}}" style="color:red;font-size:30rpx;">\n您所填写的内容绝对保密,不会对您的生活、学习、工作造成任何的影响,请您放心作答。 </text>
</view>
</view>
<view hidden="{{ishow.otype == 1}}">
<view wx:if='{{hosiptiaFlag}}'>
<view class="content" wx:if='{{unitid ==1018}}'>
<view class="partyone">工号
...
...
@@ -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">
身份证号
...
...
@@ -239,11 +240,10 @@
</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 @
9aef76a5
var
Api
=
require
(
'../../utils/api.js'
);
import
{
validateIdCard
}
from
'../../utils/util'
var
app
=
getApp
();
Page
({
...
...
@@ -58,10 +59,22 @@ Page({
mage
:
''
,
// 母亲年龄
moccupation
:
''
,
//母亲职业
mdegree
:
''
,
//母亲文化程度
idCard
:
''
idCard
:
''
,
showInfo
:
''
,
//是否从列表第一次进去 1是 2-续答
},
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
;
if
(
options
.
showInfo
)
{
that
.
setData
({
showInfo
:
options
.
showInfo
})
}
var
info
=
wx
.
getStorageSync
(
'tplbDetail'
);
if
(
info
.
unitid
==
737
)
{
this
.
setData
({
...
...
@@ -161,6 +174,51 @@ Page({
data
.
characters_id
=
info
.
g_id
;
}
Api
.
fetchPost
(
url
,
data
,
(
err
,
res
)
=>
{
if
(
wx
.
getStorageSync
(
'allUserinfo'
))
{
console
.
log
(
'用的缓存数据'
);
var
storageUserinfo
=
wx
.
getStorageSync
(
'allUserinfo'
);
if
(
storageUserinfo
.
edu
==
''
)
{
storageUserinfo
.
edu
=
0
;
}
else
{
storageUserinfo
.
edu
=
storageUserinfo
.
edu
?
storageUserinfo
.
edu
:
0
;
}
if
(
!
storageUserinfo
.
birthday
)
{
storageUserinfo
.
birthday
=
"请选择"
;
}
else
{
storageUserinfo
.
birthday
=
storageUserinfo
.
birthday
;
}
if
(
!
that
.
data
.
hosiptiaFlag
)
{
that
.
setData
({
username
:
storageUserinfo
.
name
?
storageUserinfo
.
name
:
''
,
usernumber
:
storageUserinfo
.
usernumber
?
storageUserinfo
.
usernumber
:
''
,
username1
:
storageUserinfo
.
ask_department
?
storageUserinfo
.
ask_department
:
''
,
index
:
storageUserinfo
.
edu
,
idCard
:
storageUserinfo
.
idCard
?
storageUserinfo
.
idCard
:
''
,
date
:
storageUserinfo
.
birthday
,
sex
:
storageUserinfo
.
sex
,
home
:
storageUserinfo
.
house
,
// 家庭类型
fage
:
storageUserinfo
.
fage
,
// 父亲年龄
foccupation
:
storageUserinfo
.
foccupation
,
//父亲职业
fdegree
:
storageUserinfo
.
fdegree
,
//父亲文化程度
mage
:
storageUserinfo
.
mage
,
// 母亲年龄
moccupation
:
storageUserinfo
.
moccupation
,
//母亲职业
mdegree
:
storageUserinfo
.
mdegree
,
//母亲文化程度
});
}
else
{
that
.
setData
({
username
:
storageUserinfo
.
name
?
storageUserinfo
.
name
:
''
,
index
:
storageUserinfo
.
edu
,
date
:
storageUserinfo
.
birthday
,
// sex: res.info.xingbie,
usernumber
:
storageUserinfo
.
usernumber
?
storageUserinfo
.
usernumber
:
''
,
sex
:
storageUserinfo
.
sex
,
select
:
storageUserinfo
.
hunfou
?
storageUserinfo
.
hunfou
:
0
,
username1
:
storageUserinfo
.
ask_department
?
storageUserinfo
.
ask_department
:
''
,
idCard
:
storageUserinfo
.
idCard
?
storageUserinfo
.
idCard
:
''
,
});
}
}
else
{
console
.
log
(
'用的后端接口数据'
);
if
(
res
.
info
)
{
if
(
res
.
info
.
cultural
==
''
)
{
res
.
info
.
cultural
=
0
;
...
...
@@ -201,6 +259,8 @@ Page({
});
}
}
}
});
},
inputChange
:
function
(
e
)
{
...
...
@@ -239,16 +299,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"
);
...
...
@@ -277,7 +344,7 @@ Page({
}
if
(
that
.
data
.
hosiptiaFlag
)
{
// 非池州市人民医院
if
(
data
.
name
==
''
||
data
.
name
==
'null'
||
data
.
sex
==
"null"
||
data
.
sex
==
""
||
data
.
birthday
==
''
||
data
.
birthday
==
'null'
||
data
.
edu
==
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
.
hunfou
==
0
)
{
// wx.hideLoading()
clearTimeout
(
timer1
)
that
.
setData
({
...
...
@@ -286,6 +353,20 @@ Page({
Api
.
alert
(
'请完善信息'
);
return
;
}
if
(
data
.
usernumber
==
''
||
data
.
usernumber
==
'null'
||
data
.
usernumber
.
length
!=
11
){
that
.
setData
({
payInfo
:
true
})
Api
.
alert
(
'请填写正确的手机号'
);
return
;
}
if
(
!
validateIdCard
(
data
.
idCard
)){
that
.
setData
({
payInfo
:
true
})
Api
.
alert
(
'请填写正确的身份证号'
);
return
;
}
}
else
{
// console.log(data)
if
(
data
.
name
==
''
||
data
.
name
==
'null'
||
data
.
sex
==
"null"
||
data
.
sex
==
""
||
data
.
birthday
==
''
||
data
.
birthday
==
'null'
||
data
.
edu
==
0
||
data
.
fage
.
length
<
1
||
data
.
foccupation
.
length
<
1
||
data
.
fdegree
.
length
<
1
||
data
.
mage
.
length
<
1
||
data
.
moccupation
.
length
<
1
||
data
.
mdegree
.
length
<
1
||
data
.
house
.
length
<
1
)
{
...
...
@@ -315,10 +396,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 +424,10 @@ Page({
}
})
}
}
else
{
Api
.
alert
(
res
.
msg
);
}
});
// } else {
// Api.alert(res.msg);
// }
// });
}
},
onUnload
()
{},
...
...
pages/info1/info1.wxml
View file @
9aef76a5
...
...
@@ -3,6 +3,7 @@
<view class='top'>{{title1}}</view>
<view class='bn'><text>{{content}}</text></view>
</view>
<view hidden="{{showInfo != 1}}">
<view wx:if='{{hosiptiaFlag}}'>
<view class="content">
<view class="partyone" wx:if='{{unitid == 775 || unitid == 776}}'>工号
...
...
@@ -48,8 +49,8 @@
</picker>
</view>
</view>
<view class="partyone">
编号
<input type='text' placeholder='请输入
编号
' bindinput="inputChange2" value='{{usernumber}}'></input>
<view class="partyone">
联系方式
<input type='text' placeholder='请输入
联系方式
' bindinput="inputChange2" value='{{usernumber}}'></input>
</view>
<view class="partyone">
身份证号
...
...
@@ -123,6 +124,7 @@
</view>
</view>
</view>
</view>
<view class="footer" bindtap="submit">
<button>开始</button>
</view>
...
...
pages/record/record.js
View file @
9aef76a5
...
...
@@ -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
})
...
...
project.private.config.json
0 → 100644
View file @
9aef76a5
{
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"projectname"
:
"XLCT-XAMJW"
,
"setting"
:
{
"compileHotReLoad"
:
true
}
}
\ No newline at end of file
utils/api.js
View file @
9aef76a5
var
HOST_xinli
=
'https://www.xiaodongai.com/xiaodong_yiyuan/'
;
// 提交量表
// var HOST_xinli = 'http://123.207.162.160/xiaodong_yiyuan/';//测试
var
HOST
=
'https://xam.xiaodongai.com/kongtian/'
;
// var HOST = 'https://xam.xiaodongai.com/kongtian/';
var
HOST
=
'https://demos-xam.xiaodongai.com/kongtian/'
;
// var HOST = 'http://123.207.162.160/xiaodong_yiyuan/kongtian/';
var
HOST_info
=
'https://www.xiaodongai.com/xiaodongai/kongtian/'
;
// 个人咨询 弃用
var
HOST_Linux
=
'https://www.xiaodongai.com/xiaodongai/kongtian/'
;
// 加载Linux 服务器资讯
...
...
@@ -8,6 +9,8 @@ var HOST_P_K = "https://static.xiaodongai.com/xiaodongai/kongtian/"; // 加载
var
HOST_banner
=
'https://www.xiaodongai.com/xiaodongai/kongtian/'
;
// banner
var
HOST_xinli_lb
=
'https://static.xiaodongai.com/'
;
// 量表
var
HOST_Share
=
"https://static.xiaodongai.com/xiaodong_yiyuan/kongtian/"
;
// var HOST_xlxl = 'https://online-xlxl.xiaodongai.com/';
var
HOST_xlxl
=
'https://demos-xlxl.xiaodongai.com/'
;
// get请求方法
function
fetchGet
(
url
,
callback
)
{
// return callback(null, top250)
...
...
@@ -224,6 +227,7 @@ module.exports = {
HOST_xinli
:
HOST_xinli
,
HOST
:
HOST
,
HOST_info
:
HOST_info
,
HOST_xlxl
:
HOST_xlxl
,
fetchGet
:
fetchGet
,
//get方法
fetchGetN
:
fetchGetN
,
fetchPost
:
fetchPost
,
//post方法
...
...
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