Merge branch 'feature/mall_product_new'

pull/2/head^2
perry 2023-05-26 13:50:29 +08:00
commit 664b5c9b4c
5 changed files with 76 additions and 29 deletions

View File

@ -235,10 +235,10 @@ wx:
useRedis: false useRedis: false
defaultContent: \u60A8\u597D\uFF0C\u6709\u4EC0\u4E48\u95EE\u9898\uFF1F defaultContent: \u60A8\u597D\uFF0C\u6709\u4EC0\u4E48\u95EE\u9898\uFF1F
redisConfig: redisConfig:
host: 117.33.142.185 # 地址 host: 47.109.92.244 # 地址
port: 6369 # 端口 port: 6399 # 端口
database: 16 # 数据库索引 database: 16 # 数据库索引
password: 20221122@dev # 密码,建议生产环境开启 password: cyywl123.. # 密码,建议生产环境开启
phone: phone:
query-url: http://cy-phone-bill-inquiry-server:4006/cyywl-phone-query-api/ query-url: http://cy-phone-bill-inquiry-server:4006/cyywl-phone-query-api/
token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0 token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0

View File

@ -7,6 +7,7 @@ import util from 'utils/util'
* 去商品详情 * 去商品详情
*/ */
export function goShopDetail(item, uid) { export function goShopDetail(item, uid) {
console.log(item,'indexItem哇')
return new Promise(resolve => { return new Promise(resolve => {
if (item.activityH5 && item.activityH5.type === "1") { if (item.activityH5 && item.activityH5.type === "1") {
uni.navigateTo({ uni.navigateTo({
@ -25,6 +26,12 @@ export function goShopDetail(item, uid) {
} }
}); });
} }
export function goShopDetailCart(item, uid) {
console.log(item,'itemWWw阿')
return new Promise(resolve => {
resolve(item);
});
}
/** /**
* 活动商品普通商品购物车再次购买预下单 * 活动商品普通商品购物车再次购买预下单

View File

@ -206,7 +206,7 @@
<productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" <productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'> @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window'>
</productWindow> </productWindow>
<home></home> <!-- <home></home> -->
<couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons" <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" @ChangCoupons="ChangCoupons"
@ChangCouponsUseState="ChangCouponsUseState" @tabCouponType="tabCouponType"></couponListWindow> @ChangCouponsUseState="ChangCouponsUseState" @tabCouponType="tabCouponType"></couponListWindow>
<!-- 分享按钮 --> <!-- 分享按钮 -->

View File

@ -24,19 +24,31 @@
</view> </view>
</view> </view>
</view> </view>
<view class="right"> <view class="right" v-if="vip.integral">
<view class="up"> <view class="up" @tap="goEquity">
<image style="width: ;" src="@/static/images/shop/vip_oneStar.png" mode=""></image> <image style="width: ;" src="@/static/images/shop/vip_oneStar.png" mode=""></image>
</view> </view>
<text>会员等级1级</text> <text>会员等级1级</text>
<view class="button">查看权益</view> <view class="button" @tap="goEquity"></view>
</view>
<view class="right" v-else>
<view class="up" @tap="goEquity">
<image style="width: ;" src="@/static/images/shop/vip_oneStar.png" mode=""></image>
</view>
<text>会员等级0级</text>
<view class="button" @tap="goEquity"></view>
</view> </view>
</view> </view>
</view> </view>
<view class="header_bottom"> <view class="header_bottom">
<navigator :url="bannerList.url"> <u-swiper
<image :src="bannerList.picUrl" mode=""></image> :list="bannerList"
</navigator> keyName="picUrl"
height="100%"
radius="20rpx"
bgColor="transparent"
@click="goUrl"
></u-swiper>
</view> </view>
</view> </view>
<view class="notice" @tap="goNoticeDetail"> <view class="notice" @tap="goNoticeDetail">
@ -82,10 +94,7 @@
<view class="item" v-for="item in productList" @click="goDetail(item)"> <view class="item" v-for="item in productList" @click="goDetail(item)">
<image :src="item.image" mode=""></image> <image :src="item.image" mode=""></image>
<view class="name">{{item.storeName}}</view> <view class="name">{{item.storeName}}</view>
<u--text class="text" color="#E50202" mode="price" :text="item.price"></u--text>
<text>
<u--text color="#E50202" mode="price" :text="item.price"></u--text>
</text>
</view> </view>
</view> </view>
<view class="" style="margin-top: 110rpx;"> <view class="" style="margin-top: 110rpx;">
@ -260,6 +269,7 @@
page: 1, page: 1,
limit: 10, limit: 10,
}, },
vip: {},//
tempArr: [], // tempArr: [], //
roll: [], // roll: [], //
site_name: '', //title site_name: '', //title
@ -333,7 +343,8 @@
}) })
}) })
getHeader().then(res => { getHeader().then(res => {
console.log(res, '会员') this.vip = res.data
console.log(this.vip, '会员')
}) })
this.getBanners() this.getBanners()
this.getIndexPage() this.getIndexPage()
@ -349,9 +360,25 @@
}) })
}, },
methods: { methods: {
goUrl(e){
let url = ''
if(this.bannerList[e].url.indexOf('http')>=0){
url = this.bannerList[e].url
}else{
url = 'http://' + this.bannerList[e].url
}
window.open(url)
},
//
goEquity(){
console.log('goEmember_equity')
uni.switchTab({
url:'/pages/member_equity/index'
})
},
// //
goNoticeDetail() { goNoticeDetail() {
console.log('notice哇')
uni.navigateTo({ uni.navigateTo({
url: '/pages/notice/index' url: '/pages/notice/index'
}) })
@ -390,8 +417,9 @@
// console.log(this.$store.tenantId,'tenantId') // console.log(this.$store.tenantId,'tenantId')
getBanner().then(res => { getBanner().then(res => {
this.bannerList = res.data.list[0] this.bannerList = [...res.data.list]
console.log(this.bannerList, 'banner') console.log(res.data.list,'banner')
}) })
console.log(this.userInfo.userId, 'userInfo111111') console.log(this.userInfo.userId, 'userInfo111111')
@ -920,18 +948,18 @@
.bottom { .bottom {
margin-top: 27rpx; margin-top: 27rpx;
height: 200rpx; height: 200rpx;
overflow: scroll; display: flex;
white-space: nowrap; flex-wrap: nowrap;
.item { .item {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 370rpx; width: 45%;
height: 199rpx; height: 199rpx;
margin-left: 19rpx; margin-left: 19rpx;
image { image {
width: 370rpx; width: 100%;
height: 199rpx; height: 199rpx;
} }
@ -963,16 +991,16 @@
position: absolute; position: absolute;
left: 17rpx; left: 17rpx;
top: 81rpx; top: 81rpx;
width: 166rpx; width: 120rpx;
height: 71rpx; height: 62rpx;
} }
.img2 { .img2 {
position: absolute; position: absolute;
top: 22rpx; top: 22rpx;
right: 25rpx; right: 25rpx;
width: 138rpx; width: 116rpx;
height: 132rpx; height: 104rpx;
} }
} }
} }
@ -1011,8 +1039,10 @@
color: #000000; color: #000000;
} }
text { .text {
position: absolute; position: absolute;
display: flex;
justify-content: flex-end !important;
right: 20rpx; right: 20rpx;
bottom: 14rpx; bottom: 14rpx;
font-size: 28rpx; font-size: 28rpx;

View File

@ -20,7 +20,7 @@
<view class="image"> <view class="image">
<image :src="item.image" style="border-radius: 10rpx;"></image> <image :src="item.image" style="border-radius: 10rpx;"></image>
</view> </view>
<view class="detail"> <view class="detail" @tap="goDetail(item)">
<view class="name"> <view class="name">
{{item.storeName}} {{item.storeName}}
</view> </view>
@ -186,7 +186,7 @@
}; };
}, },
computed: { computed: {
...mapGetters(['isLogin']), ...mapGetters(['isLogin', 'uid']),
reChecked() { reChecked() {
return item => { return item => {
return item.checked return item.checked
@ -263,6 +263,16 @@
}; };
}, },
methods: { methods: {
//
goDetail(item) {
if (item.activityH5 && item.activityH5.type === "2" && !this.isLogin) {
toLogin();
} else {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.productId}`
})
}
},
// //
allCheck() { allCheck() {
this.isAllSelect = !this.isAllSelect this.isAllSelect = !this.isAllSelect