reactor:清理部分 TODO

This commit is contained in:
YunaiV
2025-04-28 09:50:50 +08:00
parent 93ce26f6be
commit 08e7b32fc3
25 changed files with 95 additions and 113 deletions
+1 -2
View File
@@ -28,10 +28,9 @@
<view class="flex align-center justify-between ss-p-25">
<!-- 左侧图标 -->
<view class="time-icon">
<!-- TODO 芋艿图片统一维护 -->
<image
class="ss-w-100 ss-h-100"
src="http://mall.yudao.iocoder.cn/static/images/priceTag.png"
:src="sheep.$url.static('/static/img/shop/priceTag.png')"
/>
</view>
<scroll-view
+1 -2
View File
@@ -62,7 +62,7 @@
</view>
</view>
<!-- 签到说明 TODO @科举这里改成已累计签到 -->
<!-- 签到说明 -->
<view class="bg-white ss-m-t-16 ss-p-t-30 ss-p-b-60 ss-p-x-40">
<view class="activity-title ss-m-b-30">签到说明</view>
<view class="activity-des">1.已累计签到{{ state.signInfo.totalDay }}</view>
@@ -160,7 +160,6 @@
getSignInfo();
getSignConfigList();
});
// TODO 芋艿:1)css 需要优化,例如说引入的图片;2)删除多余的样式
</script>
<style lang="scss" scoped>
+36 -35
View File
@@ -1,27 +1,29 @@
<!-- 页面 TODO 芋艿该页面的实现代码需要优化包括 js css以及相关的样式设计 -->
<!-- 页面 -->
<template>
<s-layout title="我的团队" :class="state.scrollTop ? 'team-wrap' : ''" navbar="inner">
<view
class="header-box"
:style="[
{
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx',
},
]"
>
<!-- 推广数据总览 -->
<view class="team-data-box ss-flex ss-col-center ss-row-between" style="width: 100%">
<view class="data-card" style="width: 100%">
<view class="total-item" style="width: 100%">
<view class="item-title" style="text-align: center">推广人数</view>
<view class="total-num" style="text-align: center">
{{ state.summary.firstBrokerageUserCount + state.summary.secondBrokerageUserCount || 0 }}
</view>
</view>
</view>
</view>
</view>
<view
class="header-box"
:style="[
{
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx',
},
]"
>
<!-- 推广数据总览 -->
<view class="team-data-box ss-flex ss-col-center ss-row-between" style="width: 100%">
<view class="data-card" style="width: 100%">
<view class="total-item" style="width: 100%">
<view class="item-title" style="text-align: center">推广人数</view>
<view class="total-num" style="text-align: center">
{{
state.summary.firstBrokerageUserCount + state.summary.secondBrokerageUserCount || 0
}}
</view>
</view>
</view>
</view>
</view>
<view class="promoter-list">
<!--<view
class="promoterHeader bg-color"
@@ -44,7 +46,7 @@
</view>
</view>-->
<view style="padding: 0 20rpx">
<view class="nav acea-row row-around l1" style="margin-top:20rpx;">
<view class="nav acea-row row-around l1" style="margin-top: 20rpx">
<view :class="state.level == 1 ? 'item on' : 'item'" @click="setType(1)">
一级({{ state.summary.firstBrokerageUserCount || 0 }})
</view>
@@ -66,7 +68,7 @@
/>
</view>
<image
src="/static/images/search.png"
:src="sheep.$url.static('/static/img/shop/search.png')"
mode=""
style="width: 60rpx; height: 64rpx"
@click="submitForm"
@@ -80,8 +82,7 @@
v-if="sort === 'userCountDESC'"
>
团队排序
<!-- TODO 芋艿看看怎么从项目里拿出去 -->
<image src="/static/images/sort1.png" />
<image :src="sheep.$url.static('/static/img/shop/sort1.png')" />
</view>
<view
class="sortItem"
@@ -89,15 +90,15 @@
v-else-if="sort === 'userCountASC'"
>
团队排序
<image src="/static/images/sort3.png" />
<image :src="sheep.$url.static('/static/img/shop/sort3.png')" />
</view>
<view class="sortItem" @click="setSort('userCount', 'desc')" v-else>
团队排序
<image src="/static/images/sort2.png" />
<image :src="sheep.$url.static('/static/img/shop/sort2.png')" />
</view>
<view class="sortItem" @click="setSort('price', 'asc')" v-if="sort === 'priceDESC'">
金额排序
<image src="/static/images/sort1.png" />
<image :src="sheep.$url.static('/static/img/shop/sort1.png')" />
</view>
<view
class="sortItem"
@@ -105,11 +106,11 @@
v-else-if="sort === 'priceASC'"
>
金额排序
<image src="/static/images/sort3.png" />
<image :src="sheep.$url.static('/static/img/shop/sort3.png')" />
</view>
<view class="sortItem" @click="setSort('price', 'desc')" v-else>
金额排序
<image src="/static/images/sort2.png" />
<image :src="sheep.$url.static('/static/img/shop/sort2.png')" />
</view>
<view
class="sortItem"
@@ -117,7 +118,7 @@
v-if="sort === 'orderCountDESC'"
>
订单排序
<image src="/static/images/sort1.png" />
<image :src="sheep.$url.static('/static/img/shop/sort1.png')" />
</view>
<view
class="sortItem"
@@ -125,11 +126,11 @@
v-else-if="sort === 'orderCountASC'"
>
订单排序
<image src="/static/images/sort3.png" />
<image :src="sheep.$url.static('/static/img/shop/sort3.png')" />
</view>
<view class="sortItem" @click="setSort('orderCount', 'desc')" v-else>
订单排序
<image src="/static/images/sort2.png" />
<image :src="sheep.$url.static('/static/img/shop/sort2.png')" />
</view>
</view>
<block v-for="(item, index) in state.pagination.list" :key="index">
@@ -173,7 +174,7 @@
</view>
</block>
<block v-if="state.pagination.list.length === 0">
<view style="text-align: center;margin-top:30rpx;">暂无推广人数</view>
<view style="text-align: center; margin-top: 30rpx">暂无推广人数</view>
</block>
</view>
</view>
@@ -2,7 +2,6 @@
<template>
<view v-if="state.list.length > 0" class="groupon-list detail-card ss-p-x-20">
<view class="join-activity ss-flex ss-row-between ss-m-t-30">
<!-- todo: 接口缺少总数 -->
<view class="">已有{{ state.list.length }}人参与活动</view>
<text class="cicon-forward"></text>
</view>
@@ -37,7 +36,7 @@
import { onMounted, reactive } from 'vue';
import sheep from '@/sheep';
import { useDurationTime } from '@/sheep/hooks/useGoods';
import CombinationApi from "@/sheep/api/promotion/combination";
import CombinationApi from '@/sheep/api/promotion/combination';
const props = defineProps({
modelValue: {
@@ -74,7 +73,7 @@
onMounted(async () => {
// 查询参团记录
// status = 0 表示未成团
const { data } = await CombinationApi.getHeadCombinationRecordList(props.modelValue.id, 0 , 10);
const { data } = await CombinationApi.getHeadCombinationRecordList(props.modelValue.id, 0, 10);
state.list = data;
});
</script>
+1 -1
View File
@@ -68,7 +68,7 @@
</view>
</view>
<view class="line">
<image :src="sheep.$url.static('/static/images/line.png', 'local')" />
<image :src="sheep.$url.static('/static/img/shop/line.png')" />
</view>
</view>
</template>
-1
View File
@@ -64,7 +64,6 @@
v-model="formData.applyDescription"
placeholder="客官~请描述您遇到的问题,建议上传照片"
/>
<!-- TODO 芋艿上传的测试 -->
<view class="upload-img">
<s-uploader
v-model:url="formData.applyPicUrls"
+1 -1
View File
@@ -194,7 +194,7 @@
@close="state.showCoupon = false"
/>
<!-- 满额折扣弹框 TODO @puhui999折扣后续要把优惠信息打进去 -->
<!-- 满额折扣弹框 -->
<s-discount-list
v-model="state.orderInfo"
:show="state.showDiscount"
+3 -3
View File
@@ -331,7 +331,7 @@
// 确认收货
async function onConfirm(orderId, ignore = false) {
// 需开启确认收货组件
// todo: 芋艿:待接入微信
// todo: 芋艿:待接入微信 https://gitee.com/sheepjs/shopro-uniapp/commit/a6bbba49b84dd418b84c5fefc8b7463df8f4901f
// 1.怎么检测是否开启了发货组件功能?如果没有开启的话就不能在这里return出去
// 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
let isOpenBusinessView = true;
@@ -432,7 +432,7 @@
onShow(async () => {
//onShow中获取订单列表,保证跳转后页面为最新状态
await getOrderDetail(state.orderInfo.id);
})
});
onLoad(async (options) => {
let id = 0;
@@ -444,7 +444,7 @@
if (state.comeinType === 'wechat') {
state.merchantTradeNo = options.merchant_trade_no;
}
state.orderInfo.id = id
state.orderInfo.id = id;
});
</script>
+1 -1
View File
@@ -209,7 +209,7 @@
// 确认收货 TODO 芋艿:待测试
async function onConfirm(order, ignore = false) {
// 需开启确认收货组件
// todo: 芋艿:需要后续接入微信收货组件
// todo: 芋艿:需要后续接入微信收货组件 https://gitee.com/sheepjs/shopro-uniapp/commit/a6bbba49b84dd418b84c5fefc8b7463df8f4901f
// 1.怎么检测是否开启了发货组件功能?如果没有开启的话就不能在这里return出去
// 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
let isOpenBusinessView = true;
+32 -31
View File
@@ -1,5 +1,5 @@
<template>
<view class='order-details'>
<view class="order-details">
<!-- 自提商品核销 -->
<view v-if="orderInfo.deliveryType === 2 && orderInfo.payStatus" class="writeOff borRadius14">
<view class="title">核销信息</view>
@@ -8,21 +8,19 @@
<image
v-if="!!painterImageUrl"
:src="painterImageUrl"
:style="{width: `${state.qrcodeSize}px`, height: `${state.qrcodeSize}px`}"
:style="{ width: `${state.qrcodeSize}px`, height: `${state.qrcodeSize}px` }"
:show-menu-by-longpress="true"
/>
</view>
</view>
<view class="gear">
<image :src="sheep.$url.static('/static/images/writeOff.png', 'local')"></image>
<image :src="sheep.$url.static('/static/img/shop/writeOff.png')"></image>
</view>
<view class="num">{{ orderInfo.pickUpVerifyCode }}</view>
<view class="rules">
<!-- TODO puhui999: 需要后端放回使用 receiveTime 即可 -->
<view class="item">
<view class="rulesTitle flex flex-wrap align-center">
核销时间
</view>
<view class="rulesTitle flex flex-wrap align-center"> 核销时间 </view>
<view class="info">
每日
<text class="time">2020-2-+52</text>
@@ -37,7 +35,10 @@
</view>
</view>
</view>
<view v-if="orderInfo.deliveryType === 2" class="map flex flex-wrap align-center ss-row-between borRadius14">
<view
v-if="orderInfo.deliveryType === 2"
class="map flex flex-wrap align-center ss-row-between borRadius14"
>
<view>自提地址信息</view>
<view class="place cart-color flex flex-wrap flex-center" @tap="showMaoLocation">
查看位置
@@ -64,14 +65,14 @@
type: Object,
default() {},
},
systemStore:{
systemStore: {
type: Object,
default() {},
}
},
});
const state = reactive({
qrcodeSize: 145
})
qrcodeSize: 145,
});
/**
* 打开地图
@@ -80,7 +81,7 @@
console.log(props.systemStore);
if (!props.systemStore.latitude || !props.systemStore.longitude) {
sheep.$helper.toast('缺少经纬度信息无法查看地图!');
return
return;
}
uni.openLocation({
latitude: props.systemStore.latitude,
@@ -89,19 +90,19 @@
name: props.systemStore.name,
address: props.systemStore.areaName + props.systemStore.detailAddress,
});
}
};
/**
* 拨打电话
*/
const makePhone = () => {
uni.makePhoneCall({
phoneNumber: props.systemStore.phone
})
}
phoneNumber: props.systemStore.phone,
});
};
const painterRef = ref(); // 海报画板
const painterImageUrl = ref(); // 海报 url
const showPainter = ref(true)
const showPainter = ref(true);
// 渲染海报
const renderPoster = async (poster) => {
await painterRef.value.render(poster);
@@ -109,7 +110,7 @@
// 获得生成的图片
const setPainterImageUrl = (path) => {
painterImageUrl.value = path;
showPainter.value = false
showPainter.value = false;
};
/**
* 生成核销二维码
@@ -118,23 +119,23 @@
renderPoster({
css: {
width: `${state.qrcodeSize}px`,
height: `${state.qrcodeSize}px`
height: `${state.qrcodeSize}px`,
},
views:[
views: [
{
type: 'qrcode',
text: text,
css: {
width: `${state.qrcodeSize}px`,
height: `${state.qrcodeSize}px`
}
}
]
})
}
height: `${state.qrcodeSize}px`,
},
},
],
});
};
defineExpose({
markCode
})
markCode,
});
</script>
<style scoped lang="scss">
@@ -142,10 +143,10 @@
border-radius: 14rpx !important;
}
.cart-color {
color: #E93323 !important;
border: 1px solid #E93323 !important
color: #e93323 !important;
border: 1px solid #e93323 !important;
}
.order-details{
.order-details {
border-radius: 10rpx;
margin: 0 20rpx 20rpx 20rpx;
}