代码提交
This commit is contained in:
@ -87,7 +87,7 @@ function baseRequest(options) {
|
||||
return Promise.reject({msg: data.msg, res, data})
|
||||
}
|
||||
|
||||
if (data.code != 0) {
|
||||
if (data.code != 0 && data.code != 999999 && data.code != 1008003000) {
|
||||
uni.showToast({
|
||||
title: data.msg,
|
||||
icon: 'none',
|
||||
@ -95,7 +95,6 @@ function baseRequest(options) {
|
||||
})
|
||||
return Promise.reject({data, res})
|
||||
}
|
||||
|
||||
return Promise.resolve(data.data, res)
|
||||
|
||||
// if ([401, 403].indexOf(data.status) !== -1) {
|
||||
@ -108,6 +107,8 @@ function baseRequest(options) {
|
||||
// } else {
|
||||
// return Promise.reject({ msg: res.data.msg, res, data })
|
||||
// }
|
||||
}).catch(err=>{
|
||||
return Promise.reject(err.data, err)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,9 @@
|
||||
<script setup>
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
import { computed, onMounted, ref, toRefs, unref } from "vue";
|
||||
import UvIcon from "@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue";
|
||||
import { useScreen } from "@/hooks/useScreen";
|
||||
import { useSystem } from "@/hooks/useSystem";
|
||||
import { CacheKey } from "@/utils/config";
|
||||
import { toTop } from "@/utils/images";
|
||||
|
||||
const {scrollTop, scrollToTop} = useScroll()
|
||||
const {getSystemInfo} = useSystem();
|
||||
|
||||
@ -28,11 +25,11 @@ const {getSystemInfo} = useSystem();
|
||||
const props = defineProps({
|
||||
top: {
|
||||
type: Number,
|
||||
default:200
|
||||
default:300
|
||||
},
|
||||
location: {
|
||||
type: Array,
|
||||
default: () => ([20, 200])
|
||||
default: () => ([20, 400])
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
@ -115,6 +112,7 @@ function handleTouchmove(e){
|
||||
|
||||
function handleTouchend(e){
|
||||
timeout&&clearTimeout(timeout)
|
||||
if(!isTouch.value) return handleClick()
|
||||
isTouch.value = false
|
||||
// 判断是否移动数据
|
||||
if(unref(touchLocation)[0]>0 || unref(touchLocation)[1]>0){
|
||||
@ -151,13 +149,13 @@ onMounted(async ()=>{
|
||||
class="return-top"
|
||||
:class="{touch:isTouch,click:animation}"
|
||||
:style="computedStyle"
|
||||
@touchstart="handleTouchstart"
|
||||
@touchstart.prevent="handleTouchstart"
|
||||
@touchmove.stop="handleTouchmove"
|
||||
@touchend="handleTouchend"
|
||||
@click="handleClick"
|
||||
>
|
||||
<slot>
|
||||
<image class="top-icon" :src="toTop" />
|
||||
<view class="top-icon" :style="{backgroundImage:`url(${toTop})`}" />
|
||||
</slot>
|
||||
</view>
|
||||
</template>
|
||||
@ -182,10 +180,13 @@ onMounted(async ()=>{
|
||||
}
|
||||
|
||||
.top-icon{
|
||||
user-select: none;
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
<view class="activity-header-more-info">{{ more }}</view>
|
||||
<img
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/next.png"
|
||||
:src="nextIcon"
|
||||
alt=""
|
||||
>
|
||||
</view>
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { nextIcon } from "@/utils/images";
|
||||
const props = defineProps(["title", "subtitle", 'more'])
|
||||
|
||||
const title = ref(props.title)
|
||||
|
@ -29,7 +29,7 @@
|
||||
>
|
||||
<view class="goods-list-model-label">{{ data.attrInfo.sku }}</view>
|
||||
<view class="goods-list-model-action icon">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/down.png" />
|
||||
<image :src="goodsArrowsIcon" />
|
||||
</view>
|
||||
</div>
|
||||
</view>
|
||||
@ -137,6 +137,7 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import { goodsArrowsIcon } from "@/utils/images";
|
||||
|
||||
const props = defineProps(['data', 'min', 'groupNum', 'original', 'stock', 'primary', 'card', 'list', 'buyProgress', 'quantity', 'selectModel', 'model', 'purchase', 'link', 'fill', 'round','price'])
|
||||
|
||||
|
@ -70,21 +70,21 @@
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view
|
||||
v-if="data._status._type == 0"
|
||||
v-if="data._status._type === '0'"
|
||||
class="order-actions-default"
|
||||
@tap="showModal(0)"
|
||||
>
|
||||
取消订单
|
||||
</view>
|
||||
<view
|
||||
v-if="data._status._type == 0"
|
||||
v-if="data._status._type === '0'"
|
||||
class="order-actions-primary"
|
||||
@tap="handlePay"
|
||||
>
|
||||
立即付款
|
||||
</view>
|
||||
<view
|
||||
v-if="['1','2','3','4'].includes(data._status._type)"
|
||||
v-if="!['0','5','-1','-2'].includes(data._status._type)"
|
||||
class="order-actions-default"
|
||||
@tap="toSelectRefundGood"
|
||||
>
|
||||
@ -92,13 +92,13 @@
|
||||
</view>
|
||||
<view
|
||||
class="order-actions-default"
|
||||
v-if="data._status._type == 2"
|
||||
v-if="data._status._type === '2'"
|
||||
@tap="toOrderInfo"
|
||||
>
|
||||
查看物流
|
||||
</view>
|
||||
<view
|
||||
v-if="data._status._type == 2"
|
||||
v-if="data._status._type === '2'"
|
||||
class="order-actions-primary"
|
||||
@tap="showModal(2)"
|
||||
>
|
||||
@ -209,9 +209,7 @@ async function doTakeRequest(){
|
||||
function toSelectRefundGood(){
|
||||
push({url: '/pages/selectRefundGood/selectRefundGood'}, {
|
||||
data: {
|
||||
orderId: data.value.orderId,
|
||||
id: data.value.id,
|
||||
status: data.value.status
|
||||
id: data.value.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
export const VUE_APP_API_URL = 'https://b2c-pro-api-dev.zkthink.com/app-api'
|
||||
export const VUE_APP_UPLOAD_URL = VUE_APP_API_URL + '/infra/file/upload'
|
||||
export const VUE_APP_STATIC_URL = "https://b2c-pro-static-dev.zkthink.com/" // 静态资源路径
|
||||
export const VUE_SHARE_TITLE = '邀请您使用YShop~'
|
||||
const orderListStatus = {}
|
||||
|
||||
// -1:申请退款
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @description:useRouter.js
|
||||
* @update: 2023-10-30 10:52
|
||||
* */
|
||||
const PARAMS_KEY = 'details' // 路由参数key
|
||||
export const PARAMS_KEY = 'details' // 路由参数key
|
||||
|
||||
/**
|
||||
* 封装Router
|
||||
@ -130,8 +130,9 @@ export const useRouter = () => {
|
||||
function getParams(options) {
|
||||
if (typeof options !== 'object') return {}
|
||||
if (!options[PARAMS_KEY]) return {}
|
||||
console.log('参数原始-----',options[PARAMS_KEY])
|
||||
// #ifdef MP-WEIXIN
|
||||
console.log(typeof options[PARAMS_KEY],options[PARAMS_KEY],decodeURIComponent(options[PARAMS_KEY]))
|
||||
// console.log(typeof options[PARAMS_KEY],options[PARAMS_KEY],decodeURIComponent(options[PARAMS_KEY]))
|
||||
// #endif
|
||||
return JSON.parse(decodeURIComponent(options[PARAMS_KEY]));
|
||||
}
|
||||
|
147
hooks/useShare.js
Normal file
147
hooks/useShare.js
Normal file
@ -0,0 +1,147 @@
|
||||
/**
|
||||
* @name: useShare
|
||||
* @author: kahu4
|
||||
* @date: 2023-11-10 09:45
|
||||
* @description:useShare
|
||||
* @update: 2023-11-10 09:45
|
||||
* */
|
||||
import { ref, unref } from "vue";
|
||||
import { PARAMS_KEY, useRouter } from "@/hooks/useRouter";
|
||||
import { VUE_SHARE_TITLE } from "@/config";
|
||||
|
||||
// 分享页面
|
||||
export const SharePathMap = {
|
||||
GOODS_DETAIL:'/pages/goodsDetail/goodsDetail'
|
||||
}
|
||||
|
||||
export function useShare(url='pages/share/index'){
|
||||
const shareInfo = ref({
|
||||
title: VUE_SHARE_TITLE,
|
||||
path: 'pages/share/index',
|
||||
imageUrl: ''
|
||||
})
|
||||
const shareUrl = ref(url)
|
||||
|
||||
/**
|
||||
* 设置路径
|
||||
* @param packageParameter
|
||||
*/
|
||||
const handleSetShareData = (packageParameter) => {
|
||||
//views/dynamic/detail/index
|
||||
shareInfo.value.path = `/pages/share/index?${packageParameter}`
|
||||
}
|
||||
|
||||
const shareAppMessage = ()=>Promise.resolve({
|
||||
title: shareInfo.value.title,
|
||||
path: shareInfo.value.path,
|
||||
imageUrl: shareInfo.value.imageUrl
|
||||
})
|
||||
|
||||
const shareTimeline = ()=>({
|
||||
title: shareInfo.value.title,
|
||||
path: shareInfo.value.path,
|
||||
imageUrl: shareInfo.value.imageUrl
|
||||
})
|
||||
|
||||
/**
|
||||
* 封装参数
|
||||
* @param data
|
||||
*/
|
||||
const packageParameter = (data)=>{
|
||||
const shareData = {
|
||||
url,
|
||||
data
|
||||
}
|
||||
shareData.url = shareUrl.value
|
||||
return `${PARAMS_KEY}=${encodeURIComponent(JSON.stringify(shareData))}`
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认分享
|
||||
*/
|
||||
const defaultShare = ()=>{
|
||||
unref(shareInfo).title = VUE_SHARE_TITLE
|
||||
unref(shareInfo).imageUrl = ''
|
||||
handleSetShareData(packageParameter({
|
||||
url:'/pages/index/index',
|
||||
data:{}
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分享
|
||||
* @param goods
|
||||
*/
|
||||
const goodsDetailShare = (goods)=>{
|
||||
unref(shareInfo).title = goods.storeName
|
||||
unref(shareInfo).imageUrl = goods.image
|
||||
handleSetShareData(packageParameter({
|
||||
id:goods.id
|
||||
}))
|
||||
}
|
||||
|
||||
return {
|
||||
shareUrl,
|
||||
shareInfo,
|
||||
handleSetShareData,
|
||||
shareAppMessage,
|
||||
shareTimeline,
|
||||
packageParameter,
|
||||
defaultShare,
|
||||
goodsDetailShare,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const useShareInner = () => {
|
||||
|
||||
const {push, getParams, pushToTab} = useRouter()
|
||||
|
||||
const params = ref({
|
||||
data: undefined, url: ""
|
||||
})
|
||||
|
||||
/**
|
||||
* 处理share参数
|
||||
* @param options
|
||||
*/
|
||||
async function analysisParams(options) {
|
||||
params.value = getParams(options);
|
||||
await analysisParameter()
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析参数
|
||||
*/
|
||||
async function analysisParameter() {
|
||||
switch (unref(params).url) {
|
||||
case SharePathMap.GOODS_DETAIL:
|
||||
toSkip()
|
||||
break;
|
||||
default:
|
||||
pushToTab({url: '/pages/index/index'})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
function toSkip() {
|
||||
if (unref(params).url) {
|
||||
push({
|
||||
url: unref(params).url,
|
||||
}, {
|
||||
data: unref(params).data,
|
||||
type: 'redirectTo'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
params,
|
||||
analysisParams
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +401,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxe4938661906993b5",
|
||||
"appid" : "wxd968b04655cc4ce1",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
|
@ -6,6 +6,12 @@
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/share/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分享"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/orderList/orderList",
|
||||
"style": {
|
||||
|
@ -47,7 +47,7 @@
|
||||
>
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-edit.png"
|
||||
:src="addressEditIcon"
|
||||
alt=""
|
||||
></image>
|
||||
</view>
|
||||
@ -86,7 +86,7 @@ import { ref, unref } from 'vue'
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { useMainStore } from '@/store/store'
|
||||
import Empty from '@/components/Empty/index.vue'
|
||||
import { emptyAddressIcon } from "@/utils/images";
|
||||
import { emptyAddressIcon, addressEditIcon } from "@/utils/images";
|
||||
import { getAddressDel, } from '@/api/address'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import Header from "@/components/Header/index.vue"
|
||||
@ -188,6 +188,7 @@ async function doDeleteRequest(){
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../style/images";
|
||||
.addressList {
|
||||
.address {
|
||||
&:last-child {
|
||||
@ -315,7 +316,7 @@ async function doDeleteRequest(){
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: url("https://b2c-pro-static-dev.zkthink.com/static/images/delete_icon.png") no-repeat center center;
|
||||
background: $addDelIcon no-repeat center center;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background-size: contain;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout class="bargaining">
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/kjzq.png" />
|
||||
<image :src="bargainingBg" />
|
||||
</view>
|
||||
<blank size="15"></blank>
|
||||
<container min>
|
||||
@ -38,20 +38,8 @@
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
<script setup>
|
||||
import { bargainingBg } from "@/utils/images";
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -261,6 +261,7 @@ onLoad(async (option) => {
|
||||
lang="scss"
|
||||
scoped
|
||||
>
|
||||
@import "../../style/images";
|
||||
.select-row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -327,7 +328,7 @@ onLoad(async (option) => {
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: url("https://b2c-pro-static-dev.zkthink.com/static/images/delete_icon.png") no-repeat center center;
|
||||
background: $addDelIcon no-repeat center center;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background-size: contain;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout>
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/zkzq.png" />
|
||||
<image :src="discountBg" />
|
||||
</view>
|
||||
<div class="time-bar">
|
||||
<uv-tabs :current="active">
|
||||
@ -111,7 +111,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import { discountBg } from "@/utils/images";
|
||||
import { ref } from 'vue'
|
||||
|
||||
const active = ref(0)
|
||||
|
@ -88,10 +88,11 @@ const goToProduct = (coupons) => {
|
||||
scoped
|
||||
lang="scss"
|
||||
>
|
||||
@import "../../../style/images";
|
||||
.coupon-item {
|
||||
width: 100%;
|
||||
aspect-ratio: 682/176;
|
||||
background: url("https://b2c-pro-static-dev.zkthink.com/static/background/coupon-bg.png") no-repeat ;
|
||||
background: $orderStateCoupon no-repeat ;
|
||||
background-size: 100%;
|
||||
padding: 25rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
|
@ -79,6 +79,7 @@ const pics = ref([])
|
||||
const fileList1 = ref([])
|
||||
const comment = ref("")
|
||||
const orderInfoData = ref(null)
|
||||
const orderId = ref(0)
|
||||
|
||||
const {goBack} = useRouter()
|
||||
const handleOrderComments = async () => {
|
||||
@ -148,10 +149,20 @@ const uploadFilePromise = (url) => {
|
||||
})
|
||||
}
|
||||
|
||||
const goOrderInfo = ()=>{
|
||||
push({url: '/pages/orderInfo/orderInfo'}, {
|
||||
data: {
|
||||
key: unique.value,
|
||||
orderId: orderId.value,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
onLoad((options) => {
|
||||
const params = getParams(options)
|
||||
unique.value = params.unique
|
||||
orderId.value = params.orderId
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout>
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/flashKilling.png" />
|
||||
<image :src="seckillBg" />
|
||||
</view>
|
||||
<div class="time-bar">
|
||||
<uv-tabs v-model:active="active">
|
||||
@ -68,7 +68,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import { seckillBg } from "@/utils/images";
|
||||
import { ref } from 'vue'
|
||||
|
||||
const active = ref(0)
|
||||
|
@ -263,6 +263,7 @@ onLoad(async (option) => {
|
||||
lang="scss"
|
||||
scoped
|
||||
>
|
||||
@import "../../style/images";
|
||||
.select-row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -329,7 +330,7 @@ onLoad(async (option) => {
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: url("https://b2c-pro-static-dev.zkthink.com/static/images/delete_icon.png") no-repeat center center;
|
||||
background: $addDelIcon no-repeat center center;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background-size: contain;
|
||||
|
46
pages/goodsDetail/components/GoodEmpty.vue
Normal file
46
pages/goodsDetail/components/GoodEmpty.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
@name: 空购物车
|
||||
@author: kahu4
|
||||
@date: 2023-11-06 15:59
|
||||
@description:CartEmpty
|
||||
@update: 2023-11-06 15:59
|
||||
-->
|
||||
<script setup>
|
||||
import Empty from '@/components/Empty/index.vue'
|
||||
import { emptyGoodIcon } from "@/utils/images";
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
|
||||
const {pushToTab} = useRouter()
|
||||
const padding = "500rpx 0 0 0"
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Empty
|
||||
:iconSrc="emptyGoodIcon"
|
||||
:padding='padding'
|
||||
>
|
||||
<template #default>
|
||||
商品不存在~
|
||||
</template>
|
||||
<template #bottom>
|
||||
<view
|
||||
class="go-on-btn"
|
||||
@click="pushToTab({url:'/pages/index/index'})"
|
||||
>
|
||||
继续逛逛
|
||||
</view>
|
||||
</template>
|
||||
</Empty>
|
||||
</template>
|
||||
|
||||
<style
|
||||
scoped
|
||||
lang="scss"
|
||||
>
|
||||
.go-on-btn {
|
||||
padding: 15rpx 50rpx;
|
||||
background: $primary-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,32 +1,15 @@
|
||||
<template>
|
||||
<layout class="goodsDetail">
|
||||
<view :style="computedHeightStyle"></view>
|
||||
<Header
|
||||
:scroll-top="scrollTop"
|
||||
ref="headerRef"
|
||||
:propUp="false"
|
||||
>
|
||||
</Header>
|
||||
<Header :scroll-top="scrollTop" ref="headerRef" :propUp="false"> </Header>
|
||||
<view v-if="!showEmpty">
|
||||
<view v-if="detailData">
|
||||
<swiper
|
||||
class="swiper detail"
|
||||
circular
|
||||
indicator-dots
|
||||
autoplay
|
||||
>
|
||||
<swiper-item
|
||||
v-for="(item, index) in sliderImageData"
|
||||
:key="index"
|
||||
>
|
||||
<swiper class="swiper detail" circular indicator-dots autoplay>
|
||||
<swiper-item v-for="(item, index) in sliderImageData" :key="index">
|
||||
<view class="swiper-item">
|
||||
<image
|
||||
class="image"
|
||||
:src="item"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image class="image" :src="item" mode="aspectFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
</swiper>
|
||||
<view class="goodsDetail-info">
|
||||
<view class="goodsDetail-price-row">
|
||||
@ -34,13 +17,20 @@
|
||||
class="goodsDetail-price goodsDetail-price-primary"
|
||||
v-if="storeAttr || storeInfo"
|
||||
>
|
||||
¥{{ storeAttr && storeAttr.price || storeInfo && storeInfo.price || '0.00' }}
|
||||
¥{{
|
||||
(storeAttr && storeAttr.price) ||
|
||||
(storeInfo && storeInfo.price) ||
|
||||
"0.00"
|
||||
}}
|
||||
</view>
|
||||
<view
|
||||
class="goodsDetail-price goodsDetail-price-original"
|
||||
v-if="storeAttr && storeInfo"
|
||||
>
|
||||
¥{{ storeAttr&&storeAttr.otPrice || storeInfo&&storeInfo.otPrice }}
|
||||
¥{{
|
||||
(storeAttr && storeAttr.otPrice) ||
|
||||
(storeInfo && storeInfo.otPrice)
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="goodsDetail-storeName">{{ storeInfo.storeName }}</view>
|
||||
@ -59,10 +49,7 @@
|
||||
></uv-tags>
|
||||
</space> -->
|
||||
</view>
|
||||
<view
|
||||
class="goodsDetail-info-action-desc"
|
||||
v-if="storeInfo.stock"
|
||||
>
|
||||
<view class="goodsDetail-info-action-desc" v-if="storeInfo.stock">
|
||||
仅剩{{ storeInfo.stock }}件
|
||||
</view>
|
||||
</view>
|
||||
@ -74,17 +61,16 @@
|
||||
<view class="label">运费:</view>
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ detailData.tempName !== '规定运费' ? detailData.tempName : storeInfo.postage + '元' }}
|
||||
{{
|
||||
detailData.tempName !== "规定运费"
|
||||
? detailData.tempName
|
||||
: storeInfo.postage + "元"
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="label-row"
|
||||
@click="discountCouponSelect('select')"
|
||||
>
|
||||
<view class="label-row" @click="discountCouponSelect('select')">
|
||||
<view class="label">
|
||||
<view class="text">
|
||||
促销:{{ detailData.couponSplicing }}
|
||||
</view>
|
||||
<view class="text"> 促销:{{ detailData.couponSplicing }} </view>
|
||||
</view>
|
||||
<view class="value">
|
||||
领券
|
||||
@ -92,13 +78,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="label-row"
|
||||
@click="handleOpenSelect('select')"
|
||||
>
|
||||
<view class="label-row" @click="handleOpenSelect('select')">
|
||||
<view class="label">
|
||||
<view class="text">
|
||||
选择: {{ !storeAttr ? '请选择商品规格' : storeAttr.sku }}
|
||||
选择: {{ !storeAttr ? "请选择商品规格" : storeAttr.sku }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="value">
|
||||
@ -107,19 +90,26 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card full">
|
||||
<view
|
||||
class="card-head"
|
||||
:style="{borderBottom:detailData.replyCount<=0?'none':'1rpx solid #e6e6e6'}"
|
||||
:style="{
|
||||
borderBottom:
|
||||
detailData.replyCount <= 0 ? 'none' : '1rpx solid #e6e6e6',
|
||||
}"
|
||||
>
|
||||
<view class="card-title"
|
||||
>商品评价({{ detailData.replyCount }})</view
|
||||
>
|
||||
<view class="card-title">商品评价({{ detailData.replyCount }})</view>
|
||||
<view
|
||||
class="card-more"
|
||||
@click="push({url: '/pages/goodsReply/goodsReply'},{data:{id: detailData.storeInfo.id}})"
|
||||
><span>
|
||||
查看更多
|
||||
</span>
|
||||
@click="
|
||||
push(
|
||||
{ url: '/pages/goodsReply/goodsReply' },
|
||||
{ data: { id: detailData.storeInfo.id } }
|
||||
)
|
||||
"
|
||||
><span> 查看更多 </span>
|
||||
<uv-icon
|
||||
name="arrow-right"
|
||||
color="rgb(187, 187, 187)"
|
||||
@ -127,28 +117,17 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="card-content"
|
||||
v-if="detailData.reply"
|
||||
>
|
||||
<view class="card-content" v-if="detailData.reply">
|
||||
<detail-reply :data="detailData.reply"></detail-reply>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<blank size="15"></blank>
|
||||
|
||||
|
||||
<view class="card full">
|
||||
<view class="card-head">
|
||||
<view class="card-title">
|
||||
商品详情
|
||||
</view>
|
||||
<view class="card-title"> 商品详情 </view>
|
||||
</view>
|
||||
<view class="goods-detail-content">
|
||||
<rich-text
|
||||
:nodes="storeInfo.description"
|
||||
bindtap="onOpenLink"
|
||||
/>
|
||||
<rich-text :nodes="storeInfo.description" bindtap="onOpenLink" />
|
||||
</view>
|
||||
</view>
|
||||
<blank size="15"></blank>
|
||||
@ -159,7 +138,6 @@
|
||||
<view class="title">热门推荐</view>
|
||||
<view class="center-title-line"></view>
|
||||
</view>
|
||||
|
||||
</container>
|
||||
<good-attr-select
|
||||
ref="selectAttrPanel"
|
||||
@ -180,55 +158,39 @@
|
||||
|
||||
<view
|
||||
class="action-bar"
|
||||
:class="detailData.storeInfo.isShow === 0 && 'off'"
|
||||
v-if="detailData"
|
||||
>
|
||||
<view class="off-tip">商品已经下架了啦~要不要瞧瞧别的~</view>
|
||||
<view class="action-cont">
|
||||
<view class="action-icons">
|
||||
<view class="action-icons-item">
|
||||
<view
|
||||
class="action-icon"
|
||||
@click="goToService"
|
||||
>
|
||||
<img
|
||||
class="action-icon-img"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-kefu.png"
|
||||
/>
|
||||
<view class="action-icon" @click="goToService">
|
||||
<img class="action-icon-img" :src="productCustomerIcon" />
|
||||
<text class="action-icon-label">客服</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-icons-item">
|
||||
<view
|
||||
class="action-icon"
|
||||
@click="goToShopCart"
|
||||
>
|
||||
<view class="action-icon" @click="goToShopCart">
|
||||
<view class="action-icon-badge">
|
||||
<uv-badge
|
||||
type="error"
|
||||
max="99"
|
||||
:value="cardCount"
|
||||
></uv-badge>
|
||||
<uv-badge type="error" max="99" :value="cardCount"></uv-badge>
|
||||
</view>
|
||||
|
||||
<image
|
||||
class="action-icon-img"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-gouwuche.png"
|
||||
/>
|
||||
<image class="action-icon-img" :src="productCartIcon" />
|
||||
<text class="action-icon-label">购物车</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-icons-item">
|
||||
<view
|
||||
class="action-icon"
|
||||
@click="handleCollect"
|
||||
>
|
||||
<view class="action-icon" @click="handleCollect">
|
||||
<image
|
||||
v-if="!storeInfo?.userCollect"
|
||||
class="action-icon-img"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-shouceng.png"
|
||||
:src="productCollectIcon"
|
||||
/>
|
||||
<image
|
||||
v-if="storeInfo?.userCollect"
|
||||
class="action-icon-img"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-shouceng-o.png"
|
||||
:src="productAffirmCollectIcon"
|
||||
/>
|
||||
<text class="action-icon-label">收藏</text>
|
||||
</view>
|
||||
@ -238,47 +200,56 @@
|
||||
<uv-button
|
||||
type="info"
|
||||
text="加入购物车"
|
||||
:disabled="detailData.storeInfo.isShow === 0"
|
||||
plain
|
||||
@click="handleOpenSelect('cart')"
|
||||
></uv-button>
|
||||
<uv-button
|
||||
type="primary"
|
||||
text="立即购买"
|
||||
:disabled="detailData.storeInfo.isShow === 0"
|
||||
@click="handleOpenSelect('buy')"
|
||||
></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ReturnTop :scroll-top="scrollTop" />
|
||||
</view>
|
||||
<GoodEmpty v-else></GoodEmpty>
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {productCustomerIcon, productCollectIcon, productCartIcon, productAffirmCollectIcon} from "@/utils/images";
|
||||
import { computed, onMounted, ref, unref } from 'vue'
|
||||
import { collectSingle, getProductDetail, unCollectSingle } from '@/api/product'
|
||||
import { getCartAdd, getCartCount } from '@/api/cart'
|
||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app'
|
||||
import { onLoad, onPageScroll, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import { useInterface } from "@/hooks/useInterface";
|
||||
import Header from '@/components/Header/index.vue'
|
||||
import Header from "@/components/Header/index.vue";
|
||||
import GoodCouponSelect from "@/components/good-coupon-select/good-coupon-select.vue";
|
||||
import UvIcon from "@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue";
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
import ReturnTop from "@/components/ReturnTop/index.vue"
|
||||
import GoodEmpty from "@/pages/goodsDetail/components/GoodEmpty.vue";
|
||||
import { SharePathMap, useShare } from "@/hooks/useShare";
|
||||
|
||||
const {push, getParams, pushToTab, goBack} = useRouter();
|
||||
const {toast} = useInterface()
|
||||
const detailData = ref(null)
|
||||
const sliderImageData = ref([])
|
||||
const storeInfo = ref(null)
|
||||
const actionType = ref(null)
|
||||
const storeAttr = ref(null)
|
||||
const storeNum = ref(null)
|
||||
const cardCount = ref(null)
|
||||
const { push, getParams, pushToTab, goBack } = useRouter();
|
||||
const { toast } = useInterface();
|
||||
const detailData = ref(null);
|
||||
const sliderImageData = ref([]);
|
||||
const storeInfo = ref(null);
|
||||
const actionType = ref(null);
|
||||
const storeAttr = ref(null);
|
||||
const storeNum = ref(null);
|
||||
const cardCount = ref(null);
|
||||
|
||||
const selectAttrPanel = ref(false)
|
||||
const selectCouponPanel = ref(false)
|
||||
const selectCoupon = ref(false)
|
||||
const headerRef = ref()
|
||||
const selectAttrPanel = ref(false);
|
||||
const selectCouponPanel = ref(false);
|
||||
const selectCoupon = ref(false);
|
||||
const headerRef = ref();
|
||||
const showEmpty = ref(false)
|
||||
|
||||
const computedHeightStyle = computed(() => {
|
||||
const style = {width: '100 %', height: 0,background:'#f5f5f5'}
|
||||
@ -289,137 +260,141 @@ const computedHeightStyle = computed(() => {
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
|
||||
const {shareAppMessage,shareTimeline,goodsDetailShare} = useShare(SharePathMap.GOODS_DETAIL)
|
||||
|
||||
onShareAppMessage(shareAppMessage)
|
||||
onShareTimeline(shareTimeline)
|
||||
|
||||
const handleGetDetail = async (id) => {
|
||||
try {
|
||||
const detail = await getProductDetail(id)
|
||||
uni.hideLoading();
|
||||
|
||||
const detail = await getProductDetail(id);
|
||||
if (detail) {
|
||||
detailData.value = detail
|
||||
sliderImageData.value = detail.storeInfo.sliderImage.split(',')
|
||||
storeInfo.value = detail.storeInfo
|
||||
const description = storeInfo.value.description
|
||||
storeInfo.value.description = description.replace(/<img /g, "<img style='width:100%;' ")
|
||||
let attr = []
|
||||
detailData.value = detail;
|
||||
sliderImageData.value = detail.storeInfo.sliderImage.split(",");
|
||||
storeInfo.value = detail.storeInfo;
|
||||
const description = storeInfo.value.description;
|
||||
storeInfo.value.description = description.replace(
|
||||
/<img /g,
|
||||
"<img style='width:100%;' "
|
||||
);
|
||||
let attr = [];
|
||||
detail.productAttr.forEach((item, i) => {
|
||||
attr[i] = item.attrValueArr[0]
|
||||
})
|
||||
let selectedAttrStr = attr.join(',')
|
||||
storeAttr.value = detail.productValue[selectedAttrStr]
|
||||
goodsDetailShare(detail.storeInfo)
|
||||
} else {
|
||||
showEmpty.value = true
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onLoad((options) => {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
const params = getParams(options)
|
||||
handleGetDetail(params.id)
|
||||
handleGetCartCount(params.id)
|
||||
})
|
||||
const {scrollTop} = useScroll()
|
||||
const goToService = () => {
|
||||
toast({title: '😒敬请期待😒'})
|
||||
}
|
||||
toast({ title: "敬请期待" });
|
||||
};
|
||||
|
||||
const goToShopCart = () => {
|
||||
push({
|
||||
url: '/pages/shoppingCartJump/shoppingCart'
|
||||
})
|
||||
}
|
||||
url: "/pages/shoppingCartJump/shoppingCart",
|
||||
});
|
||||
};
|
||||
|
||||
const handleOpenSelect = (action) => {
|
||||
actionType.value = action
|
||||
selectAttrPanel.value.open()
|
||||
}
|
||||
if (detailData.value.storeInfo.isShow === 1) {
|
||||
actionType.value = action;
|
||||
selectAttrPanel.value.open();
|
||||
}
|
||||
};
|
||||
|
||||
const discountCouponSelect = () => {
|
||||
selectCouponPanel.value.open()
|
||||
}
|
||||
selectCouponPanel.value.open();
|
||||
};
|
||||
|
||||
const handleSelectAttr = (attr) => {
|
||||
selectAttrPanel.value.close()
|
||||
storeAttr.value = attr.store
|
||||
storeNum.value = attr.num
|
||||
selectAttrPanel.value.close();
|
||||
storeAttr.value = attr.store;
|
||||
storeNum.value = attr.num;
|
||||
switch (actionType.value) {
|
||||
case 'select':
|
||||
|
||||
case "select":
|
||||
break;
|
||||
case 'cart':
|
||||
handleCardAdd()
|
||||
case "cart":
|
||||
handleCardAdd();
|
||||
break;
|
||||
case 'buy':
|
||||
handleBuy()
|
||||
case "buy":
|
||||
handleBuy();
|
||||
break;
|
||||
}
|
||||
actionType.value = ''
|
||||
}
|
||||
actionType.value = "";
|
||||
};
|
||||
|
||||
const handleSelectCoupon = (coupon) => {
|
||||
selectCoupon.value = coupon
|
||||
}
|
||||
selectCoupon.value = coupon;
|
||||
};
|
||||
|
||||
const handleCardAdd = async () => {
|
||||
|
||||
let res = await getCartAdd({
|
||||
cartNum: storeNum.value,
|
||||
productId: storeAttr.value.productId,
|
||||
uniqueId: storeAttr.value.unique,
|
||||
new: 0
|
||||
})
|
||||
handleGetCartCount()
|
||||
uni.showToast({
|
||||
title: '已加入购物车',
|
||||
duration: 2000
|
||||
new: 0,
|
||||
});
|
||||
}
|
||||
handleGetCartCount();
|
||||
uni.showToast({
|
||||
title: "已加入购物车",
|
||||
duration: 2000,
|
||||
});
|
||||
};
|
||||
|
||||
const handleBuy = async () => {
|
||||
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
title: "加载中",
|
||||
});
|
||||
|
||||
let res = await getCartAdd({
|
||||
cartNum: storeNum.value,
|
||||
productId: storeAttr.value.productId,
|
||||
uniqueId: storeAttr.value.unique,
|
||||
new: 1
|
||||
})
|
||||
new: 1,
|
||||
});
|
||||
uni.hideLoading();
|
||||
push({url: '/pages/submitOrder/submitOrder'}, {data: {cartId: res.cartId}})
|
||||
}
|
||||
push(
|
||||
{ url: "/pages/submitOrder/submitOrder" },
|
||||
{ data: { cartId: res.cartId } }
|
||||
);
|
||||
};
|
||||
|
||||
const handleCollect = async () => {
|
||||
const goodInfo = unref(storeInfo)
|
||||
const isCollect = goodInfo.userCollect
|
||||
const goodInfo = unref(storeInfo);
|
||||
const isCollect = goodInfo.userCollect;
|
||||
const data = {
|
||||
productId: goodInfo.id,
|
||||
type: 'collect',
|
||||
category: 'common'
|
||||
}
|
||||
type: "collect",
|
||||
category: "common",
|
||||
};
|
||||
if (isCollect) {
|
||||
// 取消
|
||||
await unCollectSingle(data)
|
||||
await unCollectSingle(data);
|
||||
} else {
|
||||
// 收藏
|
||||
await collectSingle(data)
|
||||
await collectSingle(data);
|
||||
}
|
||||
goodInfo.userCollect = !goodInfo.userCollect
|
||||
isCollect ? toast({title: '已取消收藏'}) : toast({title: '已收藏'})
|
||||
}
|
||||
goodInfo.userCollect = !goodInfo.userCollect;
|
||||
isCollect ? toast({ title: "已取消收藏" }) : toast({ title: "已收藏" });
|
||||
};
|
||||
|
||||
const handleGetCartCount = async () => {
|
||||
const count = await getCartCount()
|
||||
cardCount.value = count.count
|
||||
}
|
||||
|
||||
|
||||
|
||||
const count = await getCartCount();
|
||||
cardCount.value = count.count;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@ -447,7 +422,6 @@ const handleGetCartCount = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.goodsDetail {
|
||||
width: 100%;
|
||||
|
||||
@ -458,22 +432,17 @@ const handleGetCartCount = async () => {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
&-price {
|
||||
|
||||
&-row {
|
||||
margin-bottom: 17rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.goods-price {
|
||||
}
|
||||
}
|
||||
|
||||
&-primary {
|
||||
line-height: 50rpx;
|
||||
font-size: 50rpx;
|
||||
color: #EE6D46;
|
||||
color: #ee6d46;
|
||||
}
|
||||
|
||||
&-default {
|
||||
@ -489,7 +458,6 @@ const handleGetCartCount = async () => {
|
||||
color: #999999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&-info {
|
||||
@ -499,9 +467,6 @@ const handleGetCartCount = async () => {
|
||||
// align-items: flex-end;
|
||||
// justify-content: space-between;
|
||||
|
||||
&-left {
|
||||
}
|
||||
|
||||
&-action {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -518,8 +483,6 @@ const handleGetCartCount = async () => {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
&-image {
|
||||
@ -556,150 +519,6 @@ const handleGetCartCount = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// .goods {
|
||||
// padding: 16rpx 14rpx;
|
||||
|
||||
// &-header {
|
||||
// display: flex;
|
||||
// align-items: flex-start;
|
||||
// }
|
||||
|
||||
// &-thumb {
|
||||
|
||||
// width: 220rpx;
|
||||
// height: 220rpx;
|
||||
|
||||
// &-img {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// display: block;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &-content {
|
||||
// margin-top: 24rpx;
|
||||
// margin-left: 40rpx;
|
||||
// flex: 1
|
||||
// }
|
||||
|
||||
// &-storeName {
|
||||
// line-height: 40rpx;
|
||||
// font-size: 28rpx;
|
||||
// font-weight: 500;
|
||||
// color: #333333;
|
||||
// margin-bottom: 35rpx;
|
||||
// }
|
||||
|
||||
// &-info {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
|
||||
// &-left {
|
||||
// display: flex;
|
||||
// align-items: flex-end;
|
||||
|
||||
// }
|
||||
|
||||
// &-action {
|
||||
// &-btn {}
|
||||
|
||||
// &-desc {
|
||||
// color: #999999;
|
||||
// font-size: 24rpx;
|
||||
// line-height: 40rpx;
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// &-price {
|
||||
// &-default {
|
||||
// line-height: 28rpx;
|
||||
// font-size: 20rpx;
|
||||
// color: #999999;
|
||||
|
||||
// }
|
||||
|
||||
// &-primary {
|
||||
// line-height: 42rpx;
|
||||
// font-size: 30rpx;
|
||||
// font-weight: 500;
|
||||
// color: #EE6D46;
|
||||
// margin-left: 5rpx;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// &-desc {
|
||||
// color: #999999;
|
||||
// font-size: 24rpx;
|
||||
// line-height: 40rpx;
|
||||
// }
|
||||
|
||||
|
||||
// &-model {
|
||||
// display: inline-flex;
|
||||
// align-items: center;
|
||||
// width: auto;
|
||||
// height: 40rpx;
|
||||
// border: 1px solid #CCCCCC;
|
||||
// opacity: 1;
|
||||
// border-radius: 0rpx;
|
||||
// padding: 0 10rpx;
|
||||
|
||||
// margin-bottom: 28rpx;
|
||||
|
||||
// &-label {
|
||||
// line-height: 38rpx;
|
||||
// font-size: 24rpx;
|
||||
// color: #999999;
|
||||
// }
|
||||
|
||||
// &-value {
|
||||
// line-height: 38rpx;
|
||||
// font-size: 24rpx;
|
||||
// color: #333333;
|
||||
// margin-right: 10rpx;
|
||||
// }
|
||||
|
||||
// &-action {
|
||||
// width: 11rpx;
|
||||
// height: 7rpx;
|
||||
// }
|
||||
// }
|
||||
|
||||
// &-model-info {
|
||||
// display: inline-flex;
|
||||
// align-items: center;
|
||||
// width: auto;
|
||||
// height: 40rpx;
|
||||
// opacity: 1;
|
||||
// border-radius: 0rpx;
|
||||
// margin-bottom: 28rpx;
|
||||
|
||||
// &-label {
|
||||
// line-height: 38rpx;
|
||||
// font-size: 24rpx;
|
||||
// color: #999999;
|
||||
// }
|
||||
|
||||
// &-value {
|
||||
// line-height: 38rpx;
|
||||
// font-size: 24rpx;
|
||||
// color: #333333;
|
||||
// margin-right: 10rpx;
|
||||
// }
|
||||
|
||||
// &-action {
|
||||
// width: 11rpx;
|
||||
// height: 7rpx;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
.buy-progress {
|
||||
@ -723,7 +542,6 @@ const handleGetCartCount = async () => {
|
||||
}
|
||||
|
||||
.buy-num {
|
||||
|
||||
&-info-desc {
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
@ -753,7 +571,6 @@ const handleGetCartCount = async () => {
|
||||
.row-context {
|
||||
margin: 30rpx 0;
|
||||
|
||||
|
||||
.label-row {
|
||||
@include useFlex(space-between, center);
|
||||
@include usePadding(30, 20);
|
||||
@ -781,7 +598,6 @@ const handleGetCartCount = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.value {
|
||||
@include useFlex(flex-end, center);
|
||||
flex-shrink: 0;
|
||||
@ -802,5 +618,4 @@ const handleGetCartCount = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout>
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/ptzq.png" />
|
||||
<image :src="groupBuyBg" />
|
||||
</view>
|
||||
<div class="groupBuy-top">
|
||||
<container>
|
||||
@ -94,20 +94,8 @@
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
<script setup>
|
||||
import { groupBuyBg } from "@/utils/images";
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -6,7 +6,7 @@
|
||||
@update: 2023-11-02 16:10
|
||||
-->
|
||||
<script setup>
|
||||
|
||||
import { defaultBanner } from "@/utils/images";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -20,7 +20,7 @@
|
||||
<swiper-item v-for="item in 10">
|
||||
<view class="swiper-item">
|
||||
<image
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/banner.png"
|
||||
:src="defaultBanner"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</view>
|
||||
|
@ -15,7 +15,7 @@ const {push} = useRouter()
|
||||
const {toast} = useInterface()
|
||||
|
||||
function handleClickItem(menu) {
|
||||
if (!menu.path) return toast({title:'😒敬请期待😒'})
|
||||
if (!menu.path) return toast({title:'敬请期待'})
|
||||
// todo 这里可以通过判断menu.path去处理跳转参数
|
||||
push({url: menu.path})
|
||||
}
|
||||
|
@ -18,14 +18,6 @@ const props = defineProps({
|
||||
|
||||
const {push} = useRouter()
|
||||
|
||||
|
||||
const toDetail = (id) => {
|
||||
push({url: '/pages/goodsDetail/goodsDetail'}, {
|
||||
data: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -34,7 +26,6 @@ const toDetail = (id) => {
|
||||
<view class="good-item">
|
||||
<Goods
|
||||
:goods="item"
|
||||
@click="toDetail(item.id)"
|
||||
>
|
||||
<template #options>
|
||||
<Options :goods="item"></Options>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<view class="logo-col">
|
||||
<image
|
||||
class="logo"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/logo.png"
|
||||
:src="homeLogoIcon"
|
||||
alt=""
|
||||
/>
|
||||
</view>
|
||||
@ -66,7 +66,7 @@
|
||||
<Recommend />
|
||||
</template>
|
||||
<!-- h5 tabbar 底部 -->
|
||||
<view class="h5-tabbar-height"></view>
|
||||
<!-- <view class="h5-tabbar-height"></view> -->
|
||||
<ReturnTop :scroll-top="scrollTop" />
|
||||
</view>
|
||||
</template>
|
||||
@ -74,7 +74,7 @@
|
||||
<script setup>
|
||||
import { ref, unref } from 'vue'
|
||||
import Header from "@/components/Header/index.vue"
|
||||
import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { onLoad, onPageScroll, onReachBottom, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
import { getBanner, getHomeData } from '@/api/market'
|
||||
import { useMainStore } from '@/store/store'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
@ -89,6 +89,8 @@ import Recommend from "./components/Recommend/index.vue";
|
||||
import ReturnTop from "@/components/ReturnTop/index.vue"
|
||||
import UvIcon from "@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue";
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
import { homeLogoIcon } from "@/utils/images";
|
||||
import { useShare } from "@/hooks/useShare";
|
||||
|
||||
const main = useMainStore()
|
||||
const {push} = useRouter()
|
||||
@ -116,16 +118,16 @@ function handleHeaderAnimation(numericalValue) {
|
||||
}
|
||||
}
|
||||
|
||||
/*const scrollTop = ref(0)
|
||||
onPageScroll((e) => {
|
||||
scrollTop.value = e.scrollTop
|
||||
})*/
|
||||
|
||||
onLoad(() => {
|
||||
main.init()
|
||||
doGetHomeData()
|
||||
})
|
||||
|
||||
const {shareAppMessage,shareTimeline} = useShare();
|
||||
onShareAppMessage(shareAppMessage)
|
||||
onShareTimeline(shareTimeline)
|
||||
|
||||
const {scrollTop} = useScroll()
|
||||
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout class="bargaining">
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/kjzq.png" />
|
||||
<image :src="bargainingBg" />
|
||||
</view>
|
||||
<blank size="15"></blank>
|
||||
<container min>
|
||||
@ -38,7 +38,8 @@
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script setup>
|
||||
import { bargainingBg } from "@/utils/images";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -16,6 +16,7 @@ import { useInterface } from "@/hooks/useInterface";
|
||||
import { privacyAgreementUrl, userAgreementUrl, weixinLogin } from "@/api/auth";
|
||||
import { useMainStore } from "@/store/store";
|
||||
import { afterLogin } from "@/utils";
|
||||
import { loginLogoIcon } from "@/utils/images";
|
||||
|
||||
const {toast, loading, hideLoading} = useInterface()
|
||||
const {goBack, push} = useRouter()
|
||||
@ -109,7 +110,7 @@ function toAgreement(type) {
|
||||
<view class="main-box flex flex-jc__center">
|
||||
<image
|
||||
class="logo"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/icon/logo.png"
|
||||
:src="loginLogoIcon"
|
||||
/>
|
||||
</view>
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
@update: 2023-11-08 16:52
|
||||
-->
|
||||
<script setup>
|
||||
import { loginLogoIcon, loginPhoneIcon, loginCodeIcon } from "@/utils/images";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import { nextTick, onBeforeUnmount, ref, unref } from "vue";
|
||||
@ -178,7 +179,7 @@ onBeforeUnmount(() => {
|
||||
<view class="logo-box">
|
||||
<image
|
||||
class="logo"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/icon/logo.png"
|
||||
:src="loginLogoIcon"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@ -188,7 +189,7 @@ onBeforeUnmount(() => {
|
||||
<view class="icon">
|
||||
<image
|
||||
class="icon"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/icon/login/手机@2x.png"
|
||||
:src="loginPhoneIcon"
|
||||
/>
|
||||
</view>
|
||||
<view class="area-code">
|
||||
@ -228,7 +229,7 @@ onBeforeUnmount(() => {
|
||||
<view class="icon">
|
||||
<image
|
||||
class="icon"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/icon/login/验证码@2x.png"
|
||||
:src="loginCodeIcon"
|
||||
/>
|
||||
</view>
|
||||
<view class="area-code">
|
||||
|
@ -19,7 +19,7 @@
|
||||
<view class="swiper-item">
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/banner.png"
|
||||
:src="defaultBanner"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@ -28,7 +28,7 @@
|
||||
<view class="swiper-item">
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/banner.png"
|
||||
:src="defaultBanner"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@ -37,7 +37,7 @@
|
||||
<view class="swiper-item">
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/banner.png"
|
||||
:src="defaultBanner"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@ -105,6 +105,7 @@ import ListLoadOver from "@/components/ListLoadOver/index.vue";
|
||||
import ListLoadLoading from "@/components/ListLoadLoading/index.vue";
|
||||
import {emptyCollectIcon} from "@/utils/images";
|
||||
import Empty from "@/components/Empty/index.vue";
|
||||
import { defaultBanner } from "@/utils/images";
|
||||
|
||||
const {news, refresh, dataList, loading, loadend, listEmpty} = usePage(getProductList)
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
:fixed="false"
|
||||
title="订单详情"
|
||||
left-arrow
|
||||
@leftClick="goBack"
|
||||
@leftClick="goList"
|
||||
/>
|
||||
<view v-if="orderInfoData">
|
||||
<view class="orderInfo-header background-warp">
|
||||
<view class="background">
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/order-info-bg.png"
|
||||
:src="orderDetailsBg"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@ -21,10 +21,6 @@
|
||||
class="order-status"
|
||||
:class="'order-status-'+ orderInfoData.status"
|
||||
>
|
||||
<!-- <image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/kjzq.png"
|
||||
/> -->
|
||||
<view>{{ orderInfoData._status._title }}</view>
|
||||
</view>
|
||||
<view class="order-date">
|
||||
@ -36,7 +32,7 @@
|
||||
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/icon-location.png"
|
||||
:src="orderAddressIcon"
|
||||
/>
|
||||
</view>
|
||||
<view class="address-main">
|
||||
@ -202,156 +198,54 @@
|
||||
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status == 0"
|
||||
|
||||
>
|
||||
<!-- 未支付 -->
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<!--待付款-->
|
||||
<view
|
||||
v-if="orderInfoData._status._type === '0'"
|
||||
class="order-actions-delete"
|
||||
@tap="showModal(1)"
|
||||
>
|
||||
取消订单
|
||||
</view>
|
||||
<view
|
||||
v-if="orderInfoData._status._type === '0'"
|
||||
class="order-actions-primary"
|
||||
@tap="handlePay"
|
||||
>
|
||||
立即付款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status === 99"
|
||||
>
|
||||
<!-- 待发货 -->
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<!-- 除了待付款和已取消 -->
|
||||
<view
|
||||
v-if="!['0','5','-1','-2'].includes(orderInfoData._status._type)"
|
||||
class="order-actions-delete"
|
||||
@tap="toSelectRefundGood(orderInfoData)"
|
||||
>
|
||||
申请退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 已完成 -->
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status === 1"
|
||||
v-if="['4'].includes(orderInfoData._status._type)"
|
||||
class="order-actions-primary"
|
||||
@tap="showModal(0)"
|
||||
>
|
||||
删除订单
|
||||
</view>
|
||||
<!-- 已发货 待收货 -->
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view
|
||||
class="order-actions-delete"
|
||||
@tap="toSelectRefundGood(orderInfoData)"
|
||||
>
|
||||
申请退款
|
||||
</view>
|
||||
<view
|
||||
v-if="orderInfoData._status._type === '2'"
|
||||
class="order-actions-primary"
|
||||
@tap="showModal(2)"
|
||||
>
|
||||
确认收货
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status === 2"
|
||||
>
|
||||
<!-- 待评价 -->
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view
|
||||
class="order-actions-primary"
|
||||
@tap="toSelectRefundGood(orderInfoData)"
|
||||
>
|
||||
申请售后
|
||||
</view>
|
||||
<!-- <view-->
|
||||
<!-- class="order-actions-primary"-->
|
||||
<!-- @tap="toEvaluate(orderInfoData.cartInfo[0])"-->
|
||||
<!-- >-->
|
||||
<!-- 去评价-->
|
||||
<!-- </view>-->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status === 3"
|
||||
>
|
||||
<!-- 已完成 -->
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view
|
||||
class="order-actions-delete"
|
||||
@tap="showModal(0)"
|
||||
>
|
||||
删除订单
|
||||
</view>
|
||||
<view
|
||||
class="order-actions-primary"
|
||||
@tap="toSelectRefundGood(orderInfoData)"
|
||||
>
|
||||
申请售后
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退款中 -->
|
||||
<view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status === 5"
|
||||
>
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view class="order-actions-primary">
|
||||
查看订单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已退款 -->
|
||||
<!-- <view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status == 6"
|
||||
>
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view class="order-actions-primary">
|
||||
查看订单
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 退款 -->
|
||||
<!-- <view
|
||||
class="order-actions bottom-bar"
|
||||
v-if="orderInfoData.status == 7"
|
||||
>
|
||||
<view class="order-actions-left">
|
||||
</view>
|
||||
<view class="order-actions-btns">
|
||||
<view class="order-actions-primary">
|
||||
查看订单
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
</view>
|
||||
</layout>
|
||||
<!-- 支付弹窗 -->
|
||||
@ -366,6 +260,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { orderDetailsBg, orderAddressIcon } from "@/utils/images";
|
||||
import { computed, ref, unref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { orderCancel, orderDelete, orderExpress, orderInfo, orderTake } from '@/api/order'
|
||||
@ -402,12 +297,17 @@ const handleOrderInfo = async (option) => {
|
||||
if(parseInt(res._status._type) === 2){
|
||||
remainTimeStr.value = formatRemainTime(res._status._payRemainTime)
|
||||
}
|
||||
const express = await orderExpress({
|
||||
await orderExpress({
|
||||
orderCode: orderInfoData.value.orderId,
|
||||
shipperCode: orderInfoData.value.deliverySn,
|
||||
logisticCode: orderInfoData.value.deliveryId,
|
||||
}).then(res=>{
|
||||
expressData.value = res.traces.reverse()
|
||||
}).catch(err=>{
|
||||
console.log(err,'err')
|
||||
})
|
||||
expressData.value = express.traces.reverse()
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -428,6 +328,9 @@ const goList = ()=>{
|
||||
case 0:
|
||||
status = 0
|
||||
break
|
||||
case 4:
|
||||
status = -1
|
||||
break
|
||||
case 99:
|
||||
status = 1
|
||||
break
|
||||
@ -437,8 +340,7 @@ const goList = ()=>{
|
||||
push({url: '/pages/orderList/orderList'}, {
|
||||
data: {
|
||||
type: status
|
||||
},
|
||||
timeout:2000
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -447,6 +349,7 @@ const toEvaluate = (item) => {
|
||||
push({url: '/pages/evaluate/evaluate'}, {
|
||||
data: {
|
||||
unique: item.unique,
|
||||
orderId: item.orderId
|
||||
},
|
||||
type:'redirectTo'
|
||||
})
|
||||
@ -455,9 +358,7 @@ const toEvaluate = (item) => {
|
||||
const toSelectRefundGood = () => {
|
||||
push({url: '/pages/selectRefundGood/selectRefundGood'}, {
|
||||
data: {
|
||||
orderId: orderInfoData.value.orderId,
|
||||
id: orderInfoData.value.id,
|
||||
status: orderInfoData.value.status === 99?0:orderInfoData.value.status
|
||||
id: orderInfoData.value.id
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -497,7 +398,9 @@ async function doDeleteRequest(){
|
||||
uni: orderInfoData.value.orderId
|
||||
})
|
||||
toast({title: '删除成功'});
|
||||
setTimeout(()=>{
|
||||
goList()
|
||||
},2000)
|
||||
}
|
||||
|
||||
async function doCancelRequest(){
|
||||
@ -505,7 +408,9 @@ async function doCancelRequest(){
|
||||
id: orderInfoData.value.orderId
|
||||
})
|
||||
toast({title: '取消成功'});
|
||||
setTimeout(()=>{
|
||||
goList()
|
||||
},2000)
|
||||
}
|
||||
|
||||
async function doTakeRequest(){
|
||||
@ -544,6 +449,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../style/images";
|
||||
.orderList {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
@ -574,15 +480,15 @@ onLoad((options) => {
|
||||
}
|
||||
|
||||
&.order-status-0,&.order-status--1,&.order-status-4,&.order-status-5,&.order-status-6,&.order-status-7 {
|
||||
background-image: url("https://b2c-pro-static-dev.zkthink.com/static/images/icon-order-info-1.png");
|
||||
background-image: $orderStateMoney;
|
||||
}
|
||||
|
||||
&.order-status-1, &.order-status-99 {
|
||||
background-image: url("https://b2c-pro-static-dev.zkthink.com/static/images/icon-order-info-2.png");
|
||||
background-image: $orderStateReturn;
|
||||
}
|
||||
|
||||
&.order-status-2, &.order-status-3 {
|
||||
background-image: url("https://b2c-pro-static-dev.zkthink.com/static/images/icon-order-info-4.png");
|
||||
background-image: $orderStateFinish;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<uv-navbar
|
||||
:fixed="false"
|
||||
:title="title"
|
||||
@leftClick="goBack"
|
||||
@leftClick="goUser"
|
||||
/>
|
||||
<uv-tabs
|
||||
:list="navList"
|
||||
@ -65,7 +65,7 @@ import { useScroll } from "@/hooks/useScroll";
|
||||
const {scrollTop} = useScroll()
|
||||
const {type, refresh, dataList, loadend, loading, listEmpty} = usePage(orderList)
|
||||
|
||||
const {getParams, goBack, push} = useRouter()
|
||||
const {getParams, pushToTab, push} = useRouter()
|
||||
|
||||
const actionType = ref(0)
|
||||
|
||||
@ -122,6 +122,9 @@ function paySuccess() {
|
||||
push({url: '/pages/payStatus/index'}, {})
|
||||
}
|
||||
|
||||
function goUser() {
|
||||
pushToTab({url: '/pages/user/user'}, {})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
const params = getParams(options)
|
||||
|
@ -229,17 +229,20 @@ const handleOrderInfo = async (option) => {
|
||||
goodsList.value = res.filter(item => goodsSelect.value.includes(item.cartInfo.productAttrUnique))
|
||||
|
||||
let price = 0
|
||||
let postagePrice = 0
|
||||
let productParamList = []
|
||||
let productAttrUnique = []
|
||||
goodsList.value.forEach(item => {
|
||||
price += item.cartInfo.truePrice * item.cartInfo.cartNum
|
||||
price += item.cartInfo.truePrice * item.cartInfo.cartNum - item.cartInfo.couponPrice
|
||||
postagePrice += item.cartInfo.postagePrice
|
||||
productParamList.push({
|
||||
productId: item.productId,
|
||||
productAttrUnique: item.cartInfo.productAttrUnique
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
if(goodsList.value[0].status === 0){
|
||||
price += postagePrice
|
||||
}
|
||||
totalPrice.value = price.toFixed(2)
|
||||
data.value.orderId = res[0].orderId
|
||||
data.value.serviceType = refundType.value
|
||||
|
@ -4,14 +4,14 @@
|
||||
:fixed="false"
|
||||
title="售后订单详情"
|
||||
left-arrow
|
||||
@leftClick="goBack"
|
||||
@leftClick="goBackList"
|
||||
/>
|
||||
<view v-if="orderInfoData">
|
||||
<view class="orderInfo-header background-warp" :class="orderInfoData.state === 0 && 'mb-100'">
|
||||
<view class="background">
|
||||
<image
|
||||
class="image"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/refund-order-bg.png"
|
||||
:src="afterSalesBg"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-date" v-if="parseInt(orderInfoData.remainTime) > 0 && ![3,4].includes(orderInfoData.state)">
|
||||
还剩{{remainTimeStr}}自动确认
|
||||
{{remainTimeStr}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="address noBorder">-->
|
||||
@ -109,6 +109,7 @@
|
||||
<view class="order-goods page-card mb-20">
|
||||
<goods
|
||||
list
|
||||
link
|
||||
interval
|
||||
desc="3"
|
||||
showAction
|
||||
@ -164,15 +165,19 @@
|
||||
{{ orderInfoData.serviceType===0?'仅退款':'退货退款' }}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="info-cell"
|
||||
>
|
||||
<view class="info-cell">
|
||||
<view class="info-cell-label">
|
||||
订单编号
|
||||
</view>
|
||||
<view class="info-cell-value">
|
||||
{{ orderInfoData.orderId }}
|
||||
</view>
|
||||
<view
|
||||
class="info-cell-operation"
|
||||
@click="setData(orderInfoData.orderId,'复制成功')"
|
||||
>
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="info-cell"
|
||||
@ -293,12 +298,15 @@ import {
|
||||
import { orderReStatus } from '@/config'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import {useGlobalProperties} from "@/hooks";
|
||||
import { useShearPlate } from "@/hooks/useShearPlate";
|
||||
import { formatRemainTime } from '@/utils/utils'
|
||||
import Modal from "@/components/Modal/index.vue";
|
||||
import { afterSalesBg } from "@/utils/images";
|
||||
import config from "@/uni_modules/uv-ui-tools/libs/config/config";
|
||||
const {$timeFormat} = useGlobalProperties()
|
||||
|
||||
const {getParams,push,goBack} = useRouter()
|
||||
|
||||
const {getParams,push} = useRouter()
|
||||
const {setData} = useShearPlate();
|
||||
const orderInfoData = ref(null)
|
||||
const orderInfoStatusMsg = ref('')
|
||||
const expressData = ref(null)
|
||||
@ -410,6 +418,13 @@ const toRefund = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 返回列表
|
||||
const goBackList = () => {
|
||||
push({url: '/pages/refundList/refundList'}, {
|
||||
type:"redirectTo"
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
const params = getParams(options)
|
||||
id.value = params.id
|
||||
@ -424,6 +439,7 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "../../style/images";
|
||||
.orderList {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
@ -451,10 +467,10 @@ onLoad((options) => {
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
&.order-status-0,&.order-status-1,&.order-status-2,&.order-status-5{
|
||||
background-image: url("https://b2c-pro-static-dev.zkthink.com/static/images/icon-order-info-5.png");
|
||||
background-image: $orderStateClock;
|
||||
}
|
||||
&.order-status-3,&.order-status-4{
|
||||
background-image: url("https://b2c-pro-static-dev.zkthink.com/static/images/icon-order-info-4.png");
|
||||
background-image: $orderStateFinish;
|
||||
}
|
||||
.image {
|
||||
width: 40rpx;
|
||||
|
@ -27,7 +27,7 @@
|
||||
<label>热门搜索</label>
|
||||
<image
|
||||
class="seeIcon hotSearchListSee-icon"
|
||||
:src="!hideHotFlag?'https://b2c-pro-static-dev.zkthink.com/static/images/see.png':'https://b2c-pro-static-dev.zkthink.com/static/images/notSee.png'"
|
||||
:src="!hideHotFlag ? seeIcon : notSeeIcon"
|
||||
@click="hideHotFlag = !hideHotFlag"
|
||||
/>
|
||||
</view>
|
||||
@ -60,7 +60,7 @@
|
||||
<image
|
||||
class="historyDel-icon"
|
||||
@click="showModal(0)"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/delete.png"
|
||||
:src="historyDeleteIcon"
|
||||
/>
|
||||
</view>
|
||||
<view class="historySear-box hot-flex-list">
|
||||
@ -87,6 +87,7 @@ import { useRouter } from "@/hooks/useRouter";
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { hotSearch, historySearch, clearHistorySearch } from "@/api/product";
|
||||
import Modal from "@/components/Modal/index.vue";
|
||||
import { seeIcon, notSeeIcon, historyDeleteIcon } from "@/utils/images";
|
||||
const {push, goBack} = useRouter()
|
||||
|
||||
const searchRef = ref();
|
||||
|
30
pages/selectRefundGood/index.data.js
Normal file
30
pages/selectRefundGood/index.data.js
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @name: index.data
|
||||
* @author: hsj
|
||||
* @date: 2023-11-21 14:15
|
||||
* @description:index.data
|
||||
* @update: 2023-11-06 14:15
|
||||
* */
|
||||
// 购物车统计信息
|
||||
export const settleFields = [
|
||||
{
|
||||
label: '商品总价',
|
||||
field: 'truePrice',
|
||||
prefix: '¥'
|
||||
},
|
||||
{
|
||||
label: '优惠',
|
||||
field: 'couponPrice',
|
||||
prefix: '-¥'
|
||||
},
|
||||
{
|
||||
label: '运费',
|
||||
field: 'postagePrice',
|
||||
prefix: '¥'
|
||||
},
|
||||
{
|
||||
label: '总计',
|
||||
field: 'totalPrice',
|
||||
prefix: '¥'
|
||||
}
|
||||
]
|
@ -58,6 +58,21 @@
|
||||
</Goods>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选中了的结算统计信息 -->
|
||||
<view :class="{'select-product-settle-info':true,show:goodsSelect.length>0}">
|
||||
<view
|
||||
class="row flex flex-ai__center flex-jc__sb"
|
||||
v-for="(item,index) in settleFields"
|
||||
:key="index"
|
||||
>
|
||||
<view class="label">
|
||||
{{ item.label }}
|
||||
</view>
|
||||
<view v-if="statisticsInfo">
|
||||
{{ item.prefix }} {{ statisticsInfo[item.field].toFixed(2) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</card>
|
||||
</space>
|
||||
</uv-checkbox-group>
|
||||
@ -70,6 +85,7 @@
|
||||
>
|
||||
<uv-checkbox
|
||||
name="all"
|
||||
:disabled="allDisabled"
|
||||
:checked="goodsSelectAll"
|
||||
@change="handleGoodsSelectAll"
|
||||
>
|
||||
@ -81,7 +97,7 @@
|
||||
{{ goodsSelect.length }} 件商品
|
||||
</view>
|
||||
<view class="action-total">
|
||||
总计:¥{{ totalPrice }}
|
||||
总计:¥{{ statisticsInfo.totalPrice.toFixed(2) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-btns">
|
||||
@ -110,17 +126,23 @@ import { applyForAfterSalesInfo } from '@/api/order'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useRouter } from "@/hooks/useRouter";
|
||||
import Goods from "@/components/goodsComponents/Goods.vue";
|
||||
import { settleFields } from "@/pages/selectRefundGood/index.data";
|
||||
|
||||
const {getParams, push, goBack} = useRouter()
|
||||
const goodsList = ref([])
|
||||
const goodsSelect = ref([])
|
||||
const goodsSelectAll = ref(false)
|
||||
const totalPrice = ref(0);
|
||||
const orderId = ref(null)
|
||||
const id = ref(null)
|
||||
const refundType = ref(null)
|
||||
const status = ref(0)
|
||||
|
||||
const allDisabled = ref(true)
|
||||
const statisticsInfo = ref({
|
||||
truePrice: 0,
|
||||
couponPrice: 0,
|
||||
postagePrice: 0,
|
||||
totalPrice: 0
|
||||
})
|
||||
|
||||
const handleGoodsSelectAll = (e) => {
|
||||
goodsSelectAll.value = e
|
||||
@ -128,26 +150,46 @@ const handleGoodsSelectAll = (e) => {
|
||||
goodsSelect.value = []
|
||||
return
|
||||
}
|
||||
goodsSelect.value = goodsList.value.map(item => item.cartInfo.productAttrUnique)
|
||||
goodsSelect.value = goodsList.value.filter(item=> item.isAfterSales === 1).map(item => item.cartInfo.productAttrUnique)
|
||||
}
|
||||
|
||||
const handleGoodsSelect = (value) => {
|
||||
goodsSelectAll.value = value.length === goodsList.value.length
|
||||
goodsSelectAll.value = value.length === goodsList.value.filter(item=> item.isAfterSales === 1).length
|
||||
}
|
||||
|
||||
watch(goodsSelect, (goodsSelect) => {
|
||||
let price = 0
|
||||
statisticsInfo.value = {
|
||||
truePrice: 0,
|
||||
couponPrice: 0,
|
||||
postagePrice: 0,
|
||||
totalPrice: 0
|
||||
}
|
||||
let postagePrice = 0
|
||||
goodsList.value.filter(item => goodsSelect.includes(item.cartInfo.productAttrUnique)).forEach(item => {
|
||||
price += item.cartInfo.truePrice * item.cartInfo.cartNum
|
||||
statisticsInfo.value.truePrice += item.cartInfo.truePrice * item.cartInfo.cartNum
|
||||
statisticsInfo.value.couponPrice += item.cartInfo.couponPrice
|
||||
postagePrice += item.cartInfo.postagePrice
|
||||
})
|
||||
|
||||
totalPrice.value = price.toFixed(2)
|
||||
statisticsInfo.value.totalPrice = statisticsInfo.value.truePrice - statisticsInfo.value.couponPrice
|
||||
// 未发货退邮费
|
||||
if(status.value === 0){
|
||||
statisticsInfo.value.postagePrice = postagePrice
|
||||
statisticsInfo.value.totalPrice += statisticsInfo.value.postagePrice
|
||||
}
|
||||
})
|
||||
|
||||
const handleOrderInfo = async (option) => {
|
||||
const res = await applyForAfterSalesInfo(option)
|
||||
// orderInfoData.value = res
|
||||
goodsList.value = res
|
||||
orderId.value = res[0].orderId
|
||||
status.value = res[0].status
|
||||
for(let i=0;i<res.length;i++){
|
||||
if(res[i].isAfterSales === 1){
|
||||
allDisabled.value = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -171,9 +213,7 @@ const toRefund = (type) => {
|
||||
|
||||
onLoad((options) => {
|
||||
const params = getParams(options)
|
||||
orderId.value = params.orderId
|
||||
id.value = params.id
|
||||
status.value = params.status
|
||||
handleOrderInfo({
|
||||
key: params.id
|
||||
})
|
||||
@ -183,8 +223,6 @@ onLoad((options) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.shopping-checkbox {
|
||||
}
|
||||
|
||||
.shopping-action {
|
||||
padding-left: 34rpx;
|
||||
|
137
pages/share/index.vue
Normal file
137
pages/share/index.vue
Normal file
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
@name: 分享跳转页面
|
||||
@author: kahu4
|
||||
@date: 2023-11-10 11:33
|
||||
@description:index
|
||||
@update: 2023-11-10 11:33
|
||||
-->
|
||||
<script
|
||||
setup
|
||||
>
|
||||
import { onBeforeUnmount, onMounted, ref } from "vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { lazyLoading } from "@/utils/images";
|
||||
import { useShareInner } from "@/hooks/useShare";
|
||||
|
||||
let colorTime
|
||||
const textColor = ref('#cccccc')
|
||||
const text = ref('数据处理中...')
|
||||
|
||||
const {
|
||||
params,
|
||||
analysisParams
|
||||
} = useShareInner()
|
||||
onMounted(() => {
|
||||
colorTime = setInterval(() => {
|
||||
textColor.value = textColor.value === '#333' ? "#cccccc" : "#333"
|
||||
}, 800)
|
||||
})
|
||||
|
||||
onLoad(options => {
|
||||
// 解析参数
|
||||
analysisParams(options)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
colorTime && clearInterval(colorTime)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="share-container">
|
||||
<view class="main-box">
|
||||
<view
|
||||
class="loading"
|
||||
|
||||
>
|
||||
<image :src="lazyLoading" />
|
||||
</view>
|
||||
<view
|
||||
class="text"
|
||||
:style="{color:textColor}"
|
||||
>
|
||||
<view
|
||||
:style="{animationDelay: `${index*0.2}s`}"
|
||||
v-for="(item,index) in text"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fafafa;
|
||||
}
|
||||
</style>
|
||||
<style
|
||||
scoped
|
||||
lang="scss"
|
||||
>
|
||||
.share-container {
|
||||
width: 100%;
|
||||
|
||||
.main-box {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
.loading {
|
||||
image{
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 30rpx 0;
|
||||
transition: all .3s;
|
||||
font-size: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
view {
|
||||
margin: 0 5rpx;
|
||||
animation: jump 3s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
rotate: 0deg;
|
||||
}
|
||||
100% {
|
||||
rotate: 360deg;
|
||||
}
|
||||
80% {
|
||||
rotate: 460deg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@keyframes jump {
|
||||
0%, 60% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
20% {
|
||||
transform: translateY(-15rpx);
|
||||
}
|
||||
40% {
|
||||
transform: translateY(15rpx);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -356,25 +356,6 @@ const {scrollTop} = useScroll()
|
||||
}
|
||||
}
|
||||
|
||||
// 统计信息
|
||||
.select-product-settle-info {
|
||||
@include usePadding(40, 0);
|
||||
font-size: 28rpx;
|
||||
transition: height .3s;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.row {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
&.show {
|
||||
@include usePadding(40, 10);
|
||||
border-top: 1rpx solid #E6E6E6;
|
||||
height: 260rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
z-index: 89;
|
||||
height: 100rpx;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout class="bargaining">
|
||||
<view class="swiper">
|
||||
<image src="https://b2c-pro-static-dev.zkthink.com/static/images/kjzq.png" />
|
||||
<image :src="bargainingBg" />
|
||||
</view>
|
||||
<blank size="15"></blank>
|
||||
<container min>
|
||||
@ -38,20 +38,8 @@
|
||||
</layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
<script setup>
|
||||
import { bargainingBg } from "@/utils/images";
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -15,6 +15,7 @@ import { doPayment, PayType } from "@/utils/paymentUtils";
|
||||
import CouponSelect from "@/pages/submitOrder/components/coupon-select.vue";
|
||||
import Header from "@/components/Header/index.vue"
|
||||
import { useScroll } from "@/hooks/useScroll";
|
||||
import { nextIcon } from "@/utils/images";
|
||||
|
||||
const {getParams, push, goBack} = useRouter()
|
||||
const {toast, loading, hideLoading} = useInterface();
|
||||
@ -46,7 +47,7 @@ const addressTabSelect = ref(0) // 提货方式
|
||||
*/
|
||||
function changeAddressTab(tab) {
|
||||
if (tab.value === 1) {
|
||||
toast({title: '😒敬请期待😒'})
|
||||
toast({title: '敬请期待'})
|
||||
} else {
|
||||
addressTabSelect.value = tab.value
|
||||
}
|
||||
@ -237,7 +238,7 @@ onShow(async ()=>{
|
||||
</view>
|
||||
<image
|
||||
class="arrow-icon"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/next.png"
|
||||
:src="nextIcon"
|
||||
alt=""
|
||||
/>
|
||||
</view>
|
||||
@ -249,7 +250,7 @@ onShow(async ()=>{
|
||||
点击添加地址
|
||||
<image
|
||||
class="arrow-icon"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/next.png"
|
||||
:src="nextIcon"
|
||||
alt=""
|
||||
/>
|
||||
</view>
|
||||
@ -317,7 +318,7 @@ onShow(async ()=>{
|
||||
<image
|
||||
v-if="row.field=== 'couponPrice'"
|
||||
class="arrow-icon"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/images/next.png"
|
||||
:src="nextIcon"
|
||||
alt=""
|
||||
/>
|
||||
</view>
|
||||
|
@ -33,7 +33,7 @@ const {push} = useRouter();
|
||||
const {toast} = useInterface();
|
||||
|
||||
function toLink(listItem) {
|
||||
if (!listItem.path) return toast({title: '😒 暂未开放 😒'})
|
||||
if (!listItem.path) return toast({title: ' 暂未开放 '})
|
||||
push({url: listItem.path}, listItem?.params ?? {})
|
||||
}
|
||||
</script>
|
||||
|
@ -12,7 +12,7 @@
|
||||
>
|
||||
<image
|
||||
class="head"
|
||||
src="https://b2c-pro-static-dev.zkthink.com/static/icon/user/mine.png"
|
||||
:src="defaultAvatarIcon"
|
||||
/>
|
||||
<view class="user-info">
|
||||
点击登录
|
||||
@ -70,6 +70,7 @@ import { useRouter } from "@/hooks/useRouter";
|
||||
import { storeToRefs } from "pinia";
|
||||
import GridCard from "@/pages/user/components/GridCard.vue";
|
||||
import { cardOneList, cardTwoList, orderIconList } from "@/pages/user/index.data";
|
||||
import {defaultAvatarIcon} from "@/utils/images";
|
||||
|
||||
const mainStore = useMainStore()
|
||||
const {user} = storeToRefs(mainStore);
|
||||
|
14
style/images.scss
Normal file
14
style/images.scss
Normal file
@ -0,0 +1,14 @@
|
||||
$base-path: 'https://b2c-pro-static-dev.zkthink.com/';
|
||||
|
||||
$addDelIcon: url('#{$base-path}/static/images/delete_icon.png'); // 删除按钮图标
|
||||
|
||||
$orderStateClock: url('#{$base-path}/static/images/icon-order-info-5.png'); // 订单状态icon-时钟
|
||||
|
||||
$orderStateMoney: url('#{$base-path}/static/images/icon-order-info-1.png'); // 订单状态icon-金额
|
||||
|
||||
$orderStateReturn: url('#{$base-path}/static/images/icon-order-info-2.png'); // 订单状态icon-退货
|
||||
|
||||
$orderStateFinish: url('#{$base-path}/static/images/icon-order-info-4.png'); // 订单状态icon-已完成
|
||||
|
||||
$orderStateCoupon: url('#{$base-path}/static/background/coupon-bg.png'); // 优惠券背景
|
||||
|
@ -868,6 +868,24 @@ image {
|
||||
right: 0;
|
||||
background: #fff;
|
||||
z-index: 89;
|
||||
.off-tip{
|
||||
display: none;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.action-cont{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
&.off{
|
||||
display: block;
|
||||
.off-tip{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
//#ifdef H5
|
||||
&.screen {
|
||||
bottom: var(--window-bottom);
|
||||
@ -879,8 +897,9 @@ image {
|
||||
padding-bottom: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
&.column {
|
||||
flex-direction: column;
|
||||
|
||||
@ -931,6 +950,7 @@ image {
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.action-icon-img {
|
||||
@ -1202,10 +1222,21 @@ image {
|
||||
}
|
||||
}
|
||||
|
||||
.uni-tabbar{
|
||||
height: 118rpx;
|
||||
.uni-tabbar__label{
|
||||
font-size: 20rpx;
|
||||
line-height: 28rpx;
|
||||
// 购物车和售后产品选择统计信息
|
||||
.select-product-settle-info {
|
||||
@include usePadding(40, 0);
|
||||
font-size: 28rpx;
|
||||
transition: height .3s;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.row {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
&.show {
|
||||
@include usePadding(40, 10);
|
||||
border-top: 1rpx solid #E6E6E6;
|
||||
height: 260rpx;
|
||||
}
|
||||
}
|
||||
|
102
utils/images.js
Normal file
102
utils/images.js
Normal file
@ -0,0 +1,102 @@
|
||||
import { VUE_APP_STATIC_URL } from "@/config";
|
||||
// 空状态
|
||||
export const emptyCouponIcon = `${VUE_APP_STATIC_URL}static/icon/empty/优惠券.png`
|
||||
export const emptyCollectIcon = `${VUE_APP_STATIC_URL}static/icon/empty/收藏.png`
|
||||
export const emptyCartIcon = `${VUE_APP_STATIC_URL}static/icon/empty/购物车.png`
|
||||
export const emptyOrderIcon = `${VUE_APP_STATIC_URL}static/icon/empty/订单.png`
|
||||
export const emptyAddressIcon = `${VUE_APP_STATIC_URL}static/icon/empty/地址.png`
|
||||
export const emptyGoodIcon = `${VUE_APP_STATIC_URL}static/icon/empty/good.png`
|
||||
|
||||
// logo
|
||||
export const homeLogoIcon = `${VUE_APP_STATIC_URL}static/images/logo.png` // 首页logo
|
||||
export const loginLogoIcon = `${VUE_APP_STATIC_URL}static/icon/logo.png` // 登录logo
|
||||
export const loginPhoneIcon = `${VUE_APP_STATIC_URL}static/icon/login/手机@2x.png` // 手机图标
|
||||
export const loginCodeIcon = `${VUE_APP_STATIC_URL}static/icon/login/验证码@2x.png` // 验证码图标
|
||||
|
||||
// 用户信息
|
||||
export const defaultAvatarIcon = `${VUE_APP_STATIC_URL}static/icon/user/mine.png` // 用户默认头像
|
||||
|
||||
// 微信支付宝支付图标
|
||||
export const wechatIcon = `${VUE_APP_STATIC_URL}static/icon/pay/weixin.png`
|
||||
export const aliIcon = `${VUE_APP_STATIC_URL}static/icon/pay/zhifubao.png`
|
||||
|
||||
// 我的页面功能图标
|
||||
export const toPayIcon = `${VUE_APP_STATIC_URL}static/images/icon-dfk.png`
|
||||
export const toFHIcon = `${VUE_APP_STATIC_URL}static/images/icon-dfh.png`
|
||||
export const toSHIcon = `${VUE_APP_STATIC_URL}static/images/icon-dsh.png`
|
||||
export const toPJIcon = `${VUE_APP_STATIC_URL}static/images/icon-dpj.png`
|
||||
export const toZJIcon = `${VUE_APP_STATIC_URL}static/images/icon-wdzj.png`
|
||||
export const toYHQIcon = `${VUE_APP_STATIC_URL}static/images/icon-yhq.png`
|
||||
export const toSCIcon = `${VUE_APP_STATIC_URL}static/images/icon-wdsc.png`
|
||||
export const toZBIcon = `${VUE_APP_STATIC_URL}static/images/icon-kqzb.png`
|
||||
export const toTGIcon = `${VUE_APP_STATIC_URL}static/images/icon-wdtg.png`
|
||||
export const toKJIcon = `${VUE_APP_STATIC_URL}static/images/icon-kqjl.png`
|
||||
export const toSHOIcon = `${VUE_APP_STATIC_URL}static/images/icon-kqjl.png`
|
||||
export const toKFIcon = `${VUE_APP_STATIC_URL}static/images/icon-lxkf.png`
|
||||
|
||||
// 个人信息账号和地址
|
||||
export const toDZIcon = `${VUE_APP_STATIC_URL}static/images/icon-address.png`
|
||||
export const toZHIcon = `${VUE_APP_STATIC_URL}static/images/icon-zhsz.png`
|
||||
|
||||
export const wechat = `${VUE_APP_STATIC_URL}static/icon/login/wechat.png`
|
||||
export const phone = `${VUE_APP_STATIC_URL}static/icon/login/phone.png`
|
||||
|
||||
// 首页营销活动图标
|
||||
export const sp = `${VUE_APP_STATIC_URL}static/images/sp.png`
|
||||
export const pt = `${VUE_APP_STATIC_URL}static/images/pt.png`
|
||||
export const ms = `${VUE_APP_STATIC_URL}static/images/ms.png`
|
||||
export const kj = `${VUE_APP_STATIC_URL}static/images/kj.png`
|
||||
|
||||
// 暂无回复
|
||||
export const emptyReply = `${VUE_APP_STATIC_URL}static/images/icon-dpj.png`
|
||||
|
||||
|
||||
// 懒加载Loading
|
||||
export const lazyLoading = `${VUE_APP_STATIC_URL}static/images/%E5%8D%95%E5%95%86%E6%88%B7%E5%8A%A0%E8%BD%BD%E5%8A%A8%E5%9B%BE.gif`
|
||||
|
||||
// 返回顶部
|
||||
export const toTop = `${VUE_APP_STATIC_URL}static/images/up.png`
|
||||
|
||||
// 支付状态
|
||||
export const paySuccess = `${VUE_APP_STATIC_URL}static/icon/pay/pay-success.png`
|
||||
export const payError = `${VUE_APP_STATIC_URL}static/icon/pay/pay-error.png`
|
||||
|
||||
// 地址管理
|
||||
export const addressEditIcon = `${VUE_APP_STATIC_URL}static/images/icon-edit.png` // 地址编辑
|
||||
|
||||
// 订单管理
|
||||
export const orderDetailsBg = `${VUE_APP_STATIC_URL}static/images/order-info-bg.png` // 订单详情背景图
|
||||
export const orderAddressIcon = `${VUE_APP_STATIC_URL}static/images/icon-location.png` // 订单详情地址图标
|
||||
|
||||
|
||||
// 商品组件
|
||||
export const goodsArrowsIcon = `${VUE_APP_STATIC_URL}static/images/down.png` // 商品组件箭头
|
||||
|
||||
// 商品详情
|
||||
export const productCustomerIcon = `${VUE_APP_STATIC_URL}static/images/icon-kefu.png` // 商品详情客服
|
||||
export const productCartIcon = `${VUE_APP_STATIC_URL}static/images/icon-gouwuche.png` // 商品详情购物车图标
|
||||
export const productCollectIcon = `${VUE_APP_STATIC_URL}static/images/icon-shouceng.png` // 商品详情收藏图标
|
||||
export const productAffirmCollectIcon = `${VUE_APP_STATIC_URL}static/images/icon-shouceng-o.png` // 商品详情已收藏图标
|
||||
|
||||
// 默认banner
|
||||
export const defaultBanner = `${VUE_APP_STATIC_URL}static/images/banner.png` // 商品详情已收藏图标
|
||||
|
||||
// 营销活动
|
||||
export const bargainingBg = `${VUE_APP_STATIC_URL}static/images/kjzq.png` // 砍价背景
|
||||
export const discountBg = `${VUE_APP_STATIC_URL}static/images/zkzq.png` // 折扣背景图
|
||||
export const seckillBg = `${VUE_APP_STATIC_URL}static/images/flashKilling.png` // 秒杀背景
|
||||
export const groupBuyBg = `${VUE_APP_STATIC_URL}static/images/ptzq.png` // 拼团背景
|
||||
|
||||
// 搜索
|
||||
export const seeIcon = `${VUE_APP_STATIC_URL}static/images/see.png` // 热门搜索图标显示
|
||||
export const notSeeIcon = `${VUE_APP_STATIC_URL}static/images/notSee.png` // 热门搜索图标隐藏
|
||||
export const historyDeleteIcon = `${VUE_APP_STATIC_URL}static/images/delete.png` // 删除历史记录
|
||||
|
||||
// 售后
|
||||
export const afterSalesBg = `${VUE_APP_STATIC_URL}static/images/refund-order-bg.png` // 售后背景
|
||||
|
||||
// 箭头图标
|
||||
export const nextIcon = `${VUE_APP_STATIC_URL}static/images/next.png`
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ import stringify from '@/utils/querystring'
|
||||
import { timeFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js';
|
||||
import router from './router'
|
||||
import cookie from './cookie'
|
||||
import { PARAMS_KEY } from "@/hooks/useRouter";
|
||||
|
||||
/**
|
||||
* 未登录无权限
|
||||
@ -16,10 +17,10 @@ export const handleLoginFailure = () => {
|
||||
if (["pages/login/guid", "pages/login/index"].includes(curRoute.route)) {
|
||||
return;
|
||||
}
|
||||
const data = curRoute?.$page?.fullPath;
|
||||
const lastFullPath = `/${curRoute.route}?${PARAMS_KEY}=${curRoute.options[PARAMS_KEY]}`
|
||||
uni.setStorage({
|
||||
key: 'lastFullPath',
|
||||
data
|
||||
data:lastFullPath
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/guid',
|
||||
|
Reference in New Issue
Block a user