reactor:清理部分 TODO

pull/132/MERGE
YunaiV 2025-04-28 09:50:50 +08:00
parent 93ce26f6be
commit 08e7b32fc3
25 changed files with 95 additions and 113 deletions

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

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 1css 2
</script>
<style lang="scss" scoped>

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>

View File

@ -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>

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>

View File

@ -64,7 +64,6 @@
v-model="formData.applyDescription"
placeholder="客官~请描述您遇到的问题,建议上传照片"
/>
<!-- TODO 芋艿上传的测试 -->
<view class="upload-img">
<s-uploader
v-model:url="formData.applyPicUrls"

View File

@ -194,7 +194,7 @@
@close="state.showCoupon = false"
/>
<!-- 满额折扣弹框 TODO @puhui999折扣后续要把优惠信息打进去 -->
<!-- 满额折扣弹框 -->
<s-discount-list
v-model="state.orderInfo"
:show="state.showDiscount"

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.vueshow
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>

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.vueshow
let isOpenBusinessView = true;

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;
}

View File

@ -262,7 +262,6 @@
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
//
// TODO
spu.name = activity.name;
//
spu.price = Math.min(combinationPrice, spu.price);

View File

@ -262,7 +262,6 @@
const spu = state.spuList.find((spu) => activity.spuId === spu.id);
if (spu) {
//
// TODO
spu.name = activity.name;
//
spu.price = Math.min(seckillPrice, spu.price);

View File

@ -19,8 +19,10 @@
<view class="goods-title ss-line-2">{{ state.goodsInfo.name }}</view>
<view class="header-right-bottom ss-flex ss-col-center ss-row-between">
<!-- 价格 -->
<view v-if="state.goodsInfo.activity_type === PromotionActivityTypeEnum.POINT.type"
class="price-text ss-flex">
<view
v-if="state.goodsInfo.activity_type === PromotionActivityTypeEnum.POINT.type"
class="price-text ss-flex"
>
<image
v-if="!isEmpty(state.selectedSku)"
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
@ -97,7 +99,6 @@
/**
* 秒杀活动SKU选择
* 与s-select-sku的区别多一个秒杀价的标签没有加入购物车按钮立即购买按钮叫确认秒杀有最大购买数量限制
* 差别不大可以考虑合并 todo @芋艿
*/
// active,nostock
import { computed, reactive, watch } from 'vue';
@ -110,8 +111,7 @@
const props = defineProps({
modelValue: {
type: Object,
default() {
},
default() {},
},
show: {
type: Boolean,

View File

@ -43,8 +43,6 @@ function ShoproDebug() {
// new vconsole.default();
// });
// #endif
// TODO 芋艿:可以打印路由
// 同步前端页面到后端
// console.log(ROUTES)
}

View File

@ -39,8 +39,14 @@ export default {
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['chooseWXPay', 'openLocation', 'getLocation','updateTimelineShareData','scanQRCode'], // TODO 芋艿:后续可以设置更多权限;
openTagList: data.openTagList
jsApiList: [
'chooseWXPay',
'openLocation',
'getLocation',
'updateTimelineShareData',
'scanQRCode',
], // TODO 芋艿:后续可以设置更多权限;
openTagList: data.openTagList,
});
}
@ -55,7 +61,7 @@ export default {
if (configSuccess) {
console.log('微信 JSSDK 初始化成功');
}
})
});
// 回调
if (callback) {
@ -110,7 +116,7 @@ export default {
});
},
// 更新微信分享信息 TODO 芋艿:未测试
// 更新微信分享信息
updateShareInfo(data, callback = null) {
this.isReady(() => {
const shareData = {
@ -141,7 +147,7 @@ export default {
...data,
success: function (res) {
console.log(res);
}
},
});
});
},

View File

@ -15,7 +15,6 @@ const platformMap = ['H5', 'WechatOfficialAccount', 'WechatMiniProgram', 'App'];
// 设置分享方式: 1=直接转发,2=海报,3=复制链接,...按需扩展
const fromMap = ['forward', 'poster', 'link'];
// TODO 芋艿:分享的接入
// 设置分享信息参数
const getShareInfo = (
scene = {
@ -37,7 +36,7 @@ const getShareInfo = (
link: '', // 分享Url+参数
query: '', // 分享参数
poster, // 海报所需数据
forward: {} // 转发所需参数
forward: {}, // 转发所需参数
};
shareInfo.title = scene.title;
shareInfo.image = $url.cdn(scene.image);

View File

@ -119,7 +119,6 @@ const app = defineStore({
},
});
// todo: @owen 先做数据适配,后期重构
const adaptTemplate = async (appTemplate, templateId) => {
const { data: diyTemplate } = templateId
? // 查询指定模板,一般是预览时使用

View File

@ -128,7 +128,6 @@ const user = defineStore({
},
// 登录后,加载各种信息
// TODO 芋艿:整理下;
async loginAfter() {
await this.updateUserData();

View File

@ -40,19 +40,6 @@ export const floatToFixed2 = (num) => {
return str;
};
/**
* 将一个分数转换为整数
*
* @param {number | string | undefined} num 分数
* @return {number} 整数
*/
export const convertToInteger = (num) => {
if (typeof num === 'undefined') return 0;
const parsedNumber = typeof num === 'string' ? parseFloat(num) : num;
// TODO 分转元后还有小数则四舍五入
return Math.round(parsedNumber * 100);
};
/**
* 时间日期转换
* @param {dayjs.ConfigType} date 当前时间new Date() 格式
@ -110,8 +97,6 @@ export function handleTree(
/**
* 重置分页对象
*
* TODO 芋艿需要处理其它页面
*
* @param pagination 分页对象
*/
export function resetPagination(pagination) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB