Commit d307aa2fd473cafb82193af8e7237345ad7ad88a
1 parent
8d340ab82a
Exists in
master
跨页面传值
Showing 3 changed files with 19 additions and 5 deletions
woman/pages/premaritalCheckup/premaritalCheckup.js
View file @
d307aa2
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | Page({ |
| 8 | 8 | |
| 9 | 9 | data: { |
| 10 | + text : "qqqaaa", | |
| 10 | 11 | baseCheck: [{ 'title': '首诊日期', 'word': 'checkTime', value: '' }, { 'title': '末次月经', 'word': 'lastMenses', value: '' }, { 'title': '预产期', 'word': 'dueDate', value: '' }, { 'title': '月经周期', 'word': 'mensDay', value: '' }], |
| 11 | 12 | bodyCheck: [{ title: '身高', word: 'height', value: '' }, { title: '体重', word: 'weight', value: '' }, { title: '心', word: 'heart', value: '' }, { title: '肺', word: 'lungs', value: '' }], |
| 12 | 13 | |
| 13 | 14 | |
| ... | ... | @@ -140,8 +141,14 @@ |
| 140 | 141 | str = '孕次:' + data.pregnacyTimes + '次' |
| 141 | 142 | } |
| 142 | 143 | }, |
| 144 | + triggers(e) { | |
| 145 | + console.log(e.target.dataset.idtype,e); // 1 | |
| 146 | +}, | |
| 143 | 147 | goDetail(e) { |
| 144 | - console.log("检测详情",e) | |
| 148 | + console.log("检测详情",e,e.currentTarget.dataset) | |
| 149 | + let item = networkUtil.urlParams("index",e) | |
| 150 | + | |
| 151 | + console.log("检测",item) | |
| 145 | 152 | wx.navigateTo({ |
| 146 | 153 | url: '../premaritalReport/premaritalReport', |
| 147 | 154 | }) |
woman/pages/premaritalCheckup/premaritalCheckup.wxml
View file @
d307aa2
| ... | ... | @@ -14,12 +14,13 @@ |
| 14 | 14 | </view> |
| 15 | 15 | </view> |
| 16 | 16 | <view> |
| 17 | + | |
| 17 | 18 | <view class = "menuList_title margin-lr40 margin-tb38">检验报告查询</view> |
| 18 | - <view class="menuList_bg margin-l40 i-column margin-b20" wx:for="{{assistantCheck}}" wx:key="index"> | |
| 19 | + <view class="menuList_bg margin-l40 i-column margin-b20" wx:for="{{assistantCheck}}" wx:key="index" > | |
| 19 | 20 | <view class="font-white-40 font-weight-500 margin-l26 margin-t30">{{item.top_title}}</view> |
| 20 | 21 | <view class="i-row i-between i-align-center margin-l34 margin-r12 margin-t50"> |
| 21 | 22 | <view class="font-white-30">未见异常</view> |
| 22 | - <view class="i-row i-align-center" bindtap="goDetail"> | |
| 23 | + <view class="i-row i-align-center" bindtap="goDetail" data-index="{{index}}"> | |
| 23 | 24 | <view class="menuList_text">详细报告</view> |
| 24 | 25 | <view class="menuList_next margin-l5 margin-r12"></view> |
| 25 | 26 | </view> |
woman/utils/network_util.js
View file @
d307aa2
| ... | ... | @@ -232,6 +232,12 @@ |
| 232 | 232 | } |
| 233 | 233 | }) |
| 234 | 234 | } |
| 235 | +// 跨页面传参 | |
| 236 | +function urlParams(item,e) { | |
| 237 | + let p = e.currentTarget.dataset; | |
| 238 | + // console.log(item, "item",e,p,p[item]) | |
| 239 | + return p[item] | |
| 240 | +} | |
| 235 | 241 | |
| 236 | 242 | |
| 237 | 243 | |
| ... | ... | @@ -240,7 +246,6 @@ |
| 240 | 246 | |
| 241 | 247 | |
| 242 | 248 | |
| 243 | - | |
| 244 | 249 | var introList = [ |
| 245 | 250 | |
| 246 | 251 | { key: 'guideoftz', url: 'https://dev-rp-api.healthbaby.com.cn/id_photo/app_guide/guideoftz.png' }, |
| ... | ... | @@ -376,7 +381,8 @@ |
| 376 | 381 | Builing_Release_AppStore: Builing_Release_AppStore, |
| 377 | 382 | _getAddress: _getAddress, |
| 378 | 383 | checkIsNeedDownload: checkIsNeedDownload, |
| 379 | - isLoadImage: isLoadImage | |
| 384 | + isLoadImage: isLoadImage, | |
| 385 | + urlParams:urlParams | |
| 380 | 386 | } |
| 381 | 387 | |
| 382 | 388 | // networkUtil._get(api,param,function(res){},function(res){}) |