Commit b261f317 by 谢中龙

导购优化,推荐商品去除价格显示

parent fb3509e3
...@@ -64,6 +64,15 @@ wxService.page({ ...@@ -64,6 +64,15 @@ wxService.page({
onShow: function () { onShow: function () {
this.getRecruitRanking() // 招募榜 this.getRecruitRanking() // 招募榜
}, },
//跳转到商品详情
onTapToGoodsDetail(e){
console.log(e)
let item = e.currentTarget.dataset.item;
let productId = item.productId;
wx.navigateTo({
url: '/pages/productDetail/productDetail?id=' + productId,
});
},
//打开摄像头 扫码 //打开摄像头 扫码
onTapScanQrcode(){ onTapScanQrcode(){
wx.scanCode({ wx.scanCode({
......
...@@ -88,6 +88,8 @@ ...@@ -88,6 +88,8 @@
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
wx:key="goodslist{{idx}}" wx:key="goodslist{{idx}}"
data-item="{{item}}"
bindtap='onTapToGoodsDetail'
data-index="{{idx}}"> data-index="{{idx}}">
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image> <image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
...@@ -97,13 +99,13 @@ ...@@ -97,13 +99,13 @@
<view class='price'> <view class='price'>
<view class='plus'> <view class='plus'>
<image src='/assets/imgs/point.png' mode='aspectFit'></image> <image src='/assets/imgs/point.png' mode='aspectFit'></image>
<text>{{item.point}}</text> <text class='original-price'>{{item.point}}</text>
</view> </view>
<view class='original-price'>¥126.08</view> <!-- <view class='original-price'>¥126.08</view> -->
</view> </view>
<view class='goods-share'> <view class='goods-share'>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToShare'>定向发送</view> <view class='send-coupon' data-item="{{item}}" catchtap='onTapToShare'>定向发送</view>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToRecommandProduct'>群发推荐</view> <view class='send-coupon' data-item="{{item}}" catchtap='onTapToRecommandProduct'>群发推荐</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -275,6 +275,7 @@ view{ ...@@ -275,6 +275,7 @@ view{
font-size: 22rpx; font-size: 22rpx;
color: #999999; color: #999999;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-price{ .goods-list .goods-item .goods-rg-info .goods-price{
......
...@@ -49,6 +49,15 @@ wxService.page({ ...@@ -49,6 +49,15 @@ wxService.page({
this.getGoodsList(); this.getGoodsList();
}, },
//跳转到商品详情
onTapToGoodsDetail(e) {
let item = e.currentTarget.dataset.item;
let productId = item.productId;
wx.navigateTo({
url: '/pages/productDetail/productDetail?id=' + productId,
});
},
//筛选点击 //筛选点击
onTapChangeGoodsType(e){ onTapChangeGoodsType(e){
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
wx:for="{{goods.goodsList}}" wx:for="{{goods.goodsList}}"
wx:for-item="item" wx:for-item="item"
wx:for-index="idx" wx:for-index="idx"
data-item="{{item}}"
bindtap='onTapToGoodsDetail'
wx:key="{{idx}}"> wx:key="{{idx}}">
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image> <image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
...@@ -29,13 +31,13 @@ ...@@ -29,13 +31,13 @@
<view class='price'> <view class='price'>
<view class='plus'> <view class='plus'>
<image src='/assets/imgs/point.png' mode='aspectFit'></image> <image src='/assets/imgs/point.png' mode='aspectFit'></image>
<text>{{item.point}}</text> <text class='original-price'>{{item.point}}</text>
</view> </view>
<view class='original-price'>¥126.08</view> <!-- <view class='original-price'>¥126.08</view> -->
</view> </view>
<view class='goods-share'> <view class='goods-share'>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToShare'>定向发送</view> <view class='send-coupon' data-item="{{item}}" catchtap='onTapToShare'>定向发送</view>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToRecommandProduct'>群发推荐</view> <view class='send-coupon' data-item="{{item}}" catchtap='onTapToRecommandProduct'>群发推荐</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -118,8 +118,8 @@ view{ ...@@ -118,8 +118,8 @@ view{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 2;
line-clamp: 1; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-weight: bold; font-weight: bold;
margin-bottom: 8rpx; margin-bottom: 8rpx;
......
// shoppingGuid/page/pages/welcomGuider/welcomGuider.js // shoppingGuid/page/pages/welcomGuider/welcomGuider.js
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
const envInfo = require('../../../../config/index').envInfo
const app = getApp(); const app = getApp();
wxService.page({ wxService.page({
...@@ -34,9 +35,6 @@ wxService.page({ ...@@ -34,9 +35,6 @@ wxService.page({
title: '检查登录状态..', title: '检查登录状态..',
}); });
// this.qyLogin();
// return ;
//先判断是是不是已经登录了 //先判断是是不是已经登录了
let currentUserInfo = wx.getStorageSync('guidBaseInfo'); let currentUserInfo = wx.getStorageSync('guidBaseInfo');
let userInfo = wx.getStorageSync('guidInfo'); let userInfo = wx.getStorageSync('guidInfo');
...@@ -90,6 +88,7 @@ wxService.page({ ...@@ -90,6 +88,7 @@ wxService.page({
jsCodeSession : r.data.data, jsCodeSession : r.data.data,
btnIsDisabled : false, btnIsDisabled : false,
}); });
wx.hideLoading();
}) })
}, },
...@@ -127,7 +126,16 @@ wxService.page({ ...@@ -127,7 +126,16 @@ wxService.page({
userid: this.data.jsCodeSession.userid, userid: this.data.jsCodeSession.userid,
corpid: this.data.jsCodeSession.corpid, corpid: this.data.jsCodeSession.corpid,
}; };
wxService.post('/member/qiyeweixin/minaLogin', param).then(r => { let url = envInfo.ctx + '/member/qiyeweixin/minaLogin';
wx.request({
url,
method: 'POST',
header: {
'tunnel-token': envInfo.tunnelToken, // 开发
},
data: param,
channel: null,
success(r){
wx.setStorageSync('guidInfo', userInfo); wx.setStorageSync('guidInfo', userInfo);
wx.setStorageSync('token', r.data.data.token); wx.setStorageSync('token', r.data.data.token);
let qiyeLoginUserInfo = r.data.data; let qiyeLoginUserInfo = r.data.data;
...@@ -136,7 +144,11 @@ wxService.page({ ...@@ -136,7 +144,11 @@ wxService.page({
wx.redirectTo({ wx.redirectTo({
url: '/shoppingGuid/page/pages/home/home', url: '/shoppingGuid/page/pages/home/home',
}); });
}) },
fail(error){
console.log(res)
},
});
}, },
//进入商城 //进入商城
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment