Commit 1e4a38b0 by 赵雅纹

Merge branch 'feature-zyw' into 'dev'

Feature zyw

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