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