Merge remote-tracking branch 'origin'
合并order-729分分支代码
This commit is contained in:
@@ -37,12 +37,13 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { getLoginUserPhone } from '@/request/api/LoginApi'
|
||||
|
||||
// 假数据
|
||||
const userInfo = ref({
|
||||
avatar: '/static/default-avatar.png',
|
||||
nickname: '微信用户',
|
||||
phone: '182****0628'
|
||||
phone: ''
|
||||
})
|
||||
|
||||
// 功能菜单列表(带 type 区分操作类型)
|
||||
@@ -53,11 +54,18 @@ const menuList = ref([
|
||||
{ label: '联系客服', type: 'action', action: 'contactService' }
|
||||
])
|
||||
|
||||
// 生命周期
|
||||
// 生命周期钩子
|
||||
onMounted(() => {
|
||||
// TODO: 这里调用接口获取用户信息
|
||||
getLoginUserPhoneInfo()
|
||||
})
|
||||
|
||||
const getLoginUserPhoneInfo = async () => {
|
||||
const res = await getLoginUserPhone()
|
||||
if (res.code === 0) {
|
||||
userInfo.value.phone = res.data
|
||||
}
|
||||
}
|
||||
|
||||
// 处理菜单点击
|
||||
const handleMenuClick = (item) => {
|
||||
if (item.type === 'navigate' && item.url) {
|
||||
|
||||
@@ -2,30 +2,32 @@
|
||||
<view class="container">
|
||||
<ModuleTitle :title="commodityDTO.title" />
|
||||
<view class="container-scroll">
|
||||
<view class="mk-card-item" v-for="(item, index) in commodityDTO.commodityList" :key="`${item.commodityId}-${index}`">
|
||||
<!-- <view class="card-badge">超值推荐</view> -->
|
||||
<image class="card-img" :src="item.commodityIcon" mode="aspectFill" />
|
||||
<view class="card-content">
|
||||
<view class="card-title-column">
|
||||
<text class="card-title">{{ item.commodityName }}</text>
|
||||
<view class="card-tags" v-for="(tag) in item.commodityTradeRuleList" :key="tag">
|
||||
<text class="card-tag">{{ tag }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-for="(serviceItem, index) in item.commodityServices" :key="serviceItem.serviceTitle">
|
||||
<view v-if="index < 3" class="card-desc">· {{ serviceItem.serviceTitle }}</view>
|
||||
</template>
|
||||
<view class="card-bottom-row">
|
||||
<view class="card-price-row">
|
||||
<text class="card-price-fu">¥</text>
|
||||
<text class="card-price">{{ item.commodityPrice }}</text>
|
||||
<text class="card-unit">/人</text>
|
||||
</view>
|
||||
<view v-for="(item, index) in commodityDTO.commodityList" :key="`${item.commodityId}-${index}`">
|
||||
<view class="mk-card-item" @click="placeOrderHandle(item)">
|
||||
<!-- <view class="card-badge">超值推荐</view> -->
|
||||
<image class="card-img" :src="item.commodityIcon" mode="aspectFill" />
|
||||
<view class="card-content">
|
||||
<view class="card-title-column">
|
||||
<text class="card-title">{{ item.commodityName }}</text>
|
||||
<view class="card-tags" v-for="(tag) in item.commodityTradeRuleList" :key="tag">
|
||||
<text class="card-tag">{{ tag }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-for="(serviceItem, index) in item.commodityServices" :key="serviceItem.serviceTitle">
|
||||
<view v-if="index < 3" class="card-desc">· {{ serviceItem.serviceTitle }}</view>
|
||||
</template>
|
||||
<view class="card-bottom-row">
|
||||
<view class="card-price-row">
|
||||
<text class="card-price-fu">¥</text>
|
||||
<text class="card-price">{{ item.commodityPrice }}</text>
|
||||
<text class="card-unit">/人</text>
|
||||
</view>
|
||||
|
||||
<text class="card-btn" @click="placeOrderHandle(item)">下单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="card-btn">下单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -142,10 +144,11 @@
|
||||
.card-tag {
|
||||
background: #f5f5f5;
|
||||
color: #ff6600;
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
border-radius: 4px;
|
||||
padding: 0 6px;
|
||||
margin-left: 2px;
|
||||
border: 1px solid #ff6600;
|
||||
}
|
||||
|
||||
.card-desc {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
width: 100%;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -2,29 +2,30 @@
|
||||
<view class="container">
|
||||
<ModuleTitle title="相关商品" />
|
||||
<view class="container-scroll">
|
||||
<view class="mk-card-item" v-for="(item, index) in commodityList" :key="`${item.commodityId}-${index}`">
|
||||
<image class="card-img" :src="item.commodityPhoto" mode="aspectFill" />
|
||||
<view class="card-content">
|
||||
<view class="card-title-column">
|
||||
<text class="card-title">{{ item.commodityName }}</text>
|
||||
<view class="card-tags" v-for="(tag) in item.commodityTradeRuleList" :key="tag">
|
||||
<text class="card-tag">{{ tag }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-for="(serviceItem, index) in item.commodityServices" :key="serviceItem.serviceTitle">
|
||||
<view v-if="index < 3" class="card-desc">· {{ serviceItem.serviceTitle }}</view>
|
||||
</template>
|
||||
<view class="card-bottom-row">
|
||||
<view class="card-price-row">
|
||||
<text class="card-price-fu">¥</text>
|
||||
<text class="card-price">{{ item.specificationPrice }}</text>
|
||||
<text class="card-unit">/人</text>
|
||||
</view>
|
||||
|
||||
<text class="card-btn" @click="placeOrderHandle(item)">下单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in commodityList" :key="`${item.commodityId}-${index}`">
|
||||
<view class="mk-card-item" @click="placeOrderHandle(item)">
|
||||
<image class="card-img" :src="item.commodityPhoto" mode="aspectFill" />
|
||||
<view class="card-content">
|
||||
<view class="card-title-column">
|
||||
<text class="card-title">{{ item.commodityName }}</text>
|
||||
<view class="card-tags" v-for="(tag) in item.commodityTradeRuleList" :key="tag">
|
||||
<text class="card-tag">{{ tag }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-for="(serviceItem, index) in item.commodityServices" :key="serviceItem.serviceTitle">
|
||||
<view v-if="index < 3" class="card-desc">· {{ serviceItem.serviceTitle }}</view>
|
||||
</template>
|
||||
<view class="card-bottom-row">
|
||||
<view class="card-price-row">
|
||||
<text class="card-price-fu">¥</text>
|
||||
<text class="card-price">{{ item.specificationPrice }}</text>
|
||||
<text class="card-unit">/人</text>
|
||||
</view>
|
||||
<text class="card-btn">下单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -50,7 +51,7 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
margin-bottom: 8px 0;
|
||||
margin: 6px 0 0;
|
||||
|
||||
.container-scroll {
|
||||
display: flex;
|
||||
@@ -142,10 +143,11 @@
|
||||
.card-tag {
|
||||
background: #f5f5f5;
|
||||
color: #ff6600;
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
border-radius: 4px;
|
||||
padding: 0 6px;
|
||||
margin-left: 2px;
|
||||
border: 1px solid #ff6600;
|
||||
}
|
||||
|
||||
.card-desc {
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
<view class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<view class="container-scroll">
|
||||
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
|
||||
<image :src="item.coverPhoto" mode="widthFix"></image>
|
||||
<text>{{ item.topic }}</text>
|
||||
</view>
|
||||
<view v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
|
||||
<view class="mk-card-item" @click="sendReply(item)">
|
||||
<image :src="item.coverPhoto" mode="widthFix"></image>
|
||||
<text>{{ item.topic }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
<view class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<view class="container-scroll">
|
||||
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
|
||||
<image :src="item.coverPhoto" mode="aspectFill"></image>
|
||||
<view class="overlay-gradient">
|
||||
<text class="overlay-text">{{ item.topic }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
|
||||
<view class="mk-card-item" @click="sendReply(item)">
|
||||
<image :src="item.coverPhoto" mode="aspectFill"></image>
|
||||
<view class="overlay-gradient">
|
||||
<text class="overlay-text">{{ item.topic }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -23,6 +23,11 @@ const checkUserPhone = (args) => {
|
||||
return request.get("/hotelBiz/user/checkUserHasBindPhone", args);
|
||||
};
|
||||
|
||||
// 获取登录用户手机号
|
||||
const getLoginUserPhone = (args) => {
|
||||
return request.get("/hotelBiz/user/getLoginUserPhone", args);
|
||||
};
|
||||
|
||||
// 获取服务协议
|
||||
const getServiceAgreement = (args) => {
|
||||
return request.get("/hotelBiz/mainScene/serviceAgreement", args);
|
||||
@@ -37,6 +42,7 @@ export {
|
||||
wxLogin,
|
||||
bindUserPhone,
|
||||
checkUserPhone,
|
||||
getLoginUserPhone,
|
||||
getServiceAgreement,
|
||||
getPrivacyAgreement,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user