1. 优化订单模块的UI、接口迁移到新的api
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
|
||||
<!-- granular -->
|
||||
<view class="list"
|
||||
v-if="orderInfo.ProductOrder.prescription_type==1||orderInfo.ProductOrder.prescription_type==3">
|
||||
v-if="orderInfo.ProductOrder.prescription_type==1">
|
||||
<view class="it_" v-for="(item,index) in orderInfo.ProductOrderItems" :key="item.id">
|
||||
<view class="it_name">{{item.drug_name}}
|
||||
<text class="it_num" style="margin-left: 8rpx;">x{{item.number}}</text>
|
||||
@@ -69,7 +69,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list_west" v-if="orderInfo.ProductOrder.prescription_type==2||orderInfo.ProductOrder.prescription_type==5||orderInfo.ProductOrder.prescription_type==7">
|
||||
<view class="list_west" v-if="orderInfo.ProductOrder.prescription_type==2||orderInfo.ProductOrder.prescription_type==3||orderInfo.ProductOrder.prescription_type==5||orderInfo.ProductOrder.prescription_type==5||orderInfo.ProductOrder.prescription_type==6||orderInfo.ProductOrder.prescription_type==7">
|
||||
<view class="list" v-for="(item,index) in orderInfo.ProductOrderItems" :key="item.id" @click.stop="goDrugDetail(item)">
|
||||
<view class="img">
|
||||
<image :src="item.drug_image || 'https://xiaokang88.oss-cn-hangzhou.aliyuncs.com/xk-client-wx/static/empty/gwc.png'" mode=""></image>
|
||||
@@ -695,9 +695,8 @@ export default {
|
||||
width: 750rpx;
|
||||
max-height: 100%;
|
||||
min-height: 100vh;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
background: #F5F5F5;
|
||||
|
||||
padding-bottom: 500rpx;
|
||||
/* 新增:物流提示样式 */
|
||||
.order-text-tip {
|
||||
background: #e6f3ff;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
<!-- 药品信息 -->
|
||||
<!-- 中药-颗粒 -->
|
||||
<view class="item_info" v-if="item.prescription_type==1||item.prescription_type==3">
|
||||
<view class="item_info" v-if="item.prescription_type==1">
|
||||
<view class="info">
|
||||
<view class="zy_">
|
||||
<!-- 改用原生 v-show 保证安全渲染折叠 -->
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
|
||||
<!-- 西药 -->
|
||||
<view class="item_info" v-if="item.prescription_type==2||item.prescription_type==5||item.prescription_type==7">
|
||||
<view class="item_info" v-if="item.prescription_type==2||item.prescription_type==3||item.prescription_type==4||item.prescription_type==5||item.prescription_type==6||item.prescription_type==7">
|
||||
<!-- 改用原生 v-show 保证规格和数据安全渲染 -->
|
||||
<view class="info" v-for="(it, idx) in item.items" :key="it.id" v-show="item._expanded || idx < 2">
|
||||
<view class="xy_">
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
import { getOrderTextApi, getStoreDrugDetailApi } from "@/request/api/product";
|
||||
import { genOrderApi, getPrescriptionStatusApi } from "@/request/api/order";
|
||||
import { getCartCountsApi, saveCartApi } from "@/request/api/cart";
|
||||
import { canShowFunction, canShowUsage, canShowInstruction, isPrescriptionApprovedStatus } from '@/common/utils/drug';
|
||||
import { canShowFunction, canShowUsage, canShowInstruction, isHealthFood, isPrescriptionApprovedStatus } from '@/common/utils/drug';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -317,13 +317,18 @@ export default {
|
||||
return (this.productDetail.supplier && this.productDetail.supplier.name) || '';
|
||||
},
|
||||
showFunctionSection() {
|
||||
return canShowFunction(this.productDetail, this.prescriptionApproved);
|
||||
if (isHealthFood(this.productDetail)) return false;
|
||||
return canShowFunction(this.productDetail, this.prescriptionApproved)
|
||||
|| !!(this.productDetail.function || this.productDetail.indications);
|
||||
},
|
||||
showUsageSection() {
|
||||
return canShowUsage(this.productDetail, this.prescriptionApproved);
|
||||
if (isHealthFood(this.productDetail)) return false;
|
||||
return canShowUsage(this.productDetail, this.prescriptionApproved)
|
||||
|| !!this.productDetail.usage;
|
||||
},
|
||||
showInstructionSection() {
|
||||
return canShowInstruction(this.productDetail, this.prescriptionApproved);
|
||||
return canShowInstruction(this.productDetail, this.prescriptionApproved)
|
||||
|| !!this.productDetail.instruction;
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -402,8 +407,11 @@ export default {
|
||||
this.getOrderText();
|
||||
const params = {
|
||||
id: this.productDetail.id,
|
||||
store_id: this.orderStoreId || uni.getStorageSync('store_id') || '11001',
|
||||
};
|
||||
const storeId = this.orderStoreId || uni.getStorageSync('store_id');
|
||||
if (storeId) {
|
||||
params.store_id = storeId;
|
||||
}
|
||||
if (this.fromOrderId) {
|
||||
params.order_id = this.fromOrderId;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user