This commit is contained in:
Waiting committed 2024-04-14 01:43:37 +08:00
1 parent b676a1acd9
commit 16dac8d97f
17 files changed
+60 -32

No files matched your search

+4 -4
View File
@@ -1,8 +1,8 @@
<script setup lang="ts">
<script setup lang='ts'>
import { mpUpdate } from '@/utils';
onLaunch(() => {
console.log('App Launch');
onLaunch((options) => {
console.log('App Launch options ', options);
// #ifdef MP
mpUpdate();
// #endif
@@ -15,7 +15,7 @@ onHide(() => {
});
</script>
<style lang="scss">
<style lang='scss'>
/* 每个页面公共css */
@import 'uview-plus/index.scss';
@import '@/static/styles/common.scss';
+2 -2
View File
@@ -2,7 +2,7 @@
<uni-popup ref='popupRef' type='bottom' :mask-click='false' @touchmove.stop.prevent=''>
<view class='content'>
<view class='c-flex-row' style='align-items: flex-start'>
<image class='goods-image' :src='goodsDetailBean?.images' />
<image class='goods-image' :src='goodsDetailBean?.images||defaultImage' />
<view class='c-flex-column' style='flex: 1'>
<text class='goods-name'>{{ goodsDetailBean?.name }}</text>
<text class='goods-price'>{{ flashPrice > 0 ? `${flashPrice}` : `${goodsDetailBean?.price}` || 0 }}</text>
@@ -54,7 +54,7 @@
<script lang='ts' setup>
import { PropType, ref } from 'vue';
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { showToast } from '@/utils';
import { getGoodsDetail } from '@/api/goods';
import { GoodsBean, StockBean } from '@/api/goods/types';
+6
View File
@@ -32,6 +32,12 @@
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "肃客会员"
}
}
],
"subPackages": [
+2 -2
View File
@@ -3,7 +3,7 @@
<view class='swiper-container'>
<swiper class='swiper' :interval='1500' :duration='1000' @change='swiperChange'>
<swiper-item v-for='(item,index) in bannerList' :key='index'>
<image :src='item' />
<image :src='item||defaultImage' />
</swiper-item>
</swiper>
<view class='indicator'>
@@ -129,7 +129,7 @@
</template>
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import dayjs from 'dayjs';
import { formatTimeWithZeroPad, goPath, isLogin } from '@/utils';
import SkuDialog from '@/components/sku-dialog.vue';
+2 -2
View File
@@ -10,7 +10,7 @@
<!-- <u-list-item v-for='(item,index) in groupbuyList' :key='index'>-->
<view class='c-flex-column' v-for='(item,index) in groupbuyList' :key='index'>
<view class='item c-flex-row' @click.stop='goPath(`/pages/common/groupbuy/detail?id=${item.id}`)'>
<image class='goods-image' :src='JSON.parse(item.content)[0].images' />
<image class='goods-image' :src='JSON.parse(item.content)[0].images||defaultImage' />
<view class='c-flex-column' style='flex: 1'>
<view class='goods-name'>{{ item.name }}</view>
<view class='middle-view c-flex-row'>
@@ -37,7 +37,7 @@
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { getGroupBuyList } from '@/api/groupbuy';
import { goPath } from '@/utils';
+2 -2
View File
@@ -3,7 +3,7 @@
<view class='card-view'>
<template class='c-flex-row' v-for='item in orderBean?.orderGoods' :key='item.id'>
<image class='goods-image' :src='item?.images' />
<image class='goods-image' :src='item?.images||defaultImage' />
<view class='c-flex-column' style='flex: 1'>
<text class='goods-name'>{{ item?.goodsName || item?.goodsCode }}</text>
<text class='goods-sku'>{{ item?.stockStock?.colorName }} {{ item?.stockStock?.sizeName }}</text>
@@ -50,6 +50,7 @@ import { parseParameter, sortASCII } from '@/utils';
import { hexMD5 } from '@/utils/common/md5';
import { useUserStore } from '@/store';
import { handlePayResult } from '@/utils/order';
import { defaultImage } from '@/utils/assets';
const userState = useUserStore();
const { terminalInfo } = storeToRefs(userState);
@@ -79,7 +80,6 @@ const buildSqbParams = computed(() => {
});
const navigateTo = (e: any) => {
console.log('----------->>>>>navigateTo ', e);
handlePayResult(orderBean.value?.id, e, {
onSuccess: () => {
pay({
+2 -2
View File
@@ -3,7 +3,7 @@
<swiper class='swiper' :indicator-dots='true' :autoplay='true' :interval='3000' :duration='1000'
@change='swiperChange'>
<swiper-item v-for='(item, index) in companyConfigInfo?.bannerinx' :key='index'>
<image :src='item.src' mode='aspectFill' />
<image :src='item.src||defaultImage' mode='aspectFill' />
</swiper-item>
</swiper>
@@ -69,7 +69,7 @@
<script setup lang='ts'>
import { getCompanyList } from '@/api/company';
import { useUserStore } from '@/store';
import { assetsUrl, defaultAvatar } from '@/utils/assets';
import { assetsUrl, defaultAvatar, defaultImage } from '@/utils/assets';
import { getCompanyId, goPath, isLogin } from '@/utils';
import { storeToRefs } from 'pinia';
+15
View File
@@ -0,0 +1,15 @@
<template>
</template>
<script lang='ts' setup>
onMounted(() => {
uni.reLaunch({
url: '/pages/home/index'
});
});
</script>
<style lang='scss' scoped>
</style>
+2 -2
View File
@@ -20,7 +20,7 @@
<grid-view type='masonry' :cross-axis-count='2'>
<view v-for='(item, index) in goodsList' :key='index' class='goods-item'
@click.stop='goPath(`/pages/mall/subs/goods/detail?goodsId=${item.goodsId}`)'>
<image class='goods-image' :src='item.images' />
<image class='goods-image' :src='item.images||defaultImage' />
<text class='goods-name'>{{ item.goodsName }}</text>
<text class='goods-price'>¥{{ item.price }}</text>
<image class='add-image' :src='assetsUrl("ic_add_goods.png")' @click.stop='addShoppingCart(item)' />
@@ -42,7 +42,7 @@
<script setup lang='ts'>
import SkuDialog from '@/components/sku-dialog.vue';
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { goLogin, goPath, isLogin, showToast } from '@/utils';
import { getCategoryList, getGoodsList } from '@/api/goods';
import { CategoryBean, GoodsBean } from '@/api/goods/types';
+3 -3
View File
@@ -3,7 +3,7 @@
<view class='swiper-container'>
<swiper class='swiper' :interval='1500' :duration='1000' @change='swiperChange'>
<swiper-item v-for='(item,index) in [goodsBean?.images]' :key='index'>
<image :src='item' />
<image :src='item||defaultImage' />
</swiper-item>
</swiper>
<view class='indicator' style='display: none'>
@@ -48,7 +48,7 @@
<view style='display: inline-block' v-for='(item, index) in recommendList'
:key='index'>
<view class='recommend-item c-flex-column'>
<image :src='item.images' />
<image :src='item.images||defaultImage' />
<text>{{ item.goodsName }}</text>
<text class='goods-price'>{{ item.price }}</text>
</view>
@@ -94,7 +94,7 @@
</template>
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import SkuDialog from '@/components/sku-dialog.vue';
import { goPath, showToast } from '@/utils';
import { getGoodsDetail, getGoodsList } from '@/api/goods';
+4 -4
View File
@@ -39,7 +39,7 @@
<view class='goods-info-view c-flex-column'>
<view class='c-flex-row' style='margin-bottom: 20rpx' v-for='(item,index) in orderBean?.orderGoods'
:key='index'>
<image class='goods-image' :src='item.images' />
<image class='goods-image' :src='item.images||defaultImage' />
<view class='c-flex-column' style='flex: 1;'>
<view class='c-flex-row'>
<text class='goods-name'>{{ item.name }}</text>
@@ -121,7 +121,7 @@
</template>
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import PaymentDialog from '@/components/payment-dialog.vue';
import CouponDialog from '@/pages/mall/subs/components/coupon-dialog.vue';
import { goPath, parseParameter, sortASCII } from '@/utils';
@@ -198,7 +198,6 @@ const navigateTo = (e: any) => {
};
const createOrder = async () => {
await uni.showLoading();
const params = {
// 'discount': 0,
// 'freePrice': 0,
@@ -227,11 +226,12 @@ const createOrder = async () => {
}
))
};
await uni.showLoading();
const result = await orderCreate(params);
orderBean.value!.id = result.id;
uni.hideLoading();
//删除购物车已存在商品
orderBean?.value?.orderGoods?.forEach(item => {
const index = shoppingCartStore.getSameGoodsIndex(item.id, item.checkedStock.colorId, item.checkedStock.sizeId);
+2 -2
View File
@@ -11,7 +11,7 @@
<grid-view :cross-axis-count='2'>
<view v-for='(item, index) in goodsList' :key='index' class='goods-item'
@click.stop='goPath(`/pages/mall/subs/goods/detail?goodsId=${item.goodsId}`)'>
<image class='goods-image' :src='item.images' />
<image class='goods-image' :src='item.images||defaultImage' />
<text class='goods-name'>{{ item.goodsName }}</text>
<text class='goods-price'>¥{{ item.price }}</text>
<image class='add-image' :src='assetsUrl("ic_add_goods.png")' @click.stop='addShoppingCart(item)' />
@@ -24,7 +24,7 @@
<script lang='ts' setup>
import SkuDialog from '@/components/sku-dialog.vue';
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { goPath } from '@/utils';
import { getGoodsList } from '@/api/goods';
import useShoppingCartStore from '@/store/modules/shoppingcart';
+2 -2
View File
@@ -13,7 +13,7 @@
<image class='checkbox'
:src='assetsUrl(item.checked?"ic_checkbox_active_red.png":"ic_checkbox_normal.png")'
@click.stop='item.checked=!item.checked' />
<image class='goods-image' :src='item.images' />
<image class='goods-image' :src='item.images||defaultImage' />
<view class='c-flex-column'>
<text>{{ item.name }}</text>
<view class='c-flex-row'>
@@ -61,7 +61,7 @@
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import useShoppingCartStore from '@/store/modules/shoppingcart';
import { goPath, showToast } from '@/utils';
import { GoodsBean, StockBean } from '@/api/goods/types';
@@ -1,7 +1,7 @@
<template>
<view class='card-view' @click.stop='goPath(`/pages/mine/subs/order/detail?orderId=${item?.id}`)'>
<view class='goods-info-view c-flex-row'>
<image class='goods-image' :src='item?.orderGoods[0].images' />
<image class='goods-image' :src='item?.orderGoods[0].images||defaultImage' />
<view class='c-flex-column' style='flex: 1;'>
<view class='c-flex-row'>
<text class='goods-name'>{{ item?.orderGoods[0].goodsName }}</text>
@@ -42,7 +42,7 @@
<script lang='ts' setup>
import { PropType } from 'vue';
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { goPath } from '@/utils';
import { isPending } from '@/utils/order';
import { OrderBean } from '@/api/order/types';
+7 -3
View File
@@ -15,7 +15,8 @@
</view>
</view>
</view>
<view class='address-view c-flex-column' v-if='orderBean?.order?.address'>
<view class='address-view c-flex-column'
v-if='orderBean?.order?.address'>
<view class='user-info c-flex-row'>
<text v-if='orderBean.order.address.defaultstatus==1'>默认</text>
<text>{{ orderBean?.order?.address.name }}</text>
@@ -34,7 +35,7 @@
<view class='goods-info-view c-flex-column'>
<view class='c-flex-row' style='margin-bottom: 20rpx' v-for='(item,index) in orderBean?.order.orderGoods'
:key='index'>
<image class='goods-image' :src='item.stockStock.images' />
<image class='goods-image' :src='item.stockStock.images||defaultImage' />
<view class='c-flex-column' style='flex: 1;'>
<view class='c-flex-row'>
<text class='goods-name'>{{ item.goodsName }}</text>
@@ -112,7 +113,7 @@
</template>
<script lang='ts' setup>
import { assetsUrl } from '@/utils/assets';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { getOrderDetail } from '@/api/order';
import { OrderBean } from '@/api/order/types';
import { parseParameter, sortASCII } from '@/utils';
@@ -140,6 +141,9 @@ onLoad(async (e: any) => {
const fetchData = async (orderId: string) => {
await uni.showLoading();
orderBean.value = await getOrderDetail(orderId);
if(orderBean.value?.order.address) {
orderBean.value.order.address = JSON.parse(orderBean?.value.order?.address);
}
uni.hideLoading();
};
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1705542491615" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4429" xmlns:xlink="http://www.w3.org/1999/xlink" width="168" height="168"><path d="M0 0m73.142857 0l877.714286 0q73.142857 0 73.142857 73.142857l0 877.714286q0 73.142857-73.142857 73.142857l-877.714286 0q-73.142857 0-73.142857-73.142857l0-877.714286q0-73.142857 73.142857-73.142857Z" fill="#DEE1E9" p-id="4430"></path><path d="M712.137143 256h-381.988572C309.394286 256 292.571429 272.018286 292.571429 291.712v276.004571c0 19.748571 16.859429 35.712 37.577142 35.712h381.988572C732.891429 603.428571 749.714286 587.410286 749.714286 567.716571V291.712C749.714286 272.018286 732.854857 256 712.137143 256z m-143.853714 61.568c20.772571 0 37.632 16.018286 37.632 35.766857s-16.859429 35.766857-37.632 35.766857c-20.790857 0-37.650286-16.018286-37.650286-35.766857s16.859429-35.766857 37.650286-35.766857zM330.002286 555.922286s30.793143-170.605714 102.4-170.605715c70.144 0 88.027429 119.314286 137.398857 119.314286 31.158857 0 27.885714-53.851429 77.330286-53.851428 35.437714 0 57.965714 105.142857 57.965714 105.142857H329.984zM274.048 773.869714v9.709715c-7.734857 0.658286-15.798857 1.481143-24.192 2.304v12.672h-10.861714v-11.849143c-10.861714 0.658286-22.381714 1.481143-34.230857 2.139428l-1.481143-10.532571c12.507429-0.658286 24.521143-1.152 35.712-1.810286v-13.659428h-30.610286l-2.633143-9.380572c4.608-5.266286 9.051429-11.52 13.001143-18.925714H201.142857v-10.532572h22.875429c1.481143-3.620571 2.962286-7.241143 4.278857-10.861714l11.849143 1.974857c-1.152 2.962286-2.304 5.924571-3.620572 8.886857h40.155429v10.532572h-45.092572c-3.620571 6.912-7.570286 13.165714-11.684571 18.596571h19.090286v-10.861714h10.861714v10.861714h25.673143v9.709715h-25.673143v13.001142c8.557714-0.658286 16.621714-1.316571 24.192-1.974857z m23.04-10.861714c-1.810286 13.824-6.253714 25.837714-13.330286 36.041143l-8.228571-8.557714c7.241143-10.697143 11.190857-23.369143 11.52-38.180572v-25.837714c20.406857-1.974857 36.534857-5.595429 48.054857-10.861714l7.570286 8.886857c-12.178286 5.266286-26.989714 9.051429-44.763429 11.026285v17.115429h49.371429v10.368h-17.444572v35.712h-11.355428v-35.712h-21.394286z m31.762286 40.484571v61.878858h-12.178286v-6.418286h-83.602286v6.418286h-12.178285v-61.878858h107.958857z m-95.780572 45.257143h83.602286v-12.836571h-83.602286v12.836571z m0-22.381714h83.602286v-12.836571h-83.602286v12.836571z m144.987429-103.021714h118.162286v11.52h-58.916572v11.026285a302.646857 302.646857 0 0 1-2.139428 28.8h74.386285v11.355429h-51.017143v57.435429c0 5.266286 2.633143 8.064 7.899429 8.064h20.900571c3.949714 0 6.912-1.152 8.722286-3.291429 2.304-2.633143 3.785143-10.203429 4.608-23.04l11.190857 3.620571c-1.316571 16.128-3.785143 25.837714-7.405714 29.458286-3.126857 2.962286-8.064 4.443429-14.976 4.443429H462.811429c-10.861714 0-16.128-5.595429-16.128-16.786286v-59.904h-13.330286c-2.633143 14.317714-6.747429 26.660571-12.342857 37.193143-10.203429 17.773714-26.660571 31.762286-49.536 41.636571l-6.582857-10.532571c22.710857-10.203429 38.345143-23.533714 47.232-40.32 3.949714-8.228571 6.912-17.609143 9.051428-27.977143h-54.144v-11.355429h56.118857c1.316571-8.886857 1.974857-18.596571 2.139429-28.8v-11.026285h-47.232v-11.52z m209.170286 12.507428l10.532571 1.316572a90.88 90.88 0 0 1-4.278857 9.051428h43.446857v8.228572c-4.608 8.722286-11.52 16.457143-20.900571 23.04 11.026286 5.266286 23.533714 9.709714 37.686857 13.001143l-6.253715 8.886857c-15.963429-4.278857-29.622857-9.545143-41.142857-15.963429-12.672 6.747429-28.306286 12.178286-47.067428 16.292572l-5.266286-9.545143c16.950857-2.962286 31.268571-7.241143 42.788571-12.672a93.842286 93.842286 0 0 1-16.621714-13.824c-4.937143 4.608-10.532571 8.886857-16.786286 12.836571l-6.582857-8.557714c14.976-8.886857 25.179429-19.584 30.445715-32.091429z m19.090285 36.534857c8.064-4.937143 14.317714-10.697143 18.761143-17.28h-37.357714a7.734857 7.734857 0 0 0-1.481143 1.974858c5.76 5.595429 12.507429 10.697143 20.077714 15.305142z m-32.585143 44.269715a374.857143 374.857143 0 0 1 63.030858 17.609143l-3.949715 9.545142a372.699429 372.699429 0 0 0-63.689143-18.267428l4.608-8.886857z m17.115429-23.04c12.836571 4.278857 24.685714 9.545143 35.382857 15.469714l-5.595428 8.557714a165.302857 165.302857 0 0 0-35.218286-16.128l5.430857-7.899428z m79.323429-71.917715v143.670858h-11.52v-6.747429h-111.250286v6.747429h-11.52v-143.670858h134.290286z m-122.770286 126.390858h111.250286v-115.858286h-111.250286v115.858286z m188.928-78.500572v9.874286c-0.164571 6.089143-0.493714 11.849143-0.822857 17.28h76.525714v68.955428h-11.849143v-57.435428h-66.157714c-3.949714 24.685714-13.001143 43.776-26.989714 56.941714l-9.051429-7.899428c17.28-16.292571 26.002286-42.294857 26.331429-77.842286v-60.397714h12.013714v39.168h48.219428v-43.776h11.684572v43.776h37.028571v11.35Line truncated

After

Width:  |  Height:  |  Size: 4.9 KiB

+2
View File
@@ -1,2 +1,4 @@
export const assetsUrl = (name: string) => `https://img.lakeapp.cn/wx/images/${name}`;
export const defaultAvatar = 'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132';
export const defaultImage = '/static/images/ic_noimage.svg';