After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,99 @@ |
|||||||
|
// page/record/record.js
|
||||||
|
var app = getApp(); |
||||||
|
Page({ |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面的初始数据 |
||||||
|
*/ |
||||||
|
data: { |
||||||
|
test_id:null, |
||||||
|
page:1, |
||||||
|
num:10, |
||||||
|
list:[], |
||||||
|
total:0 |
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面加载 |
||||||
|
*/ |
||||||
|
onLoad(options) { |
||||||
|
this.setData({test_id:options.res_test_id}); |
||||||
|
this.getdata() |
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||||
|
*/ |
||||||
|
onReady() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面显示 |
||||||
|
*/ |
||||||
|
onShow() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面隐藏 |
||||||
|
*/ |
||||||
|
onHide() { |
||||||
|
this.data.page = 1;//隐藏设置分页1
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面卸载 |
||||||
|
*/ |
||||||
|
onUnload() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||||
|
*/ |
||||||
|
onPullDownRefresh() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面上拉触底事件的处理函数 |
||||||
|
*/ |
||||||
|
onReachBottom() { |
||||||
|
console.log("到底了") |
||||||
|
var pagenum = this.data.page + 1; //获取当前页数并+1
|
||||||
|
this.setData({ |
||||||
|
page: pagenum, //更新当前页数
|
||||||
|
}) |
||||||
|
this.getdata(); |
||||||
|
}, |
||||||
|
getdata(){ |
||||||
|
wx.request({ |
||||||
|
url: 'https://mini.nanjingchuangyou.com/api/mini/viewList', |
||||||
|
method:'POST', |
||||||
|
header: { |
||||||
|
'content-type': 'application/x-www-form-urlencoded', |
||||||
|
}, |
||||||
|
data:{ |
||||||
|
num:this.data.num, |
||||||
|
test_id:this.data.test_id, |
||||||
|
page:this.data.page |
||||||
|
}, |
||||||
|
success:(res)=>{ |
||||||
|
console.log(res.data.data.lists,"0-00") |
||||||
|
let list = [] |
||||||
|
list.push(...(res.data.data.lists)) |
||||||
|
this.setData({ |
||||||
|
list:list, |
||||||
|
total:res.data.total |
||||||
|
}) |
||||||
|
} |
||||||
|
}) |
||||||
|
}, |
||||||
|
/** |
||||||
|
* 用户点击右上角分享 |
||||||
|
*/ |
||||||
|
onShareAppMessage() { |
||||||
|
|
||||||
|
} |
||||||
|
}) |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"usingComponents": {}, |
||||||
|
"navigationBarBackgroundColor": "#209F84", |
||||||
|
"navigationBarTitleText": "浏览记录", |
||||||
|
"navigationBarTextStyle": "white" |
||||||
|
} |
@ -0,0 +1,66 @@ |
|||||||
|
|
||||||
|
.title{ |
||||||
|
font-size: 42rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: bold; |
||||||
|
color: #FFFFFF; |
||||||
|
} |
||||||
|
.content{ |
||||||
|
position: relative; |
||||||
|
z-index: 9; |
||||||
|
margin-top:-280rpx; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
.layout{ |
||||||
|
width:91%; |
||||||
|
margin:40rpx auto 40rpx auto; |
||||||
|
background:#fff; |
||||||
|
border:1px solid transparent; |
||||||
|
border-radius: 10px; |
||||||
|
padding-bottom:50rpx; |
||||||
|
box-shadow: 0px 0px 7px 0px |
||||||
|
rgba(0, 0, 0, 0.22); |
||||||
|
min-height:calc(75vh); |
||||||
|
/* overflow: auto; */ |
||||||
|
} |
||||||
|
.picimg{ |
||||||
|
margin:30rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
border-bottom:1px solid #EAEAEA; |
||||||
|
padding-bottom:47rpx; |
||||||
|
} |
||||||
|
.first{ |
||||||
|
font-size: 36rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #333333; |
||||||
|
} |
||||||
|
.avatar{ |
||||||
|
width: 100rpx; |
||||||
|
height: 100rpx; |
||||||
|
overflow: hidden; |
||||||
|
border-radius: 50%; |
||||||
|
margin-left:30rpx; |
||||||
|
} |
||||||
|
.avatar image{ |
||||||
|
width:100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
.userdetails{ |
||||||
|
margin-left:24rpx; |
||||||
|
text-align: left; |
||||||
|
} |
||||||
|
.userName{ |
||||||
|
font-size: 30rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #333333; |
||||||
|
} |
||||||
|
.time{ |
||||||
|
font-size: 24rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #999999; |
||||||
|
margin-top:24rpx; |
||||||
|
} |
@ -0,0 +1,129 @@ |
|||||||
|
// pages/testHistory/testHistory.js
|
||||||
|
var app = getApp(); |
||||||
|
Page({ |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面的初始数据 |
||||||
|
*/ |
||||||
|
data: { |
||||||
|
user_id:0, |
||||||
|
pagenum:0, |
||||||
|
lists:[], |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面加载 |
||||||
|
*/ |
||||||
|
onLoad: function (options) { |
||||||
|
this.getUserId(); |
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||||
|
*/ |
||||||
|
onReady: function () { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面显示 |
||||||
|
*/ |
||||||
|
onShow: function () { |
||||||
|
this.getdata(); |
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面隐藏 |
||||||
|
*/ |
||||||
|
onHide: function () { |
||||||
|
this.data.pagenum = 1;//隐藏设置分页1
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面卸载 |
||||||
|
*/ |
||||||
|
onUnload: function () { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||||
|
*/ |
||||||
|
onPullDownRefresh: function () { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面上拉触底事件的处理函数 |
||||||
|
*/ |
||||||
|
onReachBottom: function () { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
getUserId(){ |
||||||
|
var getuser = wx.getStorageSync("userInfo"); |
||||||
|
if(getuser){ |
||||||
|
this.data.user_id = getuser.id; |
||||||
|
this.data.userInfo= getuser; |
||||||
|
}else if(app.globalData.userInfo){ |
||||||
|
this.data.user_id = app.globalData.userInfo.id; |
||||||
|
this.data.userInfo= app.globalData.userInfo; |
||||||
|
}else{ |
||||||
|
wx.navigateTo({ |
||||||
|
url: '/page/login/login', |
||||||
|
}); |
||||||
|
} |
||||||
|
}, |
||||||
|
//data
|
||||||
|
getdata:function(){ |
||||||
|
var that=this; |
||||||
|
this.setData({ loading: true }); |
||||||
|
app.request('/api/mini/testhostory', { |
||||||
|
user_id:this.data.user_id, |
||||||
|
page:this.data.pagenum |
||||||
|
}, function (data, ret) { |
||||||
|
if(ret.code == 1){ |
||||||
|
if(ret.data.lists){ |
||||||
|
var newA = that.data.lists.concat(ret.data.lists); |
||||||
|
}else{ |
||||||
|
var newA = that.data.lists; |
||||||
|
} |
||||||
|
that.setData({ |
||||||
|
loading: false, |
||||||
|
lists:newA, |
||||||
|
}); |
||||||
|
} |
||||||
|
typeof cb == 'function' && cb(data); |
||||||
|
}, function (data, ret) { |
||||||
|
|
||||||
|
that.setData({ |
||||||
|
loading: false |
||||||
|
}); |
||||||
|
app.error(ret.msg); |
||||||
|
},2); |
||||||
|
}, |
||||||
|
|
||||||
|
onReachBottom: function () { //触底开始下一页
|
||||||
|
console.log("到底了") |
||||||
|
var pagenum = this.data.pagenum + 1; //获取当前页数并+1
|
||||||
|
this.setData({ |
||||||
|
pagenum: pagenum, //更新当前页数
|
||||||
|
}) |
||||||
|
this.getdata(); |
||||||
|
|
||||||
|
}, |
||||||
|
goDetail:function(e){ |
||||||
|
var test_id = e.currentTarget.dataset.test_id; |
||||||
|
wx.navigateTo({ |
||||||
|
url: '/page/constitutionGrade/constitutionGrade?res_test_id='+test_id, |
||||||
|
}); |
||||||
|
}, |
||||||
|
gorecord:function(e){ |
||||||
|
var test_id = e.currentTarget.dataset.test_id; |
||||||
|
wx.navigateTo({ |
||||||
|
url: '/page/record/record?res_test_id='+test_id, |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
}) |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"usingComponents": {}, |
||||||
|
"navigationBarBackgroundColor": "#209F84", |
||||||
|
"navigationBarTitleText": "分享报告列表", |
||||||
|
"navigationBarTextStyle": "white" |
||||||
|
} |
@ -0,0 +1,66 @@ |
|||||||
|
/* page/shareList/shareList.wxss */ |
||||||
|
.share{ |
||||||
|
padding:20rpx 24rpx; |
||||||
|
} |
||||||
|
.sharelist{ |
||||||
|
background: #FFFFFF; |
||||||
|
box-shadow: 0px 4px 10px 0px rgba(15,91,75,0.13); |
||||||
|
border-radius: 20px; |
||||||
|
padding:20rpx 20rpx 30rpx 20rpx; |
||||||
|
margin-bottom:20rpx; |
||||||
|
} |
||||||
|
.top{ |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
border-bottom: 1px solid #EAEAEA; |
||||||
|
padding-bottom:30rpx; |
||||||
|
} |
||||||
|
.picde{ |
||||||
|
width: 200rpx; |
||||||
|
height: 200rpx; |
||||||
|
background: #F4F4F4; |
||||||
|
border-radius: 20px; |
||||||
|
overflow: hidden; |
||||||
|
} |
||||||
|
.picde image{ |
||||||
|
width:100%; |
||||||
|
height:100%; |
||||||
|
} |
||||||
|
.detailsInfo{ |
||||||
|
flex:1; |
||||||
|
margin-left:20rpx; |
||||||
|
} |
||||||
|
.first{ |
||||||
|
font-size: 28rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #999999; |
||||||
|
} |
||||||
|
.second{ |
||||||
|
color:#222222; |
||||||
|
font-size: 28rpx; |
||||||
|
} |
||||||
|
.score{ |
||||||
|
color:#209F84 |
||||||
|
} |
||||||
|
.btngroup{ |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: flex-end; |
||||||
|
margin-top:29rpx; |
||||||
|
} |
||||||
|
.btnitem{ |
||||||
|
padding:14rpx 35rpx; |
||||||
|
margin-left:30rpx; |
||||||
|
background: #FFFFFF; |
||||||
|
border: 1px solid #209F84; |
||||||
|
border-radius: 70rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #209F84; |
||||||
|
} |
||||||
|
.sharebtn{ |
||||||
|
background: #209F84; |
||||||
|
color:#ffffff; |
||||||
|
} |
@ -0,0 +1,101 @@ |
|||||||
|
// page/shetai/shetai.js
|
||||||
|
Page({ |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面的初始数据 |
||||||
|
*/ |
||||||
|
data: { |
||||||
|
imgPath:'', |
||||||
|
res_test_id:'' |
||||||
|
}, |
||||||
|
getimg() { |
||||||
|
var _this = this; |
||||||
|
wx.chooseImage({ |
||||||
|
count: 1, // 默认9
|
||||||
|
sizeType: ['original', 'compressed'], |
||||||
|
sourceType: ['album', 'camera'], |
||||||
|
success: function (res) { |
||||||
|
var token = wx.getStorageSync('token') || ''; |
||||||
|
let filePath = res.tempFilePaths[0] |
||||||
|
wx.uploadFile({ |
||||||
|
filePath: filePath, |
||||||
|
url: 'https://mini.nanjingchuangyou.com/api/common/upload', |
||||||
|
name: 'file', |
||||||
|
timeout:5000, |
||||||
|
formData:{ |
||||||
|
token:token |
||||||
|
}, |
||||||
|
success(res2){ |
||||||
|
_this.setData({ |
||||||
|
imgPath:JSON.parse(res2.data).data.url |
||||||
|
}) |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
|
}) |
||||||
|
}, |
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面加载 |
||||||
|
*/ |
||||||
|
onLoad(options) { |
||||||
|
this.setData({ |
||||||
|
imgPath:'', |
||||||
|
res_test_id:options.res_test_id, |
||||||
|
}) |
||||||
|
}, |
||||||
|
gonext(){ |
||||||
|
console.log(this.data.res_test_id,"iiiiiiii77") |
||||||
|
wx.redirectTo({ |
||||||
|
url: '../constitutionGrade/constitutionGrade?res_test_id=' +this.data.res_test_id |
||||||
|
})
|
||||||
|
}, |
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||||
|
*/ |
||||||
|
onReady() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面显示 |
||||||
|
*/ |
||||||
|
onShow() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面隐藏 |
||||||
|
*/ |
||||||
|
onHide() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 生命周期函数--监听页面卸载 |
||||||
|
*/ |
||||||
|
onUnload() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||||
|
*/ |
||||||
|
onPullDownRefresh() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 页面上拉触底事件的处理函数 |
||||||
|
*/ |
||||||
|
onReachBottom() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
/** |
||||||
|
* 用户点击右上角分享 |
||||||
|
*/ |
||||||
|
onShareAppMessage() { |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
|
}) |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"usingComponents": {}, |
||||||
|
"navigationBarBackgroundColor": "#209F84", |
||||||
|
"navigationBarTitleText": "舌苔收集", |
||||||
|
"navigationBarTextStyle": "white" |
||||||
|
} |
@ -0,0 +1,56 @@ |
|||||||
|
/* page/shetai/shetai.wxss */ |
||||||
|
.title{ |
||||||
|
font-size: 42rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: bold; |
||||||
|
color: #FFFFFF; |
||||||
|
} |
||||||
|
.content{ |
||||||
|
position: relative; |
||||||
|
z-index: 9; |
||||||
|
margin-top:-280rpx; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
.picimg{ |
||||||
|
width:91%; |
||||||
|
margin:40rpx auto 40rpx auto; |
||||||
|
background:#fff; |
||||||
|
border:1px solid transparent; |
||||||
|
border-radius: 10px; |
||||||
|
padding-bottom:50rpx; |
||||||
|
box-shadow: 0px 0px 7px 0px |
||||||
|
rgba(0, 0, 0, 0.22); |
||||||
|
height:calc(70vh); |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
} |
||||||
|
.shetaipiccontent{ |
||||||
|
margin:50rpx 50rpx 62rpx 50rpx; |
||||||
|
background: #F4F4F4; |
||||||
|
border-radius: 20px; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
flex:1; |
||||||
|
} |
||||||
|
.shetaipic{ |
||||||
|
width:135rpx; |
||||||
|
height:auto; |
||||||
|
} |
||||||
|
.uploadbtn{ |
||||||
|
/* flex:1; */ |
||||||
|
padding:0 10%; |
||||||
|
height: 100rpx; |
||||||
|
background: #209F84; |
||||||
|
border-radius: 20rpx; |
||||||
|
font-size: 36rpx; |
||||||
|
font-family: PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #FFFFFF; |
||||||
|
line-height: 100rpx; |
||||||
|
margin:0 20rpx; |
||||||
|
} |
||||||
|
.btngrounp{ |
||||||
|
display: flex; |
||||||
|
justify-content: center; |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
||||||
|
"projectname": "tizhiceshi", |
||||||
|
"setting": { |
||||||
|
"compileHotReLoad": true |
||||||
|
} |
||||||
|
} |