Commit 7959a18c by 谢中龙

导购首页,核销,招募等优化

parent f8757c28
...@@ -86,7 +86,9 @@ ...@@ -86,7 +86,9 @@
"pages/taskNotice/taskNotice", "pages/taskNotice/taskNotice",
"pages/myMemberList/myMemberList", "pages/myMemberList/myMemberList",
"pages/moreCoupons/moreCoupons", "pages/moreCoupons/moreCoupons",
"pages/moreProducts/moreProducts" "pages/moreProducts/moreProducts",
"pages/couponWriteOff/couponWriteOff",
"pages/openCard/openCard"
] ]
} }
], ],
......
// component/empty/empty.js
Component({
/**
* 组件的属性列表
*/
properties: {
show : Boolean,
text : {
type : String,
default : '暂无数据~'
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/empty/empty.wxml-->
<view class='page-empty'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/empty.png' mode='aspectFit'></image>
<view>{{text}}</view>
</view>
/* component/empty/empty.wxss */
.page-empty{
width: 100%;
height: auto;
padding: 100rpx 40rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
.page-empty image{
width: 200rpx;
height: 160rpx;
margin-bottom: 20rpx;
}
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 47, "current": 69,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
}, },
{ {
"id": 46, "id": 46,
"name": "招募(任务中心)", "name": "任务中心",
"pathName": "shoppingGuid/page/pages/kpi/kpi", "pathName": "shoppingGuid/page/pages/kpi/kpi",
"query": "", "query": "",
"scene": null "scene": null
...@@ -416,10 +416,11 @@ ...@@ -416,10 +416,11 @@
"scene": null "scene": null
}, },
{ {
"id": -1, "id": 56,
"name": "招募二维码", "name": "招募",
"pathName": "shoppingGuid/page/pages/qrcode/qrcode", "pathName": "shoppingGuid/page/pages/qrcode/qrcode",
"query": "" "query": "",
"scene": null
}, },
{ {
"id": -1, "id": -1,
...@@ -446,10 +447,11 @@ ...@@ -446,10 +447,11 @@
"query": "id=636202518078164992&type=2" "query": "id=636202518078164992&type=2"
}, },
{ {
"id": -1, "id": 61,
"name": "我招募的总会员数", "name": "我招募的所有会员",
"pathName": "shoppingGuid/page/pages/myMemberList/myMemberList", "pathName": "shoppingGuid/page/pages/myMemberList/myMemberList",
"query": "" "query": "",
"scene": null
}, },
{ {
"id": -1, "id": -1,
...@@ -490,6 +492,20 @@ ...@@ -490,6 +492,20 @@
"pathName": "shoppingGuid/page/pages/moreProducts/moreProducts", "pathName": "shoppingGuid/page/pages/moreProducts/moreProducts",
"query": "", "query": "",
"scene": null "scene": null
},
{
"id": 68,
"name": "优惠券核销",
"pathName": "shoppingGuid/page/pages/couponWriteOff/couponWriteOff",
"query": "id=36339254758056185447",
"scene": null
},
{
"id": -1,
"name": "开卡页",
"pathName": "shoppingGuid/page/pages/openCard/openCard",
"query": "",
"scene": null
} }
] ]
} }
......
...@@ -41,7 +41,7 @@ Component({ ...@@ -41,7 +41,7 @@ Component({
}, },
{ {
activeUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_a.png', activeUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_a.png',
pageUrl: '/shoppingGuid/page/pages/kpi/kpi', pageUrl: '/shoppingGuid/page/pages/qrcode/qrcode',
defaultUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_d.png', defaultUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_d.png',
isActive: false isActive: false
}, },
......
// shoppingGuid/page/pages/couponWriteOff/couponWriteOff.js
const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
const app = getApp();
wxService.page({
/**
* 页面的初始数据
*/
data: {
couponId : '',
paramIsError : false,
useStoreId : '',
couponInfo : {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let param = options.id;
console.log(param)
if(param){
this.getCurrentStoreId();
this.data.couponId = param;
//获取优惠券详情
wx.showLoading({
title: '加载中..',
});
this.getCouponDetail();
}
else{
//参数格式异常 需要提示处理
this.setData({
paramIsError: true
});
}
},
//获取当前登录用户的storeId
getCurrentStoreId(){
//获取当前登录用户的storeid
let member = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null;
if (member) {
this.data.useStoreId = member.member.storeId;
} else {
this.setData({
paramIsError: true
});
}
},
//获取优惠券详情
getCouponDetail(){
wxService.post(`/coupon/coupon/get?cardNo=${this.data.couponId}`).then(res => {
if(res){
this.data.couponInfo = res.data.data ? res.data.data : {};
this.data.couponInfo.takeCouponBgimg = this.data.couponInfo.couponDetail.style.takeCouponBgimg;
this.data.couponInfo.title = this.data.couponInfo.couponSetting.title;
this.data.couponInfo.faceAmountDesc = this.data.couponInfo.couponSetting.faceAmountDesc;
this.data.couponInfo.startTime = this.data.couponInfo.couponSetting.startTime.substring(0,10);
this.data.couponInfo.endTime = this.data.couponInfo.couponSetting.endTime.substring(0, 10);
let notice = this.data.couponInfo.couponSetting.notice;
this.data.couponInfo.notice = notice ? JSON.parse(notice) : [];
if (this.data.couponInfo.notice){
this.data.couponInfo.notice = this.data.couponInfo.notice.filter(item => item.type != 1);
}
this.setData({
couponInfo: this.data.couponInfo
});
}
}).finally(() => {
wx.hideLoading();
});
},
//确认核销
onTapSureWhiteOffCoupon(){
let self = this;
wx.showModal({
title: '核销确认',
content: '您将核销该优惠券,是否继续?',
confirmColor: '#ff3333',
success(res) {
if (res.confirm) {
self.writeOffCoupon();
} else if (res.cancel) {}
}
})
},
//核销优惠券
writeOffCoupon(){
wx.showLoading({
title: '核销中..',
});
wxService.post(`/coupon/coupon/checkAndInvalid`,{
cardNo : this.data.couponId,
useStoreId: this.data.useStoreId,
brandId: app.globalData.brandId
}).then(res => {
if(res){
if (res.data.result == 0) {
wx.showToast({
title: '核销成功',
});
setTimeout(() => {
wx.navigateBack({
delta: 1
});
},500);
}
}
}).finally(() => {
wx.hideLoading();
});
}
});
\ No newline at end of file
{
"navigationBarTitleText": "优惠券核销",
"disableScroll" : true,
"usingComponents": {}
}
\ No newline at end of file
<!-- 优惠券二维码 -->
<view class='main-container'>
<!-- 优惠券福利 -->
<view class='coupons'>
<view class='coupon-item' style='background-image:url(https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png)'>
<view class='coupon-item-lf'>
<image src="{{couponInfo.takeCouponBgimg}}" mode='aspectFit'></image>
</view>
<view class='coupon-item-rg'>
<view class='coupon-title'>{{couponInfo.title}}</view>
<view class='op'>
有效期:{{couponInfo.startTime}}至{{couponInfo.endTime}}
</view>
<view class='op'>
{{couponInfo.couponSetting.typeDesc}} <label>{{couponInfo.faceAmountDesc}}</label>
</view>
</view>
</view>
</view>
<!--备注说明 -->
<view class='coupon-remark' wx:if="{{couponInfo.notice.length > 0}}">
<view class='remark-item'
wx:for="{{couponInfo.notice}}"
wx:for-index="idx"
wx:for-item="item"
wx:key="{{idx}}">
<view class='lf-title'>{{item.label}}</view>
<view class='rg-desc'>{{item.value}}</view>
</view>
</view>
</view>
<!-- 核销按钮 -->
<view class='off'>
<view class='off-btn' bindtap='onTapSureWhiteOffCoupon'>确认核销</view>
</view>
<!-- 确认弹框 -->
<!-- <view class='comfirm' wx:if="{{showConfirm}}">
<view class='confirm-body'>
<view class='c-header'>核销确认</view>
<view class='c-center'>您将核销该优惠券,是否继续?</view>
<view class='c-bottom'>
<view bindtap='onTapCancel'>取消</view>
<view bindtap='onTapConfirmOff'>确认</view>
</view>
</view>
</view> -->
\ No newline at end of file
/* shoppingGuid/page/pages/couponQrcode/couponQrcode.wxss */
/* shoppingGuid/page/pages/welfare/welfare.wxss */
page{
background: #f2f2f2;
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding-bottom: 160rpx;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.main-container{
width: 100%;
height: auto;
}
/* 优惠券 */
.coupons{
padding: 20rpx;
width: 100%;
background: #ffffff;
margin-bottom: 20rpx;
}
.coupons .coupon-item{
width: 100%;
height: 180rpx;
/* background: #ffffff; */
display: flex;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-bottom: 10rpx;
}
.coupons .coupon-item .coupon-item-lf{
flex: 0;
min-width: 180rpx;
max-width: 180rpx;
height: 180rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #0091FF ;
font-size: 24rpx;
justify-content: center;
}
.coupons .coupon-item .coupon-item-lf image{
width: 100%;
height: 100%;
border-radius: 8rpx;
}
.coupons .coupon-item .coupon-item-rg{
flex: 1;
padding: 30rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.coupons .coupon-item .coupon-item-rg .coupon-title{
font-size: 24rpx;
color: #333333;
font-weight: bold;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.coupons .coupon-item .coupon-item-rg .op{
display: flex;
width: 100%;
align-items: center;
font-size: 22rpx;
color: #666666;
}
.coupons .coupon-item .coupon-item-rg .op label{
color: #ff3333;
margin-left: 10rpx;
}
/* 优惠券备注信息 */
.coupon-remark{
background: #ffffff;
padding: 0 20rpx;
}
.coupon-remark .remark-item{
width: 100%;
height: auto;
padding: 30rpx 20rpx;
border-bottom: solid 2rpx #eeeeee;
display: flex;
font-size: 24rpx;
color: #333333;
}
.coupon-remark .remark-item:last-child{
border-bottom: none;
}
.coupon-remark .remark-item .lf-title{
flex: 0;
min-width: 140rpx;
max-width: 140rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.coupon-remark .remark-item .rg-desc{
flex: 1;
}
.off{
width: 100%;
height: auto;
padding: 20rpx 40rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 2;
background: #f2f2f2;
}
.off .off-btn{
width: 100%;
height: 90rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
background: #ff3333;
color: #ffffff;
font-size: 28rpx;
}
.off .off-btn:active{
opacity: 0.7;
}
/* 确认框 */
.comfirm{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.comfirm .confirm-body{
width: 72vw;
height: 320rpx;
background: #ffffff;
border-radius: 8rpx;
position: fixed;
z-index: 1001;
left: 14vw;
top: 25vh;
display: flex;
flex-direction: column;
}
.comfirm .confirm-body .c-header{
flex: 0;
min-height: 90rpx;
max-height: 90rpx;
border-bottom: solid 2rpx #eeeeee;
display: flex;
align-items: center;
color: #333333;
font-size: 28rpx;
padding: 0 20rpx;
}
.comfirm .confirm-body .c-center{
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #333333;
}
.comfirm .confirm-body .c-bottom{
flex: 0;
min-height: 90rpx;
max-height: 90rpx;
display: flex;
align-items: center;
color: #333333;
font-size: 28rpx;
border-top: solid 1px #eeeeee;
}
.comfirm .confirm-body .c-bottom view{
flex: 0;
min-width: 50%;
max-width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0 20rpx;
}
.comfirm .confirm-body .c-bottom view:first-child{
border-bottom-left-radius: 8rpx;
}
.comfirm .confirm-body .c-bottom view:last-child{
color: #ff3333;
border-left: solid 1px #eeeeee;
border-bottom-right-radius: 8rpx;
}
.comfirm .confirm-body .c-bottom view:active{
opacity: 0.7;
}
\ No newline at end of file
...@@ -64,28 +64,19 @@ wxService.page({ ...@@ -64,28 +64,19 @@ wxService.page({
this.getRecruitRanking() // 招募榜 this.getRecruitRanking() // 招募榜
}, },
//打开我的名片 //打开我的名片
onTapOpenMyFile(){ onTapScanQrcode(){
// let uInfo = wx.getStorageSync('_baseUserInfo'); wx.scanCode({
// if (uInfo){ success : res => {
// let myUserId = uInfo.member.qiyeInfo.userid; let result = res.result;
// console.log(myUserId)
// wx.qy.openUserProfile({
// type : 1,
// userid: myUserId,
// success : res => {
// console.log('ok',res)
// },
// fail : err => {
// console.log('error')
// },
// })
// }
wx.navigateTo({ wx.navigateTo({
url: '/shoppingGuid/page/pages/qrcode/qrcode', url: '/shoppingGuid/page/pages/couponWriteOff/couponWriteOff?id=' + result,
});
},
fail : err => {
console.log('扫码失败结果是--',err)
},
}); });
// console.log(uInfo)
}, },
//获取排行榜 //获取排行榜
getRecruitRanking() { getRecruitRanking() {
...@@ -166,15 +157,9 @@ wxService.page({ ...@@ -166,15 +157,9 @@ wxService.page({
current == 1? this.getRecruitRanking() : this.getStoreRanking() current == 1? this.getRecruitRanking() : this.getStoreRanking()
}); });
}, },
//跳转到我的招募码
onTapShowMyQrcode(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/qrcode/qrcode',
})
},
//跳转到任务中心 //跳转到任务中心
onTapToTaskList(){ onTapToTaskCenter(){
wx.redirectTo({ wx.navigateTo({
url: '/shoppingGuid/page/pages/kpi/kpi', url: '/shoppingGuid/page/pages/kpi/kpi',
}) })
}, },
...@@ -447,7 +432,7 @@ wxService.page({ ...@@ -447,7 +432,7 @@ wxService.page({
//跳转到会员 //跳转到会员
onTapToMember(){ onTapToMember(){
wx.navigateTo({ wx.navigateTo({
url: '/shoppingGuid/page/pages/selectUsers/selectUsers', url: '/shoppingGuid/page/pages/myMemberList/myMemberList',
}); });
}, },
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "导购首页", "navigationBarTitleText": "导购首页",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"tab-bar" : "../../../component/tabBar/tabBar" "tab-bar" : "../../../component/tabBar/tabBar",
"empty": "../../../../component/empty/empty"
} }
} }
\ No newline at end of file
<!--shoppingGuid/page/pages/home/home.wxml--> <!--shoppingGuid/page/pages/home/home.wxml-->
<wxs src="../../../../wxs/utils.wxs" module="utils" />
<!-- 常用工具 --> <!-- 常用工具 -->
<view class='top-items'> <view class='top-items'>
<view class='header'>常用工具</view> <view class='header'>常用工具</view>
...@@ -8,7 +7,7 @@ ...@@ -8,7 +7,7 @@
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_mall.png' mode='aspectFit'></image> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_mall.png' mode='aspectFit'></image>
<view class='tool-name'>官方商城</view> <view class='tool-name'>官方商城</view>
</view> </view>
<view class='tools-item' > <view class='tools-item' bindtap='onTapToTaskCenter'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_task.png' mode='aspectFit'></image> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_task.png' mode='aspectFit'></image>
<view class='tool-name'>任务中心</view> <view class='tool-name'>任务中心</view>
</view> </view>
...@@ -16,9 +15,9 @@ ...@@ -16,9 +15,9 @@
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_member_center.png' mode='aspectFit'></image> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_member_center.png' mode='aspectFit'></image>
<view class='tool-name'>会员中心</view> <view class='tool-name'>会员中心</view>
</view> </view>
<view class='tools-item' bindtap='onTapOpenMyFile'> <view class='tools-item' bindtap='onTapScanQrcode'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_my_card.jpg' mode='aspectFit'></image> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_scan_qrcode.jpg' mode='aspectFit'></image>
<view class='tool-name'>我的名片</view> <view class='tool-name'>扫码核销</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -60,8 +59,8 @@ ...@@ -60,8 +59,8 @@
</view> </view>
<!-- empty --> <!-- empty -->
<view class='empty' wx:if="{{coupon.couponList.length == 0}}">商家还未设置优惠券哦~</view> <!-- <view class='empty' wx:if="{{coupon.couponList.length == 0}}">商家还未设置优惠券哦~</view> -->
<empty text="商家还未设置优惠券哦~" wx:else/>
</view> </view>
<!-- 爆款推荐 --> <!-- 爆款推荐 -->
...@@ -83,7 +82,7 @@ ...@@ -83,7 +82,7 @@
</view> </view>
</view> </view>
<!-- list --> <!-- list -->
<view class='goods-list'> <view class='goods-list' wx:if="{{goods.goodsList.length > 0}}">
<view class='goods-item' <view class='goods-item'
wx:for="{{goods.goodsList}}" wx:for="{{goods.goodsList}}"
wx:for-item="item" wx:for-item="item"
...@@ -110,6 +109,7 @@ ...@@ -110,6 +109,7 @@
</view> </view>
</view> </view>
</view> </view>
<empty text="暂无商品~" wx:else/>
</view> </view>
<!-- 招募榜 --> <!-- 招募榜 -->
<view class='rank-container'> <view class='rank-container'>
...@@ -141,7 +141,8 @@ ...@@ -141,7 +141,8 @@
</view> </view>
</block> </block>
</view> </view>
<view class="no-list" wx:else>{{loadingText}}</view> <empty text="{{loadingText}}" wx:else/>
<!-- <view class="no-list" wx:else>{{loadingText}}</view> -->
</view> </view>
<!-- 门店榜 --> <!-- 门店榜 -->
<view wx:if="{{current == 2}}"> <view wx:if="{{current == 2}}">
...@@ -156,15 +157,11 @@ ...@@ -156,15 +157,11 @@
</view> </view>
</block> </block>
</view> </view>
<view class="no-list" wx:else>{{loadingText}}</view> <empty text="{{loadingText}}" wx:else/>
<!-- <view class="no-list" wx:else>{{loadingText}}</view> -->
</view> </view>
</view> </view>
</view> </view>
<!-- 整体布局 -->
<!-- tabbar -->
<tab-bar index="{{2}}" />
<!-- 分享 --> <!-- 分享 -->
<!-- 分享好友 --> <!-- 分享好友 -->
<view class='bg' style='display:{{showModal ? "block" : "none"}}' bindtap='onTapCancelShare'></view> <view class='bg' style='display:{{showModal ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
...@@ -176,3 +173,6 @@ ...@@ -176,3 +173,6 @@
</view> </view>
</button> </button>
</view> </view>
<!-- 整体布局 -->
<!-- tabbar -->
<tab-bar index="{{2}}" />
\ No newline at end of file
...@@ -53,6 +53,10 @@ view{ ...@@ -53,6 +53,10 @@ view{
justify-content: center; justify-content: center;
} }
.top-items .tools-item:active{
opacity: 0.7;
}
.top-items .tools-item image{ .top-items .tools-item image{
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
......
{ {
"navigationBarTitleText": "招募", "navigationBarTitleText": "任务中心",
"usingComponents": { "usingComponents": {
"tab-bar": "../../../component/tabBar/tabBar"
} }
} }
\ No newline at end of file
...@@ -75,5 +75,3 @@ ...@@ -75,5 +75,3 @@
</view> </view>
<!-- tabbar -->
<tab-bar index="{{1}}"></tab-bar>
\ No newline at end of file
/* shoppingGuid/page/pages/kpi/kpi.wxss */ /* shoppingGuid/page/pages/kpi/kpi.wxss */
page{ page{
background: rgba(0,0,0,0.04); background: rgba(0,0,0,0.04);
padding-bottom: 106rpx;
padding-top: 82rpx; padding-top: 82rpx;
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
......
...@@ -46,7 +46,7 @@ wxService.page({ ...@@ -46,7 +46,7 @@ wxService.page({
}); });
if(list.length == 0){ if(list.length == 0){
this.data.loadingText = '暂无数据~'; this.data.loadingText = '您还未招募任何会员~';
} }
this.setData({ this.setData({
...@@ -64,6 +64,12 @@ wxService.page({ ...@@ -64,6 +64,12 @@ wxService.page({
url: '/shoppingGuid/page/pages/userInfo/userInfo?id=' + item.id, url: '/shoppingGuid/page/pages/userInfo/userInfo?id=' + item.id,
}); });
}, },
//跳转到标签会员列表
onTapToTagsUser(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/selectUsers/selectUsers',
});
},
//回访 //回访
onTapRecall(e) { onTapRecall(e) {
const currentEnv = wx.getStorageSync('_qyWeChat'); const currentEnv = wx.getStorageSync('_qyWeChat');
......
{ {
"navigationBarTitleText": "全部会员", "navigationBarTitleText": "我的会员",
"usingComponents": {} "usingComponents": {
"empty" : "../../../../component/empty/empty"
}
} }
\ No newline at end of file
<!--shoppingGuid/page/pages/saleTaskInfo/saleTaskInfo.wxml--> <!--shoppingGuid/page/pages/saleTaskInfo/saleTaskInfo.wxml-->
<view class='tag-name' bindtap='onTapToTagsUser'>
<view class='tag'>
<image src='/assets/imgs/shoppingGuide/kpi_task_name.png' mode='aspectFit'></image>
<label>标签会员</label>
</view>
<image class='right-image' src='/assets/imgs/shoppingGuide/right.png' mode='aspectFit'></image>
</view>
<!-- 列表 --> <!-- 列表 -->
<view class='list' wx:if="{{list.length}}"> <view class='list' wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="{{index}}" wx:for-item="item"> <block wx:for="{{list}}" wx:key="{{index}}" wx:for-item="item">
...@@ -13,5 +20,7 @@ ...@@ -13,5 +20,7 @@
</view> </view>
<!-- empty --> <!-- empty -->
<view class='empty' wx:else>{{loadingText}}</view> <!-- <view class='empty' wx:else>{{loadingText}}</view> -->
<!-- 空 -->
<empty wx:else text="{{loadingText}}"/>
...@@ -22,39 +22,49 @@ view{ ...@@ -22,39 +22,49 @@ view{
/* tag-name */ /* tag-name */
.tag-name{ .tag-name{
width: 100%; width: 100%;
height: 80rpx; height: 100rpx;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 30rpx; padding: 0 30rpx;
margin-bottom: 10rpx;
border-top: solid 2rpx #eeeeee;
border-bottom: solid 2rpx #eeeeee;
justify-content: space-between;
} }
.tag-name image{ .tag-name:active{
width: 20rpx; background: #f2f2f2;
margin-right: 10rpx; }
.tag-name .right-image{
width: 26rpx;
height: 26rpx;
} }
.tag-name label{ .tag-name label{
font-weight: bold;
color: #333333; color: #333333;
margin-right: 30rpx;
} }
.tag-name .tag{ .tag-name .tag{
height: 40rpx; display: flex;
font-size: 24rpx; align-items: center;
padding: 4rpx 20rpx; font-size: 28rpx;
border-radius: 20rpx; }
margin-right: 20rpx;
color: #0091FF ; .tag-name .tag image{
background-color: rgba(0, 145, 255, 0.1); width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
} }
/* list */ /* list */
.list{ .list{
padding: 20rpx; /* padding: 20rpx; */
width: 100%; width: 100%;
height: auto; height: auto;
background: #ffffff;
} }
.list .item{ .list .item{
...@@ -63,8 +73,11 @@ view{ ...@@ -63,8 +73,11 @@ view{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20rpx; border-bottom: solid 1px #eeeeee;
border-radius: 10rpx; }
.list .item:last-child{
border-bottom: none;
} }
.list .item .u-info{ .list .item .u-info{
......
// shoppingGuid/page/pages/openCard/openCard.js
const app = getApp()
const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
const utils = require('../../../../utils/util')
wxService.page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
//授权回调
userAuthBtnCallBack(res = {}) {
wx.showLoading({
title: '请求中..',
});
const userInfo = res.detail || {};
if (res.detail.userInfo) {
utils.getUserInfoByBtn(userInfo).then((data = {}) => {
const { token } = data
wx.setStorageSync('_accreditUserInfo', userInfo);
if (token) {
wx.setStorageSync('token', token)
} else {
wx.setStorageSync('token', '')
}
wx.setStorageSync('_baseUserInfo', data)
// 存储用户开卡状态
this.setUserInfo()
}).catch(err => {
if (err) {
wx.showToast({
title: `会员系统异常请稍后重试!`,
icon: 'none'
})
}
})
} else {
this.setData({
isAuthorization: false
})
}
},
//设置用户信息
setUserInfo() {
// 判断有无开卡
// const {memberActivateStatus} = wx.getStorageSync('_baseUserInfo')
const userInfo = wx.getStorageSync('_baseUserInfo')
// 新用户去激活领卡
if (userInfo && userInfo.member && !userInfo.member.mobile) {
wxService.openCard()
return false
}
return ;
//如果已经是会员则跳转到首页
wx.reLaunch({
url: '/pages/userCenter/userCenter',
});
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
});
\ No newline at end of file
{
"navigationBarTitleText": "开卡页",
"usingComponents": {}
}
\ No newline at end of file
<!--shoppingGuid/page/pages/openCard/openCard.wxml-->
<view class='open-card-container'></view>
page{
background: #f2f2f2;
box-sizing: border-box;
-webkit-box-sizing: border-box;
font-size: 24rpx;
color: #333333;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.open-card-container{
}
\ No newline at end of file
...@@ -9,12 +9,12 @@ wxService.page({ ...@@ -9,12 +9,12 @@ wxService.page({
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png // https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png // https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
data: { data: {
codeImg: '', codeImg: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png',
avator: '', avator: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png',
name :'', name :'谢中龙',
template : {}, template : {},
cardImg : '', cardImg : '',
companyName: '', companyName: '上海舞象',
bottomTypeArr : [ bottomTypeArr : [
{ {
name: "关注公众号", name: "关注公众号",
......
{ {
"navigationBarTitleText": "对外名片", "navigationBarTitleText": "招募",
"disableScroll" : true,
"usingComponents": { "usingComponents": {
"painter": "/component/painter/painter" "painter": "/component/painter/painter",
"tab-bar": "../../../component/tabBar/tabBar"
} }
} }
\ No newline at end of file
...@@ -29,3 +29,5 @@ ...@@ -29,3 +29,5 @@
</view> </view>
<!-- tabbar -->
<tab-bar index="{{1}}"></tab-bar>
\ No newline at end of file
...@@ -3,25 +3,25 @@ page{ ...@@ -3,25 +3,25 @@ page{
background: #f2f2f2; background: #f2f2f2;
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
overflow: hidden; padding-bottom: 106rpx;
position: relative;
} }
view{ view{
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.qrcode{ .qrcode{
padding: 50rpx; padding: 50rpx;
padding-top: 130rpx; padding-top: 89rpx;
width: 100%; width: 100%;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: 100% 100%;
background-image: url(https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_shoudi_mingp.png); background-image: url(https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_shoudi_mingp.png);
margin-top: 30rpx; /* margin-top: 30rpx; */
position: relative; position: relative;
} }
...@@ -29,7 +29,7 @@ view{ ...@@ -29,7 +29,7 @@ view{
position: absolute; position: absolute;
display: flex; display: flex;
color: #0091FF; color: #0091FF;
top: 30rpx; top: 35rpx;
left: 0; left: 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -45,7 +45,7 @@ view{ ...@@ -45,7 +45,7 @@ view{
.qrcode .card{ .qrcode .card{
width: 100%; width: 100%;
height: auto; height: auto;
padding: 100rpx 30rpx; padding: 60rpx 30rpx;
background: transparent; background: transparent;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
...@@ -57,14 +57,14 @@ view{ ...@@ -57,14 +57,14 @@ view{
.qrcode .card .g-qrcode{ .qrcode .card .g-qrcode{
width: 320rpx; width: 320rpx;
height: 320rpx; height: 320rpx;
margin-bottom: 40rpx; margin-bottom: 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.qrcode .card .g-logo{ .qrcode .card .g-logo{
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
margin-bottom: 25rpx; margin-bottom: 20rpx;
border-radius: 50%; border-radius: 50%;
} }
...@@ -72,7 +72,7 @@ view{ ...@@ -72,7 +72,7 @@ view{
font-size: 36rpx; font-size: 36rpx;
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
margin-bottom: 20rpx; margin-bottom: 10rpx;
} }
.qrcode .card .company{ .qrcode .card .company{
...@@ -82,9 +82,6 @@ view{ ...@@ -82,9 +82,6 @@ view{
/* 底部操作按钮 */ /* 底部操作按钮 */
.bottom-operator{ .bottom-operator{
position: fixed;
bottom: 20rpx;
left: 0;
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
display: flex; display: flex;
...@@ -93,6 +90,7 @@ view{ ...@@ -93,6 +90,7 @@ view{
justify-content: center; justify-content: center;
color: #666666; color: #666666;
font-size: 28rpx; font-size: 28rpx;
margin-top: 30rpx;
} }
.bottom-operator .items{ .bottom-operator .items{
......
...@@ -19,7 +19,7 @@ wxService.page({ ...@@ -19,7 +19,7 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('options', options) console.log('options', options)
console.log(this.data) options.id = '651730112529698816';
this.setData({ this.setData({
id: options.id id: options.id
},()=>{ },()=>{
...@@ -77,9 +77,12 @@ wxService.page({ ...@@ -77,9 +77,12 @@ wxService.page({
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
this.data.subStoreData = data.subStore ? JSON.parse(data.subStore) : [];
this.setData({ this.setData({
couponDetail: data couponDetail: data,
}) subStoreData: this.data.subStoreData
});
this.getCouponGoods(data.couponId) this.getCouponGoods(data.couponId)
} }
}) })
...@@ -93,55 +96,12 @@ wxService.page({ ...@@ -93,55 +96,12 @@ wxService.page({
const {result,data} = res.data const {result,data} = res.data
if(result == 0){ if(result == 0){
wx.hideLoading() wx.hideLoading()
// data.coupon.startTime = data.coupon.startTime.substring(0,10)
// data.coupon.endTime = data.coupon.endTime.substring(0,10)
// data.couponSetting.notice = JSON.parse(data.couponSetting.notice)
// for (let i in data.couponSetting.notice){
// if (data.couponSetting.notice[i].type == 1){
// data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10)
// }
// }
this.setData({ this.setData({
productData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.productData, productData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.productData,
subStoreData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.subStoreData
}) })
} }
}).finally(() => { }).finally(() => {
wx.hideLoading() wx.hideLoading()
}) })
}, },
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
...@@ -17,7 +17,11 @@ ...@@ -17,7 +17,11 @@
<view class="store-num">适用门店 <view class="store-num">适用门店
<text class="store-num-tips">({{subStoreData.length}})</text> <text class="store-num-tips">({{subStoreData.length}})</text>
</view> </view>
<view class="store-more" wx:if="{{subStoreData.length}}" data-list="{{subStoreData}}" bindtap="handelGoStoreList">查看更多></view> <view class="store-more"
wx:if="{{subStoreData.length}}"
data-list="{{subStoreData}}"
bindtap="handelGoStoreList">
查看更多></view>
</view> </view>
<view class="store-address" wx:if="{{subStoreData.length}}"> <view class="store-address" wx:if="{{subStoreData.length}}">
<view class="store-detail"> <view class="store-detail">
......
...@@ -76,16 +76,24 @@ page { ...@@ -76,16 +76,24 @@ page {
.scan-title .title-name { .scan-title .title-name {
min-width: 160rpx; min-width: 160rpx;
height: 32rpx; height: auto;
color: rgba(0, 145, 255, 1); color: rgba(0, 145, 255, 1);
font-size: 32rpx; font-size: 32rpx;
margin-top: 30rpx; margin-top: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
} }
.scan-title .title-desc { .scan-title .title-desc {
height: 24rpx; height: 24rpx;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 24rpx; font-size: 24rpx;
margin-top: 30rpx; margin-top: 30rpx;
} }
.scan-title .title-others { .scan-title .title-others {
height: 44rpx; height: 44rpx;
......
...@@ -15,12 +15,6 @@ wxService.page({ ...@@ -15,12 +15,6 @@ wxService.page({
onLoad: function (options) { onLoad: function (options) {
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -32,38 +26,5 @@ wxService.page({ ...@@ -32,38 +26,5 @@ wxService.page({
list: JSON.parse(storeList) list: JSON.parse(storeList)
}) })
}, },
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
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