main
wangdong 6 months ago
parent 0bba9badcb
commit 7d72b178dc
  1. 4
      config.js
  2. 4
      pages/goods/detail.vue
  3. 4
      pages/goods/seckillDetail.vue
  4. 37
      pages/shopList/shopPage.vue

@ -7,9 +7,9 @@ export default {
* 后端api地址 (必填; 斜杠/结尾; 请确保能访问) * 后端api地址 (必填; 斜杠/结尾; 请确保能访问)
* 例如: https://www.你的域名.com/index.php?s=/api/ * 例如: https://www.你的域名.com/index.php?s=/api/
*/ */
// apiUrl: "https://www.royaum.com.cn/index.php?s=/api/", apiUrl: "https://www.royaum.com.cn/index.php?s=/api/",
apiUrl: "https://test-www.royaum.com.cn/index.php?s=/api/", // apiUrl: "https://test-www.royaum.com.cn/index.php?s=/api/",
picUrl:'https://www.royaum.com.cn', picUrl:'https://www.royaum.com.cn',
/** /**

@ -139,14 +139,14 @@
</view> </view>
</view> </view>
<view v-if="storeVersion == 1 && goods.merchant_id > 0" class="merchant-info" @click="toShop()"> <view v-if="storeVersion == 1 && goods.merchant_id > 0" class="merchant-info" @click="toShop()">
<image :src="goods.merchant.logoImage[0].external_url" mode="aspectFill"></image> <image :src="goods.merchant.logoImage && goods.merchant.logoImage[0].external_url" mode="aspectFill"></image>
<view class="info-box"> <view class="info-box">
<view class="info-name"> <view class="info-name">
<text>{{ goods.merchant.shop_name }}</text> <text>{{ goods.merchant.shop_name }}</text>
<image src="@/static/arrow-right.png" mode="aspectFill"></image> <image src="@/static/arrow-right.png" mode="aspectFill"></image>
</view> </view>
<view class="label"> <view class="label">
<text>{{ goods.merchant.shop_label }}</text> <text v-if="goods.merchant.shop_label">{{ goods.merchant.shop_label }}</text>
</view> </view>
</view> </view>
</view> </view>

@ -120,14 +120,14 @@
</view> </view>
</view> </view>
<view v-if="storeVersion == 1 && goods.merchant_id > 0" class="merchant-info" @click="toShop()"> <view v-if="storeVersion == 1 && goods.merchant_id > 0" class="merchant-info" @click="toShop()">
<image :src="goods.merchant.logoImage[0].external_url" mode="aspectFill"></image> <image :src="goods.merchant.logoImage && goods.merchant.logoImage[0].external_url" mode="aspectFill"></image>
<view class="info-box"> <view class="info-box">
<view class="info-name"> <view class="info-name">
<text>{{ goods.merchant.shop_name }}</text> <text>{{ goods.merchant.shop_name }}</text>
<image src="@/static/arrow-right.png" mode="aspectFill"></image> <image src="@/static/arrow-right.png" mode="aspectFill"></image>
</view> </view>
<view class="label"> <view class="label">
<text>{{ goods.merchant.shop_label }}</text> <text v-if="goods.merchant.shop_label">{{ goods.merchant.shop_label }}</text>
</view> </view>
</view> </view>
</view> </view>

@ -34,7 +34,7 @@
<text class="label">{{ shopDetail.shop_label }}</text> <text class="label">{{ shopDetail.shop_label }}</text>
<view @click="toCer"> <view @click="toCer">
<image src="/static/cer.png" mode="aspectFill"></image> <image src="/static/cer.png" mode="aspectFill"></image>
</view> </view>
</view> </view>
</view> </view>
@ -54,7 +54,17 @@
<view class="goods-content"> <view class="goods-content">
<view class="first-cate"> <view class="first-cate">
<scroll-view class="first-cate-tabs" scroll-y> <scroll-view class="first-cate-tabs" scroll-y>
<view v-for="(item, index) in goodsCate" :key="index" class="cate-item" :class="{active: firstCate === item.category_id}" @click="firstCate = item.category_id;secondCate = '';"> <view
v-for="(item, index) in goodsCate"
:key="index"
class="cate-item"
:class="{
active: firstCate === item.category_id,
prev: goodsCate[index + 1] && goodsCate[index + 1].category_id === firstCate,
next: goodsCate[index - 1] && goodsCate[index - 1].category_id === firstCate,
}"
@click="firstCate = item.category_id;secondCate = '';"
>
{{ item.name }} {{ item.name }}
</view> </view>
</scroll-view> </scroll-view>
@ -120,7 +130,7 @@
filterList: [ filterList: [
{ name: '综合', value: 'all' }, { name: '综合', value: 'all' },
{ name: '价格', value: 'price' }, { name: '价格', value: 'price' },
{ name: '折扣', value: 'discount' }, // { name: '', value: 'discount' },
{ name: '销量', value: 'sales' }], { name: '销量', value: 'sales' }],
isTop: false, isTop: false,
page: 1, page: 1,
@ -173,7 +183,14 @@
}, },
methods: { methods: {
back() { back() {
let pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack(); uni.navigateBack();
} else {
uni.reLaunch({
url: "/pages/index/index"
})
}
}, },
search() { search() {
// //
@ -252,7 +269,7 @@
console.log(data); console.log(data);
this.goods = this.goods.concat(data); this.goods = this.goods.concat(data);
this.finished = data.length < 10; this.finished = data.length < 10;
this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多"; this.loadTitle = this.finished ? "我是有底线的哦~" : "上拉加载更多";
}) })
}, 500), }, 500),
toCart() { toCart() {
@ -472,14 +489,22 @@
.first-cate-tabs { .first-cate-tabs {
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background: #fff;
.cate-item { .cate-item {
width: 100%; width: 100%;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
position: relative; position: relative;
background: #F0F4F3;
&.prev {
border-radius: 0 0 30rpx 0;
}
&.next {
border-radius: 0 30rpx 0 0;
}
&.active { &.active {
background: #fff; background: transparent;
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
@ -557,7 +582,7 @@
margin-right: 0; margin-right: 0;
} }
>image { >image {
width: 290rpx; width: 100%;
height: 287rpx; height: 287rpx;
} }
.name { .name {

Loading…
Cancel
Save