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

8
components/visitorInfo.vue

@ -4,13 +4,15 @@
<view class="user-top">
<view class="user-left">
<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 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>
<view class="user-bottom gap24 flex-between">
<view>板式{{ visitorInfo.format }}</view>
<view class="user-bottom gap24 flex-between" v-if="visitorInfo.format || visitorInfo.operate_time">
<view>
<view v-if="visitorInfo.format">板式{{ visitorInfo.format }}</view>
</view>
<view v-if="visitorInfo.operate_time">{{ visitorInfo.operate_time }} </view>
</view>
</view>

29
pages/coinsDetail/index.vue

@ -1,15 +1,18 @@
<template>
<view class="coinsDetail-wrap">
<!-- :visitorInfo="visitorInfo" -->
<view style="margin-top: 20rpx;">
<VisitorInfo :visitorInfo="detailItem"/>
</view>
<view class="list-wrap">
<ListBox leftTitle="评级部门" :rightTitle="detailItem.rating_department" />
<ListBox leftTitle="评级编号" :rightTitle="detailItem.rating_code" />
<ListBox leftTitle="分数" :rightTitle="detailItem.grade" />
<ListBox leftTitle="尺寸" :rightTitle="detailItem.size" />
<ListBox v-if="detailItem.rating_code" leftTitle="评级部门" :rightTitle="detailItem.rating_department" />
<ListBox v-if="detailItem.rating_code" leftTitle="评级编号" :rightTitle="detailItem.rating_code" />
<ListBox v-if="detailItem.material" leftTitle="材质" :rightTitle="detailItem.material" />
<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" />
</view>
@ -31,29 +34,17 @@ export default {
return {
visitorInfo: {},
id:'',
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": "" //
},
detailItem: {},
scan_code_detail:''
}
},
watch: {
scanCodeDetail(newVal, oldVal) {
// console.log('someProp changed:', newVal, 'from', oldVal);
this.detailItem = {...newVal}//
}
},
mounted(){
if(Object.keys(this.scanCodeDetail).length > 0){
if(this.scanCodeDetail && Object.keys(this.scanCodeDetail).length > 0){
this.detailItem = {...this.scanCodeDetail}
}
},

35
pages/home/index.vue

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

Loading…
Cancel
Save