fix(组件): 修复组件错误

This commit is contained in:
2025-12-26 16:50:02 +08:00
parent 40f5f63096
commit d36e7f6bba
5 changed files with 372 additions and 348 deletions

View File

@@ -737,11 +737,12 @@ export default {
* 微信订阅消息 * 微信订阅消息
*/ */
subscribeMessage(keywords) { subscribeMessage(keywords) {
let url = ""
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
let url = '/weapp/api/weapp/messagetmplids'; url = '/weapp/api/weapp/messagetmplids';
// #endif // #endif
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
let url = '/aliapp/api/aliapp/messagetmplids'; url = '/aliapp/api/aliapp/messagetmplids';
// #endif // #endif
Http.sendRequest({ Http.sendRequest({
url, url,

View File

@@ -16,6 +16,8 @@ export const lang = {
mescrollTextOutOffset: 'Loading...', mescrollTextOutOffset: 'Loading...',
mescrollEmpty: "No data available", mescrollEmpty: "No data available",
goodsRecommendTitle: 'Guess you like', goodsRecommendTitle: 'Guess you like',
currencySymbol: '¥' currencySymbol: '¥',
submit: 'Submit',
searchTip: 'Please enter search keywords'
} }
} }

View File

@@ -17,6 +17,7 @@ export const lang = {
mescrollEmpty: "暂无相关数据", mescrollEmpty: "暂无相关数据",
goodsRecommendTitle: '猜你喜欢', goodsRecommendTitle: '猜你喜欢',
currencySymbol: '¥', currencySymbol: '¥',
submit: '提交' submit: '提交',
searchTip: '请输入搜索关键词'
} }
} }

View File

@@ -3,13 +3,16 @@
<view class="order-container"> <view class="order-container">
<view class="cate-search"> <view class="cate-search">
<view class="search-box"> <view class="search-box">
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search" placeholder="请输入商品名称/订单编号" @confirm="search()" @click.stop="search()" @tap.stop="search()" /> <input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search"
placeholder="请输入商品名称/订单编号" @confirm="search()" @click.stop="search()" @tap.stop="search()" />
<text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text> <text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view> </view>
</view> </view>
<view class="order-nav" v-if="storeToken"> <view class="order-nav" v-if="storeToken">
<view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item" :id="statusItem.id" :data-current="statusIndex" @click="ontabtap"> <view v-for="(statusItem, statusIndex) in statusList" :key="statusIndex" class="uni-tab-item"
<text class="uni-tab-item-title" :class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''"> :id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
<text class="uni-tab-item-title"
:class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''">
{{ statusItem.name }} {{ statusItem.name }}
</text> </text>
</view> </view>
@@ -24,7 +27,8 @@
<block slot="list"> <block slot="list">
<view class="order-list" v-if="orderList.length > 0"> <view class="order-list" v-if="orderList.length > 0">
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex"> <view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex">
<view class="order-header" :class="{ waitpay: orderStatus == 'waitpay' && orderItem.order_status == 0 }"> <view class="order-header"
:class="{ waitpay: orderStatus == 'waitpay' && orderItem.order_status == 0 }">
<!-- <view class="iconfont" <!-- <view class="iconfont"
:class="$util.inArray(orderItem.order_id, mergePayOrder) == -1 ? 'icon-yuan_checkbox' : 'icon-yuan_checked color-base-text'" :class="$util.inArray(orderItem.order_id, mergePayOrder) == -1 ? 'icon-yuan_checkbox' : 'icon-yuan_checked color-base-text'"
@click="selectOrder(orderItem.order_id, orderItem.pay_money)" @click="selectOrder(orderItem.order_id, orderItem.pay_money)"
@@ -35,13 +39,17 @@
</view> </view>
<view class="order-body" @click="orderDetail(orderItem)"> <view class="order-body" @click="orderDetail(orderItem)">
<block v-if="orderItem.order_goods.length == 1"> <block v-if="orderItem.order_goods.length == 1">
<view class="goods-wrap" v-for="(goodsItem, goodsIndex) in orderItem.order_goods" :key="goodsIndex"> <view class="goods-wrap" v-for="(goodsItem, goodsIndex) in orderItem.order_goods"
:key="goodsIndex">
<view class="goods-img"> <view class="goods-img">
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex, goodsIndex)" mode="aspectFill" :lazy-load="true"/> <image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
@error="imageError(orderIndex, goodsIndex)" mode="aspectFill"
:lazy-load="true" />
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view class="pro-info"> <view class="pro-info">
<view class="goods-name" v-if="goodsItem.goods_class == 2">{{ goodsItem.goods_name }}</view> <view class="goods-name" v-if="goodsItem.goods_class == 2">{{
goodsItem.goods_name }}</view>
<view class="goods-name" v-else>{{ goodsItem.sku_name }}</view> <view class="goods-name" v-else>{{ goodsItem.sku_name }}</view>
<view class="sku" v-if="goodsItem.sku_spec_format"> <view class="sku" v-if="goodsItem.sku_spec_format">
<view class="goods-spec"> <view class="goods-spec">
@@ -73,8 +81,12 @@
<view class="multi-order-goods"> <view class="multi-order-goods">
<scroll-view scroll-x="true" class="scroll-view"> <scroll-view scroll-x="true" class="scroll-view">
<view class="goods-wrap"> <view class="goods-wrap">
<view class="goods-img" v-for="(goodsItem, goodsIndex) in orderItem.order_goods" :key="goodsIndex"> <view class="goods-img"
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex, goodsIndex)" mode="aspectFill" :lazy-load="true"/> v-for="(goodsItem, goodsIndex) in orderItem.order_goods"
:key="goodsIndex">
<image :src="$util.img(goodsItem.sku_image, { size: 'mid' })"
@error="imageError(orderIndex, goodsIndex)" mode="aspectFill"
:lazy-load="true" />
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@@ -90,7 +102,8 @@
<text class="font-size-sub">{{ orderItem.goods_num }}件商品</text> <text class="font-size-sub">{{ orderItem.goods_num }}件商品</text>
<text class="align-right font-size-base"> <text class="align-right font-size-base">
实付款 实付款
<text class="font-size-base price-font">{{ $lang('common.currencySymbol') }}{{ orderItem.order_money }}</text> <text class="font-size-base price-font">{{ $lang('common.currencySymbol')
}}{{ orderItem.order_money }}</text>
</text> </text>
</view> </view>
</view> </view>
@@ -117,8 +130,10 @@
{{ operationItem.title }} {{ operationItem.title }}
</view> </view>
</view> </view>
<view class="order-action" v-else-if="orderItem.action.length == 0 && orderItem.is_evaluate == 1 && evaluateConfig.evaluate_status == 1"> <view class="order-action"
<view class="order-box-btn" v-if="orderItem.is_evaluate == 1" @click="operation('memberOrderEvaluation', orderItem)"> v-else-if="orderItem.action.length == 0 && orderItem.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
<view class="order-box-btn" v-if="orderItem.is_evaluate == 1"
@click="operation('memberOrderEvaluation', orderItem)">
<text v-if="orderItem.evaluate_status == 0">评价</text> <text v-if="orderItem.evaluate_status == 0">评价</text>
<text v-else-if="orderItem.evaluate_status == 1">追评</text> <text v-else-if="orderItem.evaluate_status == 1">追评</text>
</view> </view>
@@ -131,8 +146,9 @@
</view> </view>
<view v-else><ns-empty :isIndex="false" :text="$lang('emptyTips')"></ns-empty></view> <view v-else><ns-empty :isIndex="false" :text="$lang('emptyTips')"></ns-empty></view>
</block> </block>
<!--#ifndef MP -->
</mescroll-uni> </mescroll-uni>
<!--#endif -->
<!-- <view class="order-batch-action" :class="{ 'bottom-safe-area': isIphoneX }" v-if="mergePayOrder.length"> <!-- <view class="order-batch-action" :class="{ 'bottom-safe-area': isIphoneX }" v-if="mergePayOrder.length">
<view class="action-btn color-base-text color-base-border" @click="mergePay()">合并付款</view> <view class="action-btn color-base-text color-base-border" @click="mergePay()">合并付款</view>
</view> --> </view> -->
@@ -143,18 +159,21 @@
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
<!-- #ifdef MP -->
</mescroll-uni>
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
import orderMethod from './public/js/orderMethod.js'; import orderMethod from './public/js/orderMethod.js';
import nsPayment from '@/components/payment/payment.vue'; import nsPayment from '@/components/payment/payment.vue';
import MescrollUni from "@/components/mescroll/my-list-mescroll.vue"; import MescrollUni from "@/components/mescroll/my-list-mescroll.vue";
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue'; import loadingCover from '@/components/loading-cover/loading-cover.vue';
import nsEmpty from '@/components/ns-empty/ns-empty.vue'; import nsEmpty from '@/components/ns-empty/ns-empty.vue';
export default { export default {
components: { components: {
nsPayment, nsPayment,
MescrollUni, MescrollUni,
@@ -277,7 +296,7 @@
getOrderStatus() { getOrderStatus() {
this.statusList = [{ this.statusList = [{
status: 'all', status: 'all',
name:'全部', name: '全部',
id: 'status_0' id: 'status_0'
}, },
{ {
@@ -439,24 +458,25 @@
} }
}, },
watch: { watch: {
storeToken: function(nVal, oVal) { storeToken: function (nVal, oVal) {
if (nVal) { if (nVal) {
this.$refs.mescroll.refresh(); this.$refs.mescroll.refresh();
} }
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './public/css/list.scss'; @import './public/css/list.scss';
</style> </style>
<style scoped>
/deep/ .uni-page {
overflow: hidden;
}
/deep/ .mescroll-upwarp { <style lang="scss" scoped>
/deep/ .uni-page {
overflow: hidden;
}
/deep/ .mescroll-upwarp {
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }
</style> </style>

View File

@@ -124,7 +124,7 @@ export default {
}, },
search() { search() {
if (!this.inputValue.trim()) { if (!this.inputValue.trim()) {
uni.showToast({ title: '请输入搜索关键词', icon: 'none' }); uni.showToast({ title: this.$lang('common.searchTip'), icon: 'none' });
return; return;
} }
// 保存搜索历史 // 保存搜索历史