reactor:清理部分 TODO
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -43,8 +43,6 @@ function ShoproDebug() {
|
||||
// new vconsole.default();
|
||||
// });
|
||||
// #endif
|
||||
|
||||
// TODO 芋艿:可以打印路由
|
||||
// 同步前端页面到后端
|
||||
// console.log(ROUTES)
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -119,7 +119,6 @@ const app = defineStore({
|
||||
},
|
||||
});
|
||||
|
||||
// todo: @owen 先做数据适配,后期重构
|
||||
const adaptTemplate = async (appTemplate, templateId) => {
|
||||
const { data: diyTemplate } = templateId
|
||||
? // 查询指定模板,一般是预览时使用
|
||||
|
||||
@@ -128,7 +128,6 @@ const user = defineStore({
|
||||
},
|
||||
|
||||
// 登录后,加载各种信息
|
||||
// TODO 芋艿:整理下;
|
||||
async loginAfter() {
|
||||
await this.updateUserData();
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user