迁移一部分接口

This commit is contained in:
李琦
2026-01-13 13:36:55 +08:00
parent 2a294898ec
commit 11ade5d7ae
11 changed files with 81 additions and 47 deletions

View File

@@ -147,14 +147,15 @@
<view class="product-list-container">
<view class="product-card" @click="goProductDetail(item)" v-for="(item, index) in displayProductList" :key="index">
<view class="prod-img-box">
<image :src="(item.drug && item.drug.image) ? item.drug.image : '/static/mine/avatar_1.png'" mode="aspectFill" class="prod-img" :class="{ 'prescription-blur': item.drug && (item.drug.is_otc === 0 || item.drug.is_otc === '0') }"></image>
<image :src="(item.drug && item.drug.image) ? item.drug.image : '/static/mine/avatar_1.png'" mode="aspectFill" class="prod-img" :class="{ 'prescription-blur': item.drug && item.drug.type == 2 && (item.drug.is_otc === 0 || item.drug.is_otc === '0') }"></image>
</view>
<view class="prod-info">
<view>
<view class="prod-title">{{ item.drug ? item.drug.drug_name : '' }}</view>
<view class="tag-row">
<text class="otc-tag" :class="item.drug && item.drug.is_otc ? 'otc-green' : 'otc-red'">{{item.drug && item.drug.is_otc ? 'OTC' : 'Rx'}}</text>
<!-- 只有西药type == 2才显示OTC/Rx标签 -->
<text v-if="item.drug && item.drug.type == 2" class="otc-tag" :class="item.drug.is_otc ? 'otc-green' : 'otc-red'">{{item.drug.is_otc ? 'OTC' : 'Rx'}}</text>
</view>
<view class="prod-spec">{{ item.drug ? item.drug.specification : '' }}</view>
</view>

View File

@@ -106,8 +106,8 @@
<script>
import {
getuserInfo
} from '../../request/api/api'
getUserInfoApi
} from '../../request/api/user'
export default {
data() {
return {
@@ -137,15 +137,12 @@
// 用户信息
getInfo() {
getuserInfo({
method: "post",
data: {
store_id: uni.getStorageSync('store_id') || 11001
}
getUserInfoApi({
store_id: uni.getStorageSync('store_id') || 11001
}).then((res) => {
// console.log(res, 'ingo');
if (res.data.errcode == 0) {
this.infoList = res.data.data
if (res.data.code == 0) {
this.infoList = res.data.result
}
})
},