Compare commits
No commits in common. "83beb3513c9cb53962d3d9769a380fa18e5e31c3" and "d4f85d9078529bac5099277c27824bffa1db5318" have entirely different histories.
83beb3513c
...
d4f85d9078
9
env/.env
vendored
9
env/.env
vendored
@ -7,10 +7,10 @@ VITE_WX_APPID = 'wxf2c6d4b7361366b4'
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
VITE_APP_PUBLIC_BASE=/acdr/
|
||||
|
||||
VITE_SERVER_BASEURL = 'http://47.99.70.12:28184/api'
|
||||
# VITE_SERVER_BASEURL = 'http://47.99.70.12:28184/api'
|
||||
# VITE_UPLOAD_BASEURL = 'http://47.99.70.12:28184'
|
||||
# VITE_SERVER_BASEURL = 'http://localhost:28184/api'
|
||||
VITE_WS_BASEURL = 'ws://47.99.70.12:28184/api'
|
||||
VITE_SERVER_BASEURL = 'http://localhost:28184/api'
|
||||
VITE_WS_BASEURL = 'ws://localhost:28184/api'
|
||||
VITE_UPLOAD_BASEURL = 'http://localhost:28184'
|
||||
VITE_OSS_BASEURL = 'http://116.204.119.171:9000/linghe'
|
||||
|
||||
@ -25,8 +25,7 @@ SHOPRO_VERSION = v1.8.3
|
||||
SHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn
|
||||
|
||||
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
|
||||
# SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
|
||||
SHOPRO_DEV_BASE_URL = http://47.99.70.12:48080
|
||||
SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080
|
||||
### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc
|
||||
|
||||
# 后端接口前缀(一般不建议调整)
|
||||
|
@ -21,7 +21,7 @@ export default defineUniPages({
|
||||
},
|
||||
pages: [
|
||||
{
|
||||
path: 'modules/mall/index/index',
|
||||
path: 'pages/mall/index/index',
|
||||
aliasPath: '/mall',
|
||||
style: {
|
||||
navigationBarTitleText: '宠物商城',
|
||||
@ -35,7 +35,7 @@ export default defineUniPages({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/user',
|
||||
path: 'pages/mall/index/user',
|
||||
style: {
|
||||
navigationBarTitleText: '个人中心',
|
||||
enablePullDownRefresh: true,
|
||||
@ -47,7 +47,7 @@ export default defineUniPages({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/category',
|
||||
path: 'pages/mall/index/category',
|
||||
style: {
|
||||
navigationBarTitleText: '商品分类',
|
||||
},
|
||||
@ -58,7 +58,7 @@ export default defineUniPages({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/cart',
|
||||
path: 'pages/mall/index/cart',
|
||||
style: {
|
||||
navigationBarTitleText: '购物车',
|
||||
},
|
||||
@ -69,13 +69,13 @@ export default defineUniPages({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/login',
|
||||
path: 'pages/mall/index/login',
|
||||
style: {
|
||||
navigationBarTitleText: '登录',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/search',
|
||||
path: 'pages/mall/index/search',
|
||||
style: {
|
||||
navigationBarTitleText: '搜索',
|
||||
},
|
||||
@ -86,7 +86,7 @@ export default defineUniPages({
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'modules/mall/index/page',
|
||||
path: 'pages/mall/index/page',
|
||||
style: {
|
||||
navigationBarTitleText: '',
|
||||
},
|
||||
@ -100,7 +100,7 @@ export default defineUniPages({
|
||||
],
|
||||
subPackages: [
|
||||
{
|
||||
root: 'modules/mall/goods',
|
||||
root: 'pages/mall/goods',
|
||||
pages: [
|
||||
{
|
||||
path: 'index',
|
||||
@ -165,7 +165,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/order',
|
||||
root: 'pages/mall/order',
|
||||
pages: [
|
||||
{
|
||||
path: 'detail',
|
||||
@ -265,7 +265,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/user',
|
||||
root: 'pages/mall/user',
|
||||
pages: [
|
||||
{
|
||||
path: 'info',
|
||||
@ -364,7 +364,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/commission',
|
||||
root: 'pages/mall/commission',
|
||||
pages: [
|
||||
{
|
||||
path: 'index',
|
||||
@ -465,7 +465,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/app',
|
||||
root: 'pages/mall/app',
|
||||
pages: [
|
||||
{
|
||||
path: 'sign',
|
||||
@ -482,7 +482,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/public',
|
||||
root: 'pages/mall/public',
|
||||
pages: [
|
||||
{
|
||||
path: 'setting',
|
||||
@ -532,7 +532,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/coupon',
|
||||
root: 'pages/mall/coupon',
|
||||
pages: [
|
||||
{
|
||||
path: 'list',
|
||||
@ -560,7 +560,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/chat',
|
||||
root: 'pages/mall/chat',
|
||||
pages: [
|
||||
{
|
||||
path: 'index',
|
||||
@ -577,7 +577,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/pay',
|
||||
root: 'pages/mall/pay',
|
||||
pages: [
|
||||
{
|
||||
path: 'index',
|
||||
@ -618,7 +618,7 @@ export default defineUniPages({
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'modules/mall/activity',
|
||||
root: 'pages/mall/activity',
|
||||
pages: [
|
||||
{
|
||||
path: 'groupon/detail',
|
||||
|
@ -49,8 +49,7 @@ onHide(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/style/index.scss";
|
||||
@import "@/scss/index.scss";
|
||||
@import '@/style/index.scss';
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "宠屋",
|
||||
"appid": "H57F2ACE4",
|
||||
"appid": "__UNI__9D479DC",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
|
@ -347,7 +347,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/index",
|
||||
"path": "pages/mall/index/index",
|
||||
"aliasPath": "/mall",
|
||||
"style": {
|
||||
"navigationBarTitleText": "宠物商城",
|
||||
@ -361,7 +361,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/user",
|
||||
"path": "pages/mall/index/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": true
|
||||
@ -373,7 +373,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/category",
|
||||
"path": "pages/mall/index/category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类"
|
||||
},
|
||||
@ -384,7 +384,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/cart",
|
||||
"path": "pages/mall/index/cart",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车"
|
||||
},
|
||||
@ -395,13 +395,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/login",
|
||||
"path": "pages/mall/index/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/search",
|
||||
"path": "pages/mall/index/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
},
|
||||
@ -412,7 +412,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "modules/mall/index/page",
|
||||
"path": "pages/mall/index/page",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
},
|
||||
@ -426,7 +426,7 @@
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "modules/mall/goods",
|
||||
"root": "pages/mall/goods",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index",
|
||||
@ -490,7 +490,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/order",
|
||||
"root": "pages/mall/order",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
@ -590,7 +590,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/user",
|
||||
"root": "pages/mall/user",
|
||||
"pages": [
|
||||
{
|
||||
"path": "info",
|
||||
@ -689,7 +689,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/commission",
|
||||
"root": "pages/mall/commission",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index",
|
||||
@ -790,7 +790,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/app",
|
||||
"root": "pages/mall/app",
|
||||
"pages": [
|
||||
{
|
||||
"path": "sign",
|
||||
@ -807,7 +807,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/public",
|
||||
"root": "pages/mall/public",
|
||||
"pages": [
|
||||
{
|
||||
"path": "setting",
|
||||
@ -857,7 +857,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/coupon",
|
||||
"root": "pages/mall/coupon",
|
||||
"pages": [
|
||||
{
|
||||
"path": "list",
|
||||
@ -885,7 +885,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/chat",
|
||||
"root": "pages/mall/chat",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index",
|
||||
@ -902,7 +902,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/pay",
|
||||
"root": "pages/mall/pay",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index",
|
||||
@ -943,7 +943,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "modules/mall/activity",
|
||||
"root": "pages/mall/activity",
|
||||
"pages": [
|
||||
{
|
||||
"path": "groupon/detail",
|
||||
|
@ -11,7 +11,7 @@
|
||||
<image :src="imgUrl('@/static/home/pb.png')" class="quick-service-image" />
|
||||
<text class="quick-service-text">宠物陪伴</text>
|
||||
</view>
|
||||
<view class="quick-service-card" @click="toPath('/mall/index/index')">
|
||||
<view class="quick-service-card" @click="toPath('/pages/mall/index/index')">
|
||||
<image :src="imgUrl('@/static/home/yl.png')" class="quick-service-image" />
|
||||
<text class="quick-service-text">定制商城</text>
|
||||
</view>
|
||||
|
@ -29,7 +29,7 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.test-css {
|
||||
// mt-4=>1rem=>16px;
|
||||
margin-top: 16px;
|
@ -22,7 +22,7 @@
|
||||
<view class="my-2 text-left text-sm">{{ recommendUrl }}</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- http://localhost:9000/#/modules/mall/index/request -->
|
||||
<!-- http://localhost:9000/#/pages/mall/index/request -->
|
||||
<wd-button @click="run" class="my-6">发送请求</wd-button>
|
||||
<view class="h-12">
|
||||
<view v-if="loading">loading...</view>
|
@ -26,6 +26,6 @@ const { loading, data, run } = useUpload({ user: '菲鸽' })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
//
|
||||
</style>
|
@ -26,7 +26,7 @@
|
||||
:price="state.data.headRecord.combinationPrice"
|
||||
priceColor="#E1212B"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/goods/groupon', {
|
||||
sheep.$router.go('/pages/mall/goods/groupon', {
|
||||
id: state.data.headRecord.activityId,
|
||||
})
|
||||
"
|
||||
@ -248,7 +248,7 @@ const shareInfo = computed(() => {
|
||||
|
||||
// 订单详情
|
||||
function onDetail(orderId) {
|
||||
sheep.$router.go('/modules/mall/order/detail', {
|
||||
sheep.$router.go('/pages/mall/order/detail', {
|
||||
id: orderId,
|
||||
})
|
||||
}
|
||||
@ -276,7 +276,7 @@ function onJoinGroupon() {
|
||||
|
||||
// 立即购买
|
||||
function onBuy(sku) {
|
||||
sheep.$router.go('/modules/mall/order/confirm', {
|
||||
sheep.$router.go('/pages/mall/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
order_type: 'goods',
|
||||
combinationActivityId: state.activity.id,
|
||||
@ -343,7 +343,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.recharge-box {
|
||||
position: relative;
|
||||
height: 100rpx;
|
@ -33,7 +33,7 @@
|
||||
size="lg"
|
||||
:data="item"
|
||||
:grouponTag="true"
|
||||
@click="sheep.$router.go('/modules/mall/goods/groupon', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/groupon', { id: item.id })"
|
||||
>
|
||||
<template v-slot:cart>
|
||||
<button class="ss-reset-button cart-btn">去拼团</button>
|
||||
@ -114,7 +114,7 @@ onLoad(() => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.page-bg {
|
||||
width: 100%;
|
||||
height: 458rpx;
|
@ -38,14 +38,14 @@
|
||||
<view class="order-card-footer ss-flex ss-row-right ss-p-x-20">
|
||||
<button
|
||||
class="detail-btn ss-reset-button"
|
||||
@tap="sheep.$router.go('/modules/mall/order/detail', { id: record.orderId })"
|
||||
@tap="sheep.$router.go('/pages/mall/order/detail', { id: record.orderId })"
|
||||
>
|
||||
订单详情
|
||||
</button>
|
||||
<button
|
||||
class="tool-btn ss-reset-button"
|
||||
:class="{ 'ui-BG-Main-Gradient': record.status === 0 }"
|
||||
@tap="sheep.$router.go('/modules/mall/activity/groupon/detail', { id: record.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/activity/groupon/detail', { id: record.id })"
|
||||
>
|
||||
{{ record.status === 0 ? '邀请拼团' : '拼团详情' }}
|
||||
</button>
|
||||
@ -157,7 +157,7 @@ onPullDownRefresh(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.swiper-box {
|
||||
flex: 1;
|
||||
|
@ -23,7 +23,7 @@
|
||||
class="goods-md-box"
|
||||
size="md"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'left')"
|
||||
>
|
||||
<template v-slot:cart>
|
||||
@ -38,7 +38,7 @@
|
||||
class="goods-md-box"
|
||||
size="md"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'right')"
|
||||
>
|
||||
<template v-slot:cart>
|
||||
@ -158,7 +158,7 @@ onLoad(async (options) => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-list-box {
|
||||
box-sizing: border-box;
|
||||
width: 50%;
|
@ -91,7 +91,7 @@
|
||||
:data="{ ...activity, price: activity.seckillPrice }"
|
||||
:goodsFields="goodsFields"
|
||||
:seckillTag="true"
|
||||
@click="sheep.$router.go('/modules/mall/goods/seckill', { id: activity.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/seckill', { id: activity.id })"
|
||||
>
|
||||
<!-- 抢购进度 -->
|
||||
<template #activity>
|
||||
@ -252,7 +252,7 @@ onLoad(async () => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 顶部背景图
|
||||
.page-bg {
|
||||
width: 100%;
|
@ -164,7 +164,7 @@ onReady(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.header-box {
|
||||
border-top: 2rpx solid rgba(#dfdfdf, 0.5);
|
||||
}
|
@ -19,5 +19,5 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -59,7 +59,7 @@ function sendMessage() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.send-wrap {
|
||||
padding: 18rpx 20rpx;
|
||||
background: #fff;
|
@ -44,7 +44,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import MessageListItem from '@/modules/mall/chat/components/messageListItem.vue'
|
||||
import MessageListItem from '@/pages/mall/chat/components/messageListItem.vue'
|
||||
import { reactive, ref } from 'vue'
|
||||
import KeFuApi from '@/sheep/api/promotion/kefu'
|
||||
import { isEmpty } from '@/sheep/helper/utils'
|
||||
@ -108,5 +108,5 @@ const onScrollToUpper = () => {
|
||||
defineExpose({ getMessageList, refreshMessageList })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -71,7 +71,7 @@
|
||||
<GoodsItem
|
||||
:goodsData="getMessageContent(message)"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/goods/index', {
|
||||
sheep.$router.go('/pages/mall/goods/index', {
|
||||
id: getMessageContent(message).id,
|
||||
})
|
||||
"
|
||||
@ -81,7 +81,7 @@
|
||||
<OrderItem
|
||||
:orderData="getMessageContent(message)"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/order/detail', {
|
||||
sheep.$router.go('/pages/mall/order/detail', {
|
||||
id: getMessageContent(message).id,
|
||||
})
|
||||
"
|
||||
@ -105,12 +105,12 @@
|
||||
<script setup>
|
||||
import { computed, unref } from 'vue'
|
||||
import dayjs from 'dayjs'
|
||||
import { KeFuMessageContentTypeEnum, UserTypeEnum } from '@/modules/mall/chat/util/constants'
|
||||
import { emojiList } from '@/modules/mall/chat/util/emoji'
|
||||
import { KeFuMessageContentTypeEnum, UserTypeEnum } from '@/pages/mall/chat/util/constants'
|
||||
import { emojiList } from '@/pages/mall/chat/util/emoji'
|
||||
import sheep from '@/sheep'
|
||||
import { formatDate } from '@/sheep/util'
|
||||
import GoodsItem from '@/modules/mall/chat/components/goods.vue'
|
||||
import OrderItem from '@/modules/mall/chat/components/order.vue'
|
||||
import GoodsItem from '@/pages/mall/chat/components/goods.vue'
|
||||
import OrderItem from '@/pages/mall/chat/components/order.vue'
|
||||
|
||||
const props = defineProps({
|
||||
// 消息
|
||||
@ -173,7 +173,7 @@ function selEmojiFile(name) {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.message-item {
|
||||
margin-bottom: 33rpx;
|
||||
}
|
@ -38,7 +38,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.order-list-card-box {
|
||||
.order-card-header {
|
||||
height: 80rpx;
|
@ -102,7 +102,7 @@ function loadmore() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.select-popup {
|
||||
max-height: 600rpx;
|
||||
|
@ -68,7 +68,7 @@
|
||||
/**
|
||||
* 聊天工具
|
||||
*/
|
||||
import { emojiPage } from '@/modules/mall/chat/util/emoji'
|
||||
import { emojiPage } from '@/pages/mall/chat/util/emoji'
|
||||
import sheep from '@/sheep'
|
||||
|
||||
const props = defineProps({
|
||||
@ -107,7 +107,7 @@ function onShowSelect(mode) {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.content {
|
||||
width: 100%;
|
||||
align-content: space-around;
|
@ -42,16 +42,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import MessageList from '@/modules/mall/chat/components/messageList.vue'
|
||||
import MessageList from '@/pages/mall/chat/components/messageList.vue'
|
||||
import { reactive, ref, toRefs } from 'vue'
|
||||
import sheep from '@/sheep'
|
||||
import ToolsPopup from '@/modules/mall/chat/components/toolsPopup.vue'
|
||||
import MessageInput from '@/modules/mall/chat/components/messageInput.vue'
|
||||
import SelectPopup from '@/modules/mall/chat/components/select-popup.vue'
|
||||
import ToolsPopup from '@/pages/mall/chat/components/toolsPopup.vue'
|
||||
import MessageInput from '@/pages/mall/chat/components/messageInput.vue'
|
||||
import SelectPopup from '@/pages/mall/chat/components/select-popup.vue'
|
||||
import {
|
||||
KeFuMessageContentTypeEnum,
|
||||
WebSocketMessageTypeConstants,
|
||||
} from '@/modules/mall/chat/util/constants'
|
||||
} from '@/pages/mall/chat/util/constants'
|
||||
import FileApi from '@/sheep/api/infra/file'
|
||||
import KeFuApi from '@/sheep/api/promotion/kefu'
|
||||
import { useWebSocket } from '@/sheep/hooks/useWebSocket'
|
||||
@ -179,7 +179,7 @@ const isReconnecting = toRefs(options).isReconnecting // 重连状态
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.chat-wrap {
|
||||
.page-bg {
|
||||
position: absolute;
|
@ -149,7 +149,7 @@ function getMonthTimes() {
|
||||
// TODO 芋艿:css 需要优化下;并且展示样式有问题
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.CommissionRank .header {
|
||||
width: 100%;
|
||||
height: 344rpx;
|
@ -16,7 +16,7 @@
|
||||
/>
|
||||
</button>
|
||||
</view>
|
||||
<view class="ss-flex" @tap="sheep.$router.go('/modules/mall/commission/wallet')">
|
||||
<view class="ss-flex" @tap="sheep.$router.go('/pages/mall/commission/wallet')">
|
||||
<view class="header-title ss-m-r-4">查看明细</view>
|
||||
<text class="cicon-play-arrow" />
|
||||
</view>
|
||||
@ -69,7 +69,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.account-card {
|
||||
position: relative;
|
||||
z-index: 3;
|
@ -102,7 +102,7 @@ const hideModal = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.ss-modal-box {
|
||||
max-height: 1000rpx;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
@ -49,7 +49,7 @@ onShow(async () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.notice-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
@ -28,7 +28,7 @@ const state = reactive({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 用户资料卡片
|
||||
.user-card {
|
||||
width: 690rpx;
|
@ -94,7 +94,7 @@ function loadmore() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.distribution-log-wrap {
|
||||
position: relative;
|
||||
z-index: 3;
|
@ -35,27 +35,27 @@ const state = reactive({
|
||||
{
|
||||
img: '/static/img/shop/commission/commission_icon1.png',
|
||||
title: '我的团队',
|
||||
path: '/modules/mall/commission/team',
|
||||
path: '/pages/mall/commission/team',
|
||||
},
|
||||
{
|
||||
img: '/static/img/shop/commission/commission_icon2.png',
|
||||
title: '佣金明细',
|
||||
path: '/modules/mall/commission/wallet',
|
||||
path: '/pages/mall/commission/wallet',
|
||||
},
|
||||
{
|
||||
img: '/static/img/shop/commission/commission_icon3.png',
|
||||
title: '分销订单',
|
||||
path: '/modules/mall/commission/order',
|
||||
path: '/pages/mall/commission/order',
|
||||
},
|
||||
{
|
||||
img: '/static/img/shop/commission/commission_icon4.png',
|
||||
title: '推广商品',
|
||||
path: '/modules/mall/commission/goods',
|
||||
path: '/pages/mall/commission/goods',
|
||||
},
|
||||
// {
|
||||
// img: '/static/img/shop/commission/commission_icon5.png',
|
||||
// title: '我的资料',
|
||||
// path: '/modules/mall/commission/apply',
|
||||
// path: '/pages/mall/commission/apply',
|
||||
// isAgentFrom: true,
|
||||
// },
|
||||
// todo @芋艿:邀请海报需要登录后的个人数据
|
||||
@ -68,19 +68,19 @@ const state = reactive({
|
||||
{
|
||||
// img: '/static/img/shop/commission/commission_icon7.png',
|
||||
title: '推广排行',
|
||||
path: '/modules/mall/commission/promoter',
|
||||
path: '/pages/mall/commission/promoter',
|
||||
},
|
||||
{
|
||||
// img: '/static/img/shop/commission/commission_icon7.png',
|
||||
title: '佣金排行',
|
||||
path: '/modules/mall/commission/commission-ranking',
|
||||
path: '/pages/mall/commission/commission-ranking',
|
||||
},
|
||||
],
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.menu-box {
|
||||
position: relative;
|
||||
z-index: 3;
|
@ -10,7 +10,7 @@
|
||||
:price="item.price"
|
||||
:originPrice="item.marketPrice"
|
||||
priceColor="#333"
|
||||
@tap="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
>
|
||||
<template #rightBottom>
|
||||
<view class="ss-flex ss-row-between">
|
||||
@ -140,7 +140,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-item {
|
||||
.commission-num {
|
||||
font-size: 24rpx;
|
@ -49,7 +49,7 @@ const bgStyle = {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep(.page-main) {
|
||||
background-size: 100% 100% !important;
|
||||
}
|
@ -162,7 +162,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.header-box {
|
||||
box-sizing: border-box;
|
||||
width: 750rpx;
|
@ -333,7 +333,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.l1 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
@ -20,7 +20,7 @@
|
||||
<view class="ss-m-r-20">
|
||||
<button
|
||||
class="ss-reset-button withdraw-btn"
|
||||
@tap="sheep.$router.go('/modules/mall/commission/withdraw')"
|
||||
@tap="sheep.$router.go('/pages/mall/commission/withdraw')"
|
||||
>
|
||||
提现
|
||||
</button>
|
||||
@ -282,7 +282,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 钱包
|
||||
.header-box {
|
||||
padding: 30rpx;
|
@ -17,7 +17,7 @@
|
||||
</view>
|
||||
<button
|
||||
class="ss-reset-button log-btn"
|
||||
@tap="sheep.$router.go('/modules/mall/commission/wallet', { type: 2 })"
|
||||
@tap="sheep.$router.go('/pages/mall/commission/wallet', { type: 2 })"
|
||||
>
|
||||
提现记录
|
||||
</button>
|
||||
@ -219,7 +219,7 @@ const onConfirm = async () => {
|
||||
confirmText: '查看记录',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
sheep.$router.go('/modules/mall/commission/wallet', { type: 2 })
|
||||
sheep.$router.go('/pages/mall/commission/wallet', { type: 2 })
|
||||
return
|
||||
}
|
||||
getBrokerageUser()
|
||||
@ -256,7 +256,7 @@ onBeforeMount(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep() {
|
||||
.uni-input-input {
|
||||
font-family: OPPOSANS !important;
|
@ -96,7 +96,7 @@
|
||||
class="ss-m-20"
|
||||
size="lg"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
:goodsFields="{
|
||||
title: { show: true },
|
||||
subtitle: { show: true },
|
||||
@ -115,7 +115,7 @@
|
||||
class="ss-m-20"
|
||||
size="lg"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
:goodsFields="{
|
||||
title: { show: true },
|
||||
subtitle: { show: true },
|
||||
@ -274,7 +274,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
@ -19,7 +19,7 @@
|
||||
<view v-for="item in state.pagination.list" :key="item.id">
|
||||
<s-coupon-list
|
||||
:data="item"
|
||||
@tap="sheep.$router.go('/modules/mall/coupon/detail', { id: item.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/coupon/detail', { id: item.id })"
|
||||
>
|
||||
<template #default>
|
||||
<button
|
||||
@ -40,14 +40,14 @@
|
||||
<s-coupon-list
|
||||
:data="item"
|
||||
type="user"
|
||||
@tap="sheep.$router.go('/modules/mall/coupon/detail', { couponId: item.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/coupon/detail', { couponId: item.id })"
|
||||
>
|
||||
<template #default>
|
||||
<button
|
||||
class="ss-reset-button card-btn ss-flex ss-row-center ss-col-center"
|
||||
:class="item.status !== 1 ? 'disabled-btn' : ''"
|
||||
:disabled="item.status !== 1"
|
||||
@click.stop="sheep.$router.go('/modules/mall/coupon/detail', { couponId: item.id })"
|
||||
@click.stop="sheep.$router.go('/pages/mall/coupon/detail', { couponId: item.id })"
|
||||
>
|
||||
{{ item.status === 1 ? '立即使用' : item.status === 2 ? '已使用' : '已过期' }}
|
||||
</button>
|
||||
@ -199,7 +199,7 @@ onReachBottom(() => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.card-btn {
|
||||
height: 50rpx;
|
||||
// width: 144rpx;
|
@ -111,7 +111,7 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 评价商品
|
||||
.goods-card {
|
||||
padding: 20rpx;
|
@ -100,7 +100,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.list-item {
|
||||
padding: 32rpx 30rpx 20rpx 20rpx;
|
||||
background: #fff;
|
@ -48,7 +48,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.avatar {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
@ -49,14 +49,14 @@ const props = defineProps({
|
||||
function onActivity(activity) {
|
||||
const type = activity.type
|
||||
const typePath = type === 1 ? 'seckill' : type === 2 ? 'TODO 拼团' : 'groupon'
|
||||
sheep.$router.go(`/modules/mall/goods/${typePath}`, {
|
||||
sheep.$router.go(`/pages/mall/goods/${typePath}`, {
|
||||
id: activity.id,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.activity-box {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
@ -31,5 +31,5 @@ const value = computed(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -34,7 +34,7 @@ const onClick = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-cell-wrap {
|
||||
padding: 10rpx 20rpx;
|
||||
// min-height: 60rpx;
|
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view
|
||||
class="ss-flex ss-col-center"
|
||||
@tap="sheep.$router.go('/modules/mall/goods/comment/list', { id: goodsId })"
|
||||
@tap="sheep.$router.go('/pages/mall/goods/comment/list', { id: goodsId })"
|
||||
v-if="state.commentList.length > 0"
|
||||
>
|
||||
<button class="ss-reset-button more-btn">查看全部</button>
|
||||
@ -61,7 +61,7 @@ onBeforeMount(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-comment-card {
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
margin: 0 20rpx 20rpx 20rpx;
|
@ -24,7 +24,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-content-card {
|
||||
.card-header {
|
||||
.line {
|
@ -82,7 +82,7 @@ function onClickLeft() {
|
||||
if (hasHistory) {
|
||||
sheep.$router.back()
|
||||
} else {
|
||||
sheep.$router.go('/modules/mall/index/index')
|
||||
sheep.$router.go('/pages/mall/index/index')
|
||||
}
|
||||
emits('clickLeft')
|
||||
}
|
||||
@ -149,7 +149,7 @@ onPageScroll((e) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.icon-box {
|
||||
box-shadow:
|
||||
0px 0px 4rpx rgba(51, 51, 51, 0.08),
|
@ -18,7 +18,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.progress-title {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
@ -62,7 +62,7 @@ const sys = computed(() => sheep.$store('sys'))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
@keyframes loading {
|
||||
0% {
|
||||
opacity: 0.5;
|
@ -135,14 +135,14 @@ async function onFavorite() {
|
||||
}
|
||||
|
||||
const onChat = () => {
|
||||
sheep.$router.go('/modules/mall/chat/index', {
|
||||
sheep.$router.go('/pages/mall/chat/index', {
|
||||
id: props.modelValue.id,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.ui-tabbar-box {
|
||||
box-shadow: 0px -6px 10px 0px rgba(51, 51, 51, 0.2);
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
</view>
|
||||
<view
|
||||
v-for="(record, index) in state.list"
|
||||
@tap="sheep.$router.go('/modules/mall/activity/groupon/detail', { id: record.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/activity/groupon/detail', { id: record.id })"
|
||||
:key="index"
|
||||
class="ss-m-t-40 ss-flex ss-row-between border-bottom ss-p-b-30"
|
||||
>
|
||||
@ -80,7 +80,7 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-card {
|
||||
margin: 14rpx 20rpx;
|
||||
overflow: hidden;
|
@ -54,7 +54,7 @@ const onClick = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
@ -84,7 +84,7 @@ const onTab = (item) => {}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.back-icon {
|
||||
font-size: 40rpx;
|
||||
}
|
@ -110,7 +110,7 @@
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20">
|
||||
<button
|
||||
class="ss-reset-button origin-price-btn ss-flex-col"
|
||||
@tap="sheep.$router.go('/modules/mall/goods/index', { id: state.goodsInfo.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/goods/index', { id: state.goodsInfo.id })"
|
||||
>
|
||||
<view class="btn-price">{{ fen2yuan(state.goodsInfo.marketPrice) }}</view>
|
||||
<view>原价购买</view>
|
||||
@ -220,7 +220,7 @@ function onJoinGroupon(record) {
|
||||
|
||||
// 立即购买
|
||||
function onBuy(sku) {
|
||||
sheep.$router.go('/modules/mall/order/confirm', {
|
||||
sheep.$router.go('/pages/mall/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
order_type: 'goods',
|
||||
combinationActivityId: state.activity.id,
|
||||
@ -299,7 +299,7 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-card {
|
||||
margin: 14rpx 20rpx;
|
||||
overflow: hidden;
|
@ -13,7 +13,7 @@
|
||||
icon="/static/soldout-empty.png"
|
||||
showAction
|
||||
actionText="再逛逛"
|
||||
actionUrl="/modules/mall/goods/list"
|
||||
actionUrl="/pages/mall/goods/list"
|
||||
/>
|
||||
<block v-else>
|
||||
<view class="detail-swiper-selector">
|
||||
@ -36,13 +36,11 @@
|
||||
{{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }}
|
||||
</view>
|
||||
<view class="origin-price-text" v-if="state.goodsInfo.marketPrice > 0">
|
||||
{{
|
||||
fen2yuan(state.selectedSku.marketPrice || state.goodsInfo.marketPrice)
|
||||
}}
|
||||
{{ fen2yuan(state.selectedSku.marketPrice || state.goodsInfo.marketPrice) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sales-text">
|
||||
{{ formatSales("exact", state.goodsInfo.salesCount) }}
|
||||
{{ formatSales('exact', state.goodsInfo.salesCount) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="discounts-box ss-flex ss-row-between ss-m-b-28">
|
||||
@ -71,9 +69,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo.name }}</view>
|
||||
<view class="subtitle-text ss-line-1">{{
|
||||
state.goodsInfo.introduction
|
||||
}}</view>
|
||||
<view class="subtitle-text ss-line-1">{{ state.goodsInfo.introduction }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能卡片 -->
|
||||
@ -112,10 +108,7 @@
|
||||
|
||||
<!-- 详情 tabbar -->
|
||||
<detail-tabbar v-model="state.goodsInfo">
|
||||
<view
|
||||
class="buy-box ss-flex ss-col-center ss-p-r-20"
|
||||
v-if="state.goodsInfo.stock > 0"
|
||||
>
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0">
|
||||
<button
|
||||
class="ss-reset-button add-btn ui-Shadow-Main"
|
||||
@tap="state.showSelectSku = true"
|
||||
@ -154,26 +147,26 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed } from "vue";
|
||||
import { onLoad, onPageScroll } from "@dcloudio/uni-app";
|
||||
import sheep from "@/sheep";
|
||||
import CouponApi from "@/sheep/api/promotion/coupon";
|
||||
import ActivityApi from "@/sheep/api/promotion/activity";
|
||||
import FavoriteApi from "@/sheep/api/product/favorite";
|
||||
import { formatSales, formatGoodsSwiper, fen2yuan } from "@/sheep/hooks/useGoods";
|
||||
import detailNavbar from "./components/detail/detail-navbar.vue";
|
||||
import detailCellSku from "./components/detail/detail-cell-sku.vue";
|
||||
import detailTabbar from "./components/detail/detail-tabbar.vue";
|
||||
import detailSkeleton from "./components/detail/detail-skeleton.vue";
|
||||
import detailCommentCard from "./components/detail/detail-comment-card.vue";
|
||||
import detailContentCard from "./components/detail/detail-content-card.vue";
|
||||
import detailActivityTip from "./components/detail/detail-activity-tip.vue";
|
||||
import { isEmpty } from "lodash-es";
|
||||
import SpuApi from "@/sheep/api/product/spu";
|
||||
import { reactive, computed } from 'vue'
|
||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app'
|
||||
import sheep from '@/sheep'
|
||||
import CouponApi from '@/sheep/api/promotion/coupon'
|
||||
import ActivityApi from '@/sheep/api/promotion/activity'
|
||||
import FavoriteApi from '@/sheep/api/product/favorite'
|
||||
import { formatSales, formatGoodsSwiper, fen2yuan } from '@/sheep/hooks/useGoods'
|
||||
import detailNavbar from './components/detail/detail-navbar.vue'
|
||||
import detailCellSku from './components/detail/detail-cell-sku.vue'
|
||||
import detailTabbar from './components/detail/detail-tabbar.vue'
|
||||
import detailSkeleton from './components/detail/detail-skeleton.vue'
|
||||
import detailCommentCard from './components/detail/detail-comment-card.vue'
|
||||
import detailContentCard from './components/detail/detail-content-card.vue'
|
||||
import detailActivityTip from './components/detail/detail-activity-tip.vue'
|
||||
import { isEmpty } from 'lodash-es'
|
||||
import SpuApi from '@/sheep/api/product/spu'
|
||||
|
||||
onPageScroll(() => {});
|
||||
onPageScroll(() => {})
|
||||
|
||||
const isLogin = computed(() => sheep.$store("user").isLogin);
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin)
|
||||
const state = reactive({
|
||||
goodsId: 0,
|
||||
skeletonLoading: true, // SPU 加载中
|
||||
@ -185,29 +178,29 @@ const state = reactive({
|
||||
showActivityModel: false, // 【满减送/限时折扣】是否展示 Activity 营销活动的弹窗
|
||||
activityInfo: [], // 【满减送/限时折扣】可参与的 Activity 营销活动的列表
|
||||
activityList: [], // 【秒杀/拼团/砍价】可参与的 Activity 营销活动的列表
|
||||
});
|
||||
})
|
||||
|
||||
// 规格变更
|
||||
function onSkuChange(e) {
|
||||
state.selectedSku = e;
|
||||
state.selectedSku = e
|
||||
}
|
||||
|
||||
// 添加购物车
|
||||
function onAddCart(e) {
|
||||
if (!e.id) {
|
||||
sheep.$helper.toast("请选择商品规格");
|
||||
return;
|
||||
sheep.$helper.toast('请选择商品规格')
|
||||
return
|
||||
}
|
||||
sheep.$store("cart").add(e);
|
||||
sheep.$store('cart').add(e)
|
||||
}
|
||||
|
||||
// 立即购买
|
||||
function onBuy(e) {
|
||||
if (!state.selectedSku.id) {
|
||||
sheep.$helper.toast("请选择商品规格");
|
||||
return;
|
||||
sheep.$helper.toast('请选择商品规格')
|
||||
return
|
||||
}
|
||||
sheep.$router.go("/modules/mall/order/confirm", {
|
||||
sheep.$router.go('/pages/mall/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
items: [
|
||||
{
|
||||
@ -217,113 +210,113 @@ function onBuy(e) {
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// 营销活动
|
||||
function onActivity() {
|
||||
state.showActivityModel = true;
|
||||
state.showActivityModel = true
|
||||
}
|
||||
|
||||
// 立即领取
|
||||
async function onGet(id) {
|
||||
const { code } = await CouponApi.takeCoupon(id);
|
||||
const { code } = await CouponApi.takeCoupon(id)
|
||||
if (code !== 0) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
uni.showToast({
|
||||
title: "领取成功",
|
||||
});
|
||||
title: '领取成功',
|
||||
})
|
||||
setTimeout(() => {
|
||||
getCoupon();
|
||||
}, 1000);
|
||||
getCoupon()
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
// TODO 芋艿:待测试
|
||||
const shareInfo = computed(() => {
|
||||
if (isEmpty(state.goodsInfo)) return {};
|
||||
if (isEmpty(state.goodsInfo)) return {}
|
||||
return sheep.$platform.share.getShareInfo(
|
||||
{
|
||||
title: state.goodsInfo.name,
|
||||
image: sheep.$url.cdn(state.goodsInfo.picUrl),
|
||||
desc: state.goodsInfo.introduction,
|
||||
params: {
|
||||
page: "2",
|
||||
page: '2',
|
||||
query: state.goodsInfo.id,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "goods", // 商品海报
|
||||
type: 'goods', // 商品海报
|
||||
title: state.goodsInfo.name, // 商品名称
|
||||
image: sheep.$url.cdn(state.goodsInfo.picUrl), // 商品主图
|
||||
price: fen2yuan(state.goodsInfo.price), // 商品价格
|
||||
original_price: fen2yuan(state.goodsInfo.marketPrice), // 商品原价
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
async function getCoupon() {
|
||||
const { code, data } = await CouponApi.getCouponTemplateList(state.goodsId, 2, 10);
|
||||
const { code, data } = await CouponApi.getCouponTemplateList(state.goodsId, 2, 10)
|
||||
if (code === 0) {
|
||||
state.couponInfo = data;
|
||||
state.couponInfo = data
|
||||
}
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
// 非法参数
|
||||
if (!options.id) {
|
||||
state.goodsInfo = null;
|
||||
return;
|
||||
state.goodsInfo = null
|
||||
return
|
||||
}
|
||||
state.goodsId = options.id;
|
||||
state.goodsId = options.id
|
||||
// 1. 加载商品信息
|
||||
SpuApi.getSpuDetail(state.goodsId).then((res) => {
|
||||
// 未找到商品
|
||||
if (res.code !== 0 || !res.data) {
|
||||
state.goodsInfo = null;
|
||||
return;
|
||||
state.goodsInfo = null
|
||||
return
|
||||
}
|
||||
// 加载到商品
|
||||
state.skeletonLoading = false;
|
||||
state.goodsInfo = res.data;
|
||||
state.skeletonLoading = false
|
||||
state.goodsInfo = res.data
|
||||
|
||||
// 加载是否收藏
|
||||
if (isLogin.value) {
|
||||
FavoriteApi.isFavoriteExists(state.goodsId, "goods").then((res) => {
|
||||
FavoriteApi.isFavoriteExists(state.goodsId, 'goods').then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
state.goodsInfo.favorite = res.data;
|
||||
});
|
||||
state.goodsInfo.favorite = res.data
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// 2. 加载优惠劵信息
|
||||
getCoupon();
|
||||
getCoupon()
|
||||
|
||||
// 3. 加载营销活动信息
|
||||
ActivityApi.getActivityListBySpuId(state.goodsId).then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
res.data.forEach((activity) => {
|
||||
if ([1, 2, 3].includes(activity.type)) {
|
||||
// 情况一:拼团/秒杀/砍价
|
||||
state.activityList.push(activity);
|
||||
state.activityList.push(activity)
|
||||
} else if (activity.type === 5) {
|
||||
// 情况二:满减送
|
||||
state.activityInfo.push(activity);
|
||||
state.activityInfo.push(activity)
|
||||
} else {
|
||||
// 情况三:限时折扣 TODO 芋艿
|
||||
console.log("待实现!优先级不高");
|
||||
console.log('待实现!优先级不高')
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.detail-card {
|
||||
margin: 14rpx 20rpx;
|
||||
overflow: hidden;
|
||||
@ -343,7 +336,7 @@ onLoad((options) => {
|
||||
|
||||
&::before {
|
||||
font-size: 30rpx;
|
||||
content: "¥";
|
||||
content: '¥';
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,7 +348,7 @@ onLoad((options) => {
|
||||
text-decoration: line-through;
|
||||
|
||||
&::before {
|
||||
content: "¥";
|
||||
content: '¥';
|
||||
}
|
||||
}
|
||||
}
|
@ -61,7 +61,7 @@
|
||||
:data="item"
|
||||
:topRadius="10"
|
||||
:bottomRadius="10"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@ -78,7 +78,7 @@
|
||||
:data="item"
|
||||
:topRadius="10"
|
||||
:bottomRadius="10"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'left')"
|
||||
>
|
||||
<template v-slot:cart>
|
||||
@ -95,7 +95,7 @@
|
||||
:topRadius="10"
|
||||
:bottomRadius="10"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
@getHeight="mountMasonry($event, 'right')"
|
||||
>
|
||||
<template v-slot:cart>
|
||||
@ -305,7 +305,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-list-box {
|
||||
box-sizing: border-box;
|
||||
width: 50%;
|
@ -12,7 +12,7 @@
|
||||
icon="/static/soldout-empty.png"
|
||||
showAction
|
||||
actionText="再逛逛"
|
||||
actionUrl="/modules/mall/goods/list"
|
||||
actionUrl="/pages/mall/goods/list"
|
||||
/>
|
||||
<block v-else>
|
||||
<view class="detail-swiper-selector">
|
||||
@ -94,7 +94,7 @@
|
||||
<button
|
||||
class="ss-reset-button origin-price-btn ss-flex-col"
|
||||
v-if="state.goodsInfo.marketPrice"
|
||||
@tap="sheep.$router.go('/modules/mall/goods/index', { id: state.goodsInfo.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/goods/index', { id: state.goodsInfo.id })"
|
||||
>
|
||||
<view>
|
||||
<view class="btn-price">{{ fen2yuan(state.goodsInfo.marketPrice) }}</view>
|
||||
@ -181,7 +181,7 @@ function onSkuChange(e) {
|
||||
|
||||
// 立即购买
|
||||
function onBuy(sku) {
|
||||
sheep.$router.go('/modules/mall/order/confirm', {
|
||||
sheep.$router.go('/pages/mall/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
order_type: 'goods',
|
||||
buy_type: 'seckill',
|
||||
@ -281,7 +281,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.disabled-btn-box[disabled] {
|
||||
background-color: transparent;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<s-layout title="购物车" tabbar="/modules/mall/index/cart" :bgStyle="{ color: '#fff' }">
|
||||
<s-layout title="购物车" tabbar="/pages/mall/index/cart" :bgStyle="{ color: '#fff' }">
|
||||
<s-empty
|
||||
v-if="state.list.length === 0"
|
||||
text="购物车空空如也,快去逛逛吧~"
|
||||
@ -157,7 +157,7 @@ function onConfirm() {
|
||||
sheep.$helper.toast('请选择商品')
|
||||
return
|
||||
}
|
||||
sheep.$router.go('/modules/mall/order/confirm', {
|
||||
sheep.$router.go('/pages/mall/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
items,
|
||||
}),
|
||||
@ -183,8 +183,8 @@ async function onDelete() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
@import '@/scss/index.scss';
|
||||
:deep(.ui-fixed) {
|
||||
height: 72rpx;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<!-- 商品分类列表 -->
|
||||
<template>
|
||||
<s-layout title="分类" tabbar="/modules/mall/index/category" :bgStyle="{ color: '#fff' }">
|
||||
<s-layout title="分类" tabbar="/pages/mall/index/category" :bgStyle="{ color: '#fff' }">
|
||||
<view class="s-category">
|
||||
<view class="three-level-wrap ss-flex ss-col-top" :style="[{ height: pageHeight + 'px' }]">
|
||||
<!-- 商品分类(左) -->
|
||||
@ -146,7 +146,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.s-category {
|
||||
:deep() {
|
||||
.side-menu-wrap {
|
@ -5,7 +5,7 @@
|
||||
<s-goods-column
|
||||
size="sl"
|
||||
:data="item"
|
||||
@click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })"
|
||||
@click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@ -20,7 +20,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-box {
|
||||
width: 100%;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<view>
|
||||
<view class="ss-flex flex-wrap">
|
||||
<view class="goods-box" v-for="item in pagination?.list" :key="item.id">
|
||||
<view @click="sheep.$router.go('/modules/mall/goods/index', { id: item.id })">
|
||||
<view @click="sheep.$router.go('/pages/mall/goods/index', { id: item.id })">
|
||||
<view class="goods-img">
|
||||
<image class="goods-img" :src="item.picUrl" mode="aspectFit" />
|
||||
</view>
|
||||
@ -27,7 +27,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.goods-box {
|
||||
width: calc((100% - 20rpx) / 2);
|
||||
margin-bottom: 20rpx;
|
@ -14,7 +14,7 @@
|
||||
v-for="item in props.data[activeMenu].children"
|
||||
:key="item.id"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/goods/list', {
|
||||
sheep.$router.go('/pages/mall/goods/list', {
|
||||
categoryId: item.id,
|
||||
})
|
||||
"
|
||||
@ -41,7 +41,7 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.title-box {
|
||||
.title-line-left,
|
||||
.title-line-right {
|
@ -6,7 +6,7 @@
|
||||
:navbarStyle="template.navigationBar"
|
||||
navbar="custom"
|
||||
onShareAppMessage
|
||||
tabbar="/modules/mall/index/index"
|
||||
tabbar="/pages/mall/index/index"
|
||||
title="首页"
|
||||
>
|
||||
<s-block
|
||||
@ -100,5 +100,5 @@ onPageScroll(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -40,5 +40,5 @@ onLoad(async (options) => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -49,5 +49,5 @@ onPageScroll(() => {})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -46,7 +46,7 @@ function onSearch(keyword) {
|
||||
}
|
||||
saveSearchHistory(keyword)
|
||||
// 前往商品列表(带搜索条件)
|
||||
sheep.$router.go('/modules/mall/goods/list', { keyword })
|
||||
sheep.$router.go('/pages/mall/goods/list', { keyword })
|
||||
}
|
||||
|
||||
// 保存搜索历史
|
||||
@ -84,7 +84,7 @@ onLoad(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.serach-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<s-layout
|
||||
title="我的"
|
||||
tabbar="/modules/mall/index/user"
|
||||
tabbar="/pages/mall/index/user"
|
||||
navbar="custom"
|
||||
:bgStyle="template.page"
|
||||
:navbarStyle="template.navigationBar"
|
||||
@ -44,5 +44,5 @@ onPageScroll(() => {})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -103,10 +103,10 @@ const state = computed({
|
||||
// 选择地址
|
||||
function onSelectAddress() {
|
||||
let emitName = 'SELECT_ADDRESS'
|
||||
let addressPage = '/modules/mall/user/address/list?type=select'
|
||||
let addressPage = '/pages/mall/user/address/list?type=select'
|
||||
if (state.value.deliveryType === 2) {
|
||||
emitName = 'SELECT_PICK_UP_INFO'
|
||||
addressPage = '/modules/mall/user/goods_details_store/index'
|
||||
addressPage = '/pages/mall/user/goods_details_store/index'
|
||||
}
|
||||
uni.$once(emitName, (e) => {
|
||||
changeConsignee(e.addressInfo)
|
||||
@ -133,7 +133,7 @@ const switchDeliveryType = (type) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.allAddress .font-color {
|
||||
color: #e93323 !important;
|
||||
}
|
@ -84,7 +84,7 @@
|
||||
<view class="foot_box ss-flex ss-col-center ss-row-between ss-p-x-30">
|
||||
<button
|
||||
class="ss-reset-button contcat-btn"
|
||||
@tap="sheep.$router.go('/modules/mall/chat/index')"
|
||||
@tap="sheep.$router.go('/pages/mall/chat/index')"
|
||||
>
|
||||
联系客服
|
||||
</button>
|
||||
@ -174,7 +174,7 @@ async function submit() {
|
||||
uni.showToast({
|
||||
title: '申请成功',
|
||||
})
|
||||
sheep.$router.go('/modules/mall/order/aftersale/list')
|
||||
sheep.$router.go('/pages/mall/order/aftersale/list')
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.item-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
@ -44,7 +44,7 @@
|
||||
<!-- 服务状态 -->
|
||||
<view
|
||||
class="status-box ss-flex ss-col-center ss-row-between ss-m-x-20"
|
||||
@tap="sheep.$router.go('/modules/mall/order/aftersale/log', { id: state.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/order/aftersale/log', { id: state.id })"
|
||||
>
|
||||
<view class="">
|
||||
<view class="status-text">
|
||||
@ -120,14 +120,14 @@
|
||||
class="ss-reset-button btn"
|
||||
v-if="state.info.buttons?.includes('delivery')"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/order/aftersale/return-delivery', { id: state.info.id })
|
||||
sheep.$router.go('/pages/mall/order/aftersale/return-delivery', { id: state.info.id })
|
||||
"
|
||||
>
|
||||
填写退货
|
||||
</button>
|
||||
<button
|
||||
class="ss-reset-button contcat-btn btn"
|
||||
@tap="sheep.$router.go('/modules/mall/chat/index')"
|
||||
@tap="sheep.$router.go('/pages/mall/chat/index')"
|
||||
>
|
||||
联系客服
|
||||
</button>
|
||||
@ -222,7 +222,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 步骤条
|
||||
.steps-box {
|
||||
width: 100%;
|
@ -17,7 +17,7 @@
|
||||
class="list-box ss-m-y-20"
|
||||
v-for="order in state.pagination.list"
|
||||
:key="order.id"
|
||||
@tap="sheep.$router.go('/modules/mall/order/aftersale/detail', { id: order.id })"
|
||||
@tap="sheep.$router.go('/pages/mall/order/aftersale/detail', { id: order.id })"
|
||||
>
|
||||
<view class="order-head ss-flex ss-col-center ss-row-between">
|
||||
<text class="no">服务单号:{{ order.no }}</text>
|
||||
@ -174,7 +174,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.list-box {
|
||||
background-color: #fff;
|
||||
|
@ -32,7 +32,7 @@ const props = defineProps({
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.log-item {
|
||||
align-items: stretch;
|
||||
}
|
@ -31,7 +31,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.log-box {
|
||||
padding: 24rpx 24rpx 24rpx 40rpx;
|
||||
background-color: #fff;
|
@ -23,7 +23,7 @@
|
||||
style="display: flex; justify-content: space-between"
|
||||
>
|
||||
<view class="reason">{{ state.expresses[state.expressIndex].name }}</view>
|
||||
<text class="iconfont _icon-forward"></text>
|
||||
<text class="iconfont _icon-forward" />
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
@ -43,6 +43,13 @@
|
||||
<button
|
||||
class="returnBnt bg-color ss-reset-button ui-BG-Main-Gradient sub-btn"
|
||||
form-type="submit"
|
||||
style="
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
var(--ui-BG-Main),
|
||||
var(--ui-BG-Main-gradient)
|
||||
) !important;
|
||||
"
|
||||
>
|
||||
提交
|
||||
</button>
|
||||
@ -83,7 +90,7 @@ async function subRefund(e) {
|
||||
uni.showToast({
|
||||
title: '填写退货成功',
|
||||
})
|
||||
sheep.$router.go('/modules/mall/order/aftersale/detail', { id: state.id })
|
||||
sheep.$router.go('/pages/mall/order/aftersale/detail', { id: state.id })
|
||||
}
|
||||
|
||||
// 获得快递物流列表
|
||||
@ -106,7 +113,7 @@ onLoad((options) => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.apply-return {
|
||||
padding: 20rpx 30rpx 70rpx 30rpx;
|
||||
}
|
||||
@ -214,6 +221,5 @@ onLoad((options) => {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 50rpx;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)) !important;
|
||||
}
|
||||
</style>
|
@ -203,7 +203,7 @@
|
||||
<script setup>
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import AddressSelection from '@/modules/mall/order/addressSelection.vue'
|
||||
import AddressSelection from '@/pages/mall/order/addressSelection.vue'
|
||||
import sheep from '@/sheep'
|
||||
import OrderApi from '@/sheep/api/trade/order'
|
||||
import CouponApi from '@/sheep/api/promotion/coupon'
|
||||
@ -299,7 +299,7 @@ async function submitOrder() {
|
||||
}
|
||||
|
||||
// 跳转到支付页面
|
||||
sheep.$router.redirect('/modules/mall/pay/index', {
|
||||
sheep.$router.redirect('/pages/mall/pay/index', {
|
||||
id: data.payOrderId,
|
||||
})
|
||||
}
|
||||
@ -366,7 +366,7 @@ watch(addressState, async (newAddress, oldAddress) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep() {
|
||||
.uni-input-wrapper {
|
||||
width: 320rpx;
|
@ -80,7 +80,7 @@
|
||||
class="ss-reset-button apply-btn"
|
||||
v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/modules/mall/order/aftersale/apply', {
|
||||
sheep.$router.go('/pages/mall/order/aftersale/apply', {
|
||||
orderId: state.orderInfo.id,
|
||||
itemId: item.id,
|
||||
})
|
||||
@ -92,7 +92,7 @@
|
||||
class="ss-reset-button apply-btn"
|
||||
v-if="item.afterSaleStatus === 10"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/modules/mall/order/aftersale/detail', {
|
||||
sheep.$router.go('/pages/mall/order/aftersale/detail', {
|
||||
id: item.afterSaleId,
|
||||
})
|
||||
"
|
||||
@ -103,7 +103,7 @@
|
||||
class="ss-reset-button apply-btn"
|
||||
v-if="item.afterSaleStatus === 20"
|
||||
@tap.stop="
|
||||
sheep.$router.go('/modules/mall/order/aftersale/detail', {
|
||||
sheep.$router.go('/pages/mall/order/aftersale/detail', {
|
||||
id: item.afterSaleId,
|
||||
})
|
||||
"
|
||||
@ -221,7 +221,7 @@
|
||||
class="ss-reset-button cancel-btn"
|
||||
v-if="state.orderInfo.buttons?.includes('combination')"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/activity/groupon/detail', {
|
||||
sheep.$router.go('/pages/mall/activity/groupon/detail', {
|
||||
id: state.orderInfo.combinationRecordId,
|
||||
})
|
||||
"
|
||||
@ -267,7 +267,7 @@ import {
|
||||
} from '@/sheep/hooks/useGoods'
|
||||
import OrderApi from '@/sheep/api/trade/order'
|
||||
import DeliveryApi from '@/sheep/api/trade/delivery'
|
||||
import PickUpVerify from '@/modules/mall/order/pickUpVerify.vue'
|
||||
import PickUpVerify from '@/pages/mall/order/pickUpVerify.vue'
|
||||
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2
|
||||
const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png')
|
||||
@ -288,14 +288,14 @@ const onCopy = () => {
|
||||
|
||||
// 去支付
|
||||
function onPay(payOrderId) {
|
||||
sheep.$router.go('/modules/mall/pay/index', {
|
||||
sheep.$router.go('/pages/mall/pay/index', {
|
||||
id: payOrderId,
|
||||
})
|
||||
}
|
||||
|
||||
// 查看商品
|
||||
function onGoodsDetail(id) {
|
||||
sheep.$router.go('/modules/mall/goods/index', {
|
||||
sheep.$router.go('/pages/mall/goods/index', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
@ -319,7 +319,7 @@ async function onCancel(orderId) {
|
||||
|
||||
// 查看物流
|
||||
async function onExpress(id) {
|
||||
sheep.$router.go('/modules/mall/order/express/log', {
|
||||
sheep.$router.go('/pages/mall/order/express/log', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
@ -382,7 +382,7 @@ function mpConfirm(orderId) {
|
||||
|
||||
// 评价
|
||||
function onComment(id) {
|
||||
sheep.$router.go('/modules/mall/goods/comment/add', {
|
||||
sheep.$router.go('/pages/mall/goods/comment/add', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
@ -431,7 +431,7 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.score-img {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
@ -89,7 +89,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.swiper-box {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
@ -180,28 +180,28 @@ function onTabsChange(e) {
|
||||
|
||||
// 订单详情
|
||||
function onOrderDetail(id) {
|
||||
sheep.$router.go('/modules/mall/order/detail', {
|
||||
sheep.$router.go('/pages/mall/order/detail', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
|
||||
// 跳转拼团记录的详情
|
||||
function onOrderGroupon(order) {
|
||||
sheep.$router.go('/modules/mall/activity/groupon/detail', {
|
||||
sheep.$router.go('/pages/mall/activity/groupon/detail', {
|
||||
id: order.combinationRecordId,
|
||||
})
|
||||
}
|
||||
|
||||
// 继续支付
|
||||
function onPay(payOrderId) {
|
||||
sheep.$router.go('/modules/mall/pay/index', {
|
||||
sheep.$router.go('/pages/mall/pay/index', {
|
||||
id: payOrderId,
|
||||
})
|
||||
}
|
||||
|
||||
// 评价
|
||||
function onComment(id) {
|
||||
sheep.$router.go('/modules/mall/goods/comment/add', {
|
||||
sheep.$router.go('/pages/mall/goods/comment/add', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
@ -265,7 +265,7 @@ function mpConfirm(order) {
|
||||
|
||||
// 查看物流
|
||||
async function onExpress(id) {
|
||||
sheep.$router.go('/modules/mall/order/express/log', {
|
||||
sheep.$router.go('/pages/mall/order/express/log', {
|
||||
id,
|
||||
})
|
||||
}
|
||||
@ -359,7 +359,7 @@ onPullDownRefresh(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.score-img {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
@ -141,7 +141,7 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// TODO puhui999: 样式需要调整有 bug
|
||||
.borRadius14 {
|
||||
border-radius: 14rpx !important;
|
@ -198,7 +198,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.pay-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
@ -102,7 +102,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 记录卡片
|
||||
.log-list {
|
||||
min-height: 213rpx;
|
@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<button
|
||||
class="ss-reset-button log-btn"
|
||||
@tap="sheep.$router.go('/modules/mall/pay/recharge-log')"
|
||||
@tap="sheep.$router.go('/pages/mall/pay/recharge-log')"
|
||||
>
|
||||
充值记录
|
||||
</button>
|
||||
@ -104,7 +104,7 @@ async function onConfirm() {
|
||||
.useProvider('wechat')
|
||||
.subscribeMessage(WxaSubscribeTemplate.PAY_WALLET_RECHARGER_SUCCESS)
|
||||
// #endif
|
||||
sheep.$router.go('/modules/mall/pay/index', {
|
||||
sheep.$router.go('/pages/mall/pay/index', {
|
||||
id: data.payOrderId,
|
||||
orderType: 'recharge',
|
||||
})
|
||||
@ -116,7 +116,7 @@ onLoad(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep() {
|
||||
.uni-input-input {
|
||||
font-family: OPPOSANS !important;
|
@ -24,14 +24,14 @@
|
||||
|
||||
<!-- 操作区 -->
|
||||
<view class="btn-box ss-flex ss-row-center ss-m-t-50">
|
||||
<button class="back-btn ss-reset-button" @tap="sheep.$router.go('/modules/mall/index/index')">
|
||||
<button class="back-btn ss-reset-button" @tap="sheep.$router.go('/pages/mall/index/index')">
|
||||
返回首页
|
||||
</button>
|
||||
<button
|
||||
class="check-btn ss-reset-button"
|
||||
v-if="payResult === 'failed'"
|
||||
@tap="
|
||||
sheep.$router.redirect('/modules/mall/pay/index', {
|
||||
sheep.$router.redirect('/pages/mall/pay/index', {
|
||||
id: state.id,
|
||||
orderType: state.orderType,
|
||||
})
|
||||
@ -46,7 +46,7 @@
|
||||
<button
|
||||
class="check-btn ss-reset-button"
|
||||
v-if="payResult === 'success' && state.tradeOrder.type === 3"
|
||||
@tap="sheep.$router.redirect('/modules/mall/activity/groupon/order')"
|
||||
@tap="sheep.$router.redirect('/pages/mall/activity/groupon/order')"
|
||||
>
|
||||
我的拼团
|
||||
</button>
|
||||
@ -152,9 +152,9 @@ async function getOrderInfo(id) {
|
||||
|
||||
function onOrder() {
|
||||
if (state.orderType === 'recharge') {
|
||||
sheep.$router.redirect('/modules/mall/pay/recharge-log')
|
||||
sheep.$router.redirect('/pages/mall/pay/recharge-log')
|
||||
} else {
|
||||
sheep.$router.redirect('/modules/mall/order/list')
|
||||
sheep.$router.redirect('/pages/mall/order/list')
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ onHide(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
@keyframes rotation {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
@ -47,14 +47,14 @@ onLoad((options) => {
|
||||
// 重新连接
|
||||
async function onReconnect() {
|
||||
uni.reLaunch({
|
||||
url: '/modules/mall/index/index',
|
||||
url: '/pages/mall/index/index',
|
||||
})
|
||||
await ShoproInit()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.error-page {
|
||||
width: 100%;
|
||||
}
|
@ -51,7 +51,7 @@ async function getFaqList() {
|
||||
onLoad(() => {
|
||||
// TODO 芋艿:目前简单做,使用营销文章,作为 faq
|
||||
if (true) {
|
||||
sheep.$router.go('/modules/mall/public/richtext', {
|
||||
sheep.$router.go('/pages/mall/public/richtext', {
|
||||
title: '常见问题',
|
||||
})
|
||||
return
|
||||
@ -61,7 +61,7 @@ onLoad(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.header {
|
||||
.title {
|
||||
max-width: 688rpx;
|
@ -44,7 +44,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.set-title {
|
||||
margin: 0 30rpx;
|
||||
}
|
@ -34,7 +34,7 @@
|
||||
:border="false"
|
||||
class="list-border"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/public/richtext', {
|
||||
sheep.$router.go('/pages/mall/public/richtext', {
|
||||
title: '关于我们',
|
||||
})
|
||||
"
|
||||
@ -58,7 +58,7 @@
|
||||
<view
|
||||
class="tcp-text"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/public/richtext', {
|
||||
sheep.$router.go('/pages/mall/public/richtext', {
|
||||
title: '用户协议',
|
||||
})
|
||||
"
|
||||
@ -69,7 +69,7 @@
|
||||
<view
|
||||
class="tcp-text"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/public/richtext', {
|
||||
sheep.$router.go('/pages/mall/public/richtext', {
|
||||
title: '隐私协议',
|
||||
})
|
||||
"
|
||||
@ -128,7 +128,7 @@ function onLogoff() {
|
||||
return
|
||||
}
|
||||
sheep.$store('user').logout()
|
||||
sheep.$router.go('/modules/mall/index/user')
|
||||
sheep.$router.go('/pages/mall/index/user')
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -147,14 +147,14 @@ function onLogout() {
|
||||
return
|
||||
}
|
||||
sheep.$store('user').logout()
|
||||
sheep.$router.go('/modules/mall/index/user')
|
||||
sheep.$router.go('/pages/mall/index/user')
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.container-list {
|
||||
width: 100%;
|
||||
}
|
@ -16,5 +16,5 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
</style>
|
@ -237,7 +237,7 @@ onLoad(async (options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep() {
|
||||
.uni-forms-item__label .label-text {
|
||||
font-size: 28rpx !important;
|
@ -24,7 +24,7 @@
|
||||
</button>
|
||||
<button
|
||||
class="add-btn ss-reset-button ui-Shadow-Main"
|
||||
@tap="sheep.$router.go('/modules/mall/user/address/edit')"
|
||||
@tap="sheep.$router.go('/pages/mall/user/address/edit')"
|
||||
>
|
||||
新增收货地址
|
||||
</button>
|
||||
@ -82,7 +82,7 @@ function importWechatAddress() {
|
||||
is_default: false,
|
||||
}
|
||||
if (!isEmpty(wechatAddress)) {
|
||||
sheep.$router.go('/modules/mall/user/address/edit', {
|
||||
sheep.$router.go('/pages/mall/user/address/edit', {
|
||||
data: JSON.stringify(wechatAddress),
|
||||
})
|
||||
}
|
||||
@ -106,7 +106,7 @@ function importWechatAddress() {
|
||||
is_default: false,
|
||||
}
|
||||
if (!isEmpty(wechatAddress)) {
|
||||
sheep.$router.go('/modules/mall/user/address/edit', {
|
||||
sheep.$router.go('/pages/mall/user/address/edit', {
|
||||
data: JSON.stringify(wechatAddress),
|
||||
})
|
||||
}
|
||||
@ -140,7 +140,7 @@ onBeforeMount(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.footer-box {
|
||||
.add-btn {
|
||||
flex: 1;
|
@ -53,7 +53,7 @@
|
||||
priceColor="#FF3000"
|
||||
:titleWidth="400"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/goods/index', {
|
||||
sheep.$router.go('/pages/mall/goods/index', {
|
||||
id: item.spuId,
|
||||
})
|
||||
"
|
||||
@ -193,7 +193,7 @@ onLoad(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.cart-box {
|
||||
.cart-header {
|
||||
position: fixed;
|
@ -56,7 +56,7 @@
|
||||
priceColor="#FF3000"
|
||||
:titleWidth="400"
|
||||
@tap="
|
||||
sheep.$router.go('/modules/mall/goods/index', {
|
||||
sheep.$router.go('/pages/mall/goods/index', {
|
||||
id: item.spuId,
|
||||
})
|
||||
"
|
||||
@ -226,7 +226,7 @@ onLoad(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.cart-box {
|
||||
.cart-header {
|
||||
position: fixed;
|
@ -183,7 +183,7 @@ onLoad(() => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.line1 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
@ -118,7 +118,7 @@
|
||||
<uni-list>
|
||||
<uni-list-item
|
||||
clickable
|
||||
@tap="sheep.$router.go('/modules/mall/user/address/list')"
|
||||
@tap="sheep.$router.go('/pages/mall/user/address/list')"
|
||||
title="地址管理"
|
||||
showArrow
|
||||
:border="false"
|
||||
@ -307,7 +307,7 @@ onBeforeMount(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
:deep() {
|
||||
.uni-file-picker {
|
||||
border-radius: 50%;
|
@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<button
|
||||
class="ss-reset-button topup-btn"
|
||||
@tap="sheep.$router.go('/modules/mall/pay/recharge')"
|
||||
@tap="sheep.$router.go('/pages/mall/pay/recharge')"
|
||||
>
|
||||
充值
|
||||
</button>
|
||||
@ -211,7 +211,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
// 钱包
|
||||
.header-box {
|
||||
padding: 30rpx;
|
@ -183,7 +183,7 @@ onReachBottom(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@import '@/scss/index.scss';
|
||||
.header-box {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
@ -1,8 +1,8 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '我的页面',
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: "我的页面",
|
||||
navigationStyle: "custom",
|
||||
},
|
||||
needLogin: true,
|
||||
}
|
||||
@ -22,7 +22,11 @@
|
||||
:height="100"
|
||||
round
|
||||
mode="aspectFill"
|
||||
:src="userInfo.avatar == '' ? imgUrl('@/static/my/avatar.jpg') : imgUrl(userInfo.avatar)"
|
||||
:src="
|
||||
userInfo.avatar == ''
|
||||
? imgUrl('@/static/my/avatar.jpg')
|
||||
: baseUrl + userInfo.avatar
|
||||
"
|
||||
></wd-img>
|
||||
<view class="info">
|
||||
<view class="name">{{ userInfo.nickname }}</view>
|
||||
@ -66,13 +70,20 @@
|
||||
|
||||
<!-- 判断该用户是否为宠托师 -->
|
||||
<view v-if="userInfo.isPetNursery" class="services-container card">
|
||||
<button class="w-full bg-[#ffc107]" @click="toPath('/pages/order/take')">接单页面</button>
|
||||
<button class="w-full bg-[#ffc107]" @click="toPath('/pages/order/take')">
|
||||
接单页面
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="pets-container card">
|
||||
<view class="pets-title">我的宠物</view>
|
||||
<view class="pets-list scroll-x overflow-x-auto" scroll-x>
|
||||
<view class="pet-item" v-for="(pet, index) in pets" @click="editPet(pet)" :key="index">
|
||||
<view
|
||||
class="pet-item"
|
||||
v-for="(pet, index) in pets"
|
||||
@click="editPet(pet)"
|
||||
:key="index"
|
||||
>
|
||||
<wd-img :width="60" :height="60" round :src="pet.icon" class="pet-avatar" />
|
||||
<view class="pet-label">{{ pet.name }}</view>
|
||||
</view>
|
||||
@ -110,101 +121,101 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { baseUrl, imgUrl, toast } from '@/utils/commUtils'
|
||||
import { httpGet } from '@/utils/http' // 假设你已经封装好了这个方法
|
||||
import Tabbar from '@/components/Tabbar.vue'
|
||||
import { ref } from "vue";
|
||||
import { useUserStore } from "@/store/user";
|
||||
import { baseUrl, imgUrl, toast } from "@/utils/commUtils";
|
||||
import { httpGet } from "@/utils/http"; // 假设你已经封装好了这个方法
|
||||
import Tabbar from "@/components/Tabbar.vue";
|
||||
|
||||
const userStore = useUserStore()
|
||||
const userStore = useUserStore();
|
||||
|
||||
const userInfo = userStore.userInfo
|
||||
const userInfo = userStore.userInfo;
|
||||
|
||||
const stats = ref([
|
||||
{ number: 0, label: '粉丝' },
|
||||
{ number: 0, label: '关注' },
|
||||
{ number: 0, label: '收藏' },
|
||||
{ number: 0, label: '获赞' },
|
||||
])
|
||||
{ number: 0, label: "粉丝" },
|
||||
{ number: 0, label: "关注" },
|
||||
{ number: 0, label: "收藏" },
|
||||
{ number: 0, label: "获赞" },
|
||||
]);
|
||||
|
||||
const services = [
|
||||
{ icon: '@/static/my/order.png', label: '我的订单', path: '/pages/order/index' },
|
||||
{ icon: '@/static/my/pet.png', label: '我的服务', path: '/pages/service/my-service' },
|
||||
{ icon: '@/static/my/wash.png', label: '我的评价', path: '/pages/order/index' },
|
||||
{ icon: '@/static/my/service.png', label: '售后服务', path: '/pages/order/index' },
|
||||
]
|
||||
{ icon: "@/static/my/order.png", label: "我的订单", path: "/pages/order/index" },
|
||||
{ icon: "@/static/my/pet.png", label: "我的服务", path: "/pages/service/my-service" },
|
||||
{ icon: "@/static/my/wash.png", label: "我的评价", path: "/pages/order/index" },
|
||||
{ icon: "@/static/my/service.png", label: "售后服务", path: "/pages/order/index" },
|
||||
];
|
||||
|
||||
const pets = ref([])
|
||||
const pets = ref([]);
|
||||
|
||||
onShow(async () => {
|
||||
await fetchActivities()
|
||||
await fetchPets()
|
||||
})
|
||||
await fetchActivities();
|
||||
await fetchPets();
|
||||
});
|
||||
|
||||
// 获取社区活动的信息
|
||||
const fetchActivities = async () => {
|
||||
try {
|
||||
const response = await httpGet('/posts/community')
|
||||
const response = await httpGet("/posts/community");
|
||||
if (response.code == 200) {
|
||||
const index = 0
|
||||
const index = 0;
|
||||
for (const key in response.data) {
|
||||
if (response.data[key]) {
|
||||
stats.value[index] = { number: response.data[key], label: key }
|
||||
stats.value[index] = { number: response.data[key], label: key };
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(response)
|
||||
console.log(response);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const fetchPets = async () => {
|
||||
try {
|
||||
const response = await httpGet('/petInfo/select', { userId: userStore.userInfo.id })
|
||||
const response = await httpGet("/petInfo/select", { userId: userStore.userInfo.id });
|
||||
pets.value = response.records.map((pet) => ({
|
||||
...pet,
|
||||
icon: baseUrl + pet.profileUrl,
|
||||
}))
|
||||
}));
|
||||
} catch (error) {
|
||||
uni.showToast({ title: '网络错误,请重试', icon: 'error' })
|
||||
uni.showToast({ title: "网络错误,请重试", icon: "error" });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const editPet = (pet) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/pet/pet-add-page?id=${pet.id}&name=${pet.name}&icon=${pet.icon}&breed=${pet.breed}&color=${pet.color}&birthday=${pet.birthday}&gender=${pet.gender}&userId=${pet.userId}`,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const items = [
|
||||
{ icon: '@/static/my/send.png', label: '我的发布', to: '/pages/publish/index' },
|
||||
{ icon: "@/static/my/send.png", label: "我的发布", to: "/pages/publish/index" },
|
||||
{
|
||||
icon: '@/static/my/handshake.png',
|
||||
label: '帮助中心',
|
||||
to: '/pages/others/official-account',
|
||||
icon: "@/static/my/handshake.png",
|
||||
label: "帮助中心",
|
||||
to: "/pages/others/official-account",
|
||||
},
|
||||
{
|
||||
icon: '@/static/my/feedback.png',
|
||||
label: '建议反馈',
|
||||
to: '/pages/others/official-account',
|
||||
icon: "@/static/my/feedback.png",
|
||||
label: "建议反馈",
|
||||
to: "/pages/others/official-account",
|
||||
},
|
||||
{
|
||||
icon: '@/static/my/badge.png',
|
||||
label: '宠托师认证',
|
||||
to: '/pages/certification/index',
|
||||
icon: "@/static/my/badge.png",
|
||||
label: "宠托师认证",
|
||||
to: "/pages/certification/index",
|
||||
},
|
||||
{ icon: '@/static/my/address.png', label: '我的地址', to: '/pages/address/index' },
|
||||
{ icon: '@/static/my/settings.png', label: '设置', to: '/pages/settings/index' },
|
||||
{ icon: '@/static/my/address.png', label: '地址', to: '/pages/map/index' },
|
||||
]
|
||||
{ icon: "@/static/my/address.png", label: "我的地址", to: "/pages/address/index" },
|
||||
{ icon: "@/static/my/settings.png", label: "设置", to: "/pages/settings/index" },
|
||||
{ icon: "@/static/my/address.png", label: "地址", to: "/pages/map/index" },
|
||||
];
|
||||
|
||||
const toPath = (path) => {
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user