Browse Source

添加钱币信息显示

master
zq 1 month ago
parent
commit
73c1c7a1da
  1. 42
      App.vue
  2. 8
      components/visitorInfo.vue
  3. 29
      pages/coinsDetail/index.vue
  4. 35
      pages/home/index.vue

42
App.vue

@ -84,30 +84,30 @@
} }
if(!did){ if(!did){
var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey) // var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey)
if(doctor_id){ // if(doctor_id){
this.globalData.doctorId = doctor_id // this.globalData.doctorId = doctor_id
}else{ // }else{
// #ifdef H5 // // #ifdef H5
document.getElementsByTagName('body')[0].innerHTML = "" // document.getElementsByTagName('body')[0].innerHTML = ""
setTimeout(function(){ // setTimeout(function(){
alert('请扫描二维码或点击分享网站链接进入'); // alert('');
}, 500) // }, 500)
// #endif // // #endif
// #ifdef MP-WEIXIN // // #ifdef MP-WEIXIN
// uni.showModal({ // // uni.showModal({
// title: '', // // title: '',
// content: '', // // content: '',
// showCancel: false, // // showCancel: false,
// success: ({ confirm, cancel }) => {} // // success: ({ confirm, cancel }) => {}
// }) // // })
uni.reLaunch({ url: '/pages/explain/explain' }) // // uni.reLaunch({ url: '/pages/explain/explain' })
throw new Error('请扫描小程序二维码或点击小程序链接进入') // throw new Error('')
// #endif // // #endif
} // }
}else{ }else{
this.globalData.doctorId = did this.globalData.doctorId = did
uni.setStorageSync(this.globalData.doctoridStorageKey, did) uni.setStorageSync(this.globalData.doctoridStorageKey, did)

8
components/visitorInfo.vue

@ -4,13 +4,15 @@
<view class="user-top"> <view class="user-top">
<view class="user-left"> <view class="user-left">
<view class="user-name PfScSemibold ft38">{{ visitorInfo.coin_name }}</view> <view class="user-name PfScSemibold ft38">{{ visitorInfo.coin_name }}</view>
<view class="user-num">{{ visitorInfo.year }}</view> <view class="user-num">{{ visitorInfo.year }}</view>
</view> </view>
<view class="user-right" v-if="visitorInfo.status" :class="className[visitorInfo.status]">{{ descObj[visitorInfo.status] }}</view> <view class="user-right" v-if="visitorInfo.status" :class="className[visitorInfo.status]">{{ descObj[visitorInfo.status] }}</view>
<view class="user-right" v-else :class="className[visitorInfo.ancient_coin_status]">{{ visitorInfo.ancient_coin_status_desc }}</view> <view class="user-right" v-else :class="className[visitorInfo.ancient_coin_status]">{{ visitorInfo.ancient_coin_status_desc }}</view>
</view> </view>
<view class="user-bottom gap24 flex-between"> <view class="user-bottom gap24 flex-between" v-if="visitorInfo.format || visitorInfo.operate_time">
<view>板式{{ visitorInfo.format }}</view> <view>
<view v-if="visitorInfo.format">板式{{ visitorInfo.format }}</view>
</view>
<view v-if="visitorInfo.operate_time">{{ visitorInfo.operate_time }} </view> <view v-if="visitorInfo.operate_time">{{ visitorInfo.operate_time }} </view>
</view> </view>
</view> </view>

29
pages/coinsDetail/index.vue

@ -1,15 +1,18 @@
<template> <template>
<view class="coinsDetail-wrap"> <view class="coinsDetail-wrap">
<!-- :visitorInfo="visitorInfo" -->
<view style="margin-top: 20rpx;"> <view style="margin-top: 20rpx;">
<VisitorInfo :visitorInfo="detailItem"/> <VisitorInfo :visitorInfo="detailItem"/>
</view> </view>
<view class="list-wrap"> <view class="list-wrap">
<ListBox leftTitle="评级部门" :rightTitle="detailItem.rating_department" /> <ListBox v-if="detailItem.rating_code" leftTitle="评级部门" :rightTitle="detailItem.rating_department" />
<ListBox leftTitle="评级编号" :rightTitle="detailItem.rating_code" /> <ListBox v-if="detailItem.rating_code" leftTitle="评级编号" :rightTitle="detailItem.rating_code" />
<ListBox leftTitle="分数" :rightTitle="detailItem.grade" /> <ListBox v-if="detailItem.material" leftTitle="材质" :rightTitle="detailItem.material" />
<ListBox leftTitle="尺寸" :rightTitle="detailItem.size" /> <ListBox v-if="detailItem.deal_with" leftTitle="处理" :rightTitle="detailItem.deal_with" />
<ListBox v-if="detailItem.pay_for_level" leftTitle="赔付等级" :rightTitle="detailItem.pay_for_level" />
<ListBox v-if="detailItem.grade" leftTitle="分数" :rightTitle="detailItem.grade" />
<ListBox v-if="detailItem.size" leftTitle="尺寸" :rightTitle="detailItem.size" />
<ListBox v-if="detailItem.remark" leftTitle="备注" :rightTitle="detailItem.remark" />
<!-- 详情页面展示 --> <!-- 详情页面展示 -->
<ListBox v-if="id" leftTitle="操作人" :rightTitle="detailItem.operator" /> <ListBox v-if="id" leftTitle="操作人" :rightTitle="detailItem.operator" />
</view> </view>
@ -31,29 +34,17 @@ export default {
return { return {
visitorInfo: {}, visitorInfo: {},
id:'', id:'',
detailItem: { detailItem: {},
// "rating_agency_id": "1", //id
// "coin_name": "", //
// "rating_code": "1310684212", //
// "rating_department": "", //
// "grade": "AU 58", //
// "size": "24.0*1.1mm,3.5g", //
// "year": "1889", //
// "format": "广", //
// "ancient_coin_status": 0, //
// "ancient_coin_status_desc": "" //
},
scan_code_detail:'' scan_code_detail:''
} }
}, },
watch: { watch: {
scanCodeDetail(newVal, oldVal) { scanCodeDetail(newVal, oldVal) {
// console.log('someProp changed:', newVal, 'from', oldVal);
this.detailItem = {...newVal}// this.detailItem = {...newVal}//
} }
}, },
mounted(){ mounted(){
if(Object.keys(this.scanCodeDetail).length > 0){ if(this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0){
this.detailItem = {...this.scanCodeDetail} this.detailItem = {...this.scanCodeDetail}
} }
}, },

