调整商品详情

This commit is contained in:
唐明明
2022-07-15 17:08:14 +08:00
parent 3d03979622
commit e0d6d82947
58 changed files with 124 additions and 91 deletions

View File

@@ -6,8 +6,9 @@
<view class="exhibition-receive">
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="popClick">
记录三高
</view>
<view class="exhibition-receive-btn exhibition-receive-btn-50">
</view>
<!-- $Router.push({name: 'UserCode'}) -->
<view class="exhibition-receive-btn exhibition-receive-btn-50" @click="userCode">
活动分享
</view>
</view>
@@ -72,7 +73,7 @@
<image @tap="authTap" class="authPop-cloes" src="/static/icons/uricacidClose.png"></image>
<image class="authPop-img" src="/static/imgs/authPop_img.png" mode="aspectFill"></image>
<view class="authPop-cont">
请先添加个人档案成功后可领取产品
请先添加个人档案成功后可添加记录
</view>
<view class="authBtn" @tap="authUrl">去添加</view>
</view>
@@ -80,7 +81,7 @@
</template>
<script>
import { goods, Receive, create } from '@/apis/interfaces/mall'
import { goods, Receive, create, index } from '@/apis/interfaces/mall'
export default {
data() {
return {
@@ -109,20 +110,17 @@
regiArr : [],
regiId : 0,
regiIndex : 0,
}
}
};
},
onShow() {
// 获取商品详情数据
this.detailsInfo();
this.detailsInfo();
},
methods: {
// 商品详情数据
detailsInfo() {
goods(2).then(res => {
console.log(res)
this.detailsData = res
this.detailsImg = res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
this.canSample = res.canSample
@@ -137,17 +135,24 @@
// 去登陆
popLogin() {
this.$Router.push({ name: 'Login' });
},
},
// 分享
userCode(){
this.$Router.push({ name: 'UserCode' });
},
// 领取产品弹出
popClick() {
if(!this.detailsData.hasCase) {
this.authState = !this.authState
return
}
this.popShow = !this.popShow
// 获取省市区列表
if(this.popShow == true)this.createInfo();
popClick() {
if(!this.detailsData.hasCase) {
this.authState = !this.authState
return
}
this.$Router.push({ name: 'uricacidIndex' });
// this.popShow = !this.popShow
// // 获取省市区列表
// if(this.popShow == true)this.createInfo();
},
// 去认证

View File

@@ -58,7 +58,7 @@
<view class="title">血压</view>
<view class="submit">最近一次记录</view>
<view class="value">
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmHg
<text>{{ caseData ? caseData.quantity : 0 }}</text> mmHg
</view>
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
</view>
@@ -75,7 +75,7 @@
<image @tap="authTap" class="authPop-cloes" src="/static/icons/uricacidClose.png"></image>
<image class="authPop-img" src="/static/imgs/authPop_img.png" mode="aspectFill"></image>
<view class="authPop-cont">
请先添加个人档案成功后可添加尿酸
请先添加个人档案成功后可添加记录
</view>
<view class="authBtn" @tap="authUrl">去添加</view>
</view>

View File

@@ -10,28 +10,40 @@
<view class="top-time">
{{ lastData.log ? lastData.log.created_at : '您还没有上传过血糖值' }}
</view>
<view v-if="lastData.log" class="top-record" @click="$Router.push({name: 'uricacidList', params: {id: lastData.caseId}})">
<view v-if="lastData.log" class="top-record" @click="$Router.push({name: 'uricacidList', params: {id: lastData.caseId, type: tabType}})">
所有记录
</view>
</view>
<view class="uricacid">
<view class="uricacid-number">
<block v-if="lastData.log">
<text>{{ lastData.log.quantity }}</text>umol
<text>{{ lastData.log.quantity }}</text> {{lastData.Newscope.scope.unit}}
</block>
<block v-else>
<text>暂无数据</text>
</block>
</view>
<view class="uricacid-tips">
<text>男性血糖指标 {{ lastData.Newscope.man }}</text>
<text>性血糖指标 {{ lastData.Newscope.woman }}</text>
<view class="uricacid-tips">
<view v-if="tabType == 'hyperglycemia'">
<view>性血糖指标 {{ lastData.Newscope.man }}</view>
<view>女性血糖指标 {{ lastData.Newscope.woman }}</view>
</view>
<view v-if="tabType == 'hyperlipidemia'">
<view>男性血脂指标 {{ lastData.Newscope.man }}</view>
<view>女性血脂指标 {{ lastData.Newscope.woman }}</view>
</view>
<view v-if="tabType == 'hypertension'">
<view>男性血压指标 {{ lastData.Newscope.man }}</view>
<view>女性血压指标 {{ lastData.Newscope.woman }}</view>
</view>
</view>
</view>
</view>
<view class="While analyse">
<view class="analyse-title">
血糖趋势分析
<text v-if="tabType == 'hyperglycemia'">血糖趋势分析</text>
<text v-if="tabType == 'hyperlipidemia'">血脂趋势分析</text>
<text v-if="tabType == 'hypertension'">血压趋势分析</text>
</view>
<view class="analyse-text" v-if="lastData.log">
当前血糖值为{{ lastData.log.quantity }}umol,
@@ -44,7 +56,9 @@
暂无分析数据
</view>
<view class="analyse-btn" @click="recordClick">
记录尿酸值
<text v-if="tabType == 'hyperglycemia'">记录血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">记录血脂值</text>
<text v-if="tabType == 'hypertension'">记录血压值</text>
</view>
</view>
@@ -55,18 +69,26 @@
<view class="recordCont-title">
<image @click="recordClick" class="recordCont-title-close" src="/static/icons/uricacidClose.png" mode="aspectFill"></image>
<view class="recordCont-title-text">
新增尿酸记录
</view>
<text v-if="tabType == 'hyperglycemia'">记录血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">记录血脂值</text>
<text v-if="tabType == 'hypertension'">记录血压值</text>
</view>
<view class="recordCont-title-btn">
<button form-type="submit">完成</button>
</view>
</view>
<view class="recordCont-form">
<view class="site-input">
<label>请输入尿酸值</label>
<label>
<text v-if="tabType == 'hyperglycemia'">血糖值</text>
<text v-if="tabType == 'hyperlipidemia'">血脂值</text>
<text v-if="tabType == 'hypertension'">血压值</text>
</label>
<view class="recordCont-title-input">
<input placeholder="请输入" name="quantity" type="digit"></input>
<text>umol</text>
<text v-if="tabType == 'hyperglycemia'">mmol/L</text>
<text v-if="tabType == 'hyperlipidemia'">mmol/L</text>
<text v-if="tabType == 'hypertension'">mmHg</text>
</view>
</view>
<view class="site-remarks">
@@ -74,7 +96,7 @@
<text>最大限制30字</text>
</view>
<view class="site-data">
<label>尿酸记录日期</label>
<label>记录日期</label>
<view class="site-data-text">
<picker mode="date" :value="date" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
@@ -170,16 +192,16 @@
},
// 提交表单
siteform(e) {
let newQuantity = e.detail.value.quantity,
newRemark = e.detail.value.remark,
newChecked = this.date,
newCover = this.cover.path
AddlastLog(this.lastData.caseId, {
quantity : newQuantity,
remark : newRemark,
checked_at : newChecked,
cover : newCover
siteform(e) {
console.log(this.lastData)
AddlastLog(this.lastData.caseId, {
type : this.tabType,
quantity : e.detail.value.quantity,
remark : e.detail.value.remark,
checked_at : this.date,
cover : this.cover.path
}).then(res => {
this.recordShow = false
this.cover = ''
@@ -323,7 +345,7 @@
text-align: center;
}
.recordCont-title-btn button {
background-color: #6e79ec;
background-color: #4490ff;
width: 120rpx;
text-align: center;
color: #FFFFFF;

View File

@@ -10,10 +10,10 @@
<view class="list-label" v-for="(item, index) in LogArr" :key="index" @click="showSee(item.gout_case_log_id)">
<view class="list-title">
<view class="list-regular">
<text>{{ item.quantity }}</text> umol
<text>{{ item.quantity }}</text>{{item.type.unit}}
</view>
<view class="list-rise" :class="{active : item.diff.symbol == '+'}">
<text>{{ item.diff.symbol == '+' ? '上升' : '下降'}}</text> {{ item.diff.value }}umol
<text>{{ item.diff.symbol == '+' ? '上升' : '下降'}}</text> {{ item.diff.value }}
</view>
</view>
<view class="list-text">
@@ -45,7 +45,7 @@
<view class="recordCont-title">
<image @click="recordClick" class="recordCont-title-close" src="/static/icons/uricacidClose.png" mode="aspectFill"></image>
<view class="recordCont-title-text">
尿酸详情
{{LogInfo.type.text}}详情
</view>
<view class="recordCont-title-btn">
<view @click="delLogs">删除记录</view>
@@ -53,9 +53,9 @@
</view>
<view class="recordCont-form">
<view class="site-input">
<label>尿酸</label>
<label>{{LogInfo.type.text}}</label>
<view class="recordCont-title-input">
{{ LogInfo.quantity }}<text>umol</text>
{{ LogInfo.quantity }}<text>{{LogInfo.type.unit}}</text>
</view>
</view>
<view class="site-input">
@@ -65,7 +65,7 @@
</view>
</view>
<view class="site-data">
<label>尿酸记录日期</label>
<label>{{LogInfo.type.text}}记录日期</label>
<view class="site-data-text">
{{ LogInfo.created_at }}
</view>
@@ -90,12 +90,13 @@
recordShow : false,
page : {}, //分页信息
lodingStats : false ,//加载状态
tabType : 'hyperglycemia'
tabType : 'hyperglycemia',
}
},
onLoad() {
onLoad(e) {
// 获取尿酸记录列表
this.lastInfo();
this.tabType = e.type
this.lastInfo();
},
methods: {
// 切换数据