fix: 首页UI重构设计
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
<view class="second">
|
||||
<!-- 商品列表 -->
|
||||
<view class="list" v-for="(item,index) in drugLists" @click="toDetail(item.id)">
|
||||
<text class="cf">{{item.is_otc=='0'?'处方药':'非处方药'}}</text>
|
||||
<text class="cf" v-if="item.type == 2">{{item.is_otc=='0'?'处方药':'非处方药'}}</text>
|
||||
<text class="cf" v-else></text>
|
||||
<view class="img">
|
||||
<image :src="item.image" mode="" :class="{ 'prescription-blur': item.is_otc === '0' || item.is_otc === 0 }"></image>
|
||||
</view>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<u-icon name="calendar-fill" size="18" color="#059669"></u-icon>
|
||||
<text class="card-title">预约挂号</text>
|
||||
</view>
|
||||
<text class="status-tag" :class="'status-' + getParsedContent(msg.message_type, msg.message_content).status">
|
||||
{{ getRegisterStatusText(getParsedContent(msg.message_type, msg.message_content).status) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<view class="info-row">
|
||||
@@ -299,6 +302,9 @@
|
||||
<u-icon name="calendar-fill" size="18" color="#059669"></u-icon>
|
||||
<text class="card-title">预约挂号</text>
|
||||
</view>
|
||||
<text class="status-tag" :class="'status-' + getParsedContent(msg.message_type, msg.message_content).status">
|
||||
{{ getRegisterStatusText(getParsedContent(msg.message_type, msg.message_content).status) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<view class="info-row">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<view class="zone-tabs">
|
||||
<view
|
||||
v-for="(zone, index) in homeZones"
|
||||
:key="zone.id || index"
|
||||
:key="index"
|
||||
class="zone-tab-item"
|
||||
:class="{ active: selectedZoneIndex === index }"
|
||||
@click="onZoneChange(index)"
|
||||
@@ -87,7 +87,7 @@
|
||||
<!-- 商品信息 -->
|
||||
<view class="product-info">
|
||||
<view class="product-title u-line-2">{{ item.drug ? item.drug.drug_name : '' }}</view>
|
||||
<view class="product-tags">
|
||||
<view class="product-tags" v-if="item.drug.type == 2">
|
||||
<text
|
||||
class="tag-label"
|
||||
:class="getProductTag(item.drug).className"
|
||||
@@ -312,10 +312,12 @@ export default {
|
||||
if (drug.type === 3) {
|
||||
return { label: '保健食品', className: 'tag-orange' };
|
||||
}
|
||||
if (drug.is_otc) {
|
||||
return { label: 'OTC', className: 'tag-green' };
|
||||
} else {
|
||||
return { label: 'Rx', className: 'tag-red' };
|
||||
if (drug.type == 2) {
|
||||
if (drug.is_otc) {
|
||||
return { label: 'OTC', className: 'tag-green' };
|
||||
} else {
|
||||
return { label: 'Rx', className: 'tag-red' };
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<text class="tag-text">保健食品</text>
|
||||
</view>
|
||||
<!-- 情况2:其他(如 type === 2 西药),走 OTC/Rx 逻辑 -->
|
||||
<view class="tag-capsule" :class="productDetail.is_otc === 0 ? 'type-rx' : 'type-otc'" v-else>
|
||||
<view class="tag-capsule" :class="productDetail.is_otc === 0 ? 'type-rx' : 'type-otc'" v-else-if="productDetail.type==2">
|
||||
<text class="tag-text">{{ productDetail.is_otc === 0 ? 'Rx 处方药' : 'OTC 非处方药' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,8 +6,8 @@ export function checkDev(key = '') {
|
||||
// 判断某些模块是否开启
|
||||
switch (key) {
|
||||
case 'dev':
|
||||
// return false;
|
||||
return true;
|
||||
return false;
|
||||
// return true;
|
||||
case 'open-im':
|
||||
// return false;
|
||||
return true;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {checkDev} from "@/utils/utils";
|
||||
|
||||
export class WebSocketManager {
|
||||
constructor(url) {
|
||||
this.url = url;
|
||||
@@ -259,5 +261,6 @@ export class WebSocketManager {
|
||||
}
|
||||
|
||||
// 全局WebSocket实例
|
||||
export const webSocketManager = new WebSocketManager('ws://127.0.0.1:12080/ws');
|
||||
// export const webSocketManager = new WebSocketManager('wss://api.ws.g.xiaokang88.com/ws');
|
||||
// export const webSocketManager = new WebSocketManager('ws://127.0.0.1:12080/ws');
|
||||
const wsUrl = checkDev('dev')? 'ws://127.0.0.1:12080/ws':'wss://api.ws.g.xiaokang88.com/ws';
|
||||
export const webSocketManager = new WebSocketManager(wsUrl);
|
||||
Reference in New Issue
Block a user