35
pages/home/index.vue

@ -18,7 +18,6 @@
</view> </view>
</view> </view>
<!-- <view class="patient-type-tab1"> -->
<scroll-view class="patient-type-tab1" @scrolltolower="onScroll" scroll-y> <scroll-view class="patient-type-tab1" @scrolltolower="onScroll" scroll-y>
<view class="bed-wait-container"> <view class="bed-wait-container">
<view class="bed-wait-list"> <view class="bed-wait-list">
@ -49,12 +48,10 @@
<view class="page-padding" v-show="bedWaitList && bedWaitList.length && bedWaitList.length > 0"> <view class="page-padding" v-show="bedWaitList && bedWaitList.length && bedWaitList.length > 0">
</view> </view>
</scroll-view> </scroll-view>
<!-- </view> -->
<view class="qrcode_wrap"> <view class="qrcode_wrap">
<img :src="cssUrl + 'qrcode_get.png'" alt="" @click="scanQrcode"> <img :src="cssUrl + 'qrcode_get.png'" alt="" @click="scanQrcode">
</view> </view>
<!-- <button @click="scanQrcode">哈哈哈</button> -->
<PopUpCommon ref="coinsPopup" :showClose="true" zIndex="top"> <PopUpCommon ref="coinsPopup" :showClose="true" zIndex="top">
<view class="popWrap"> <view class="popWrap">
@ -132,7 +129,6 @@ export default {
// var token = uni.getStorageSync("u_token"); // var token = uni.getStorageSync("u_token");
// //
this.getCoinsList() this.getCoinsList()
// this.$refs.coinsPopup.openPop(); // this.$refs.coinsPopup.openPop();
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -141,7 +137,6 @@ export default {
this.getCoinsList() this.getCoinsList()
}, },
onReachBottom() { onReachBottom() {
// debugger
if (!this.noMore && !this.loading) { if (!this.noMore && !this.loading) {
this.page++; this.page++;
this.getCoinsList(); this.getCoinsList();
@ -149,15 +144,11 @@ export default {
}, },
methods: { methods: {
onScroll() { onScroll() {
console.log(this.noMore, '000', this.loading, 'this.loading==');
if (!this.noMore && !this.loading) { if (!this.noMore && !this.loading) {
this.page++; this.page++;
this.getCoinsList(); this.getCoinsList();
} }
}, },
getList(e) {
console.log(e, '=====eeee');
},
getCoinsList() { getCoinsList() {
this.loading = true; this.loading = true;
// //
@ -183,7 +174,6 @@ export default {
}, },
lookDetail(item) { lookDetail(item) {
uni.setStorageSync('detail', JSON.stringify(item)) uni.setStorageSync('detail', JSON.stringify(item))
// let url = `/pages/coinsDetail/index`
let url = `/pages/coinsDetail/index?id=${item.rating_code}` let url = `/pages/coinsDetail/index?id=${item.rating_code}`
this.$nav.navToPath(url) this.$nav.navToPath(url)
}, },
@ -226,6 +216,7 @@ export default {
url: result url: result
}, 'POST').then(data => { }, 'POST').then(data => {
console.log(data, 'data===data'); console.log(data, 'data===data');
if(data == -1)return
this.scanCodeDetail = data; this.scanCodeDetail = data;
this.$set(this, 'scanCodeDetail', data) this.$set(this, 'scanCodeDetail', data)
setTimeout(() => { setTimeout(() => {
@ -277,6 +268,10 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.flex-between{
display: flex;
justify-content: space-between;
}
.home-wrap { .home-wrap {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -304,11 +299,11 @@ export default {
.amountLeft, .amountLeft,
.amountRight { .amountRight {
flex: 1; flex: 1;
padding: 18px; padding: 18rpx;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
border-radius: 12px; border-radius: 12rpx;
background: #F8FFF7; background: #F8FFF7;
.add, .add,
@ -335,7 +330,8 @@ export default {
justify-content: space-between; justify-content: space-between;
background: white; background: white;
border-radius: 12rpx 12rpx 0rpx 0rpx; border-radius: 12rpx 12rpx 0rpx 0rpx;
box-shadow: 0px 1rpx 0rpx 0rpx rgba(0, 0, 0, 0.15); border-bottom: 2rpx solid rgba(0, 0, 0, 0.15);
// box-shadow: 0px 1rpx 0rpx 0rpx rgba(0, 0, 0, 0.15);
.notActive { .notActive {
width: 269rpx; width: 269rpx;
@ -379,18 +375,18 @@ export default {
font-weight: 500; font-weight: 500;
color: #00A2E2; color: #00A2E2;
line-height: 56rpx; line-height: 56rpx;
margin-top: 6rpx;
font-size: 40rpx; font-size: 40rpx;
} }
.outbound { .outbound {
color: #FF7D17; color: #4DC56D;
} }
.patient-type-tab1 { .patient-type-tab1 {
height: 0; height: 0;
width: 100%; width: 100%;
background: white; background: white;
// overflow-y: auto;
flex: 1; flex: 1;
.bed-wait-container { .bed-wait-container {
@ -409,9 +405,10 @@ export default {
display: flex; display: flex;
.bed-wait-name { .bed-wait-name {
font-size: 32rpx; font-size: 30rpx;
color: #000000; color: #000000;
margin-right: 24rpx; margin-right: 24rpx;
font-weight: 500;
} }
.bed-visit-type-desc { .bed-visit-type-desc {
@ -450,6 +447,7 @@ export default {
font-weight: normal; font-weight: normal;
line-height: 44rpx; line-height: 44rpx;
color: #242833; color: #242833;
letter-spacing: 0.86rpx;
} }
.bed-age { .bed-age {
@ -498,19 +496,22 @@ export default {
} }
.content { .content {
max-height: 850rpx;
margin-bottom: 145rpx; margin-bottom: 145rpx;
overflow-y: auto;
} }
.pop-title { .pop-title {
height: 40rpx; height: 40rpx;
text-align: center; text-align: center;
margin: 42rpx 0 22rpx 0; padding: 42rpx 0 22rpx 0;
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
line-height: 50rpx; line-height: 50rpx;
text-align: center; text-align: center;
letter-spacing: 2rpx; letter-spacing: 2rpx;
color: #000000; color: #000000;
background: #fff;
// background: #F6F6F8; // background: #F6F6F8;
} }

Loading…
Cancel
Save