feat:平价商品问题

This commit is contained in:
2025-09-09 13:46:37 +08:00
parent e8211583a0
commit 018e501647
3 changed files with 197 additions and 183 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
"__platform__" : [ "ios" ] "__platform__" : [ "ios" ]
}, },
"weixin" : { "weixin" : {
"__platform__" : [ "ios", "android" ], "__platform__" : [ "ios" ],
"appid" : "wxb1deb175472de036", "appid" : "wxb1deb175472de036",
"UniversalLinks" : "" "UniversalLinks" : ""
} }
+94 -80
View File
@@ -1,106 +1,121 @@
<template> <template>
<view class="content-two" > <view class="content-two">
<TopSafe></TopSafe> <TopSafe></TopSafe>
<view class="head-view"> <view class="head-view">
<view class="head-search" @click="onJumpSearch"> <view class="head-search" @click="onJumpSearch">
<u-icon size="24" name="search" color="#999"></u-icon> <u-icon size="24" name="search" color="#999"></u-icon>
<text class="text-28 text-fu" style="margin-left:12rpx">搜索</text> <text class="text-28 text-fu" style="margin-left: 12rpx">搜索</text>
</view> </view>
</view> </view>
<view class="tab-view"> <view class="tab-view">
<view class="tab-list" @click="onTab(index)" v-for="(item,index) in tabList" :key="index"> <view
<text class="text-28 text-space" :style="{ class="tab-list"
color:curTab == index ? '#7A35F6' : '#666' @click="onTab(index)"
}">{{item.name}}</text> v-for="(item, index) in tabList"
:key="index"
>
<text
class="text-28 text-space"
:style="{
color: curTab == index ? '#7A35F6' : '#666',
}"
>{{ item.name }}</text
>
<view class="line" v-if="curTab == index"></view> <view class="line" v-if="curTab == index"></view>
</view> </view>
</view> </view>
<view class="setting-view"> <view class="setting-view">
<view class="name-box"> <view class="name-box">
<PingItem @ok="onJumpShop" style="margin-top:24rpx" :obj="item" v-for="(item,index) in dataList" :key="index"></PingItem> <PingItem
@ok="onJumpShop"
style="margin-top: 24rpx"
:obj="item"
v-for="(item, index) in dataList"
:key="index"
></PingItem>
</view> </view>
</view> </view>
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
<!-- #ifndef H5 -->
<CustomTabBar :tabIndex="2" />
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
import { getCascadeCategory } from '@/api/common.js'; import { getCascadeCategory } from "@/api/common.js";
import Header from '@/components/common/header.vue'; import Header from "@/components/common/header.vue";
import TopSafe from '@/components/common/top-safe.nvue' import TopSafe from "@/components/common/top-safe.nvue";
import MyBtn from '@/components/common/my-btn.vue' import MyBtn from "@/components/common/my-btn.vue";
import PingItem from '@/components/shop/ping-item.vue' import PingItem from "@/components/shop/ping-item.vue";
import { searchList } from '@/api/product.js'; import { searchList } from "@/api/product.js";
import func from '@/utils/func.js'; import func from "@/utils/func.js";
export default { export default {
components: { Header, TopSafe,MyBtn,PingItem }, components: { Header, TopSafe, MyBtn, PingItem },
data() { data() {
return { return {
dataList:[], dataList: [],
tabList:[], tabList: [],
curTab:0 curTab: 0,
}; };
}, },
onShow() { onShow() {},
},
onLoad() { onLoad() {
this.init(); this.init();
}, },
methods: { methods: {
async cascadeCategory(){ async cascadeCategory() {
getCascadeCategory({parentId: 0}).then(res=>{ getCascadeCategory({ parentId: 0 }).then((res) => {
if (res && res.bizcode === 100) { if (res && res.bizcode === 100) {
this.tabList = res.data; this.tabList = res.data;
this.getSearchList() this.getSearchList();
} }
}) });
}, },
onTab(index){ onTab(index) {
if(index != this.curTab){ if (index != this.curTab) {
this.curTab = index; this.curTab = index;
this.getSearchList() this.getSearchList();
} }
}, },
init() { init() {
this.cascadeCategory(); this.cascadeCategory();
}, },
async getSearchList(){ async getSearchList() {
const params = { const params = {
type:2, type: 2,
page:1, page: 1,
pageSize:99, pageSize: 99,
categoryId:this.tabList[this.curTab].id, categoryId: this.tabList[this.curTab].id,
isPar:true isPar: true,
} };
const resp = await searchList(params); const resp = await searchList(params);
if(resp && resp.bizcode === 100){ if (resp && resp.bizcode === 100) {
this.dataList = resp.data || []; this.dataList = resp.data || [];
} }
}, },
onJumpSearch(){ onJumpSearch() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/rwa_package/dongjian/search', url: "/pages/rwa_package/dongjian/search",
}) });
}, },
onJumpShop(id){ onJumpShop(id) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/other_package/productInfo/productInfo?id='+id, url: "/pages/other_package/productInfo/productInfo?id=" + id,
}) });
}, },
onShare(){ onShare() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends', url: "/pages/other_package/invite_friends/invite_friends",
}) });
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content-two{ .content-two {
display: flex; display: flex;
min-width: 750rpx; min-width: 750rpx;
max-width: 750rpx; max-width: 750rpx;
@@ -108,62 +123,63 @@ export default {
height: calc(100vh - 100rpx); height: calc(100vh - 100rpx);
//#endif //#endif
// #ifndef H5 // #ifndef H5
height: calc(100vh - 150rpx); height: 500rpx;
//#endif //#endif
height: calc(100vh - 20rpx - var(--window-bottom));
padding: 0; padding: 0;
margin: 0; margin: 0;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: fixed; position: fixed;
top:0; top: 0;
left:0; left: 0;
overflow: hidden; overflow: hidden;
background-color: $app-bj; background-color: $app-bj;
} }
.head-view{ .head-view {
width:100%; width: 100%;
min-height:88rpx; min-height: 88rpx;
height:88rpx; height: 88rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 32rpx; padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
.head-search{ .head-search {
width:100%; width: 100%;
height:76rpx; height: 76rpx;
padding: 0 24rpx; padding: 0 24rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
background-color: #F7F7F7; background-color: #f7f7f7;
align-items: center; align-items: center;
border-radius: 16rpx; border-radius: 16rpx;
} }
} }
.tab-view{ .tab-view {
width:100%; width: 100%;
height:80rpx; height: 80rpx;
min-height:80rpx; min-height: 80rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 0 32rpx; padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
overflow-x: auto; overflow-x: auto;
.tab-list{ .tab-list {
margin-right:24rpx; margin-right: 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height:60rpx; height: 60rpx;
min-height:60rpx; min-height: 60rpx;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top:22rpx; margin-top: 22rpx;
} }
.line{ .line {
width:48rpx; width: 48rpx;
height:4rpx; height: 4rpx;
background-color: #7A35F6; background-color: #7a35f6;
} }
} }
.setting-view { .setting-view {
@@ -176,10 +192,10 @@ export default {
padding: 0 32rpx; padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.name-box{ .name-box {
width:100%; width: 100%;
border-radius: 16rpx; border-radius: 16rpx;
height:100%; height: 100%;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -187,8 +203,6 @@ export default {
align-content: flex-start; align-content: flex-start;
box-sizing: border-box; box-sizing: border-box;
} }
} }
</style> </style>
+2 -2
View File
@@ -1,9 +1,9 @@
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境 // export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境 // export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
// export const BASE_URL = "https://api.tbmall.xin"; //生产 export const BASE_URL = "https://api.tbmall.xin"; //生产
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试 // export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试 // export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试