整理框架完成
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="search">
|
||||
<uni-search-bar placeholder="搜索" @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus"
|
||||
@input="input" @cancel="cancel" cancelButton="none" @clear="clear">
|
||||
</uni-search-bar>
|
||||
</view>
|
||||
<ws-chat :list="list"></ws-chat>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchValue: '',
|
||||
list: [{
|
||||
userId: 1,
|
||||
nickname: '张三',
|
||||
avatar: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
|
||||
note: '您收到一条消息',
|
||||
badge: 99,
|
||||
to: '/package/order/order',
|
||||
createTime: '2023-12-12'
|
||||
}, {
|
||||
userId: 2,
|
||||
nickname: '李四',
|
||||
avatar: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
|
||||
note: '您收到一条消息',
|
||||
badge: 'dot',
|
||||
createTime: '2023-12-12'
|
||||
}, {
|
||||
userId: 3,
|
||||
nickname: '王五',
|
||||
avatar: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
|
||||
note: '您收到一条消息',
|
||||
badge: 5,
|
||||
createTime: '2023-12-12'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search(res) {
|
||||
uni.showToast({
|
||||
title: '搜索:' + res.value,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
input(res) {
|
||||
console.log('----input:', res)
|
||||
},
|
||||
clear(res) {
|
||||
uni.showToast({
|
||||
title: 'clear事件,清除值为:' + res.value,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
blur(res) {
|
||||
uni.showToast({
|
||||
title: 'blur事件,输入值为:' + res.value,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
focus(e) {
|
||||
uni.showToast({
|
||||
title: 'focus事件,输出值为:' + e.value,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
cancel(res) {
|
||||
uni.showToast({
|
||||
title: '点击取消,输入值为:' + res.value,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
@@ -101,6 +101,16 @@
|
||||
</template>
|
||||
</uv-vtabs>
|
||||
|
||||
|
||||
<!-- 购物车 -->
|
||||
<view class="cart-icon">
|
||||
<view class="icon" style="position: relative" @click="navTo(`/package/cart/index`)">
|
||||
<uv-badge type="error" max="40" :value="cart.totalNums"
|
||||
style="position: absolute; top: -1px; right: -1px; z-index: 9;"></uv-badge>
|
||||
<uv-icon name="shopping-cart" size="30" color="#0c9d04"></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付密码弹窗 -->
|
||||
<uni-popup ref="specForm" type="center" border-radius="10px 10px 0 0">
|
||||
<uni-card :title="goods.goodsName" :border="false" :is-shadow="false" :padding="0">
|
||||
@@ -135,7 +145,7 @@
|
||||
<view class="flex m-20 justify-between items-center">
|
||||
<view class="total-price web-text-heading">
|
||||
总计
|
||||
<text class="text-red-500" style="font-weight: 500; font-size: 36rpx">¥12.99</text>
|
||||
<text class="text-red-500" style="font-weight: 500; font-size: 36rpx">¥{{ goods.price }}</text>
|
||||
</view>
|
||||
<view class="add-cart">
|
||||
<uv-button type="warning" class="add-address" iconSize="16" :customStyle="{ borderRadius: '6px', padding: '5px 20px',
|
||||
@@ -162,10 +172,12 @@ import {useMpStore} from "@/store/modules/mp";
|
||||
import UvGap from "@/uni_modules/uv-gap/components/uv-gap/uv-gap.vue";
|
||||
import * as CartApi from "@/api/shop/cart";
|
||||
|
||||
import {ShoppingCartOutlined} from '@ant-design/icons-vue';
|
||||
|
||||
const mpStore = useMpStore();
|
||||
|
||||
export default {
|
||||
components: {UvGap, UvButton, UvImage, UvAvatar, Layout},
|
||||
components: {UvGap, UvButton, UvImage, UvAvatar, Layout, ShoppingCartOutlined},
|
||||
data() {
|
||||
return {
|
||||
shopInfo: {},
|
||||
@@ -185,9 +197,7 @@ export default {
|
||||
// 支付密码是否正确
|
||||
isPayPasswordCorrect: false,
|
||||
disabledPayPayPassword: false,
|
||||
payPassword: '',
|
||||
totalPrice: 0,
|
||||
cartNum: 0
|
||||
payPassword: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -239,14 +249,15 @@ export default {
|
||||
CartApi.listCart({type: 0, isNew: false}).then(data => {
|
||||
if (data) {
|
||||
this.cart = data
|
||||
uni.setTabBarBadge({
|
||||
index: 2,
|
||||
text: `${data.totalNums}`
|
||||
})
|
||||
// uni.setTabBarBadge({
|
||||
// index: 1,
|
||||
// text: `${data.totalNums}`
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
console.log('>>>>>url')
|
||||
uni.navigateTo({url})
|
||||
},
|
||||
change(index) {
|
||||
@@ -314,6 +325,11 @@ export default {
|
||||
},
|
||||
onSlide() {
|
||||
|
||||
},
|
||||
search(){
|
||||
uni.navigateTo({
|
||||
url: '/package/goods/index?keywords=' + this.goods.goodsId
|
||||
})
|
||||
},
|
||||
save() {
|
||||
// 跳转页面
|
||||
@@ -366,36 +382,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.checkout-car {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
z-index: 9999;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #000000;
|
||||
border-radius: 100px;
|
||||
align-items: center;
|
||||
|
||||
.car-selected {
|
||||
color: #ccc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.car-total {
|
||||
display: flex;
|
||||
color: #ebcf00;
|
||||
align-items: center;
|
||||
padding-left: 40rpx;
|
||||
|
||||
.save-btn {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gap {
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
@@ -468,4 +454,25 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cart-icon {
|
||||
position: fixed;
|
||||
bottom: 200rpx;
|
||||
right: 20rpx;
|
||||
width: 75rpx;
|
||||
height: 75rpx;
|
||||
font-size: 33rpx;
|
||||
color: #0c9d04;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 100rpx;
|
||||
cursor: pointer;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.2);
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -16,54 +16,71 @@
|
||||
<!-- 收藏|关注|足迹|作品 -->
|
||||
<!-- <ws-user-collect></ws-user-collect> -->
|
||||
<!-- 我的资产 -->
|
||||
<ws-my-asset :data="users" :is-login="isLogin" @done="openLogin"></ws-my-asset>
|
||||
<ws-my-asset :data="userInfo" :users="users" :config="config" :is-login="isLogin" @done="openLogin"></ws-my-asset>
|
||||
<!-- 我的订单 -->
|
||||
<!-- <ws-user-order :order="order" :is-login="isLogin" @done="openLogin"></ws-user-order> -->
|
||||
<!-- 其他功能 -->
|
||||
<uni-card :border="false" :padding="0">
|
||||
<!-- 场馆管理可见-->
|
||||
<block v-if="hasMerchantRole || hasMerchantClerkRole">
|
||||
<view class="server" style="min-height: 200px">
|
||||
<uni-list :border="false">
|
||||
<block v-for="(item, index) in mpMenus" :key="index">
|
||||
<block v-if="index === '1981'" v-for="(v,i) in item">
|
||||
<uni-list-item :thumb="v.avatar" link @click="navTo(item)">
|
||||
<template v-slot:body>
|
||||
<view class="slot-box">
|
||||
<text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{
|
||||
v.title
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
</block>
|
||||
<!-- <uni-card :border="false" :padding="0">-->
|
||||
<!-- <!– 场馆管理可见–>-->
|
||||
<!-- <block v-if="hasMerchantRole || hasMerchantClerkRole">-->
|
||||
<!-- <view class="server" style="min-height: 200px">-->
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- </uni-list>-->
|
||||
<!-- </view>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-else>-->
|
||||
<!-- <!– 普通会员菜单 –>-->
|
||||
<!-- <view class="server" style="min-height: 200px">-->
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- </uni-list>-->
|
||||
<!-- </view>-->
|
||||
<!-- </block>-->
|
||||
<!-- </uni-card>-->
|
||||
|
||||
<block v-for="(item, index) in mpMenus" :key="index">
|
||||
<uni-card :title="item[0].groupName" :border="false" :padding="0">
|
||||
<uv-skeleton rows="1" rowsHeight="30" rowsWidth="100%" :loading="mpMenus.length === 0" :title="false">
|
||||
<div class="flex space-around py-6 flex-wrap">
|
||||
<block v-for="(item,index) in item" :key="index">
|
||||
<div class="service-item flex flex-col justify-center items-center web-cell-content web-text-center px-20"
|
||||
@click="navTo(item)">
|
||||
<image :src="item.avatar" style="width: 30px; height: 30px;" mode="widthFix"></image>
|
||||
<text>{{ item.title }}</text>
|
||||
</div>
|
||||
</block>
|
||||
</uni-list>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 普通会员菜单 -->
|
||||
<view class="server" style="min-height: 200px">
|
||||
<uni-list :border="false">
|
||||
<block v-for="(item, index) in mpMenus" :key="index">
|
||||
<block v-if="index === '1981'" v-for="(v,i) in item">
|
||||
<uni-list-item :thumb="item.avatar" link @click="navTo(item)">
|
||||
<template v-slot:body>
|
||||
<view class="slot-box">
|
||||
<text class="slot-text" :style="{ color: item.color ? item.color : '#333333' }">{{
|
||||
v.title
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
</block>
|
||||
</block>
|
||||
</uni-list>
|
||||
</view>
|
||||
</block>
|
||||
</uni-card>
|
||||
</div>
|
||||
<w-gap height="5"></w-gap>
|
||||
</uv-skeleton>
|
||||
</uni-card>
|
||||
</block>
|
||||
|
||||
<!-- <ws-personal :form="users" ref="personal" @done="reload" />-->
|
||||
<!-- 登录组件 -->
|
||||
@@ -77,17 +94,18 @@
|
||||
<script>
|
||||
import {useUserStore} from '@/store/modules/user';
|
||||
import * as UserApi from '@/api/booking/users';
|
||||
import * as MpMenuApi from '@/api/cms/mp-menu/index';
|
||||
import * as MpMenuApi from '@/api/cms/mp-menu';
|
||||
import * as UserCardApi from '@/api/booking/userCard';
|
||||
import {updateUsers} from '@/api/shop/users';
|
||||
import {openUrl} from '@/utils/common';
|
||||
import {useMpStore} from "@/store/modules/mp";
|
||||
import {getWxOpenId} from '@/api/passport/login';
|
||||
import Layout from "@/components/layout.vue";
|
||||
|
||||
import {useTenantStore} from '@/store/modules/tenant';
|
||||
|
||||
const tenantStore = useTenantStore();
|
||||
|
||||
const mpStore = useMpStore();
|
||||
const userStore = useUserStore();
|
||||
|
||||
export default {
|
||||
@@ -99,6 +117,7 @@ export default {
|
||||
userInfo: {},
|
||||
fields: {},
|
||||
logo: '',
|
||||
config: {},
|
||||
bookingUser: {},
|
||||
merchantList: [],
|
||||
server: [],
|
||||
@@ -129,6 +148,10 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
// 当前小程序信息
|
||||
const info = await mpStore.fetchMpInfo();
|
||||
// 配置信息
|
||||
app.config = info.config
|
||||
// 当前租户信息
|
||||
const tenantInfo = await tenantStore.fetchTenantInfo();
|
||||
app.logo = tenantInfo.websiteLogo;
|
||||
@@ -252,4 +275,9 @@ page {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss"></style>
|
||||
<style lang="scss">
|
||||
.service-item{
|
||||
width: 130rpx !important;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user