Commit b25f72bd by 谢中龙

优惠券对接成功

parent a942a3da
...@@ -61,14 +61,14 @@ wxService.page({ ...@@ -61,14 +61,14 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
let currentUserInfo = wx.getStorageSync('guidBaseInfo'); let currentUserInfo = wx.getStorageSync('guidBaseInfo');
if (!currentUserInfo) { //未登录成功 // if (!currentUserInfo) { //未登录成功
wx.redirectTo({ // wx.redirectTo({
url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider', // url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
}); // });
return ; // return ;
} // }
// currentUserInfo = { member: { qiyeInfo: { name : '张三'}}} currentUserInfo = { member: { qiyeInfo: { name : '张三'}}}
let userInfo = wx.getStorageSync('guidInfo'); let userInfo = wx.getStorageSync('guidInfo');
if (currentUserInfo.member) { if (currentUserInfo.member) {
......
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
<view class='month-data'> <view class='month-data'>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>当前完成(人)</text> <text class='data-item-title'>当前完成(人)</text>
<text class='data-item-number'>{{enlistList.achieve}}</text> <text class='data-item-number' style='color:#F7B500;'>{{enlistList.achieve}}</text>
</view> </view>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>当周目标(人)</text> <text class='data-item-title'>当周目标(人)</text>
<text class='data-item-number'>{{enlistList.task.target}}</text> <text class='data-item-number' style='color:#666660;'>{{enlistList.task.target}}</text>
</view> </view>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>完成率</text> <text class='data-item-title'>完成率</text>
<text class='data-item-number'>{{enlistList.rate}}</text> <text class='data-item-number' style='color:#FA6400;'>{{enlistList.rate}}</text>
</view> </view>
</view> </view>
</view> </view>
......
// shoppingGuid/page/pages/home/home.js // shoppingGuid/page/pages/home/home.js
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
const app = getApp();
const discountBg = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dicount_coupon.png';
const dingeBg = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dinge_coupon.png';
const diyongBg = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_diyong_coupon.png';
const defaultGoodsImg = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/product_defalut.jpg';
wxService.page({ wxService.page({
/** /**
...@@ -31,14 +40,21 @@ wxService.page({ ...@@ -31,14 +40,21 @@ wxService.page({
], ],
currentGoodsType: 2, currentGoodsType: 2,
goodsList: [] goodsList: []
} },
shareModel : {
title : '',
path : '',
imageUrl : ''
},
showModal : false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getCouponList();
this.getGoodsList();
}, },
/** /**
...@@ -103,6 +119,7 @@ wxService.page({ ...@@ -103,6 +119,7 @@ wxService.page({
loadingText : this.data.loadingText loadingText : this.data.loadingText
}) })
} }
} }
}) })
}, },
...@@ -152,9 +169,9 @@ wxService.page({ ...@@ -152,9 +169,9 @@ wxService.page({
this.data.coupon.couponTypeArr[index].active = true; this.data.coupon.couponTypeArr[index].active = true;
this.data.coupon.currentCouponType = this.data.coupon.couponTypeArr[index].type; this.data.coupon.currentCouponType = this.data.coupon.couponTypeArr[index].type;
this.data.coupon.couponList = [];
this.getCouponList(); this.getCouponList();
this.setData({ this.setData({
coupon: this.data.coupon coupon: this.data.coupon
}); });
...@@ -163,7 +180,118 @@ wxService.page({ ...@@ -163,7 +180,118 @@ wxService.page({
//获取优惠券列表 //获取优惠券列表
getCouponList(){ getCouponList(){
wx.showLoading({
title: '加载中..',
});
let type = this.data.coupon.currentCouponType;
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=3&pageNo=1`,{
couponName : '',
type: type,
}).then(res => {
if(res){
let list = res.data.data.content ? res.data.data.content : [];
list.forEach(item => {
item.couponType = item.couponSetting.type;
item.couponBg = item.couponType == 1 ? diyongBg : (item.couponType == 2 ? discountBg : dingeBg);
});
this.data.coupon.couponList = list;
this.setData({
coupon: this.data.coupon,
});
}
});
},
//展示优惠券二维码
onTapShowQrcode(e) {
let item = e.currentTarget.dataset.item;
wx.setStorageSync('_guidCouponInfo', item);
wx.navigateTo({
url: '/shoppingGuid/page/pages/couponQrcode/couponQrcode',
});
},
//定向发送优惠券
onTapToSendConpon(e) {
let item = e.currentTarget.dataset.item;
let id = item.id;
let content = {
title: item.title,
id: id,
url: item.couponBg
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.id,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型 STAFF_RECOMMAND
title: item.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
let tentacleId = res.id;
let inner_id = Integer.digit(item.id, 10, 64);
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareModel.title = item.title;
this.data.shareModel.imageUrl = item.couponBg;
this.data.shareModel.path = item.path;
this.setData({
shareModel: this.data.shareModel,
showModal: true
});
}
});
},
//关闭模态框
onTapCancelShare() {
this.setData({
showModal: false
});
},
//群发
onTapToSendByGroup(e) {
let item = e.currentTarget.dataset.item;
let id = item.id;
let content = {
title: item.title,
id: item.id,
url: item.imageBg
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.id,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型 STAFF_RECOMMAND
title: item.title, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
let tentacleId = res.id;
let inner_id = Integer.digit(item.couponId, 10, 64);
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
//打开企业微信通讯录选择会员
wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid
title: item.couponName, //小程序消息的title
imgUrl: item.imageBg,//小程序消息的封面图
page: path, //小程序消息打开后的路径
success: function (r) {
wx.showToast({
title: '发送成功!'
});
},
fail: function (err) {
}
});
}
});
}, },
//跳转到更多商品列表 //跳转到更多商品列表
...@@ -182,6 +310,7 @@ wxService.page({ ...@@ -182,6 +310,7 @@ wxService.page({
this.data.goods.goodsTypeArr[index].active = true; this.data.goods.goodsTypeArr[index].active = true;
this.data.goods.currentGoodsType = this.data.goods.goodsTypeArr[index].type; this.data.goods.currentGoodsType = this.data.goods.goodsTypeArr[index].type;
this.data.goods.goodsList = [];
this.getGoodsList(); this.getGoodsList();
this.setData({ this.setData({
goods: this.data.goods goods: this.data.goods
...@@ -189,6 +318,99 @@ wxService.page({ ...@@ -189,6 +318,99 @@ wxService.page({
}, },
//获取商品列表 //获取商品列表
getGoodsList(){ getGoodsList(){
wx.showLoading({
title: '加载中..',
});
wxService.post(`/merchant/share/productBonus/buyer/findPage?pageNo=1&pageSize=3`, {}).then(res => {
if(res){
let list = res.data.data.content ? res.data.data.content : [];
list.map(item => {
item.productImgUrl = item.productImgUrl ? item.productImgUrl : defaultGoodsImg;
});
this.data.goods.goodsList = list;
this.setData({
goods: this.data.goods
});
}
});
},
//定向发送
//定向转发商品给用户 分享功能
onTapToShare(e) {
let item = e.currentTarget.dataset.item;
// 生成触点对象
let content = {
title: item.productName,
id: item.productId,
url: item.productImgUrl
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.productId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
title: item.productName, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
let tentacleId = res.id;
let inner_id = Integer.digit(item.productId, 10, 64);
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail' + '?i=' + inner_id + '&t=' + inner_tentacleId;
this.data.shareModel.title = item.productName;
this.data.shareModel.imageUrl = item.productImgUrl;
this.data.shareModel.path = path;
this.setData({
shareModel: this.data.shareModel,
showModal: true,
});
}
});
},
//立即群发商品给用户
onTapToRecommandProduct(e) {
let item = e.currentTarget.dataset.item;
// 生成触点对象
let content = {
title: item.productName,
id: item.productId,
url: item.productImgUrl
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: item.productId,
contentType: app.globalData.contants.SHARE_TYPE.PRODUCT_DETAIL, //内容类型
title: item.productName, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
let tentacleId = res.id;
let inner_id = Integer.digit(item.productId, 10, 64);
let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail' + '?i=' + inner_id + '&t=' + inner_tentacleId;
//打开企业微信通讯录选择会员
wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid
title: item.productName, //小程序消息的title
imgUrl: item.productImgUrl,//小程序消息的封面图
page: path, //小程序消息打开后的路径
success: function (res) {
wx.showToast({
title: '推荐成功!'
});
},
fail: function (err) {
console.log('error---------------', err);
}
});
}
});
}, },
...@@ -209,7 +431,19 @@ wxService.page({ ...@@ -209,7 +431,19 @@ wxService.page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
this.getCouponList();
this.getGoodsList();
if (this.data.current == 1){
this.getRecruitRanking();
}
else if(this.data.current == 2){
this.getStoreRanking();
}
setTimeout(() => {
wx.stopPullDownRefresh();
},3000);
}, },
/** /**
......
{ {
"navigationBarTitleText": "导购首页", "navigationBarTitleText": "导购首页",
"enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"tab-bar" : "../../../component/tabBar/tabBar" "tab-bar" : "../../../component/tabBar/tabBar"
} }
......
...@@ -40,32 +40,25 @@ ...@@ -40,32 +40,25 @@
</view> </view>
</view> </view>
<!-- list --> <!-- list -->
<view class='coupon-list'> <view class='coupon-list' wx:if="{{coupon.couponList.length > 0}}">
<view class='coupon-list-item'> <view class='coupon-list-item'
<view class='top'> wx:for="{{coupon.couponList}}"
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dicount_coupon.png' mode='aspectFit'></image> wx:for-index="idx"
<view class='coupon-name'>打折券</view> wx:for-item="item"
</view> wx:key="coupon{{idx}}">
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dinge_coupon.png' mode='aspectFit'></image>
<view class='coupon-name'>定额券</view>
</view>
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'> <view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_diyong_coupon.png' mode='aspectFit'></image> <image src='{{item.couponBg}}' mode='aspectFit' data-item="{{item}}" bindtap='onTapShowQrcode'></image>
<view class='coupon-name'>抵扣券</view> <view class='coupon-name'>{{item.title}}</view>
</view> </view>
<view class='center'>定向发券</view> <view class='center' data-item="{{item}}" bindtap='onTapToSendConpon'>定向发券</view>
<view class='bottom'>群发推荐</view> <view class='bottom' data-item="{{item}}" bindtap='onTapToSendByGroup'>群发推荐</view>
</view> </view>
</view> </view>
<!-- empty -->
<view class='empty' wx:if="{{coupon.couponList.length == 0}}">商家还未设置优惠券哦~</view>
</view> </view>
<!-- 爆款推荐 --> <!-- 爆款推荐 -->
<view class='mg-b-40'> <view class='mg-b-40'>
...@@ -87,44 +80,27 @@ ...@@ -87,44 +80,27 @@
</view> </view>
<!-- list --> <!-- list -->
<view class='goods-list'> <view class='goods-list'>
<view class='goods-item'> <view class='goods-item'
<image class='goods-lf-icon' wx:for="{{goods.goodsList}}"
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image> wx:for-item="item"
wx:for-index="idx"
wx:key="goodslist{{idx}}"
data-index="{{idx}}">
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view> <view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view> <view class='goods-second-title'>这个是商品的描述</view>
<view class='goods-price'> <view class='goods-price'>
<view class='price'> <view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'> <view class='plus'>
<text>¥89.00</text> <image src='/assets/imgs/point.png' mode='aspectFit'></image>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image> <text>{{item.point}}</text>
</view> </view>
</view>
<view class='goods-share'>
<view class='send-coupon'>定向发券</view>
<view class='send-coupon'>群发推荐</view>
</view>
</view>
</view>
</view>
<view class='goods-item'>
<image class='goods-lf-icon'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view>
<view class='goods-price'>
<view class='price'>
<view class='original-price'>¥126.08</view> <view class='original-price'>¥126.08</view>
<view class='plus'>
<text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view>
</view> </view>
<view class='goods-share'> <view class='goods-share'>
<view class='send-coupon'>定向发券</view> <view class='send-coupon' data-item="{{item}}" bindtap='onTapToShare'>定向发送</view>
<view class='send-coupon'>群发推荐</view> <view class='send-coupon' data-item="{{item}}" bindtap='onTapToRecommandProduct'>群发推荐</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -185,3 +161,14 @@ ...@@ -185,3 +161,14 @@
<!-- tabbar --> <!-- tabbar -->
<tab-bar index="{{2}}" /> <tab-bar index="{{2}}" />
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showModal ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showModal ? "sliderUp" : ""}}'>
<button open-type="share">
<view class='share-item'>
<image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
<text>微信好友</text>
</view>
</button>
</view>
...@@ -134,8 +134,8 @@ view{ ...@@ -134,8 +134,8 @@ view{
} }
.status-bar .more-data image{ .status-bar .more-data image{
width: 24rpx; width: 22rpx;
height: 24rpx; height: 22rpx;
} }
.coupon-list{ .coupon-list{
...@@ -180,6 +180,7 @@ view{ ...@@ -180,6 +180,7 @@ view{
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 22rpx; font-size: 22rpx;
width: 80%;
} }
.coupon-list .coupon-list-item .top image{ .coupon-list .coupon-list-item .top image{
...@@ -247,6 +248,9 @@ view{ ...@@ -247,6 +248,9 @@ view{
flex: 1; flex: 1;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
font-size: 24rpx; font-size: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
} }
.goods-list .goods-item .goods-rg-info .goods-title{ .goods-list .goods-item .goods-rg-info .goods-title{
...@@ -286,13 +290,14 @@ view{ ...@@ -286,13 +290,14 @@ view{
.goods-list .goods-item .goods-rg-info .goods-price .price .plus{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus{
display: flex; display: flex;
align-items: center; align-items: center;
color: #000000; color: #333333;
margin-bottom: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-price .price .plus image{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus image{
width: 60rpx; width: 28rpx;
height: 36rpx; height: 28rpx;
margin-left: 8rpx; margin-right: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-share{ .goods-list .goods-item .goods-rg-info .goods-share{
......
...@@ -72,7 +72,6 @@ view{ ...@@ -72,7 +72,6 @@ view{
width: 100%; width: 100%;
height: auto; height: auto;
padding: 20rpx; padding: 20rpx;
/* box-shadow: 0 0 6rpx 4rpx rgba(0,0,0,0.1); */
margin-bottom: 20rpx; margin-bottom: 20rpx;
position: relative; position: relative;
border-radius: 10rpx; border-radius: 10rpx;
...@@ -143,10 +142,19 @@ view{ ...@@ -143,10 +142,19 @@ view{
.task-info .lf{ .task-info .lf{
display: flex; display: flex;
align-items: center; align-items: center;
max-width: 65%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
} }
.task-info .lf image{ .task-info .lf image{
width: 28rpx; width: 24rpx;
height: 24rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
......
...@@ -176,8 +176,10 @@ wxService.page({ ...@@ -176,8 +176,10 @@ wxService.page({
}); });
let pageNum = this.data.coupon.pageNum, let pageNum = this.data.coupon.pageNum,
pageSize = this.data.coupon.pageSize, pageSize = this.data.coupon.pageSize,
param = { couponName: '' }; type = this.data.coupon.currentCouponType,
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`, param).then(res => { param = { couponName: '', type: type};
wxService.post(`/marketing/shoppingguide/coupon/page4c?pageSize=${pageSize}&pageNo=${pageNum}`,
param).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
wx.hideLoading(); wx.hideLoading();
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
<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'>
<view class='goods-title'>{{item.productName}}</view> <view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view> <view class='goods-second-title'>这个是说明</view>
<view class='goods-price'> <view class='goods-price'>
<view class='price'> <view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'> <view class='plus'>
<text>¥89.00</text> <image src='/assets/imgs/point.png' mode='aspectFit'></image>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image> <text>{{item.point}}</text>
</view> </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}}" bindtap='onTapToShare'>定向发送</view>
......
...@@ -106,6 +106,9 @@ view{ ...@@ -106,6 +106,9 @@ view{
flex: 1; flex: 1;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
font-size: 24rpx; font-size: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
} }
.goods-list .goods-item .goods-rg-info .goods-title{ .goods-list .goods-item .goods-rg-info .goods-title{
...@@ -145,13 +148,14 @@ view{ ...@@ -145,13 +148,14 @@ view{
.goods-list .goods-item .goods-rg-info .goods-price .price .plus{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus{
display: flex; display: flex;
align-items: center; align-items: center;
color: #000000; color: #333333;
margin-bottom: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-price .price .plus image{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus image{
width: 60rpx; width: 28rpx;
height: 36rpx; height: 28rpx;
margin-left: 8rpx; margin-right: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-share{ .goods-list .goods-item .goods-rg-info .goods-share{
......
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
<view class='month-data'> <view class='month-data'>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>当前完成(元)</text> <text class='data-item-title'>当前完成(元)</text>
<text class='data-item-number'>{{saleDetail.achieve}}</text> <text class='data-item-number' style='color:#F7B500;'>{{saleDetail.achieve}}</text>
</view> </view>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>当周目标(元)</text> <text class='data-item-title'>当周目标(元)</text>
<text class='data-item-number'>{{saleDetail.task.target}}</text> <text class='data-item-number' style='color:#666660;'>{{saleDetail.task.target}}</text>
</view> </view>
<view class='data-item'> <view class='data-item'>
<text class='data-item-title'>完成率</text> <text class='data-item-title'>完成率</text>
<text class='data-item-number'>{{saleDetail.rate}}</text> <text class='data-item-number' style='color:#FA6400;'>{{saleDetail.rate}}</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -6,101 +6,83 @@ ...@@ -6,101 +6,83 @@
<view class='header'>优惠券</view> <view class='header'>优惠券</view>
<view class='status-bar'> <view class='status-bar'>
<view class='status-items'> <view class='status-items'>
<view class='status-bar-item active'>打折券</view> <view class='status-bar-item {{item.active ? "active" : ""}}'
<view class='status-bar-item'>定额券</view> wx:for="{{coupon.couponTypeArr}}"
<view class='status-bar-item'>抵用券</view> wx:for-item="item"
wx:for-index="idx"
bindtap='onTapChangeCouponType'
data-index="{{idx}}"
wx:key="tab{{idx}}">{{item.name}}</view>
</view> </view>
<view class='more-data'> <view class='more-data' bindtap='onTapToCouponList'>
<label>更多</label> <label>更多</label>
<image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image> <image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image>
</view> </view>
</view> </view>
<!-- list --> <!-- list -->
<view class='coupon-list'> <view class='coupon-list' wx:if="{{coupon.couponList.length > 0}}">
<view class='coupon-list-item'> <view class='coupon-list-item'
<view class='top'> wx:for="{{coupon.couponList}}"
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dicount_coupon.png' mode='aspectFit'></image> wx:for-index="idx"
<view class='coupon-name'>打折券</view> wx:for-item="item"
</view> wx:key="coupon{{idx}}">
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dinge_coupon.png' mode='aspectFit'></image>
<view class='coupon-name'>定额券</view>
</view>
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'> <view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_diyong_coupon.png' mode='aspectFit'></image> <image src='{{item.couponBg}}' mode='aspectFit' data-item="{{item}}" bindtap='onTapShowQrcode'></image>
<view class='coupon-name'>抵扣券</view> <view class='coupon-name'>{{item.title}}</view>
</view> </view>
<view class='center'>定向发券</view> <view class='center' data-item="{{item}}" bindtap='onTapToSendConpon'>定向发券</view>
<view class='bottom'>群发推荐</view> <view class='bottom' data-item="{{item}}" bindtap='onTapToSendByGroup'>群发推荐</view>
</view> </view>
</view> </view>
<!-- empty -->
<view class='empty' wx:if="{{coupon.couponList.length == 0}}">商家还未设置优惠券哦~</view>
</view> </view>
<!-- 爆款推荐 --> <!-- 爆款推荐 -->
<view class='mg-b-40'> <view class='mg-b-40'>
<view class='header'>爆款推荐</view> <view class='header'>爆款推荐</view>
<view class='status-bar'> <view class='status-bar'>
<view class='status-items'> <view class='status-items'>
<view class='status-bar-item active'>最新</view> <view class='status-bar-item {{item.active ? "active" : ""}}'
<view class='status-bar-item'>最热🔥</view> wx:for="{{goods.goodsTypeArr}}"
<view class='status-bar-item'>推荐👍</view> wx:for-item="item"
bindtap='onTapChangeGoodsType'
wx:for-index="idx"
wx:key="goods{{idx}}"
data-index="{{idx}}">{{item.name}}</view>
</view> </view>
<view class='more-data'> <view class='more-data' bindtap='onTapToMoreProducts'>
<label>更多</label> <label>更多</label>
<image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image> <image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image>
</view> </view>
</view> </view>
<!-- list --> <!-- list -->
<view class='goods-list'> <view class='goods-list'>
<view class='goods-item'> <view class='goods-item'
<image class='goods-lf-icon' wx:for="{{goods.goodsList}}"
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image> wx:for-item="item"
wx:for-index="idx"
wx:key="goodslist{{idx}}"
data-index="{{idx}}">
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view> <view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view> <view class='goods-second-title'>这个是商品的描述</view>
<view class='goods-price'> <view class='goods-price'>
<view class='price'> <view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'> <view class='plus'>
<text>¥89.00</text> <text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image> <image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view> </view>
</view>
<view class='goods-share'>
<view class='send-coupon'>定向发券</view>
<view class='send-coupon'>群发推荐</view>
</view>
</view>
</view>
</view>
<view class='goods-item'>
<image class='goods-lf-icon'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view>
<view class='goods-price'>
<view class='price'>
<view class='original-price'>¥126.08</view> <view class='original-price'>¥126.08</view>
<view class='plus'>
<text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view>
</view> </view>
<view class='goods-share'> <view class='goods-share'>
<view class='send-coupon'>定向发券</view> <view class='send-coupon' data-item="{{item}}" bindtap='onTapToShare'>定向发送</view>
<view class='send-coupon'>群发推荐</view> <view class='send-coupon' data-item="{{item}}" bindtap='onTapToRecommandProduct'>群发推荐</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 内容运营 --> <!-- 内容运营 -->
...@@ -137,3 +119,14 @@ ...@@ -137,3 +119,14 @@
<!-- tabbar --> <!-- tabbar -->
<tab-bar index="{{3}}" /> <tab-bar index="{{3}}" />
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showModal ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showModal ? "sliderUp" : ""}}'>
<button open-type="share">
<view class='share-item'>
<image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
<text>微信好友</text>
</view>
</button>
</view>
\ No newline at end of file
...@@ -89,8 +89,8 @@ view{ ...@@ -89,8 +89,8 @@ view{
} }
.status-bar .more-data image{ .status-bar .more-data image{
width: 24rpx; width: 22rpx;
height: 24rpx; height: 22rpx;
} }
.coupon-list{ .coupon-list{
...@@ -202,6 +202,9 @@ view{ ...@@ -202,6 +202,9 @@ view{
flex: 1; flex: 1;
padding: 15rpx 20rpx; padding: 15rpx 20rpx;
font-size: 24rpx; font-size: 24rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
} }
.goods-list .goods-item .goods-rg-info .goods-title{ .goods-list .goods-item .goods-rg-info .goods-title{
...@@ -241,13 +244,14 @@ view{ ...@@ -241,13 +244,14 @@ view{
.goods-list .goods-item .goods-rg-info .goods-price .price .plus{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus{
display: flex; display: flex;
align-items: center; align-items: center;
color: #000000; color: #333333;
margin-bottom: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-price .price .plus image{ .goods-list .goods-item .goods-rg-info .goods-price .price .plus image{
width: 60rpx; width: 28rpx;
height: 36rpx; height: 28rpx;
margin-left: 8rpx; margin-right: 8rpx;
} }
.goods-list .goods-item .goods-rg-info .goods-share{ .goods-list .goods-item .goods-rg-info .goods-share{
......
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