main
liudan 2 years ago
parent 630b7dbf3f
commit 4880def054
  1. 2
      app.js
  2. 14
      app.json
  3. 1
      app.wxss
  4. BIN
      assets/images/pic.png
  5. 73
      page/constitutionAnalyse/constitutionAnalyse.js
  6. 83
      page/constitutionAnalyse/constitutionAnalyse.wxml
  7. 104
      page/constitutionAnalyse/constitutionAnalyse.wxss
  8. 41
      page/constitutionGrade/constitutionGrade.js
  9. 2
      page/constitutionGrade/constitutionGrade.wxml
  10. 10
      page/identificationTwo/identificationTwo.js
  11. 19
      page/identificationTwo/identificationTwo.wxml
  12. 2
      page/identificationTwo/identificationTwo.wxss
  13. BIN
      page/img/1.png
  14. BIN
      page/img/2.png
  15. BIN
      page/img/3.png
  16. BIN
      page/img/4.png
  17. BIN
      page/img/5.png
  18. BIN
      page/img/6.png
  19. BIN
      page/img/7.png
  20. BIN
      page/img/8.png
  21. BIN
      page/img/9.png
  22. BIN
      page/img/abg.png
  23. BIN
      page/img/share.png
  24. 6
      page/my/my.js
  25. 11
      page/my/my.wxml
  26. 2
      page/my/my.wxss
  27. 99
      page/record/record.js
  28. 6
      page/record/record.json
  29. 26
      page/record/record.wxml
  30. 66
      page/record/record.wxss
  31. 129
      page/shareList/shareList.js
  32. 6
      page/shareList/shareList.json
  33. 37
      page/shareList/shareList.wxml
  34. 66
      page/shareList/shareList.wxss
  35. 101
      page/shetai/shetai.js
  36. 6
      page/shetai/shetai.json
  37. 21
      page/shetai/shetai.wxml
  38. 56
      page/shetai/shetai.wxss
  39. 5
      page/twoTest/twoTest.js
  40. 35
      project.config.json
  41. 7
      project.private.config.json

@ -322,7 +322,7 @@ App({
}, 300);
},
towxml: new Towxml(),
// towxml: new Towxml(),
//全局信息
globalData: {
userInfo: null,

@ -1,5 +1,6 @@
{
"pages": [
"page/begin/begin",
"page/systemTest/systemTest",
"page/twoTest/twoTest",
@ -10,7 +11,11 @@
"page/testHistory/testHistory",
"page/gradeOrder/gradeOrder",
"page/phone/phone",
"page/login/login"
"page/login/login",
"page/record/record",
"page/shareList/shareList",
"page/shetai/shetai"
],
"window": {
"backgroundTextStyle": "dark",
@ -18,7 +23,7 @@
"navigationBarTitleText": "FastAdmin",
"navigationBarTextStyle": "white"
},
"tabBar": {
"tabBar": {
"color": "#000",
"selectedColor": "#209F84",
"position": "bottom",
@ -50,5 +55,8 @@
"downloadFile": 10000
},
"debug": true,
"sitemapLocation": "sitemap.json"
"sitemapLocation": "sitemap.json",
"useExtendedLib": {
"weui": true
}
}

@ -37,6 +37,7 @@ page{
height:82rpx !important;
background:transparent;
padding:0 !important;
z-index:9
}
.zixun::after{
border: none;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -13,6 +13,9 @@ Page({
cid:0,
setcolor:['pinghezhi','qixuzhi','shirezhi','yinxuzhi','qiyuzhi','yangxuzhi','tanshizhi','xueyuzhi','tezhi'],
minipic:'',
picList:[
]
},
@ -22,10 +25,18 @@ Page({
*/
onLoad: function (options) {
this.getUserId();
this.setData({
cid:options.testcate_id,
minipic:app.globalData.apiCommonUrl+'/assets/minipic/Background.png',
})
if(options.testcate_id){
let ids = JSON.parse(options.testcate_id)
this.setData({
cid:ids,
minipic:app.globalData.apiCommonUrl+'/assets/minipic/Background.png',
})
}else{
this.setData({
minipic:app.globalData.apiCommonUrl+'/assets/minipic/Background.png',
})
}
},
/**
@ -71,7 +82,7 @@ Page({
},
//详情
getinfo:function(){
getinfo:function(cid){
var that=this;
this.setData({ loading: true });
app.request('/api/mini/solutions', {
@ -80,18 +91,35 @@ Page({
type:1,
}, function (data, ret) {
if(ret.code == 1){
WxParse.wxParse('advice_content', 'html', ret.data.detail.advice_content, that, 5);
WxParse.wxParse('causes_content', 'html', ret.data.detail.causes_content, that, 5);
WxParse.wxParse('environment_content', 'html', ret.data.detail.environment_content, that, 5);
WxParse.wxParse('expression_content', 'html', ret.data.detail.expression_content, that, 5);
WxParse.wxParse('features_content', 'html', ret.data.detail.features_content, that, 5);
WxParse.wxParse('psychology_content', 'html', ret.data.detail.psychology_content, that, 5);
WxParse.wxParse('tend_content', 'html', ret.data.detail.tend_content, that, 5);
that.setData({
that.setData({
loading: false,
catelist:ret.data.lists,
detail:ret.data.detail,
detail:ret.data.detail
});
let piclist = []
that.data.catelist.forEach(item=>{
let obj = {
title:'',
kindnum:null,
advice_content:"",
pic:'',
mini_shop_url:''
}
obj.title=item.title;
obj.kindnum=item.kindnum;
obj.advice_content = item.advice_content;
obj.pic = `../img/${item.kindnum}.png`
obj.mini_shop_url = item.mini_shop_url
piclist.push(obj)
})
that.setData({picList:piclist})
// WxParse.wxParse('advice_content', 'html',item.advice_content, that, 5);
// WxParse.wxParse('causes_content', 'html', item.causes_content, that, 5);
// WxParse.wxParse('environment_content', 'html', item.environment_content, that, 5);
// WxParse.wxParse('expression_content', 'html', item.expression_content, that, 5);
// WxParse.wxParse('features_content', 'html', item.features_content, that, 5);
// WxParse.wxParse('psychology_content', 'html', item.psychology_content, that, 5);
// WxParse.wxParse('item.tend_content', 'html', item.tend_content, that, 5);
}
typeof cb == 'function' && cb(data);
}, function (data, ret) {
@ -136,7 +164,22 @@ Page({
this.getinfo();
},
//打开另外的小程序
goOther(){
goOther(e){
console.log(e.currentTarget.dataset.path)
wx.navigateToMiniProgram({
appId: 'wxb1640083b8804601',
// path: this.data.detail.mini_shop_url,
path:e.currentTarget.dataset.path,
extraData: {
foo: 'bar'
},
envVersion: 'release',
success(res) {
// 打开成功
}
})
},
goOther1(){
wx.navigateToMiniProgram({
appId: 'wxb1640083b8804601',
path: this.data.detail.mini_shop_url,

@ -1,10 +1,11 @@
<!--pages/home/home.wxml-->
<!-- <text>pages/home/home.wxml</text> -->
<import src="../../wxParse/wxParse.wxml"/>
<view>
<view class="header"></view>
<view class="index">
<!-- <view class="header"></view> -->
<image src="../img/abg.png" class="abg" mode="widthFix"></image>
<view class="contentContainer">
<view>
<!-- <view>
<view class="btnGroup" >
<view wx:for="{{catelist}}" wx:if="{{index<3}}" class="{{setcolor[index]}}" bindtap="changeCid" data-cid="{{item.id}}">{{item.sort}}{{item.title}}</view>
</view>
@ -14,35 +15,59 @@
<view class="btnGroup" >
<view wx:for="{{catelist}}" wx:if="{{index > 5}}" class="{{setcolor[index]}}" bindtap="changeCid" data-cid="{{item.id}}">{{item.sort}}{{item.title}}</view>
</view>
</view>
<view class="content">
<view class="title pinghezhi">{{detail.title}}分析</view>
</view> -->
<view class="content" wx:for="{{catelist}}" wx:key="{{index}}">
<view class="title">{{item.title}}分析</view>
<view>
<view class="analyse">
<text class="itemTitle">迁延倾向</text>
<template is="wxParse" data="{{wxParseData:tend_content.nodes}}" />
<view>
<rich-text nodes="{{item.tend_content}}"></rich-text>
</view>
<!-- <template is="wxParse" data="{{wxParseData:tend_content.nodes}}" /> -->
</view>
<view class="analyse">
<text class="itemTitle">形体特征</text>
<template is="wxParse" data="{{wxParseData:features_content.nodes}}" />
<!-- <template is="wxParse" data="{{wxParseData:features_content.nodes}}" /> -->
<view>
<rich-text nodes="{{item.features_content}}"></rich-text>
</view>
</view>
<view class="analyse">
<text class="itemTitle">常见表现</text>
<template is="wxParse" data="{{wxParseData:expression_content.nodes}}" />
<!-- <template is="wxParse" data="{{wxParseData:expression_content.nodes}}" /> -->
<view>
<rich-text nodes="{{item.expression_content}}"></rich-text>
</view>
</view>
<view class="analyse">
<text class="itemTitle">心理特征</text>
<template is="wxParse" data="{{wxParseData:psychology_content.nodes}}" />
<!-- <template is="wxParse" data="{{wxParseData:psychology_content.nodes}}" /> -->
<view>
<rich-text nodes="{{item.psychology_content}}"></rich-text>
</view>
</view>
<view class="analyse">
<text class="itemTitle">适应环境</text>
<template is="wxParse" data="{{wxParseData:environment_content.nodes}}" />
<!-- <template is="wxParse" data="{{wxParseData:environment_content.nodes}}" /> -->
<view>
<rich-text nodes="{{item.environment_content}}"></rich-text>
</view>
</view>
<view class="analyse">
<text class="itemTitle">成因</text>
<template is="wxParse" data="{{wxParseData:causes_content.nodes}}" />
<!-- <template is="wxParse" data="{{wxParseData:causes_content.nodes}}" /> -->
<view>
<rich-text nodes="{{item.causes_content}}"></rich-text>
</view>
</view>
<view class="bottom_content">
<!-- <view class="bottom_content">
<text class="numFlag">{{detail.kindnum}}</text>
<image src="{{minipic}}" class="image"></image>
<view class="outview">
@ -58,10 +83,38 @@
</view>
<template is="wxParse" data="{{wxParseData:advice_content.nodes}}" />
</view>
</view>
</view> -->
</view>
</view>
<view class="footer_btn" bindtap="goOther">
<view class="content">
<view class="title">推荐调理</view>
<view class="bottom_content" wx:for="{{picList}}" wx:key="{{index}}">
<!-- <text class="numFlag">{{detail.kindnum}}</text> -->
<image src="{{item.pic}}" class="image"></image>
<view class="outview">
<view class="twopart">
<view class="recommendBtn" style="border-bottom-right-radius:0rpx">推荐调理</view>
<view class="recommendBtn intro" >
<view class="description">
一质一饮
<view>立康九体饮</view>
<view class="subFlag">TM</view>
</view>
</view>
</view>
<!-- <template is="wxParse" data="{{wxParseData:advice_content.nodes}}" /> -->
<rich-text nodes="{{item.advice_content}}"></rich-text>
<view class="price">
<view class="pricenum">
<text>¥</text>
<text style="font-size:30rpx">39.9</text>
</view>
<view class="buy" data-path="{{item.mini_shop_url}}" bindtap="goOther">立即购买</view>
</view>
</view>
</view>
</view>
<view class="footer_btn" bindtap="goOther1">
直接选购调理
</view>
<button class="zixun" open-type='contact' >

@ -12,6 +12,20 @@ page{
--tezhi:#815495;
}
.index{
background:#209F84;
}
.abg{
width:100%;
margin-top: -180rpx;
}
.contentContainer{
position: relative;
z-index: 9;
margin-top: -450rpx;
background-color: transparent;
}
.btnGroup{
display:flex;
justify-content: space-around;
@ -26,25 +40,36 @@ page{
border-radius: 10px;
}
.content{
margin:40rpx;
padding:40rpx;
border-radius: 10px;
overflow:hidden;
background:#F4F4F4;
/* background:#F4F4F4; */
padding-bottom:56rpx;
background-color: #ffffff;
margin-bottom:30rpx;
}
.title{
font-size: 23px;
padding:16rpx 0;
padding:0rpx 45rpx;
color:#fff;
background: #209F84;
border: 4rpx solid #38CBAC;
text-align:center;
width:fit-content;
margin:0 auto 30rpx auto;
}
.analyse{
margin:16rpx 26rpx 0 26rpx;
}
.analyse>view{
margin:24rpx 0;
}
.itemTitle{
font-size:18px;
color: #212121;
font-size:30rpx;
color: #209F84;
background: rgba(32,159,132,0.16);
padding:15rpx 24rpx;
/* margin-bottom:24rpx; */
}
.itemContent{
color:#767676;
@ -55,27 +80,33 @@ page{
.bottom_content{
display:flex;
align-items: center;
margin:54rpx 26rpx 0 26rpx;
margin:54rpx 0rpx 0 0rpx;
padding-bottom:40rpx;
border-bottom: 1px solid #eaeaea;
}
.numFlag{
font-size:55rpx;
color: var(--pinghezhi);
}
.image{
width:58rpx;
height:156rpx;
margin-left:30rpx;
margin-right:50rpx;
width:220rpx;
height:220rpx;
background: #F4F4F4;
border: 1px solid #EAEAEA;
border-radius: 10px;
}
.recommendBtn{
/* width:200rpx; */
width:50%;
font-size:14px;
line-height:14px;
line-height:60rpx;
color:#fff;
border-radius:4px;
margin-top:20rpx;
padding: 14rpx 0;
/* border-radius:4px; */
/* margin-top:20rpx; */
padding: 5rpx 0;
height:60rpx;
text-align: center;
background-color: #209F84;
}
.recommendText{
color: #5388c4;
@ -85,9 +116,9 @@ page{
}
.footer_btn{
padding:24rpx 44rpx;
background:#209f84;
background:#ffffff;
font-size: 36rpx;
color:#fff;
color:#209F84;
border-radius: 21px;
text-align: center;
width:63%;
@ -154,14 +185,45 @@ align-items: center;
.description{
position:relative;
margin-left:20rpx;
font-size: 24rpx;
}
.intro{
line-height: 24rpx;
display: flex;
align-items: center;
color:#002222;
background: #FFFFFF;
border: 1px solid #209F84;
height:56rpx;
}
.subFlag{
position:absolute;
right:-8rpx;
top:-8rpx;
font-size:10px;
position:absolute;
right:-22rpx;
top:-8rpx;
font-size:10px;
}
.outview{
flex:1;
margin-left:30rpx;
}
.price{
margin-top:10rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.pricenum{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #002222;
}
.buy{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #002222;
padding:6rpx 26rpx;
background: #F2C741;
}

@ -9,6 +9,8 @@ Page({
res_test_id:0,//测试id
child:[],//排名
user_id:0,
avatar:'',
nickname:''
},
/**
@ -19,9 +21,11 @@ Page({
this.setData({
res_test_id:options.res_test_id,
})
this.getinfo();
},
onShow:function(){
this.getinfo();
},
/**
@ -51,7 +55,29 @@ Page({
onReachBottom: function () {
},
addHandle(){
wx.request({
url: 'https://mini.nanjingchuangyou.com/api/mini/viewUser',
method:'POST',
header: {
'content-type': 'application/x-www-form-urlencoded',
},
data:{
test_id:this.data.res_test_id,
user_id:this.data.user_id,
from:'wx',
avatar:this.data.avatar,
nickname:this.data.nickname
},
success:(res)=>{
console.log(res,"0-00")
// this.setData({
// list:res.data.data.list,
// total:res.data.data.total
// })
}
})
},
//详情
getinfo:function(){
console.log(this.data.user_id)
@ -67,6 +93,7 @@ Page({
loading: false,
child:detail.orichild,
});
that.addHandle()
}
typeof cb == 'function' && cb(data);
}, function (data, ret) {
@ -82,8 +109,16 @@ Page({
var getuser = wx.getStorageSync("userInfo");
if(getuser){
this.data.user_id = getuser.id;
this.setData({
nickname:getuser.nickname,
avatar:getuser.avatar
})
}else if(app.globalData.userInfo){
this.data.user_id = app.globalData.userInfo.id;
this.setData({
nickname:app.globalData.userInfo.nickname,
avatar:app.globalData.userInfo.avatar
})
}else{
wx.navigateTo({
url: '/page/login/login',
@ -100,7 +135,7 @@ Page({
onShareAppMessage: function() {
return {
title: '转发',
path: '/pages/result/result',
path: '/page/constitutionGrade/constitutionGrade?res_test_id='+this.data.res_test_id,
success: function(res) {
wx.showToast({
title: '分享成功',

@ -4,7 +4,7 @@
<view class="header"></view>
<view class="contentContainer">
<view class="content">
<view class="progressInfo" wx:for="{{child}}">
<view class="progressInfo" wx:for="{{child}}" wx:key="index">
<text class="type">{{item.title}}</text>
<view class="progress-box">
<progress percent="{{item.change_score}}" stroke-width="13" activeColor="#d0d0d0" backgroundColor="#fff"/>

@ -11,6 +11,7 @@ Page({
user_id:0,
health:0,//是否是平和质,0不是,1是
detail:[],
ids:[]
},
/**
@ -77,11 +78,17 @@ Page({
}, function (data, ret) {
if(ret.code == 1){
var detail = ret.data.detail;
that.setData({
loading: false,
child:detail.child,
detail:detail,
ids:ids
});
let ids = that.data.child.map(item=>{
return item.testcate_id
})
that.canvasRing = that.selectComponent("#canvasRing");
that.canvasRing.showCanvasRing();
}
@ -129,8 +136,9 @@ Page({
},
goAnalyseDetail:function(e){
var testcate_id = e.currentTarget.dataset.testcate_id;
let ids = JSON.stringify(this.data.ids)
wx.navigateTo({
url: '/page/constitutionAnalyse/constitutionAnalyse?testcate_id='+testcate_id,
url: '/page/constitutionAnalyse/constitutionAnalyse?testcate_id='+ids,
});
},

@ -21,18 +21,19 @@
<view class="typeDetail">
{{detail.qinxiang_text}}
</view>
<view class="typeContent">
<view class="getDetailsInfo" wx:for="{{child}}">
<!-- <view class="typeContent"> -->
<!-- <view class="getDetailsInfo" wx:for="{{child}}">
<text style="color:#209f84">{{item.title}}</text>
<text style="color:#212121" bindtap="goAnalyseDetail" data-testcate_id="{{item.testcate_id}}">体质分析及调理方案</text>
</view>
<view class="getMoreBtn" bindtap="goOther">
获取更优调理方案
</view>
</view>
</view> -->
<!-- <view class="getMoreBtn" bindtap="goOther">
体质分析及调理建议
</view> -->
<!-- </view> -->
<view class="footer_btn">
<view class="btn" bindtap="testAgin">再测一次</view>
<button class="btn" open-type="share">分享朋友</button>
<view class="btn" bindtap="testAgin">重测一次</view>
<view class="btn" bindtap="testAgin" bindtap="goAnalyseDetail" >体质分析调理方案</view>
<!-- <button class="btn" open-type="share">分享朋友</button> -->
</view>
</view>
<button class="zixun" open-type='contact' >

@ -22,7 +22,7 @@
}
.typeDetail{
color: #212121;
font-size:30rpx;
font-size:40rpx;
}
.typeContent{
background-color: #f4f4f4;

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -85,7 +85,11 @@ Page({
})
},
sharePage(){
wx.navigateTo({
url: '/page/shareList/shareList',
});
},
//data
getdata:function(){
var that=this;

@ -40,7 +40,7 @@
<image src="../img/arrow.png"></image>
</view>
</view>
<view class="formitem lastItem">
<view class="formitem">
<button class="formItemInfo online" open-type='contact'>
<image src="../img/my4.png"></image>
<text>在线客服</text>
@ -49,6 +49,15 @@
<image src="../img/arrow.png"></image>
</view>
</view>
<view class="formitem lastItem">
<view class="formItemInfo" bindtap="sharePage">
<image src="../img/share.png"></image>
<text>分享报告列表</text>
</view>
<view class="arrow">
<image src="../img/arrow.png"></image>
</view>
</view>
</view>
</view>
</view>

@ -71,6 +71,7 @@ page{
justify-content: space-between;
padding:34rpx;
border-top:1px solid #d6d6d6;
align-items: center;
}
.lastItem{
border-bottom:1px solid #d6d6d6;
@ -85,6 +86,7 @@ page{
width:auto !important;
margin:0 !important;
font-weight:normal;
height: 27px;
}
.formItemInfo image{
width:36rpx;

@ -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,26 @@
<view class="index">
<view class="header"></view>
<view class="content">
<view class="title">浏览记录</view>
<view class="layout" >
<view wx:if="{{list.length>0}}">
<view class="picimg" wx:for="{{list}}" wx:key="index" >
<view class="first">{{index+1}}</view>
<view class="avatar">
<image src="{{item.avatar}}"></image>
</view>
<view class="userdetails">
<view class="userName">{{item.nickname}}</view>
<view class="time">浏览时间:{{item.time}}</view>
</view>
</view>
</view>
<view style="margin-top:20rpx;" wx:else>暂无数据</view>
</view>
</view>
<button class="zixun" open-type='contact' >
    <image src="../img/zixun.png"></image>
  </button>
</view>

@ -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,37 @@
<!--page/shareList/shareList.wxml-->
<view class="share">
<view class="sharelist" wx:for="{{lists}}" wx:key="index">
<view class="top">
<view class="picde">
<image src="../../image/img0.jpg"></image>
</view>
<view class="detailsInfo">
<view class="detailsItem">
<text class="first">测试时间:</text>
<text class="second">{{item.time}}</text>
</view>
<view>
<text class="first">测试得分:</text>
<text class="second score">{{item.score}}分</text>
</view>
<view>
<text class="first">测试结果:</text>
<text class="second">{{item.testname}}</text>
</view>
<view>
<text class="first">测试用时:</text>
<text class="second">{{item.usetime}}秒</text>
</view>
</view>
</view>
<view class="btngroup">
<view class="btnitem" bindtap="gorecord" data-test_id="{{item.id}}">浏览记录</view>
<view class="btnitem" data-test_id="{{item.id}}" bindtap="goDetail">详情</view>
<view class="btnitem sharebtn" data-test_id="{{item.id}}" bindtap="goDetail">分享</view>
</view>
</view>
<button class="zixun" open-type='contact' >
    <image src="../img/zixun.png"></image>
</button>
</view>

@ -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,21 @@
<!--page/shetai/shetai.wxml-->
<view class="index">
<view class="header"></view>
<view class="content">
<view class="title">上传舌苔立即获取体质报告</view>
<view class="picimg">
<view class="shetaipiccontent">
<image src="../../assets/images/pic.png" mode="widthFix" class="shetaipic" wx:if="{{imgPath==''}}"></image>
<image src="https://mini.nanjingchuangyou.com{{imgPath}}" wx:else></image>
</view>
<view class="btngrounp">
<view class="uploadbtn" bindtap="getimg">上传照片</view>
<view wx:if="{{imgPath!=''}}" class="uploadbtn" bindtap="gonext">下一步</view>
</view>
</view>
</view>
<button class="zixun" open-type='contact' >
    <image src="../img/zixun.png"></image>
  </button>
</view>

@ -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;
}

@ -181,8 +181,11 @@ Page({
}, function (data, ret) {
//获取成功
if(ret.code == 1){
// wx.redirectTo({
// url: '../constitutionGrade/constitutionGrade?res_test_id=' +ret.data.res_test_id
// })
wx.redirectTo({
url: '../constitutionGrade/constitutionGrade?res_test_id=' +ret.data.res_test_id
url: '../shetai/shetai?res_test_id=' +ret.data.res_test_id
})
}
typeof cb == 'function' && cb(data);

@ -1,7 +1,8 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": []
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
@ -47,101 +48,79 @@
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": -1,
"name": "page/login/login",
"pathName": "page/login/login",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/begin/begin",
"pathName": "page/begin/begin",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/result/result",
"pathName": "page/result/result",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/getscore/getscore",
"pathName": "page/getscore/getscore",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/case/case",
"pathName": "page/case/case",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/systemTest/systemTest",
"pathName": "page/systemTest/systemTest",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/identificationTwo/identificationTwo",
"pathName": "page/identificationTwo/identificationTwo",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/constitutionAnalyse/constitutionAnalyse",
"pathName": "page/constitutionAnalyse/constitutionAnalyse",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/my/my",
"pathName": "page/my/my",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/testHistory/testHistory",
"pathName": "page/testHistory/testHistory",
"query": "",
"scene": null
},
{
"id": -1,
"name": "page/gradeOrder/gradeOrder",
"pathName": "page/gradeOrder/gradeOrder",
"query": "",
"scene": null
}
]
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "tizhiceshi",
"setting": {
"compileHotReLoad": true
}
}
Loading…
Cancel
Save