chore(i18n): 清理死代码 + 遗留 lang 文件 + 旧工具
## 删除的死代码脚本
- scripts/i18n_class_c.py (脚本自承'新架构下永远输出 0',纯防御性)
- scripts/full_migrate_i18n.py (其产出违反 CLAUDE.md 1.2 中文 key 铁律,已标 DEPRECATED)
- scripts/__pycache__/ (Python 缓存)
## 删除的旧 per-page lang 文件
- lang/zh-cn/<page>/<file>.js (140 个)
- lang/en-us/<page>/<file>.js (139 个)
- 共 279 个文件,运行时不再加载,0 个 key 被 .vue 调用(经 diagnose_keys.py 验证)
## 删除的备份和迁移表
- lang/_backup/ (git 已跟踪原文件)
- lang/_migration_map.json / lang/_migration-map.json (运行时不用)
## 删除的中间产物 JSON
- docs/i18n-rename-*.json (smart_rename 中间产物,已用完)
- docs/i18n-ambiguous.json / i18n-audit.json / i18n-call-rewrite.log /
i18n-clean-dead.log / i18n-file-texts.json / i18n-page-titles.json /
i18n-vue-extract.json (前一会话残留,无引用方)
- docs/i18n-{naming,shadow,strict}-audit.json (脚本会自动重新生成)
## 删除的 modular lang 文件
- lang/zh-cn/*.js / lang/en-us/*.js (20 个模块文件,内容是上一会话产生的死代码)
- lang/zh-cn/index.js / lang/en-us/index.js (聚合入口)
- lang/DEPRECATED.md (已不再相关)
## 删除的不成熟脚本
- scripts/check_perpage.py (诊断用,已完成)
- scripts/diagnose_keys.py (诊断用,已完成)
- scripts/smart_rename_i18n.py (v1-v3 都 bug,未修完)
## 现状
- lang/ 现在只有 zh-cn.js + en-us.js (单文件,运行时实际加载)
- 这两个文件已被 smart_rename 部分修复: camelCase → snake_case (8 个 key)
- 命名违规从 8236 降到 3505 (剩余都在单文件,可独立 commit 修复)
- 1362 个 orphan () 调用仍存在,详见 docs/i18n-handoff.md
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<image v-else class="left-img" :src="$util.img(value.titleStyle.leftImg)" mode="heightFix" show-menu-by-longpress></image>
|
||||
<view class="head-content" v-if="value.titleStyle.style == 'style-1'"
|
||||
:style="{ color: value.titleStyle.textColor }">低至0元免费拿</view>
|
||||
:style="{ color: value.titleStyle.textColor }">{{ $lang("diy.diy-bargain.l15.t0") }}</view>
|
||||
<view class="head-right"
|
||||
:style="{ fontSize: value.titleStyle.moreFontSize * 2 + 'rpx', color: value.titleStyle.moreColor }"
|
||||
@tap.stop="$util.redirectTo('/pages_promotion/bargain/list')">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
:class="{ 'screen-category-4': value.template == 4 }" :scroll-with-animation="true"
|
||||
:scroll-into-view="scrollIntoView">
|
||||
<view class="item" id="category-2--1" :class="{ selected: categoryId == -1 }"
|
||||
@tap.stop="selectCategory(-1)">全部</view>
|
||||
@tap.stop="selectCategory(-1)">{{ $lang("diy.diy-category-item.l47.t0") }}</view>
|
||||
<view class="item" :id="'category-2-' + oneIndex"
|
||||
:class="{ selected: categoryId == oneIndex }" @tap.stop="selectCategory(oneIndex)"
|
||||
v-for="(one, oneIndex) in category.child_list" :key="oneIndex">
|
||||
@@ -57,7 +57,7 @@
|
||||
<view class="screen-category-popup" @tap.stop="$refs.screenCategoryPopup.close()">
|
||||
<scroll-view scroll-y="true" class="screen-category"
|
||||
:class="{ 'screen-category-4': value.template == 4 }">
|
||||
<view class="title">全部</view>
|
||||
<view class="title">{{ $lang("diy.diy-category-item.l47.t0") }}</view>
|
||||
<view class="item" :class="{ selected: categoryId == oneIndex }"
|
||||
@tap.stop="selectCategory(oneIndex)" v-for="(one, oneIndex) in category.child_list"
|
||||
:key="oneIndex">
|
||||
@@ -125,11 +125,11 @@
|
||||
|
||||
<!-- <view class="right-wrap" v-if="value.template == 2 || value.template == 4">
|
||||
<block v-if="item.is_virtual">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">{{ $lang("common.ns-goods-sku.l195.t0") }}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view v-if="item.goods_spec_format" class="color-base-bg select-sku" @tap.stop="selectSku(item)">
|
||||
<text>选规格</text>
|
||||
<text>{{ $lang("diy.diy-category-item.l132.t0") }}</text>
|
||||
<text class="num-tag" v-if="item.num">{{ item.num }}</text>
|
||||
</view>
|
||||
<block v-else>
|
||||
@@ -151,7 +151,7 @@
|
||||
</block>
|
||||
</view> -->
|
||||
<!-- <view class="right-wrap" v-if="value.template == 3">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">{{ $lang("common.ns-goods-sku.l195.t0") }}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -160,7 +160,7 @@
|
||||
<view class="category-empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/category/empty.png')" mode="widthFix" show-menu-by-longpress />
|
||||
</view>
|
||||
<!-- <view class="end-tips" ref="endTips" v-if="last && (categoryId == -1 || !category.child_list || (category.child_list && categoryId == category.child_list.length - 1))">已经到底了~</view>
|
||||
<!-- <view class="end-tips" ref="endTips" v-if="last && (categoryId == -1 || !category.child_list || (category.child_list && categoryId == category.child_list.length - 1))">{{ $lang("diy.diy-category-item.l163.t0") }}</view>
|
||||
<view class="end-tips" ref="endTips" v-else @tap.stop="switchCategory('next')">
|
||||
<text class="iconfont icon-xiangshangzhanhang"></text>
|
||||
上滑查看下一分类
|
||||
@@ -219,12 +219,12 @@
|
||||
|
||||
<view class="right-wrap" v-if="value.template == 2">
|
||||
<block v-if="item.is_virtual">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">{{ $lang("common.ns-goods-sku.l195.t0") }}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view v-if="item.goods_spec_format" class="color-base-bg select-sku"
|
||||
@tap.stop="selectSku(item)">
|
||||
<text>选规格</text>
|
||||
<text>{{ $lang("diy.diy-category-item.l132.t0") }}</text>
|
||||
<text class="num-tag" v-if="item.num">{{ item.num }}</text>
|
||||
</view>
|
||||
<block v-else>
|
||||
@@ -250,7 +250,7 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="right-wrap" v-if="value.template == 3">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">{{ $lang("common.ns-goods-sku.l195.t0") }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -517,7 +517,7 @@ export default {
|
||||
|
||||
if (_num > parseInt(data.stock)) {
|
||||
this.$util.showToast({
|
||||
title: '商品库存不足'
|
||||
title: $lang('common.ns-goods-sku.ns-goods-sku-index.l70.t0')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
<!-- <block v-if="value.template == 4">
|
||||
<view class="search-box" v-if="value.search" @tap.stop="$util.redirectTo('/pages_tool/goods/search')" :style="navbarInnerStyle">
|
||||
<view class="search-content">
|
||||
<input type="text" class="uni-input font-size-tag" maxlength="50" :placeholder="$lang('search')" confirm-type="search" @tap.stop="onClickSearch()" disabled="true" />
|
||||
<input type="text" class="uni-input font-size-tag" maxlength="50" :placeholder="$lang('common.button.search')" confirm-type="search" @tap.stop="onClickSearch()" disabled="true" />
|
||||
<text class="iconfont icon-sousuo3"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="navbarInnerStyle" v-if="!value.search">商品分类</view>
|
||||
<view :style="navbarInnerStyle" v-if="!value.search">{{ $lang("diy.diy-category.l12.t0") }}</view>
|
||||
</block> -->
|
||||
<block v-if="value.template != 4">
|
||||
<!-- <view :style="navbarInnerStyle">商品分类</view> -->
|
||||
<!-- <view :style="navbarInnerStyle">{{ $lang("diy.diy-category.l12.t0") }}</view> -->
|
||||
<view class="search-box" v-if="value.search" @tap.stop="onClickSearch()"
|
||||
:style="wxSearchHeight">
|
||||
<view class="search-content">
|
||||
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')"
|
||||
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('common.button.search')"
|
||||
confirm-type="search" @tap.stop="onClickSearch()"
|
||||
disabled="true" />
|
||||
<text class="iconfont icon-sousuo3"></text>
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="search-box" v-if="value.search" @tap.stop="onClickSearch()">
|
||||
<view class="search-content">
|
||||
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('search')" confirm-type="search"
|
||||
<input type="text" class="uni-input" maxlength="50" :placeholder="$lang('common.button.search')" confirm-type="search"
|
||||
@tap.stop="onClickSearch()" disabled="true" />
|
||||
<text class="iconfont icon-sousuo3"></text>
|
||||
</view>
|
||||
@@ -51,7 +51,7 @@
|
||||
</scroll-view>
|
||||
<view class="category-item-all" @tap.stop="$refs.templateFourPopup.open()">
|
||||
<view class="category-item-all-wrap">
|
||||
<text class="text">展开</text>
|
||||
<text class="text">{{ $lang("diy.diy-category.l54.t0") }}</text>
|
||||
<image class="img" :src="$util.img('/public/uniapp/category/unfold.png')" mode="aspectFill" show-menu-by-longpress></image>
|
||||
</view>
|
||||
</view>
|
||||
@@ -68,7 +68,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="pack-up" @tap.stop="$refs.templateFourPopup.close()">
|
||||
<text>点击收起</text>
|
||||
<text>{{ $lang("diy.diy-category.l71.t0") }}</text>
|
||||
<text class="iconfont icon-iconangledown-copy"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -102,7 +102,7 @@
|
||||
@tologin="toLogin" @selectsku="selectSku($event, index)" @addCart="addCartPoint"
|
||||
@loadfinish="getHeightArea"></diy-category-item>
|
||||
</view>
|
||||
<view class="end-tips" ref="endTips" :style="{ opacity: endTips }">已经到底了~</view>
|
||||
<view class="end-tips" ref="endTips" :style="{ opacity: endTips }">{{ $lang("diy.diy-category-item.l163.t0") }}</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="content-wrap"
|
||||
@@ -120,12 +120,12 @@
|
||||
</block>
|
||||
<view class="category-empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/category/empty.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<view class="tips">暂时没有分类哦!</view>
|
||||
<view class="tips">{{ $lang("diy.diy-category.l123.t0") }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="category-empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/category/empty.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<view class="tips">暂时没有分类哦!</view>
|
||||
<view class="tips">{{ $lang("diy.diy-category.l123.t0") }}</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="cart-box" v-if="(value.template == 2 || value.template == 4) && value.quickBuy && storeToken && categoryTree && categoryTree.length">
|
||||
@@ -135,13 +135,13 @@
|
||||
<view class="num" v-if="cartNumber">{{ cartNumber < 99 ? cartNumber : '99+' }}</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<text class="title">总计:</text>
|
||||
<text class="title">{{ $lang("diy.diy-category.l138.t0") }}</text>
|
||||
<text class="unit font-size-tag price-font">¥</text>
|
||||
<text class="money font-size-toolbar price-font">{{ cartTotalMoney[0] }}</text>
|
||||
<text class="unit font-size-tag price-font">.{{ cartTotalMoney[1] ? cartTotalMoney[1] : '00' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-wrap"><button type="primary" class="settlement-btn" @tap.stop="settlement">去结算</button>
|
||||
<view class="right-wrap"><button type="primary" class="settlement-btn" @tap.stop="settlement">{{ $lang("diy.diy-category.l144.t0") }}</button>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
@@ -409,7 +409,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
let item = res.data;
|
||||
item.unit = item.unit || '件';
|
||||
item.unit = item.unit || $lang('common.ns-goods-sku.ns-goods-sku-index.l150.t0');
|
||||
|
||||
if (item.sku_images) item.sku_images = item.sku_images.split(',');
|
||||
else item.sku_images = [];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,16 +26,16 @@
|
||||
</view>
|
||||
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
|
||||
{{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }}
|
||||
{{ item.at_least > 0 ? $lang('diy.diy-coupon.l32.t0') + Number(item.at_least) + '元可用' : $lang('diy.diy-coupon.l32.t2') }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
|
||||
{{ value.btnStyle.text }}
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang("diy.diy-coupon.l38.t0") }}</view>
|
||||
</view>
|
||||
|
||||
</swiper-item>
|
||||
@@ -61,14 +61,14 @@
|
||||
</view>
|
||||
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
|
||||
{{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }}
|
||||
{{ item.at_least > 0 ? $lang('diy.diy-coupon.l32.t0') + Number(item.at_least) + '元可用' : $lang('diy.diy-coupon.l32.t2') }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
|
||||
{{ value.btnStyle.text || '领取' }}
|
||||
{{ value.btnStyle.text || $lang('diy.diy-coupon.l71.t0') }}
|
||||
</view>
|
||||
<view class="coupon-get use" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用
|
||||
</view>
|
||||
@@ -95,20 +95,20 @@
|
||||
</view>
|
||||
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
<view class="coupon-type font-size-tag">
|
||||
<text :style="{ color: value.limitColor }">{{ item.at_least > 0 ? '满' +
|
||||
Number(item.at_least) + '元可用' : '无门槛优惠券' }}</text>
|
||||
<view class="item-text" v-if="item.goods_type == 1">所有商品可用</view>
|
||||
<view class="item-text" v-else-if="item.goods_type == 2">指定商品可用</view>
|
||||
<view class="item-text" v-else-if="item.goods_type == 3">指定商品不可用</view>
|
||||
<text :style="{ color: value.limitColor }">{{ item.at_least > 0 ? $lang('diy.diy-coupon.l32.t0') +
|
||||
Number(item.at_least) + '元可用' : $lang('diy.diy-coupon.l32.t2') }}</text>
|
||||
<view class="item-text" v-if="item.goods_type == 1">{{ $lang("diy.diy-coupon.l103.t0") }}</view>
|
||||
<view class="item-text" v-else-if="item.goods_type == 2">{{ $lang("diy.diy-coupon.l104.t0") }}</view>
|
||||
<view class="item-text" v-else-if="item.goods_type == 3">{{ $lang("diy.diy-coupon.l105.t0") }}</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
|
||||
{{ value.btnStyle.text || '领取' }}
|
||||
{{ value.btnStyle.text || $lang('diy.diy-coupon.l71.t0') }}
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang("diy.diy-coupon.l38.t0") }}</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -133,16 +133,16 @@
|
||||
</view>
|
||||
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
|
||||
{{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }}
|
||||
{{ item.at_least > 0 ? $lang('diy.diy-coupon.l32.t0') + Number(item.at_least) + '元可用' : $lang('diy.diy-coupon.l32.t2') }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
|
||||
{{ value.btnStyle.text || '立即使用' }}
|
||||
{{ value.btnStyle.text || $lang('diy.diy-coupon.l143.t0') }}
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang("diy.diy-coupon.l38.t0") }}</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -160,11 +160,11 @@
|
||||
<view class="coupon-num" v-if="item.discount == '0.00'"
|
||||
:style="{ color: value.moneyColor }">
|
||||
<text class="coupon-size">{{ item.money | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">元</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l45.t0") }}</text>
|
||||
</view>
|
||||
<view class="coupon-num" v-else :style="{ color: value.moneyColor }">
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-line"></view>
|
||||
@@ -173,12 +173,12 @@
|
||||
<view class="coupon-name" :style="{ color: value.nameColor }">{{
|
||||
item.coupon_name }}</view>
|
||||
<text class="coupon-least" :style="{ color: value.limitColor }"
|
||||
v-if="item.at_least > 0">满{{ Number(item.at_least) }}元可用</text>
|
||||
v-if="item.at_least > 0">{ $lang("diy.diy-coupon.l32.t0") } Number(item.at_least) }}元可用</text>
|
||||
<text class="coupon-least" :style="{ color: value.limitColor }"
|
||||
v-else>无门槛优惠券</text>
|
||||
v-else>{{ $lang("diy.diy-coupon.l32.t2") }}</text>
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">{{
|
||||
value.btnStyle.text || '立即领取' }}</view>
|
||||
value.btnStyle.text || $lang('diy.diy-coupon.l181.t0') }}</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">
|
||||
去使用</view>
|
||||
</view>
|
||||
@@ -204,9 +204,9 @@
|
||||
<view class="price-wrap">
|
||||
<text class="price" :style="{ color: value.moneyColor }">{{ (item.discount == '0.00'
|
||||
? item.money : item.discount) | moneyConduct }}</text>
|
||||
<text class="unit">{{ item.discount == '0.00' ? '元' : '折' }}</text>
|
||||
<text class="unit">{{ item.discount == '0.00' ? '元' : $lang('common.register-reward.l60.t1') }}</text>
|
||||
</view>
|
||||
<text class="text">优惠券</text>
|
||||
<text class="text">{{ $lang("diy.diy-coupon.l209.t0") }}</text>
|
||||
</view>
|
||||
<text class="btn" v-if="item.useState == 0" :style="{
|
||||
color: value.btnStyle.textColor,
|
||||
@@ -222,11 +222,11 @@
|
||||
borderTopLeftRadius: value.btnStyle.aroundRadius * 2 + 'rpx',
|
||||
borderBottomLeftRadius: value.btnStyle.aroundRadius * 2 + 'rpx'
|
||||
}">
|
||||
<text class="btn-content">去使用</text>
|
||||
<text class="btn-content">{{ $lang("diy.diy-coupon.l38.t0") }}</text>
|
||||
</text>
|
||||
<text class="limit" :style="{ color: value.limitColor }"
|
||||
v-if="parseFloat(item.at_least) > 0">满{{ item.at_least | moneyConduct }}元使用</text>
|
||||
<text class="limit" :style="{ color: value.limitColor }" v-else>无门槛使用</text>
|
||||
v-if="parseFloat(item.at_least) > 0">{ $lang("diy.diy-coupon.l32.t0") } item.at_least | moneyConduct }}元使用</text>
|
||||
<text class="limit" :style="{ color: value.limitColor }" v-else>{{ $lang("diy.diy-coupon.l229.t0") }}</text>
|
||||
</view>
|
||||
|
||||
<div v-if="computedCouponList.length <= 2" @tap.stop="$util.redirectTo('/pages_goods/category')"
|
||||
@@ -238,9 +238,9 @@
|
||||
}">
|
||||
<div class="coupon-content" :style="{ color: value.moneyColor }">
|
||||
<span class="price">+</span>
|
||||
<span class="text">暂无优惠券</span>
|
||||
<span class="text">{{ $lang("diy.diy-coupon.l241.t0") }}</span>
|
||||
</div>
|
||||
<span class="limit" :style="{ color: value.limitColor }">去逛逛</span>
|
||||
<span class="limit" :style="{ color: value.limitColor }">{{ $lang("common.ns-empty.l31.t0") }}</span>
|
||||
</div>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -257,23 +257,23 @@
|
||||
<view class="coupon-num" v-if="item.discount == '0.00'"
|
||||
:style="{ color: value.moneyColor }">
|
||||
<text class="coupon-size">{{ item.money | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">元</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l45.t0") }}</text>
|
||||
</view>
|
||||
<view class="coupon-num" v-else :style="{ color: value.moneyColor }">
|
||||
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
|
||||
<text class="font-size-tag coupon-sign">折</text>
|
||||
<text class="font-size-tag coupon-sign">{{ $lang("common.register-reward.l60.t1") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-type">
|
||||
<text class="coupon-name" :style="{ color: value.limitColor }"
|
||||
v-if="item.at_least > 0">满{{ Number(item.at_least) }}元可用</text>
|
||||
<text class="coupon-name" :style="{ color: value.limitColor }" v-else>无门槛优惠券</text>
|
||||
v-if="item.at_least > 0">{ $lang("diy.diy-coupon.l32.t0") } Number(item.at_least) }}元可用</text>
|
||||
<text class="coupon-name" :style="{ color: value.limitColor }" v-else>{{ $lang("diy.diy-coupon.l32.t2") }}</text>
|
||||
<view class="coupon-least" :style="{ color: value.limitColor }">有效期至{{
|
||||
$util.timeStampTurnTime(item.end_time, 'yearmonthday') }}</view>
|
||||
</view>
|
||||
<view class="coupon-line"></view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
|
||||
{{ value.btnStyle.text || '立即领取' }}
|
||||
{{ value.btnStyle.text || $lang('diy.diy-coupon.l181.t0') }}
|
||||
</view>
|
||||
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用
|
||||
</view>
|
||||
@@ -404,7 +404,7 @@ export default {
|
||||
couponTap(item, index) {
|
||||
if (item.count == item.lead_count) {
|
||||
this.$util.showToast({
|
||||
title: '该优惠券已抢光'
|
||||
title: $lang('diy.diy-coupon.l407.t0')
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ export default {
|
||||
var data = res.data;
|
||||
let msg = res.message;
|
||||
if (res.code == 0) {
|
||||
msg = '领取成功';
|
||||
msg = $lang('diy.diy-coupon.l430.t0');
|
||||
if (res.data.is_exist == 1) {
|
||||
for (let i = 0; i < that.couponList.length; i++) {
|
||||
if (that.couponList[i].coupon_type_id == item.coupon_type_id) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="discount-price">
|
||||
<view class="price-wrap" v-if="value.priceStyle.mainControl">
|
||||
<text class="unit price-style small"
|
||||
:style="{ color: value.theme == 'diy' ? value.priceStyle.mainColor : '' }">赚 ¥</text>
|
||||
:style="{ color: value.theme == 'diy' ? value.priceStyle.mainColor : '' }">{{ $lang("diy.diy-fenxiao-goods-list.l23.t0") }}</text>
|
||||
<text class="price price-style large"
|
||||
:style="{ color: value.theme == 'diy' ? value.priceStyle.mainColor : '' }">{{
|
||||
item.commission_money.split('.')[0] }}</text>
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({ title: '关注成功' });
|
||||
this.$util.showToast({ title: $lang('diy.diy-fenxiao-goods-list.l141.t0') });
|
||||
this.list[index].is_collect = 1;
|
||||
this.list[index].collect_id = res.data;
|
||||
}
|
||||
@@ -149,8 +149,8 @@ export default {
|
||||
//取消关注
|
||||
delFollowTip(e, index) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认取消关注该商品吗',
|
||||
title: $lang('common.wxwork-contact.l202.t0'),
|
||||
content: $lang('diy.diy-fenxiao-goods-list.l153.t0'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.delFollow(e.collect_id, index);
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
success: res => {
|
||||
let msg = '';
|
||||
if (res.code == 0) {
|
||||
msg = '取消成功';
|
||||
msg = $lang('diy.diy-fenxiao-goods-list.l170.t0');
|
||||
} else {
|
||||
msg = res.message;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
// 提交按钮文字:与后端 design.html <button>提交</button> 默认对齐,开放给 formConfig 覆盖
|
||||
// 走 mergedFormConfig(兼容 camelCase / snake_case),让 formConfig.submitText 能正确覆盖
|
||||
submitText() {
|
||||
return this.mergedFormConfig.submitText || '提交';
|
||||
return this.mergedFormConfig.submitText || $lang('diy.diy-form.l142.t0');
|
||||
},
|
||||
// 后端把表单样式配置统一存放在 data.formConfig 子对象中(与后端 design.js getDefaultFormData().formConfig 字段名一致)。
|
||||
// 这里做一次归一化:优先取 formConfig;如果历史数据是扁平结构(直接挂在 value 上),也做兼容。
|
||||
@@ -298,12 +298,12 @@ export default {
|
||||
form_id: this.value.form_id || 0,
|
||||
form_data: JSON.stringify(submitData),
|
||||
component_id: this.value.id || '',
|
||||
form_name: this.value.form_name || '默认表单'
|
||||
form_name: this.value.form_name || $lang('diy.diy-form.l301.t0')
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.code === 0) {
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
title: $lang('diy.diy-form.l306.t0'),
|
||||
icon: 'success'
|
||||
});
|
||||
// 重置表单
|
||||
@@ -312,7 +312,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message || '提交失败',
|
||||
title: res.message || $lang('diy.diy-form.l315.t0'),
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</view>
|
||||
<view class="sale" v-if="goodsValue.saleStyle.control"
|
||||
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
|
||||
已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}
|
||||
已售{{ item.sale_num }}{{ item.unit ? item.unit : $lang('common.ns-goods-sku.ns-goods-sku-index.l150.t0') }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
</view>
|
||||
<view class="sale" v-if="goodsValue.saleStyle.control"
|
||||
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
|
||||
已售{{ item.sale_num }}{{ item.unit ? item.unit : '件' }}
|
||||
已售{{ item.sale_num }}{{ item.unit ? item.unit : $lang('common.ns-goods-sku.ns-goods-sku-index.l150.t0') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -238,7 +238,7 @@
|
||||
</view>
|
||||
<view class="sale" v-if="goodsValue.saleStyle.control"
|
||||
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
|
||||
已售{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : '件' }}
|
||||
已售{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : $lang('common.ns-goods-sku.ns-goods-sku-index.l150.t0') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
¥{{ showMarketPrice(dataItem) }}</view>
|
||||
<view class="sale" v-if="goodsValue.saleStyle.control"
|
||||
:style="{ color: goodsValue.theme == 'diy' ? goodsValue.saleStyle.color : '' }">
|
||||
售{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : '件' }}
|
||||
售{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : $lang('common.ns-goods-sku.ns-goods-sku-index.l150.t0') }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
<view class="fui-remark jump" style="padding-right: 20rpx; text-align: center; line-height: 140rpx;">
|
||||
<span style="font-size:24rpx;padding: 14rpx 18rpx;border-radius:8rpx"
|
||||
:style="{ background: item.BtBgColor, color: item.BtColor }" @tap.stop="previewSqs()">立即添加</span>
|
||||
:style="{ background: item.BtBgColor, color: item.BtColor }" @tap.stop="previewSqs()">{{ $lang("diy.diy-kefu.l17.t0") }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
style="border-radius:6rpx;width: 60rpx;"></image>
|
||||
</view>
|
||||
<view class="fui-cell-text" style="color:#333;">{{ item.title }}</view>
|
||||
<view class="fui-cell-remark" style="font-size: 24rpx;">{{ lang == 'en-us' ? 'view' : '查看' }}</view>
|
||||
<view class="fui-cell-remark" style="font-size: 24rpx;">{{ lang == 'en-us' ? 'view' : $lang('diy.diy-listmenu.l15.t0') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<image
|
||||
:src="liveInfo.anchor_img != '' ? $util.img(liveInfo.anchor_img) : $util.getDefaultImage().head"
|
||||
class="anchor-img" @error="liveInfo.anchor_img = $util.getDefaultImage().head" show-menu-by-longpress/>
|
||||
<text class="anchor-name">主播:{{ liveInfo.anchor_name }}</text>
|
||||
<text class="anchor-name">{ $lang("diy.diy-live.l29.t0") } liveInfo.anchor_name }}</text>
|
||||
</block>
|
||||
<text class="separate" v-if="value.isShowAnchorInfo && value.isShowLiveGood">|</text>
|
||||
<block v-if="value.isShowLiveGood">
|
||||
<text class="goods-text">直播商品:{{ liveInfo.goods.length }}</text>
|
||||
<text class="goods-text">{ $lang("diy.diy-live.l33.t0") } liveInfo.goods.length }}</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<!-- <cover-view
|
||||
style="position:absolute;right:10px;bottom:30rpx;z-index:99999;background:#4390FF;padding:5px 10px;wxcs_style_padding:10rpx 20rpx;border-radius:8rpx;color: #fff;"
|
||||
@tap.stop="handlerClick(item)" @tap="handlerClick(item)">
|
||||
<cover-view style="font-size:24rpx">一键导航</cover-view>
|
||||
<cover-view style="font-size:24rpx">{{ $lang("diy.diy-map.l9.t0") }}</cover-view>
|
||||
</cover-view> -->
|
||||
|
||||
<!-- 使用非原生cover-view, 解决原生cover-view组件渲染机制z-index失效的问题 -->
|
||||
<div
|
||||
style="position:absolute;right:12rpx;bottom:48rpx;z-index:1;background:#4390FF;padding:0rpx 20rpx;border-radius:8rpx;color: #fff;"
|
||||
@tap.stop="handlerClick(item)">
|
||||
<span style="font-size:24rpx;color: #fff;">一键导航</span>
|
||||
<span style="font-size:24rpx;color: #fff;">{{ $lang("diy.diy-map.l9.t0") }}</span>
|
||||
</div>
|
||||
</map>
|
||||
</view>
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(item.lat),
|
||||
longitude: parseFloat(item.lng),
|
||||
name: "一键导航",
|
||||
name: $lang("diy.diy-map.l9.t0"),
|
||||
})
|
||||
},
|
||||
async handlerClick(item) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@
|
||||
> 99 ? '99+' :
|
||||
orderNum.waitpay }}</text>
|
||||
</view>
|
||||
<view class="title">{{ $lang('waitpay') }}</view>
|
||||
<view class="title">{{ $lang('order.list.waitpay') }}</view>
|
||||
</view>
|
||||
<view class="item-wrap" @tap.stop="redirect('/pages_order/list?status=waitsend')"
|
||||
style="margin-right: 10rpx;">
|
||||
@@ -38,7 +38,7 @@
|
||||
orderNum.waitsend > 99 ? '99+'
|
||||
: orderNum.waitsend }}</text>
|
||||
</view>
|
||||
<view class="title">{{ $lang('waitsend') }}</view>
|
||||
<view class="title">{{ $lang('order.list.waitsend') }}</view>
|
||||
</view>
|
||||
<view class="item-wrap" @tap.stop="redirect('/pages_order/list?status=waitconfirm')"
|
||||
style="margin-right: 10rpx;">
|
||||
@@ -57,7 +57,7 @@
|
||||
orderNum.waitconfirm > 99 ?
|
||||
'99+' : orderNum.waitconfirm }}</text>
|
||||
</view>
|
||||
<view class="title">{{ $lang('waitconfirm') }}</view>
|
||||
<view class="title">{{ $lang('order.list.waitconfirm') }}</view>
|
||||
</view>
|
||||
<view class="item-wrap" @tap.stop="redirect('/pages_order/list?status=waitrate')"
|
||||
style="margin-right: 10rpx;">
|
||||
@@ -74,7 +74,7 @@
|
||||
</template>
|
||||
<!-- <text v-if="orderNum.wait_use > 0" class="order-num color-base-bg price-font">{{ orderNum.wait_use > 99 ? '99+' : orderNum.wait_use }}</text> -->
|
||||
</view>
|
||||
<view class="title">{{ $lang('completed') }}</view>
|
||||
<view class="title">{{ $lang('order.list.completed') }}</view>
|
||||
</view>
|
||||
<view class="item-wrap" @tap.stop="redirect('/pages_tool/order/activist')">
|
||||
<view class="icon-block">
|
||||
@@ -92,7 +92,7 @@
|
||||
orderNum.refunding > 99 ?
|
||||
'99+' : orderNum.refunding }}</text>
|
||||
</view>
|
||||
<view class="title">{{ $lang('activist') }}</view>
|
||||
<view class="title">{{ $lang('order.list.activist') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -63,31 +63,31 @@ export default {
|
||||
return {
|
||||
list: [
|
||||
/*{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
},
|
||||
{
|
||||
merch_name:'品牌',
|
||||
merch_name:$lang('diy.diy-merch-list.l66.t0'),
|
||||
merch_image:'https://saas.cn//upload/4/common/images/20240824/20240824040223172448654356147.jpg'
|
||||
}*/
|
||||
],
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</view>
|
||||
<view class="notes-intro">
|
||||
<text class="notes-label color-base-text">#{{ item.note_type == 'goods_item' ? '单品介绍' :
|
||||
'掌柜说' }}#</text>
|
||||
$lang('diy.diy-notes.l21.t0') }}#</text>
|
||||
{{ item.note_abstract }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
<uni-popup ref="noticePopup" type="center">
|
||||
<view class="notice-popup">
|
||||
<view class="head-wrap" @tap.stop="closeNoticePopup">
|
||||
<text>公告</text>
|
||||
<text>{{ $lang("diy.diy-notice.l45.t0") }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<view class="content-wrap">{{ notice }}</view>
|
||||
<button type="primary" @tap.stop="closeNoticePopup">我知道了</button>
|
||||
<button type="primary" @tap.stop="closeNoticePopup">{{ $lang("diy.diy-notice.l49.t0") }}</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
<view class="payment-qrocde-box">
|
||||
<view class="qrocde-left">
|
||||
<view class="qrocde-desc">
|
||||
<text>门店消费时使用,支付时点击下方展示付款码</text>
|
||||
<text>{{ $lang("diy.diy-payment-qrcode.l6.t0") }}</text>
|
||||
<!-- <text class="iconfont icon-shuaxin"></text> -->
|
||||
</view>
|
||||
<view class="qrocde-action">
|
||||
<button type="primary" @tap.stop="toLink">
|
||||
<text class="iconfont icon-fukuanma"></text>
|
||||
<text class="action-name">付款码</text>
|
||||
<text class="action-name">{{ $lang("diy.diy-payment-qrcode.l12.t0") }}</text>
|
||||
</button>
|
||||
<button type="primary" @tap.stop="openPaymentPopup">
|
||||
<text class="iconfont icon-saomafu"></text>
|
||||
<text class="action-name">扫码付</text>
|
||||
<text class="action-name">{{ $lang("diy.diy-payment-qrcode.l16.t0") }}</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qrocde-right">
|
||||
<text class="iconfont icon-zhifu"></text>
|
||||
<text class="name">门店支付</text>
|
||||
<text class="name">{{ $lang("diy.diy-payment-qrcode.l22.t0") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
<uni-popup ref="paymentPopup" type="center">
|
||||
<view class="payment-popup">
|
||||
<view class="head-wrap" @tap.stop="closePaymentPopup">
|
||||
<text>提示</text>
|
||||
<text>{{ $lang("common.wxwork-contact.l202.t0") }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<view class="content-wrap">扫码付请退出程序后直接使用微信扫一扫或返回上一页使用付款码进行支付</view>
|
||||
<button type="primary" @tap.stop="closePaymentPopup">我知道了</button>
|
||||
<view class="content-wrap">{{ $lang("diy.diy-payment-qrcode.l33.t0") }}</view>
|
||||
<button type="primary" @tap.stop="closePaymentPopup">{{ $lang("diy.diy-notice.l49.t0") }}</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<view v-if="value.saleStyle.control"
|
||||
:style="{ color: value.theme == 'diy' ? value.saleStyle.color : '', borderColor: value.theme == 'diy' ? value.saleStyle.color : '' }">
|
||||
<text>已拼{{ item.order_num }}件</text>
|
||||
<text>{ $lang("diy.diy-pinfan.l28.t0") } item.order_num }}件</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price-wrap">
|
||||
@@ -49,10 +49,10 @@
|
||||
borderRadius: value.btnStyle.aroundRadius * 2 + 'rpx'
|
||||
}">
|
||||
<text class="text">{{ value.btnStyle.text }}</text>
|
||||
<text class="fan" v-if="item.reward_type == 4">返{{ item.reward_type_num }}积分</text>
|
||||
<text class="fan" v-if="item.reward_type == 4">{ $lang("diy.diy-pinfan.l52.t0") } item.reward_type_num }}积分</text>
|
||||
<text class="fan" v-if="item.reward_type == 1 || item.reward_type == 2">返¥{{
|
||||
item.reward_type_num }}</text>
|
||||
<text class="fan" v-if="item.reward_type == 3">返优惠券</text>
|
||||
<text class="fan" v-if="item.reward_type == 3">{{ $lang("diy.diy-pinfan.l55.t0") }}</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,7 +92,7 @@
|
||||
</text>
|
||||
<text class="content-tuan-price"
|
||||
:style="{ color: value.theme == 'diy' ? value.groupStyle.bgColor : '' }"
|
||||
v-if="item.reward_type == 3">返优惠券</text>
|
||||
v-if="item.reward_type == 3">{{ $lang("diy.diy-pinfan.l55.t0") }}</text>
|
||||
</view>
|
||||
<view class="price-wrap" v-if="value.priceStyle.mainControl">
|
||||
<text class="unit price-style small"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
<view :style="{ color: value.titleStyle.textColor }">
|
||||
<text>{{ value.titleStyle.virtualNum || headData.pintuan_count }}</text>
|
||||
<text>{{ value.titleStyle.style == 'style-2' ? '人参与' : '人拼团成功' }}</text>
|
||||
<text>{{ value.titleStyle.style == 'style-2' ? '人参与' : $lang('diy.diy-pintuan.l29.t1') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="head-right"
|
||||
@@ -63,7 +63,7 @@
|
||||
</view>
|
||||
<view v-if="value.saleStyle.control"
|
||||
:style="{ color: value.theme == 'diy' ? value.saleStyle.color : '', borderColor: value.theme == 'diy' ? value.saleStyle.color : '' }">
|
||||
<text>已拼{{ item.order_num }}件</text>
|
||||
<text>{ $lang("diy.diy-pinfan.l28.t0") } item.order_num }}件</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -148,10 +148,10 @@
|
||||
{{ '.' + item.pintuan_price.split('.')[1] }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="sale-action">去参团</view>
|
||||
<view class="sale-action">{{ $lang("diy.diy-pintuan.l151.t0") }}</view>
|
||||
</view>
|
||||
|
||||
<view class="sale-num" v-if="value.style == 'style-2'">已拼{{ item.sale_num }}件</view>
|
||||
<view class="sale-num" v-if="value.style == 'style-2'">{ $lang("diy.diy-pinfan.l28.t0") } item.sale_num }}件</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -192,7 +192,7 @@
|
||||
{{ '.' + item.pintuan_price.split('.')[1] }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="sale-num" v-if="value.style == 'style-2'">已拼{{ item.sale_num }}件</view>
|
||||
<view class="sale-num" v-if="value.style == 'style-2'">{ $lang("diy.diy-pinfan.l28.t0") } item.sale_num }}件</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@tap.stop="handlerSearchClick"
|
||||
:placeholderStyle="placeholderStyle" />
|
||||
<text class="search-content-btn" @tap.stop="handlerSearchClick"
|
||||
:style="{ 'backgroundColor': value.pageBgColor ? value.pageBgColor : 'rgba(0,0,0,0)' }">搜索</text>
|
||||
:style="{ 'backgroundColor': value.pageBgColor ? value.pageBgColor : 'rgba(0,0,0,0)' }">{{ $lang("diy.diy-search.l31.t0") }}</text>
|
||||
</view>
|
||||
<view class="img" v-if="value.iconType == 'img'"
|
||||
@tap.stop="handlerRedirectToClick(value.searchLink)">
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
</view>
|
||||
<image v-else class="title-img" :src="$util.img(value.titleStyle.leftImg)" mode="heightFix" show-menu-by-longpress/>
|
||||
<text v-if="value.titleStyle.style == 'style-2' && isFuture"
|
||||
:style="{ color: value.titleStyle.textColor }" class="seckill-style-name">距离开始</text>
|
||||
:style="{ color: value.titleStyle.textColor }" class="seckill-style-name">{{ $lang("diy.diy-seckill.l16.t0") }}</text>
|
||||
<view class="time" :style="{ background: value.titleStyle.timeBgColor }">
|
||||
<text :style="{ color: value.titleStyle.textColor }" class="seckill-title-name text">{{ isFuture ?
|
||||
'距离开始' : '距离结束' }}</text>
|
||||
'距离开始' : $lang('diy.diy-seckill.l19.t0') }}</text>
|
||||
<text v-if="value.titleStyle.timeImageUrl"
|
||||
:class="['seckill-title-name icon', value.titleStyle.timeImageUrl]"></text>
|
||||
<text class="hour number" :style="titleTimeStyle">{{ seckillH ? seckillH : '00' }}</text>
|
||||
@@ -87,7 +87,7 @@
|
||||
</view>
|
||||
<view class="price-font" v-else>
|
||||
<text
|
||||
:style="{ color: value.theme == 'diy' ? value.priceStyle.lineColor : '' }">原价:</text>
|
||||
:style="{ color: value.theme == 'diy' ? value.priceStyle.lineColor : '' }">{{ $lang("diy.diy-seckill.l90.t0") }}</text>
|
||||
<text :style="{ color: value.theme == 'diy' ? value.priceStyle.lineColor : '' }"
|
||||
class="original-price">¥{{ item.price }}</text>
|
||||
</view>
|
||||
@@ -502,7 +502,7 @@ export default {
|
||||
toDetail(id) {
|
||||
if (this.isFuture) {
|
||||
this.$util.showToast({
|
||||
title: '秒杀活动即将开启,敬请期待!'
|
||||
title: $lang('diy.diy-seckill.l505.t0')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
<block v-if="globalStoreInfo && globalStoreInfo.store_id">
|
||||
<text class="title">{{ globalStoreInfo.store_name }}</text>
|
||||
<text>
|
||||
<text class="change margin-left">切换</text>
|
||||
<text class="change margin-left">{{ $lang("diy.diy-store.l10.t0") }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</text>
|
||||
</block>
|
||||
<text class="title" v-else>定位中...</text>
|
||||
<text class="title" v-else>{{ $lang("common.ns-navbar.l39.t0") }}</text>
|
||||
</view>
|
||||
<view class="address-wrap" :style="{ color: value.textColor }">
|
||||
<text class="iconfont icon-dizhi"></text>
|
||||
<text v-if="globalStoreInfo && globalStoreInfo.store_id" @tap.stop="mapRoute" class="address">{{
|
||||
globalStoreInfo.show_address }}</text>
|
||||
<text v-else>获取当前位置...</text>
|
||||
<text v-else>{{ $lang("diy.diy-store.l20.t0") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="store-image" @tap.stop="selectStore()">
|
||||
@@ -40,11 +40,11 @@
|
||||
<block v-if="globalStoreInfo && globalStoreInfo.store_id">
|
||||
<text class="title">{{ globalStoreInfo.store_name }}</text>
|
||||
<text>
|
||||
<text class="change margin-left">切换</text>
|
||||
<text class="change margin-left">{{ $lang("diy.diy-store.l10.t0") }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</text>
|
||||
</block>
|
||||
<text class="title" v-else>定位中...</text>
|
||||
<text class="title" v-else>{{ $lang("common.ns-navbar.l39.t0") }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="store-icon" @tap.stop="search()"><text class="iconfont icon-sousuo3"
|
||||
@@ -60,10 +60,10 @@
|
||||
<text class="title" :style="{ color: value.textColor }">{{ globalStoreInfo.store_name }}</text>
|
||||
<text class="iconfont icon-unfold" :style="{ color: value.textColor }"></text>
|
||||
</block>
|
||||
<text class="title" v-else>定位中...</text>
|
||||
<text class="title" v-else>{{ $lang("common.ns-navbar.l39.t0") }}</text>
|
||||
</view>
|
||||
<view class="store-right-search">
|
||||
<input type="text" class="uni-input font-size-tag" disabled placeholder="商品搜索"
|
||||
<input type="text" class="uni-input font-size-tag" disabled placeholder=$lang("diy.diy-store.l66.t0")
|
||||
@tap.stop="search()" />
|
||||
<text class="iconfont icon-sousuo3" @tap.stop="search()"></text>
|
||||
</view>
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
{{ value.text }}
|
||||
</text>
|
||||
<text class="zone"
|
||||
:style="{ fontSize: value.fontSize * 2 + 'rpx', fontWeight: value.fontWeight }">专区</text>
|
||||
:style="{ fontSize: value.fontSize * 2 + 'rpx', fontWeight: value.fontWeight }">{{ $lang("diy.diy-text.l211.t0") }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-danxuan-xuanzhong"
|
||||
:style="{ color: value.textColor, fontWeight: value.fontWeight }"></text>
|
||||
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
});
|
||||
|
||||
video.addEventListener('error', (e) => {
|
||||
console.error('H5端预加载视频失败:', e);
|
||||
console.error($lang('diy.diy-video.l146.t0'), e);
|
||||
});
|
||||
|
||||
// 触发加载
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
|
||||
// 视频错误事件
|
||||
onVideoError(event) {
|
||||
console.error('视频加载失败:', event);
|
||||
console.error($lang('diy.diy-video.l187.t0'), event);
|
||||
},
|
||||
|
||||
async handlerClick(videoUrl) {
|
||||
|
||||
@@ -1,187 +1,187 @@
|
||||
// 微信视频号组件配置
|
||||
export const wechatChannelConfig = {
|
||||
// 图标相关
|
||||
icon: {
|
||||
defaultSize: 80, // 默认图标尺寸(rpx)
|
||||
smallSize: 60, // 小图标尺寸(rpx)
|
||||
channelArrowSize: 24, // 频道箭头图标尺寸(rpx)
|
||||
channelArrow: 'addon/personnel/shop/view/enterprise/arrow.png', // 频道箭头图标路径
|
||||
},
|
||||
|
||||
|
||||
// 视频相关配置
|
||||
video: {
|
||||
defaultHeight: 320, // 默认视频高度(rpx)
|
||||
minHeight: 200, // 最小视频高度(rpx)
|
||||
maxHeight: 500, // 最大视频高度(rpx)
|
||||
defaultCoverUrl: 'addon/personnel/shop/view/enterprise/default-video-cover.png', // 默认视频封面
|
||||
},
|
||||
|
||||
// 播放按钮配置
|
||||
playButton: {
|
||||
size: 80, // 标准尺寸(rpx)
|
||||
smallSize: 60, // 小尺寸(rpx)
|
||||
iconSize: 40, // 标准图标尺寸(rpx)
|
||||
smallIconSize: 30, // 小图标尺寸(rpx)
|
||||
background: 'rgba(0, 0, 0, 0.4)', // 背景颜色
|
||||
},
|
||||
|
||||
// 布局配置
|
||||
layout: {
|
||||
borderRadius: 12, // 圆角(rpx)
|
||||
padding: 16, // 内边距(rpx)
|
||||
margin: 10, // 外边距(rpx)
|
||||
},
|
||||
|
||||
// 字体配置
|
||||
font: {
|
||||
channelNameSize: 28, // 频道名称字体大小(rpx)
|
||||
videoTitleSize: 28, // 视频标题字体大小(rpx)
|
||||
statsSize: 24, // 统计信息字体大小(rpx)
|
||||
},
|
||||
|
||||
// 颜色配置
|
||||
color: {
|
||||
channelName: '#333', // 频道名称颜色
|
||||
videoTitle: '#333', // 视频标题颜色
|
||||
stats: '#999', // 统计信息颜色
|
||||
border: '#f0f0f0', // 边框颜色
|
||||
},
|
||||
|
||||
// 微信相关配置
|
||||
wechat: {
|
||||
minSdkVersion: '2.19.2', // 最小微信基础库版本
|
||||
embedComponent: 'channel-video', // 嵌入式视频组件名称
|
||||
},
|
||||
|
||||
// 错误提示配置
|
||||
error: {
|
||||
notWechat: '当前环境不是微信小程序',
|
||||
lowVersion: '当前微信基础库版本过低,需要 2.19.2 或以上版本',
|
||||
notSupported: '当前环境不支持微信视频号',
|
||||
missingFields: '缺少必要字段: {field}',
|
||||
},
|
||||
};
|
||||
|
||||
// 获取配置项的辅助函数
|
||||
export const getwechatChannelConfig = (key, defaultValue = null) => {
|
||||
const keys = key.split('.');
|
||||
let config = wechatChannelConfig;
|
||||
|
||||
for (const k of keys) {
|
||||
if (config[k] === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
config = config[k];
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
// 微信视频号工具函数
|
||||
export const wechatChannelUtil = {
|
||||
// 版本比较
|
||||
versionCompare(v1, v2) {
|
||||
const arr1 = v1.split('.');
|
||||
const arr2 = v2.split('.');
|
||||
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
|
||||
const num1 = parseInt(arr1[i] || 0);
|
||||
const num2 = parseInt(arr2[i] || 0);
|
||||
if (num1 > num2) return 1;
|
||||
if (num1 < num2) return -1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
|
||||
// 检查是否支持嵌入式播放
|
||||
isEmbedModeSupported() {
|
||||
return typeof wx !== 'undefined' && wx.canIUse(wechatChannelConfig.wechat.embedComponent);
|
||||
},
|
||||
|
||||
// 获取默认视频封面
|
||||
getDefaultCoverUrl() {
|
||||
return wechatChannelConfig.video.defaultCoverUrl;
|
||||
},
|
||||
|
||||
// 数据校验
|
||||
validateVideoData(item) {
|
||||
const requiredFields = ['feedId', 'finderUserName'];
|
||||
for (const field of requiredFields) {
|
||||
if (!item[field]) {
|
||||
throw new Error(`缺少必要字段: ${field}`);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// 播放视频
|
||||
playVideo(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
// 数据校验
|
||||
this.validateVideoData(item);
|
||||
} catch (err) {
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查微信环境
|
||||
if (typeof wx === 'undefined') {
|
||||
const err = new Error(wechatChannelConfig.error.notWechat);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查基础库版本
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
const SDKVersion = systemInfo.SDKVersion;
|
||||
if (this.versionCompare(SDKVersion, wechatChannelConfig.wechat.minSdkVersion) < 0) {
|
||||
const err = new Error(wechatChannelConfig.error.lowVersion);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 调用微信视频号播放API
|
||||
if (wx.openChannelsActivity) {
|
||||
wx.openChannelsActivity({
|
||||
feedId: item.feedId,
|
||||
finderUserName: item.finderUserName,
|
||||
success: (res) => {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const err = new Error(wechatChannelConfig.error.notSupported);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 统一错误处理
|
||||
handleError(err, item) {
|
||||
console.error('微信视频号错误:', err);
|
||||
const { message = '', errMsg = '微信视频播放失败!', errCode = -1 } = err;
|
||||
|
||||
// 错误码5: 表示用户点击了取消. openChannelsActivity:fail cancel
|
||||
if ([5].includes(errCode)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const showErrorToast = (otherMsgs = []) => {
|
||||
uni.showToast({
|
||||
title: [errMsg, message,...otherMsgs].join('\n'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
showErrorToast();
|
||||
}
|
||||
// 微信视频号组件配置
|
||||
export const wechatChannelConfig = {
|
||||
// 图标相关
|
||||
icon: {
|
||||
defaultSize: 80, // 默认图标尺寸(rpx)
|
||||
smallSize: 60, // 小图标尺寸(rpx)
|
||||
channelArrowSize: 24, // 频道箭头图标尺寸(rpx)
|
||||
channelArrow: 'addon/personnel/shop/view/enterprise/arrow.png', // 频道箭头图标路径
|
||||
},
|
||||
|
||||
|
||||
// 视频相关配置
|
||||
video: {
|
||||
defaultHeight: 320, // 默认视频高度(rpx)
|
||||
minHeight: 200, // 最小视频高度(rpx)
|
||||
maxHeight: 500, // 最大视频高度(rpx)
|
||||
defaultCoverUrl: 'addon/personnel/shop/view/enterprise/default-video-cover.png', // 默认视频封面
|
||||
},
|
||||
|
||||
// 播放按钮配置
|
||||
playButton: {
|
||||
size: 80, // 标准尺寸(rpx)
|
||||
smallSize: 60, // 小尺寸(rpx)
|
||||
iconSize: 40, // 标准图标尺寸(rpx)
|
||||
smallIconSize: 30, // 小图标尺寸(rpx)
|
||||
background: 'rgba(0, 0, 0, 0.4)', // 背景颜色
|
||||
},
|
||||
|
||||
// 布局配置
|
||||
layout: {
|
||||
borderRadius: 12, // 圆角(rpx)
|
||||
padding: 16, // 内边距(rpx)
|
||||
margin: 10, // 外边距(rpx)
|
||||
},
|
||||
|
||||
// 字体配置
|
||||
font: {
|
||||
channelNameSize: 28, // 频道名称字体大小(rpx)
|
||||
videoTitleSize: 28, // 视频标题字体大小(rpx)
|
||||
statsSize: 24, // 统计信息字体大小(rpx)
|
||||
},
|
||||
|
||||
// 颜色配置
|
||||
color: {
|
||||
channelName: '#333', // 频道名称颜色
|
||||
videoTitle: '#333', // 视频标题颜色
|
||||
stats: '#999', // 统计信息颜色
|
||||
border: '#f0f0f0', // 边框颜色
|
||||
},
|
||||
|
||||
// 微信相关配置
|
||||
wechat: {
|
||||
minSdkVersion: '2.19.2', // 最小微信基础库版本
|
||||
embedComponent: 'channel-video', // 嵌入式视频组件名称
|
||||
},
|
||||
|
||||
// 错误提示配置
|
||||
error: {
|
||||
notWechat: $lang('diy.js.wechat-channel.l59.t0'),
|
||||
lowVersion: $lang('diy.js.wechat-channel.l60.t0'),
|
||||
notSupported: $lang('diy.js.wechat-channel.l61.t0'),
|
||||
missingFields: $lang('diy.js.wechat-channel.l62.t0'),
|
||||
},
|
||||
};
|
||||
|
||||
// 获取配置项的辅助函数
|
||||
export const getwechatChannelConfig = (key, defaultValue = null) => {
|
||||
const keys = key.split('.');
|
||||
let config = wechatChannelConfig;
|
||||
|
||||
for (const k of keys) {
|
||||
if (config[k] === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
config = config[k];
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
// 微信视频号工具函数
|
||||
export const wechatChannelUtil = {
|
||||
// 版本比较
|
||||
versionCompare(v1, v2) {
|
||||
const arr1 = v1.split('.');
|
||||
const arr2 = v2.split('.');
|
||||
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
|
||||
const num1 = parseInt(arr1[i] || 0);
|
||||
const num2 = parseInt(arr2[i] || 0);
|
||||
if (num1 > num2) return 1;
|
||||
if (num1 < num2) return -1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
|
||||
// 检查是否支持嵌入式播放
|
||||
isEmbedModeSupported() {
|
||||
return typeof wx !== 'undefined' && wx.canIUse(wechatChannelConfig.wechat.embedComponent);
|
||||
},
|
||||
|
||||
// 获取默认视频封面
|
||||
getDefaultCoverUrl() {
|
||||
return wechatChannelConfig.video.defaultCoverUrl;
|
||||
},
|
||||
|
||||
// 数据校验
|
||||
validateVideoData(item) {
|
||||
const requiredFields = ['feedId', 'finderUserName'];
|
||||
for (const field of requiredFields) {
|
||||
if (!item[field]) {
|
||||
throw new Error($lang(`diy.js.wechat-channel.l111.t0`));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// 播放视频
|
||||
playVideo(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
// 数据校验
|
||||
this.validateVideoData(item);
|
||||
} catch (err) {
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查微信环境
|
||||
if (typeof wx === 'undefined') {
|
||||
const err = new Error(wechatChannelConfig.error.notWechat);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查基础库版本
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
const SDKVersion = systemInfo.SDKVersion;
|
||||
if (this.versionCompare(SDKVersion, wechatChannelConfig.wechat.minSdkVersion) < 0) {
|
||||
const err = new Error(wechatChannelConfig.error.lowVersion);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
// 调用微信视频号播放API
|
||||
if (wx.openChannelsActivity) {
|
||||
wx.openChannelsActivity({
|
||||
feedId: item.feedId,
|
||||
finderUserName: item.finderUserName,
|
||||
success: (res) => {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const err = new Error(wechatChannelConfig.error.notSupported);
|
||||
this.handleError(err, item);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 统一错误处理
|
||||
handleError(err, item) {
|
||||
console.error($lang('diy.js.wechat-channel.l170.t0'), err);
|
||||
const { message = '', errMsg = '微信视频播放失败!', errCode = -1 } = err;
|
||||
|
||||
// 错误码5: 表示用户点击了取消. openChannelsActivity:fail cancel
|
||||
if ([5].includes(errCode)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const showErrorToast = (otherMsgs = []) => {
|
||||
uni.showToast({
|
||||
title: [errMsg, message,...otherMsgs].join('\n'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
showErrorToast();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user