Commit 7959a18c by 谢中龙

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

parent f8757c28
......@@ -86,7 +86,9 @@
"pages/taskNotice/taskNotice",
"pages/myMemberList/myMemberList",
"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 @@
"list": []
},
"miniprogram": {
"current": 47,
"current": 69,
"list": [
{
"id": -1,
......@@ -350,7 +350,7 @@
},
{
"id": 46,
"name": "招募(任务中心)",
"name": "任务中心",
"pathName": "shoppingGuid/page/pages/kpi/kpi",
"query": "",
"scene": null
......@@ -416,10 +416,11 @@
"scene": null
},
{
"id": -1,
"name": "招募二维码",
"id": 56,
"name": "招募",
"pathName": "shoppingGuid/page/pages/qrcode/qrcode",
"query": ""
"query": "",
"scene": null
},
{
"id": -1,
......@@ -446,10 +447,11 @@
"query": "id=636202518078164992&type=2"
},
{
"id": -1,
"name": "我招募的总会员数",
"id": 61,
"name": "我招募的所有会员",
"pathName": "shoppingGuid/page/pages/myMemberList/myMemberList",
"query": ""
"query": "",
"scene": null
},
{
"id": -1,
......@@ -490,6 +492,20 @@
"pathName": "shoppingGuid/page/pages/moreProducts/moreProducts",
"query": "",
"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({
},
{
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',
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({
this.getRecruitRanking() // 招募榜
},
//打开我的名片
onTapOpenMyFile(){
// let uInfo = wx.getStorageSync('_baseUserInfo');
// if (uInfo){
// let myUserId = uInfo.member.qiyeInfo.userid;
// console.log(myUserId)
// wx.qy.openUserProfile({
// type : 1,
// userid: myUserId,
// success : res => {
// console.log('ok',res)
// },
// fail : err => {
// console.log('error')
// },
// })
// }
onTapScanQrcode(){
wx.scanCode({
success : res => {
let result = res.result;
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() {
......@@ -166,15 +157,9 @@ wxService.page({
current == 1? this.getRecruitRanking() : this.getStoreRanking()
});
},
//跳转到我的招募码
onTapShowMyQrcode(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/qrcode/qrcode',
})
},
//跳转到任务中心
onTapToTaskList(){
wx.redirectTo({
onTapToTaskCenter(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/kpi/kpi',
})
},
......@@ -447,7 +432,7 @@ wxService.page({
//跳转到会员
onTapToMember(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/selectUsers/selectUsers',
url: '/shoppingGuid/page/pages/myMemberList/myMemberList',
});
},
......
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "导购首页",
"enablePullDownRefresh": true,
"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-->
<wxs src="../../../../wxs/utils.wxs" module="utils" />
<!-- 常用工具 -->
<view class='top-items'>
<view class='header'>常用工具</view>
......@@ -8,7 +7,7 @@
<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>
<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>
<view class='tool-name'>任务中心</view>
</view>
......@@ -16,9 +15,9 @@
<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>
<view class='tools-item' bindtap='onTapOpenMyFile'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_my_card.jpg' mode='aspectFit'></image>
<view class='tool-name'>我的名片</view>
<view class='tools-item' bindtap='onTapScanQrcode'>
<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>
</view>
</view>
......@@ -60,8 +59,8 @@
</view>
<!-- 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>
<!-- 爆款推荐 -->
......@@ -83,7 +82,7 @@
</view>
</view>
<!-- list -->
<view class='goods-list'>
<view class='goods-list' wx:if="{{goods.goodsList.length > 0}}">
<view class='goods-item'
wx:for="{{goods.goodsList}}"
wx:for-item="item"
......@@ -110,6 +109,7 @@
</view>
</view>
</view>
<empty text="暂无商品~" wx:else/>
</view>
<!-- 招募榜 -->
<view class='rank-container'>
......@@ -141,7 +141,8 @@
</view>
</block>
</view>
<view class="no-list" wx:else>{{loadingText}}</view>
<empty text="{{loadingText}}" wx:else/>
<!-- <view class="no-list" wx:else>{{loadingText}}</view> -->
</view>
<!-- 门店榜 -->
<view wx:if="{{current == 2}}">
......@@ -156,15 +157,11 @@
</view>
</block>
</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>
<!-- 整体布局 -->
<!-- tabbar -->
<tab-bar index="{{2}}" />
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showModal ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
......@@ -176,3 +173,6 @@
</view>
</button>
</view>
<!-- 整体布局 -->
<!-- tabbar -->
<tab-bar index="{{2}}" />
\ No newline at end of file
......@@ -53,6 +53,10 @@ view{
justify-content: center;
}
.top-items .tools-item:active{
opacity: 0.7;
}
.top-items .tools-item image{
width: 180rpx;
height: 180rpx;
......
{
"navigationBarTitleText": "招募",
"navigationBarTitleText": "任务中心",
"usingComponents": {
"tab-bar": "../../../component/tabBar/tabBar"
}
}
\ No newline at end of file
......@@ -75,5 +75,3 @@
</view>
<!-- tabbar -->
<tab-bar index="{{1}}"></tab-bar>
\ No newline at end of file
/* shoppingGuid/page/pages/kpi/kpi.wxss */
page{
background: rgba(0,0,0,0.04);
padding-bottom: 106rpx;
padding-top: 82rpx;
box-sizing: border-box;
-webkit-box-sizing: border-box;
......
......@@ -46,7 +46,7 @@ wxService.page({
});
if(list.length == 0){
this.data.loadingText = '暂无数据~';
this.data.loadingText = '您还未招募任何会员~';
}
this.setData({
......@@ -64,6 +64,12 @@ wxService.page({
url: '/shoppingGuid/page/pages/userInfo/userInfo?id=' + item.id,
});
},
//跳转到标签会员列表
onTapToTagsUser(){
wx.navigateTo({
url: '/shoppingGuid/page/pages/selectUsers/selectUsers',
});
},
//回访
onTapRecall(e) {
const currentEnv = wx.getStorageSync('_qyWeChat');
......
{
"navigationBarTitleText": "全部会员",
"usingComponents": {}
"navigationBarTitleText": "我的会员",
"usingComponents": {
"empty" : "../../../../component/empty/empty"
}
}
\ No newline at end of file
<!--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}}">
<block wx:for="{{list}}" wx:key="{{index}}" wx:for-item="item">
......@@ -13,5 +20,7 @@
</view>
<!-- 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{
/* tag-name */
.tag-name{
width: 100%;
height: 80rpx;
height: 100rpx;
background: #ffffff;
display: flex;
align-items: center;
padding: 0 30rpx;
margin-bottom: 10rpx;
border-top: solid 2rpx #eeeeee;
border-bottom: solid 2rpx #eeeeee;
justify-content: space-between;
}
.tag-name image{
width: 20rpx;
margin-right: 10rpx;
.tag-name:active{
background: #f2f2f2;
}
.tag-name .right-image{
width: 26rpx;
height: 26rpx;
}
.tag-name label{
font-weight: bold;
color: #333333;
margin-right: 30rpx;
}
.tag-name .tag{
height: 40rpx;
font-size: 24rpx;
padding: 4rpx 20rpx;
border-radius: 20rpx;
margin-right: 20rpx;
color: #0091FF ;
background-color: rgba(0, 145, 255, 0.1);
display: flex;
align-items: center;
font-size: 28rpx;
}
.tag-name .tag image{
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
}
/* list */
.list{
padding: 20rpx;
/* padding: 20rpx; */
width: 100%;
height: auto;
background: #ffffff;
}
.list .item{
......@@ -63,8 +73,11 @@ view{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
border-radius: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.list .item:last-child{
border-bottom: none;
}
.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({
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png
// https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png
data: {
codeImg: '',
avator: '',
name :'',
codeImg: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/demo_qrcode.png',
avator: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png',
name :'谢中龙',
template : {},
cardImg : '',
companyName: '',
companyName: '上海舞象',
bottomTypeArr : [
{
name: "关注公众号",
......
{
"navigationBarTitleText": "对外名片",
"navigationBarTitleText": "招募",
"disableScroll" : true,
"usingComponents": {
"painter": "/component/painter/painter"
"painter": "/component/painter/painter",
"tab-bar": "../../../component/tabBar/tabBar"
}
}
\ No newline at end of file
......@@ -29,3 +29,5 @@
</view>
<!-- tabbar -->
<tab-bar index="{{1}}"></tab-bar>
\ No newline at end of file
......@@ -3,25 +3,25 @@ page{
background: #f2f2f2;
box-sizing: border-box;
-webkit-box-sizing: border-box;
overflow: hidden;
position: relative;
padding-bottom: 106rpx;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.qrcode{
padding: 50rpx;
padding-top: 130rpx;
padding-top: 89rpx;
width: 100%;
background-position: center;
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);
margin-top: 30rpx;
/* margin-top: 30rpx; */
position: relative;
}
......@@ -29,7 +29,7 @@ view{
position: absolute;
display: flex;
color: #0091FF;
top: 30rpx;
top: 35rpx;
left: 0;
align-items: center;
justify-content: center;
......@@ -45,7 +45,7 @@ view{
.qrcode .card{
width: 100%;
height: auto;
padding: 100rpx 30rpx;
padding: 60rpx 30rpx;
background: transparent;
border-radius: 10rpx;
display: flex;
......@@ -57,14 +57,14 @@ view{
.qrcode .card .g-qrcode{
width: 320rpx;
height: 320rpx;
margin-bottom: 40rpx;
margin-bottom: 30rpx;
border-radius: 10rpx;
}
.qrcode .card .g-logo{
width: 140rpx;
height: 140rpx;
margin-bottom: 25rpx;
margin-bottom: 20rpx;
border-radius: 50%;
}
......@@ -72,7 +72,7 @@ view{
font-size: 36rpx;
color: #333333;
font-weight: bold;
margin-bottom: 20rpx;
margin-bottom: 10rpx;
}
.qrcode .card .company{
......@@ -82,9 +82,6 @@ view{
/* 底部操作按钮 */
.bottom-operator{
position: fixed;
bottom: 20rpx;
left: 0;
width: 100%;
height: 140rpx;
display: flex;
......@@ -93,6 +90,7 @@ view{
justify-content: center;
color: #666666;
font-size: 28rpx;
margin-top: 30rpx;
}
.bottom-operator .items{
......
......@@ -19,7 +19,7 @@ wxService.page({
*/
onLoad: function (options) {
console.log('options', options)
console.log(this.data)
options.id = '651730112529698816';
this.setData({
id: options.id
},()=>{
......@@ -77,9 +77,12 @@ wxService.page({
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
this.data.subStoreData = data.subStore ? JSON.parse(data.subStore) : [];
this.setData({
couponDetail: data
})
couponDetail: data,
subStoreData: this.data.subStoreData
});
this.getCouponGoods(data.couponId)
}
})
......@@ -93,55 +96,12 @@ wxService.page({
const {result,data} = res.data
if(result == 0){
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({
productData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.productData,
subStoreData: data.couponDetail && data.couponDetail.useCondition && data.couponDetail.useCondition.subStoreData
})
}
}).finally(() => {
wx.hideLoading()
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
......@@ -17,7 +17,11 @@
<view class="store-num">适用门店
<text class="store-num-tips">({{subStoreData.length}})</text>
</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 class="store-address" wx:if="{{subStoreData.length}}">
<view class="store-detail">
......
......@@ -76,16 +76,24 @@ page {
.scan-title .title-name {
min-width: 160rpx;
height: 32rpx;
height: auto;
color: rgba(0, 145, 255, 1);
font-size: 32rpx;
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 {
height: 24rpx;
color: rgba(51, 51, 51, 1);
font-size: 24rpx;
margin-top: 30rpx;
}
.scan-title .title-others {
height: 44rpx;
......
......@@ -15,12 +15,6 @@ wxService.page({
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
......@@ -32,38 +26,5 @@ wxService.page({
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