Commit 1e4a38b0 by 赵雅纹

Merge branch 'feature-zyw' into 'dev'

Feature zyw

See merge request !34
parents e1490e1a 59648481
......@@ -35,18 +35,16 @@ App({
},
onShow: function (options = {}) {
console.log('app-onshow', options)
// 是不是第一次进入小程序
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
if (baseUserInfo) {
// wxService.getUserInfo()
}
if (options.referrerInfo.extraData!=null){
const { activate_ticket, card_id, code, errCode, wx_activate_after_submit_url } = options.referrerInfo.extraData
let urlData = wx_activate_after_submit_url.split("?");
let url = urlData[0];
let parmas = urlData[1];
// wxService.router(`${url}`).search(parmas);
// encodeURIComponent
// decodeURIComponent
wxService.router(`${url}`).search({
activate_ticket: encodeURIComponent(activate_ticket),
card_id,
......@@ -54,8 +52,6 @@ App({
errCode,
wx_activate_after_submit_url: parmas
});
// encodeURIComponent
// decodeURIComponent
// 激活成功 变更 _baseUserInfo
baseUserInfo.wechatCardId = card_id
......@@ -70,7 +66,7 @@ App({
console.log(res.status) // loaded
},
fail: function (res) {
console.log(res.status) // error
console.log(res.status) // error
}
})
......@@ -91,7 +87,6 @@ App({
checkFullSucreen () {
const self = this
wxService.getSystemInfo().then(res => {
debugger
if ((res.screenHeight - res.windowHeight - res.statusBarHeight - 32) > 72) {
     // 处理相关逻辑
self.globalData.isFullSucreen = true
......@@ -110,9 +105,10 @@ App({
storeId: '',
storeName: '',
loginFirst: false,
imageUrl:"", //图片地址
imageUrl: envInfo.imgCtx, //图片地址
isFullSucreen: false, // 当前设备是否为 FullSucreen
commonFunc: commonFunc,
// brandId: 2711,
// brandId: 2005,
brandId: 1001,
// brandId: 1002,
......
......@@ -8,7 +8,15 @@ Component({
* 组件的属性列表
*/
properties: {
isAuthorization: Boolean
isAuthorization: Boolean,
isAuthorizationActiveText: {
type: String,
value: ''
},
isAuthorizationType: {
type: Number,
value: 2
},
},
/**
......@@ -19,9 +27,8 @@ Component({
userInfo: {},
hasUserInfo: false,
env: envInfo.env,
checkAll: true,
checkAll: true
},
/**
* 组件的方法列表
*/
......@@ -32,7 +39,7 @@ Component({
})
},
handelToMemberRules() {
wxService.router('/pages/memberRules/memberRules?type=2')
wxService.router(`/pages/memberRules/memberRules?type=${this.data.isAuthorizationType}`)
},
//再想想
close() {
......@@ -75,6 +82,15 @@ Component({
})
}
},
handleActiveAgree() {
// 子组件触发父组件 去开卡
wxService.nextTick(() => {
this.triggerEvent('activeTocard', true)
})
this.setData({
isAuthorization: false
})
},
setUserInfo () {
// 判断有无开卡
// const memberActivateStatus = wx.getStorageSync('memberActivateStatus')
......
......@@ -4,10 +4,10 @@
<view class='auth-avatar'>
<image class='auth-avatar-img' src='/assets/imgs/auth-avatar.png'></image>
</view>
<view class='auth-shop'>
广东7-Eleven申请获取授权,用于会员服务
</view>
<button type='primary' bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class='agree' disabled='{{!checkAll}}'>同意</button>
<view class='auth-shop' wx:if="{{isAuthorizationActiveText}}">{{isAuthorizationActiveText}}</view>
<view class='auth-shop' wx:else>广东7-Eleven申请获取授权,用于会员服务</view>
<button type='primary' wx:if="{{!isAuthorizationActiveText}}" bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class='agree' disabled='{{!checkAll}}'>同意</button>
<button type='primary' wx:else class='agree' disabled='{{!checkAll}}' bindtap="handleActiveAgree">同意</button>
<view class='rule-wrap'>
<view class='agree-rule'>
<view class="agree-icon"><icon size="18" type="{{checkAll ? 'success' : 'circle'}}" bindtap="checkAll"></icon></view>
......
......@@ -75,8 +75,8 @@ Component({
} else if (link.type == 3) {
// 预览
wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if (link.type == 4) {
wxService.router(`${currentClickType}`)
......
......@@ -15,7 +15,11 @@ Component({
value: [],
},
},
attached() { },
attached() {
this.setData({
baseImgUrl: app.globalData.imageUrl
})
},
/**
* 组件的初始数据
*/
......@@ -26,7 +30,8 @@ Component({
circular: true,
interval: 5000,
duration: 1000,
isAuthorization: false // false 不显示 true 显示
isAuthorization: false, // false 不显示 true 显示
baseImgUrl: ''
},
/**
* 组件的方法列表
......@@ -61,8 +66,8 @@ Component({
} else if (link.type == 3) {
// 预览
wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if (link.type == 4) {
wxService.router(`${currentClickType}`)
......
......@@ -9,7 +9,7 @@
>
<block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item class="swiper-item">
<image src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
<image wx:if="{{baseImgUrl}}" src="{{baseImgUrl}}{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
</swiper-item>
</block>
</swiper>
......
......@@ -50,14 +50,17 @@ Component({
memberActivateStatus: false,
integralNum: 0,
couponNum: 0,
baseUrl: '/assets/imgs/060610.png',
// baseUrl: '/assets/imgs/060610.png',
baseUrl: '#02bb70',
isAuthorization: false,
_token: '',
currentMobile: ''
currentMobile: '',
baseImgUrl: ''
},
attached () {
this.setData({
personCenter: this.data.personData
personCenter: this.data.personData,
baseImgUrl: app.globalData.imageUrl
})
const { cardMember } = this.data
......@@ -75,10 +78,10 @@ Component({
// })
// }
let base64 = wx.getFileSystemManager().readFileSync(this.data.baseUrl, "base64");
this.setData({
baseUrl: "data:image/png;base64," + base64
})
// let base64 = wx.getFileSystemManager().readFileSync(this.data.baseUrl, "base64");
// this.setData({
// baseUrl: "data:image/png;base64," + base64
// })
},
methods: {
handleToMemberOfOwn() {
......
......@@ -2,22 +2,24 @@
<!--<view wx:if='{{!memberActivateStatus}}' class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{'background-image: url(../../assets/imgs/user-bg.png)'}}">
<button type="primary" plain='false' bindtap="handleTtoActiveMemebr">激活立享会员特权</button>
</view>-->
<view wx:if='{{!currentMobile}}' class="member-unActive" bindtap="handleTtoActiveMemebr">
<text class="un-active-btn" >升级7-Eleven会员2.0版本</text>
<view wx:if='{{!currentMobile}}' class="member-unActive {{personCenter.noactiveBackgroundImageUrl ?'':'member-unActive-bgc'}}" bindtap="handleTtoActiveMemebr">
<!-- <text class="un-active-btn">升级7-Eleven会员2.0版本</text>-->
<image wx:if="{{baseImgUrl}}" src="{{baseImgUrl}}{{personCenter.noactiveBackgroundImageUrl}}" class="no-active-img" mode="widthFix"></image>
</view>
<view wx:if='{{currentMobile}}' catchtap="handleToMemberOfOwn" class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{personData.backgroundImageUrl ? 'background-image: url('+ personData.backgroundImageUrl +');' : 'background-image: url(' + baseUrl + ');'}}">
<!--<view wx:if='{{currentMobile}}' catchtap="handleToMemberOfOwn" class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{personData.backgroundImageUrl ? 'background-image: url('+ personData.backgroundImageUrl +');' : 'background-image: url(' + baseUrl + ');'}}">-->
<view wx:if='{{currentMobile}}' catchtap="handleToMemberOfOwn" class="activation-content activation-bg {{true ? 'user-content' : ''}}" style="{{personData.backgroundImageUrl ? 'background-image: url('+ baseImgUrl +''+ personData.backgroundImageUrl +');' : 'background-color: ' + baseUrl + ';'}}">
<view class='user-info' wx:if='{{currentMobile}}'>
<view class="user-avatar">
<open-data type="userAvatarUrl"></open-data>
</view>
<view class='user-name-content'>
<view class='user-name'>
<open-data type="userNickName" class="userinfo-nickname" lang="zh_CN"></open-data>
<open-data type="userNickName" style="color:{{personCenter.fontColor}};" class="userinfo-nickname" lang="zh_CN"></open-data>
<!-- <navigator url='/pages/memberOfOwn/memberOfOwn' style='display:inline-block' hover-class="none">
<image class='icon-edit' src='/assets/imgs/711_12.png'></image>
</navigator> -->
</view>
<view class='user-id'>{{memberCardNo}}</view>
<view class='user-id' style="color:{{personCenter.fontColor}};">{{memberCardNo}}</view>
</view>
<view class='qr-code pr'>
......
......@@ -73,7 +73,11 @@
padding:0 0 5rpx 0;
box-sizing:border-box;
}
.no-active-img {
width: 100%;
height: 100% !important;
border-radius:15rpx;
}
.userinfo-nickname,.user-id {
color: #fff;
}
......@@ -89,17 +93,19 @@
.member-unActive{
margin: 18rpx 0;
background-color: rgb(11, 170, 52);
color: #FFF;
text-align: center;
height: 200rpx;
line-height: 200rpx;
border-radius: 6rpx;
border-radius: 15rpx;
font-size: 36rpx;
font-weight: 700;
letter-spacing: 5rpx;
cursor: pointer;
}
.member-unActive-bgc {
background-color: #02bb70;
}
.un-active-btn{
/* font-family:"iconfont-711" !important; */
}
......
......@@ -15,14 +15,21 @@ Component({
value: [],
},
},
attached() { },
attached() {
this.setData({
baseImgUrl: app.globalData.imageUrl
})
},
/**
* 组件的初始数据
*/
data: {
imagewidth: 0,//缩放后的宽
imageheight: 0,//缩放后的高
isAuthorization: false
isAuthorization: false,
isAuthorizationActiveText: '',
isAuthorizationType: 2,
baseImgUrl: ''
},
/**
* 组件的方法列表
......@@ -42,7 +49,7 @@ Component({
const accountInfo = utils.getAccountInfo()
const userInfo = wx.getStorageSync('_baseUserInfo')
// 2019.06.14
// 2019.06.14
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if (link.type == 1) {
// 触发父组件更新页面 外部小程序
......@@ -51,13 +58,11 @@ Component({
})
return false
} else if (!userInfo) {
// userInfo 不存在 授权弹框
this.setData({
isAuthorization: true
})
return false
} else if (userInfo && userInfo.member && !userInfo.member.mobile) {
wxService.openCard()
return false
}
if (link.type == 2) {
......@@ -68,19 +73,35 @@ Component({
} else if (link.type == 3) {
// 预览
wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if (link.type == 4) {
wxService.router(`${currentClickType}`)
} else if (link.type == 5) {
console.log('currentClickType', currentClickType)
if (currentClickType == 1) {
// wxService.openCardList()
wxService.openCard()
} else if (currentClickType == 2) {
wxService.openCard()
// if (userInfo && userInfo.member && userInfo.member.mobile && !userInfo.memberActivateStatus) {
// // 手机号存在 但未激活 跳转激活领卡页面 老用户
// this.setData({
// isAuthorizationActiveText: '新激活领卡',
// isAuthorization: true,
// isAuthorizationType: 3
// }, () => {
// return false
// })
// }
}
}
},
activeTocard(e) {
if (e.detail) {
wxService.openCard()
}
}
}
})
......@@ -2,11 +2,11 @@
<!--<view class="pic-nav">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item">
<view class="nav-block" style="width: {{imagewidth}}px;height: {{imageheight}}px;">
<image style="width: {{imagewidth}}px;height: {{imageheight}}px;" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindload="imageLoad" bindtap='preview' />
<image style="width: {{imagewidth}}px;height: {{imageheight}}px;" wx:if="{{baseImgUrl}}" src="{{baseImgUrl}}{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindload="imageLoad" bindtap='preview' />
</view>
</block>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
-->
<view class="pic-nav"><view wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item" class="nav-block" style="width: {{imagewidth}}px;height: {{imageheight}}px;"><image class="pic-img" style="width: {{imagewidth}}px;height: {{imageheight}}px;" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindload="imageLoad" bindtap='preview'/></view></view>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
\ No newline at end of file
<view class="pic-nav"><view wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item" class="nav-block" style="width: {{imagewidth}}px;height: {{imageheight}}px;"><image wx:if="{{baseImgUrl}}" class="pic-img" style="width: {{imagewidth}}px;height: {{imageheight}}px;" src="{{baseImgUrl}}{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindload="imageLoad" bindtap='preview'/></view></view>
<authorization-modal isAuthorization='{{isAuthorization}}' bind:activeTocard="activeTocard" isAuthorizationType="{{isAuthorizationType}}" isAuthorizationActiveText="{{isAuthorizationActiveText}}"/>
\ No newline at end of file
......@@ -15,12 +15,16 @@ Component({
value: [],
},
},
attached () {},
attached () {
this.setData({
baseImgUrl: app.globalData.imageUrl
})
},
/**
* 组件的初始数据
*/
data: {
baseImgUrl: ''
},
/**
* 组件的方法列表
......@@ -29,8 +33,8 @@ Component({
preview(e) {
const {url,currentUrl} = e.currentTarget.dataset
wx.previewImage({
current: `https://images.unsplash.com/${currentUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${url}`] // 需要预览的图片http链接列表
current: `${app.globalData.imageUrl}/${currentUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${url}`] // 需要预览的图片http链接列表
})
}
}
......
<!--component/picNav/picNav.wxml-->
<view class="pic-nav">
<block wx:for="{{picNav}}" wx:key="{{index}}" wx:for-item="item" class="pic-content">
<view class="pic-item"><image class="pic-img" src="http://testimg3.bigaka.com{{item.imageUrl}}" data-current-url="{{item.imageUrl}}" data-url="{{item.link.url}}" bindtap='preview' mode="scaleToFill"/></view>
<view class="pic-item"><image wx:if="{{baseImgUrl}}" class="pic-img" src="{{baseImgUrl}}{{item.imageUrl}}" data-current-url="{{item.imageUrl}}" data-url="{{item.link.url}}" bindtap='preview' mode="scaleToFill"/></view>
</block>
</view>
......@@ -9,10 +9,16 @@ const needMock = '' //
// const devCtx = 'http://111.231.86.64'
const devCtx = 'http://buyer.devapi.bigaka.net' // 开发环境
const testCtx = 'https://crm-b.bigaka.net/api' // 发预生产时解开此注释
const testCtx = 'https://crm-b.bigaka.net/api' // 发测试时解开此注释
const preCtx = 'https://crm-b.bigaka.com/api' // 发预生产时解开此注释
const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释
const devImgCtx = 'http://testimg3.bigaka.com' // 开发环境图片地址
const testImgCtx = 'http://testimg3.bigaka.com' // 测试环境图片地址
const preImgCtx = 'http://testimg3.bigaka.com' // 预生产环境图片地址
const prodImgCtx = 'http://testimg3.bigaka.com' // 预生产环境图片地址
// const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址
const config = {
dev: devCtx,
test: testCtx,
......@@ -20,10 +26,18 @@ const config = {
prod: prodCtx
}
const imgConfig = {
dev: devImgCtx,
test: testImgCtx,
pre: preImgCtx,
prod: prodImgCtx
}
const envInfo = (() => {
return {
ctx: config[PROJECT_ENV],
env: PROJECT_ENV
env: PROJECT_ENV,
imgCtx: imgConfig[PROJECT_ENV]
}
})()
......
......@@ -2,8 +2,8 @@
<view class='page-integral-mall' style="padding-bottom: 40rpx">
<view class='integral-vip-rules' wx:if="{{integralCouponList.length}}" bindtap="handleGoMemberRulesRules">会员规则</view>
<view class='coupon-wrap' wx:if="{{integralCouponList.length}}">
<view class='coupon-list' wx:for="{{integralCouponList}}" wx:for-item="item" wx:for-index="k" wx:key="{{k}}">
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png'></image>
<view class='coupon-list' wx:for="{{integralCouponList}}" wx:for-item="item" wx:for-index="k" wx:key="{{k}}" data-id="{{item.id}}" bindtap="goCouponDetail">
<view class="coupon-item">
<view class='coupon-img'>
<image wx:if="{{item.thumbnail}}" src='{{item.thumbnail}}'></image>
<image wx:else src='/assets/imgs/qr-code.png'></image>
......@@ -11,9 +11,10 @@
<view class='coupon-info'>
<view class='coupon-time fs-24'>{{item.point}}积分</view>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-desc fs-24' data-id="{{item.id}}" bindtap="goCouponDetail">查看详情 >>></view>
<view class='coupon-desc fs-24'>查看详情 >>></view>
</view>
<view class='coupon-code fs-24' data-id="{{item.id}}" data-point="{{item.point}}" bindtap='exchange'>立即兑换</view>
<view class='coupon-code fs-24' data-id="{{item.id}}" data-point="{{item.point}}" catchtap='exchange'>立即兑换</view>
</view>
</view>
</view>
<view class='empty-wrap' wx:if="{{!integralCouponList.length}}">
......
......@@ -4,7 +4,7 @@
.integral-vip-rules{
width:140rpx;
height:35rpx;
line-height: 40rpx;
line-height: 35rpx;
text-align: center;
color: rgb(64, 205, 147);
font-size: 28rpx;
......@@ -37,53 +37,51 @@
clear: both;
}
.coupon-list{
width: 712rpx;
height: 209rpx;
position: relative;
margin-bottom: 20rpx;
}
.coupon-bg{
width: 712rpx;
height: 209rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
.coupon-item {
display: flex;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsgAAADRCAYAAADR7UQMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACddJREFUeNrs3X+IpHUdwPHv3awz+sR4F7eWjuZZik9koMlKRWn7R/0jxJ1/iIqQlv4hEajQP/4RnUhEUHQQhH8onoJQRORh+UcFKRIRLbpHZj6ScudjK/5YvPPJJ2e5aZvv7AztXet5M3u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.coupon-img image{
width: 172rpx;
height: 172rpx;
position: absolute;
top: 18rpx;
left: 16rpx;
}
.coupon-info{
position: absolute;
top: 30rpx;
left: 236rpx;
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name{
color:#333;
}
.coupon-time{
color:#fc921e;
margin-top: 10rpx;
margin-bottom: 18rpx;
font-size: 26rpx;
}
.coupon-desc{
color:#999;
margin-top: 20rpx;
margin-top: 11rpx;
width: 360rpx;
font-size: 24rpx;
}
.coupon-code{
color: #ffffff;
position: absolute;
right: 20rpx;
top: 43rpx;
width: 24rpx;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.invalid-coupon{
width: 100%;
......
......@@ -61,11 +61,11 @@ wxService.page({
title: `${res.desc}`,
icon: 'none'
})
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
}
}).finally(() => {
wx.hideLoading()
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
})
},
handelReLogin(){
......@@ -91,7 +91,7 @@ wxService.page({
reject(res)
}
},()=>{
wxService.router(`/pages/userCenter/userCenter`)
wxService.router(`/pages/userCenter/userCenter`).replace()
})
},
/**
......
{}
\ No newline at end of file
{
"navigationBarTitleText": "激活卡面",
"usingComponents": {}
}
\ No newline at end of file
......@@ -31,6 +31,7 @@ wxService.page({
}
},
onLoad() {
wx.hideShareMenu();
// const {cardno} = this.data
// // 条形码
// if(cardno){
......
{
"navigationBarTitleText": "券码详情页",
"navigationBarTitleText": "会员券详情页",
"usingComponents": {}
}
\ No newline at end of file
......@@ -23,6 +23,9 @@ wxService.page({
cardno
})
},
onLoad() {
wx.hideShareMenu();
},
// 卡券详情
getCouponDetail(id){
......@@ -38,7 +41,7 @@ wxService.page({
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.couponSetting.startTime.substring(0, 10) + ' 至 ' + data.couponSetting.endTime.substring(0, 10)
data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10)
}
}
this.setData({
......
......@@ -48,11 +48,12 @@
font-weight: bold;
}
.integral-detail{
margin-top: 90rpx;
margin: 90rpx 0 160rpx 0;
padding: 0 30rpx;
}
.integral-list{
margin-bottom: 60rpx;
font-size: 27rpx;
}
.integral-title,.integral-desc{
display: inline-block;
......
......@@ -83,6 +83,7 @@ wxService.page({
this.getCouponList(1,10,0)
},
handelPresentCouponDetail(e) {
console.log('1111')
let {cardno} = e.currentTarget.dataset
wxService.router(`/pages/couponDetail/couponDetail`).search({cardno})
},
......
......@@ -16,18 +16,18 @@
wx:for-index="k"
wx:key="{{k}}"
>
<view>
<view data-title="{{item.title}}" data-cardNo="{{item.cardNo}}" data-id="{{item.couponId}}" bindtap="handelPresentCouponDetail">
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png'/>
<view class='coupon-img' data-title="{{item.title}}" data-cardNo="{{item.cardNo}}" data-id="{{item.couponId}}" bindtap="handelPresentCouponDetail">
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info' data-title="{{item.title}}" data-cardNo="{{item.cardNo}}" data-id="{{item.couponId}}" bindtap="handelPresentCouponDetail">
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}" bindtap="handelPresentCouponCode">出示劵码</view>
<view class='coupon-img' >
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}" catchtap="handelPresentCouponCode">出示劵码</view>
</view>
</view>
</view>
......@@ -63,7 +63,7 @@
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24'>出示劵码</view>
</view>
......
......@@ -53,7 +53,7 @@ scroll-view{
position: absolute;
top: 0;
left: 0;
z-index: -1;
/* z-index: -1; */
}
.coupon-img image{
width: 172rpx;
......
......@@ -39,6 +39,12 @@ wxService.page({
const {result,data} = res.data
if(result == 0){
wx.hideLoading()
data.desc = JSON.parse(data.desc)
for (let i in data.desc) {
if (data.desc[i].type == 1) {
data.desc[i].value = data.startTime.substring(0, 10) + ' 至 ' + data.endTime.substring(0, 10)
}
}
this.setData({
integralMallDetail: data
})
......
......@@ -2,7 +2,7 @@
<view class='page-integral-detail'>
<view class='coupon-wrap'>
<view class='coupon-list'>
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png' />
<view class='coupon-img'>
<image wx:if="{{integralMallDetail.thumbnail}}" src='{{integralMallDetail.thumbnail}}'></image>
<image wx:else src='/assets/imgs/qr-code.png'></image>
......@@ -13,10 +13,16 @@
</view>
<view class='coupon-code fs-24' bindtap='exchange'>立即兑换</view>
</view>
<view class='integral-detail' wx:if="{{integralMallDetail.desc}}">
<view class='integral-detail'>
<view class='integral-list' wx:for="{{integralMallDetail.desc}}" wx:key="{{index}}">
<text class='integral-title'>{{item.label}}</text>
<text class='integral-desc'>{{item.value}}</text>
</view>
</view>
<!-- <view class='integral-detail' wx:if="{{integralMallDetail.desc}}">
<image src='{{integralMallDetail.desc}}' mode="widthFix" style="width: 100%;"></image>
<!-- <button type='primary' class="redeem-now" bindtap='exchange'>立即兑换</button>-->
</view>
<button type='primary' class="redeem-now" bindtap='exchange'>立即兑换</button>
</view> -->
</view>
</view>
<view class="position-bottom">
......
......@@ -6,10 +6,12 @@
margin-bottom: 150rpx;
}
.coupon-list{
width: 712rpx;
height: 209rpx;
position: relative;
margin-bottom: 20rpx;
display: flex;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsgAAADRCAYAAADR7UQMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACddJREFUeNrs3X+IpHUdwPHv3awz+sR4F7eWjuZZik9koMlKRWn7R/0jxJ1/iIqQlv4hEajQP/4RnUhEUHQQhH8onoJQRORh+UcFKRIRLbpHZj6ScudjK/5YvPPJJ2e5aZvv7AztXet5M3u3zD7zesHD3o+dhf3wzM57vvudZ7YsLy+HE9jdP67oHpcHmCz3do896/was93jD0YJwBh5qv/4tC5X/flHbz9TvLp9M33j5ze2Hf3EWTveuiQ55zfnNc6+776Lrz201udNneBBfV/32OkcYoKdijv9RcYIwJj50qn4IpstjqN/to9MdY9znz788m1nT535jUPvvb3/kctuvu74z9u6xm33hJUVL3HMpJsdk68BAKfa7vXc+Nsv7r9hsw/gnaPvbXn0tbnds3M/ee07Lz2x80SBvLd7fNc5Az2XrzNwt6/3BxAAjGMgP/fua9+ryiCePvzyub98/cDf3y+Q46DudL7AMfas87bbjBCAMXRLWHmN2dDi6vHvFrOLqzSMrHzjrN0HHnz2+ECOK137nCvwf+I+rb0j3O5WTzgBGHOPhSFfbxO3Ijzx1vMPVXEYj7/53BWDrSNbVz2YW+mCtd055BPIeH96yNgAGHNx3+2T4SRfUH7PP379xbgVIa62VnUgg60jW/qXeZsPLuMGH+RA97ir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nADZNE4aVxZ8T+trfHv3V428+t+udo+9tqeogzm9sO/rK1XvOGOxB3uvcgBPG8exJxHEUfxuzO6ysNAPAuPvMyXbgI5fdfN1trc/ddPbUmctVHcbnt3/8j/HjIJCfDCtL68CxjvTj+PCQt7u1H9YAMK7iyvH8MDf44aW7fv7Vcz69v4rDiOF/aXLOLasDefCAfsS5Ase4a4Q4Xn2fAoBxFBdGR9pBEFeSr2xecLhqA7np3Ct/cN/F1x46PpAPhpWVMpEMK+J9Yd86bj8f/GYGgPG0nse3cNW2C++v0jC+3vrsgz/95PX3DP6+dY0H9BjJh5w30Hvx6jh8DQAYq8e41TG5mcVtFTGOH/jUjbev/ve13igkRvIV3ePeYDWZyXbwFHyNeWMEYMzEhdB1b5FIk4/8ezOH8Vd2pC/dccEXrjk+jqPBZd5OZLZ/wCQ+u15v4F4U7EUGYLwcDOvcYhHd/vzPHig67Us22zcf3whkxxkfun+w33gt/xVgAJby87DGApohAAAAAElFTkSuQmCC")
}
.coupon-bg{
width: 712rpx;
......@@ -19,17 +21,17 @@
left: 0;
z-index: -1;
}
.coupon-img {
padding: 15rpx;
box-sizing: border-box;
}
.coupon-img image{
width: 172rpx;
height: 172rpx;
position: absolute;
top: 18rpx;
left: 16rpx;
}
.coupon-info{
position: absolute;
top: 30rpx;
left: 236rpx;
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name{
color:#fc9210;
......@@ -41,18 +43,20 @@
}
.coupon-code{
color: #ffffff;
position: absolute;
right: 20rpx;
top: 38rpx;
width: 24rpx;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.integral-detail{
margin-top: 90rpx;
}
.integral-list{
margin-bottom: 60rpx;
font-size: 27rpx;
}
.integral-title,.integral-desc{
display: inline-block;
......
......@@ -41,7 +41,9 @@ wxService.page({
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {},
onLoad (options) {
wx.hideShareMenu();
},
/**
* 生命周期函数--监听页面显示
......
......@@ -13,17 +13,21 @@ wxService.page({
type:''
},
onLoad:function(options){
if (options.type == 1){
onLoad(options) {
const { type } = options
if (type == 1){
wx.setNavigationBarTitle({
title: '积分规则',
title: '积分规则'
})
}else if (type == 3){
wx.setNavigationBarTitle({
title: '激活规则'
})
}
this.setData({
type: options.type
type: type
})
this.getRule(options.type)
this.getRule(type)
},
/**
......@@ -36,9 +40,8 @@ wxService.page({
//获取规则
getRule(TYPE){
wxService.get(`/merchant/brandRuleDescSet/get?type=${TYPE}&brandId=${app.globalData.brandId}`).then(res => {
console.log(res)
this.setData({
ruleImg: res.data.data.content
ruleImg: res.data && res.data.data && res.data.data.content || ''
})
})
}
......
......@@ -68,6 +68,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow () {
console.log('---', app.globalData.imageUrl)
// 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const cardMember = wx.getStorageSync('_cardMember')
......
......@@ -2,7 +2,6 @@
<view class='user-center'>
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!--{{pItem.type}}-->
<!-- 轮播 -->
<view class="pd1530" wx:if="{{pItem.type == 1}}">
......
......@@ -19,7 +19,7 @@
"hidedInDevtools": []
},
"isGameTourist": false,
"condition": {
"condition": {
"search": {
"current": -1,
"list": []
......
......@@ -63,7 +63,6 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow () {
console.log('this..sub.', this.options)
const { pageId } = this.options
this.setData({
token: wx.getStorageSync('token'),
......
......@@ -15,7 +15,7 @@
</view>
<!-- 图片导航 {{pItem.navigation.images}} pd1530-->
<view class="pd1530" wx:if="{{pItem.type == 3}}">
<view class="pd1520" wx:if="{{pItem.type == 3}}">
<pic-nav bind:updatePage="updatePage" pic-nav="{{pItem.navigation.images}}" />
</view>
<!-- 底部 -->
......@@ -25,4 +25,3 @@
</block>
</view>
<authorization-modal isAuthorization='{{isAuthorization}}'/>
......@@ -2,6 +2,7 @@ const wxService = require('./wxService')
const moment = require('../lib/moment.min')
const Promise = require('../lib/bluebird')
const _ = require('../lib/underscore.min')
const envInfo = require('../config/index').envInfo
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
......@@ -28,7 +29,9 @@ function getCurrentPageUrlWithArgs() {
var url = currentPage.route // 当前页面url
var options = currentPage.options // 如果要获取url中所带的参数可以查看options
// 拼接url的参数
/**
* 拼接url的参数
*/
var urlWithArgs = url + '?'
for (var key in options) {
var value = options[key]
......@@ -38,7 +41,6 @@ function getCurrentPageUrlWithArgs() {
return urlWithArgs
}
/**
* 获取当前帐号信息
*/
......@@ -278,7 +280,6 @@ function getUserInfoByBtn(userInfo) {
}, (err) => {
return Promise.reject(err)
}).then(response => {
console.log(JSON.stringify(response))
logger.log('getCrmUserInfo response', response)
if (response.data.data.rspCode === -1) {
return Promise.reject(response.data.data)
......
......@@ -47,7 +47,10 @@ class WXService extends Http {
this.setPageLoadStatus()
wx.hideLoading()
}).catch(res => {
if (res.msg.indexOf('未登录') > -1) {
if (res.msg && res.msg.indexOf('未登录') > -1) {
// 判断是否登陆过 登陆过 重新登陆 未登陆 跳转首页
const baseUserInfo = this.getBaseUserInfo()
if(!baseUserInfo) wxService.router('/pages/userCenter/userCenter').replace()
// 重新登陆 更新缓存
this.reLogin()
setTimeout(()=>{
......@@ -525,7 +528,7 @@ class WXService extends Http {
reject({ state: 0 })
}
})
// 注释原因 所有跳转前 判断新老会员
// return new Promise((resolve, reject) => {
// if (baseUserInfo && baseUserInfo.member && baseUserInfo.member.mobile) {
// console.log('已开卡')
......
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