Commit 0ecea4fb by 谢中龙

积分换物,导购

parent c6492af2
...@@ -40,7 +40,15 @@ App({ ...@@ -40,7 +40,15 @@ App({
}, },
onShow: function (options = {}) { onShow: function (options = {}) {
console.log('app_onshow========', options) console.log('场景值 ========', options.scene)
//判断是不是在企业微信中通过工作台打开的
if(options.scene == 1119){
wx.redirectTo({
url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
});
return ;
}
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
// 获取当前会员是否是体验者 // 获取当前会员是否是体验者
const { member } = baseUserInfo const { member } = baseUserInfo
...@@ -79,9 +87,6 @@ App({ ...@@ -79,9 +87,6 @@ App({
// console.log(res.status) // error // console.log(res.status) // error
// } // }
// }) // })
}, },
onHide: function () { onHide: function () {
this.globalData.loginFirst = false this.globalData.loginFirst = false
...@@ -113,7 +118,7 @@ App({ ...@@ -113,7 +118,7 @@ App({
systemInfo: wx.getSystemInfoSync(), systemInfo: wx.getSystemInfoSync(),
ctx: envInfo.ctx, ctx: envInfo.ctx,
openCard: false, openCard: false,
appId: 'wx313ec36b710125d4', appId: 'wxac09792264c49b5c',
userNo: null, userNo: null,
storeId: '', storeId: '',
storeName: '', storeName: '',
...@@ -127,8 +132,8 @@ App({ ...@@ -127,8 +132,8 @@ App({
// brandId: 2711, // brandId: 2711,
// brandId: 2005, // brandId: 2005,
// brandId: 1001, // brandId: 1001,
// brandId: 1002, brandId: 1002,
brandId: 3001, // brandId: 3001,
// brandId: 3002, // brandId: 3002,
} }
}) })
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
"pages/shopping/kpi/kpi", "pages/shopping/kpi/kpi",
"pages/shopping/welfare/welfare", "pages/shopping/welfare/welfare",
"pages/shopping/performance/performance" "pages/shopping/performance/performance"
], ],
"subPackages": [ "subPackages": [
{ {
...@@ -60,7 +61,9 @@ ...@@ -60,7 +61,9 @@
"pages/scanCoupon/scanCoupon", "pages/scanCoupon/scanCoupon",
"pages/scanCouponStoreList/scanCouponStoreList", "pages/scanCouponStoreList/scanCouponStoreList",
"pages/recordList/recordList", "pages/recordList/recordList",
"pages/IntegralMallGoods/IntegralMallGoods" "pages/IntegralMallGoods/IntegralMallGoods",
"pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo",
"pages/exchangeAddress/exchangeAddress"
] ]
}, },
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// 组件plus 中数据请求 token 修改 // 组件plus 中数据请求 token 修改
// app.js 中brandId 修改为对应 // app.js 中brandId 修改为对应
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test, 预生产 pre const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const needMock = '' // const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2 // appid_dev_wx wxc3b64b09b1d3dfc2
......
...@@ -72,7 +72,8 @@ wxService.page({ ...@@ -72,7 +72,8 @@ wxService.page({
}, },
// 去积分商城 // 去积分商城
handleGoIntegralMall() { handleGoIntegralMall() {
wxService.router(`/pages/IntegralMall/IntegralMall`) // wxService.router(`/pages/IntegralMall/IntegralMall`)
wxService.router(`/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods`);
}, },
// 消费详情 // 消费详情
handleGoDetail(e) { handleGoDetail(e) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wx313ec36b710125d4", "appid": "wxac09792264c49b5c",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E", "projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 63, "current": 64,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
{ {
"id": 8, "id": 8,
"name": "积分商城", "name": "积分商城",
"pathName": "pages/IntegralMall/IntegralMall", "pathName": "subPackage/page/pages/IntegralMallGoods/IntegralMallGoods",
"query": "" "query": ""
}, },
{ {
...@@ -460,7 +460,14 @@ ...@@ -460,7 +460,14 @@
"id": -1, "id": -1,
"name": "积分商城新", "name": "积分商城新",
"pathName": "subPackage/page/pages/IntegralMallGoods/IntegralMallGoods", "pathName": "subPackage/page/pages/IntegralMallGoods/IntegralMallGoods",
"query": "",
"scene": null "scene": null
},
{
"id": -1,
"name": "填写兑换地址",
"pathName": "subPackage/page/pages/exchangeAddress/exchangeAddress",
"query": "type=1"
} }
] ]
} }
......
...@@ -63,12 +63,14 @@ wxService.page({ ...@@ -63,12 +63,14 @@ wxService.page({
//获取企业二维码 //获取企业二维码
getEnterpriseQrcode(){ getEnterpriseQrcode(){
let guideCodeImg = wx.getStorageSync('guideCodeImg'); let guideCodeImg = wx.getStorageSync('guideCodeImg');
console.log('guideCodeImg---', guideCodeImg)
if (!guideCodeImg){ if (!guideCodeImg){
wx.qy.getQrCode({ wx.qy.getQrCode({
success: res => { success: res => {
this.setData({ this.setData({
codeImg: res.qrCode codeImg: res.qrCode
}); });
console.log('res----logo---', res)
wx.setStorageSync('guideCodeImg', res.qrCode); wx.setStorageSync('guideCodeImg', res.qrCode);
}, },
fail: res => { fail: res => {
...@@ -105,16 +107,50 @@ wxService.page({ ...@@ -105,16 +107,50 @@ wxService.page({
icon : 'none' icon : 'none'
}); });
return ; return ;
} }
let avatar = this.data.avator ? this.data.avator : 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png';
wx.showLoading({ wx.showLoading({
title: '图片生成中...', title: '图片生成中...',
}); });
this.setData({
template: new GuiderCard().palette(this.data.codeImg, avatar,this.data.name) let avatar = this.data.avator ? this.data.avator : 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png';
let self = this;
wx.downloadFile({
url: this.data.codeImg,
success(res){
if (res.statusCode === 200) {
let codeImg = res.tempFilePath;
wx.downloadFile({
url: avatar,
success(res) {
if (res.statusCode === 200) {
let avatarImg = res.tempFilePath;
console.log('头像---', avatarImg)
console.log('图片---', codeImg)
self.setData({
template: new GuiderCard().palette(codeImg, avatarImg, self.data.name)
});
}
},
fail(res) {
wx.showToast({
title: '头像下载失败',
icon: 'none'
});
}
});
}
},
fail(res){
wx.showToast({
title: '二维码下载失败',
icon : 'none'
})
}
}); });
}, },
/** /**
......
...@@ -126,6 +126,7 @@ wxService.page({ ...@@ -126,6 +126,7 @@ wxService.page({
let inner_tentacleId = Integer.digit(tentacleId, 10, 64); let inner_tentacleId = Integer.digit(tentacleId, 10, 64);
var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId; var path = 'subPackage/page/pages/scanCoupon/scanCoupon' + '?i=' + inner_id + '&t=' + inner_tentacleId;
console.log('-0-00', path) console.log('-0-00', path)
//打开企业微信通讯录选择会员 //打开企业微信通讯录选择会员
wx.qy.shareToExternalContact({ wx.qy.shareToExternalContact({
appid: app.globalData.appId,//小程序的appid appid: app.globalData.appId,//小程序的appid
......
...@@ -95,7 +95,8 @@ ...@@ -95,7 +95,8 @@
<view>{{item.typeText}}</view> <view>{{item.typeText}}</view>
</view> </view>
<view class='coupon-item-rg'> <view class='coupon-item-rg'>
<view class='qrcode' data-item="{{item}}" bindtap='onTapShowQrcode' wx:if="{{item.drawType == 2}}"> <!-- wx:if="{{item.drawType == 2 -->
<view class='qrcode' data-item="{{item}}" bindtap='onTapShowQrcode' >
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/walare_qrcode.png' mode='aspectFit'></image> <image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/walare_qrcode.png' mode='aspectFit'></image>
</view> </view>
<view class='coupon-title'>{{item.title}}</view> <view class='coupon-title'>{{item.title}}</view>
...@@ -103,7 +104,8 @@ ...@@ -103,7 +104,8 @@
<view class='text-btn'> <view class='text-btn'>
<text class='theme-text-color'>数量:{{item.stock}}</text> <text class='theme-text-color'>数量:{{item.stock}}</text>
</view> </view>
<button class='info-btn' wx:if="{{item.drawType == 1}}" data-item="{{item}}" bindtap='onTapToSendConpon'>定向发送</button> <!-- wx:if="{{item.drawType == 1}}" -->
<button class='info-btn' data-item="{{item}}" bindtap='onTapToSendConpon'>定向发送</button>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -6,42 +6,28 @@ wxService.page({ ...@@ -6,42 +6,28 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
pageNo: 1,
pageSize: 10,
query: '', query: '',
totalPages: 0,
integralCouponList: [], // 积分兑换优惠券列表 integralCouponList: [], // 积分兑换优惠券列表
integralGoodsList: [ integralGoodsList: [], // 限量精品列表
{
id:"631891473612296192",
title: "鸭肫兑换券",
point: 1,
thumbnail: "https://img3.bigaka.com/prd/3001/201910/20191011/30017c228f98-99e9-425b-b24c-43ec65333ea8.jpg",
},
{
id:"631891473612296192",
title: "鸭肫兑换券",
point: 1,
thumbnail: "https://img3.bigaka.com/prd/3001/201910/20191011/30017c228f98-99e9-425b-b24c-43ec65333ea8.jpg",
},
{
id:"631891473612296192",
title: "鸭肫兑换券",
point: 1,
thumbnail: "https://img3.bigaka.com/prd/3001/201910/20191011/30017c228f98-99e9-425b-b24c-43ec65333ea8.jpg",
}
], // 限量精品列表
noMore: false, noMore: false,
isExchange: false, isExchange: false,
exchangeId: '', exchangeId: '',
exchangePoint: 0, exchangePoint: 0,
currentTab: 'goods' currentTab: 'coupon',
memberPoint : {
total : 0,
expirePoint : 0,
expireDate : ''
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { }, onLoad: function (options) {
this.initIntegralCouponList();
this.initIntegralProductList();
},
handelTab(e) { handelTab(e) {
let curTab = e.currentTarget.dataset.tab let curTab = e.currentTarget.dataset.tab
this.setData({ this.setData({
...@@ -52,21 +38,53 @@ wxService.page({ ...@@ -52,21 +38,53 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.initIntegralProductList() // this.initIntegralProductList()
// this.initIntegralCouponList() // this.initIntegralCouponList();
//获取会员积分信息
this.getMemberIntegrateInfo();
},
//积分换物记录
onTapToExchangeRecords(){
wx.navigateTo({
url: '/subPackage/page/pages/recordList/recordList',
});
},
//查询会员积分信息
getMemberIntegrateInfo(){
// wx.showLoading({
// title: '数据请求中..',
// });
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.get(`/member/memberPoint/getMemberPointInfo?memberId=${memberId}`).then(res => {
let data = res.data.data ? res.data.data : {};
this.data.memberPoint.total = data.point ? data.point : 0;
this.data.memberPoint.expirePoint = data.pointWillExpired ? data.pointWillExpired : 0;
this.data.memberPoint.expireDate = data.pointExpiredTime;
this.setData({
memberPoint: this.data.memberPoint
});
});
}, },
// 查询所有生效中的活动 限量精品 // 查询所有生效中的活动 限量精品
initIntegralProductList() { initIntegralProductList() {
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
wxService.get(`/coupon/pointsRedemptionProductSetting/getAllValid`).then(res => { wxService.get(`/member/pointsRedemptionProductSetting/getAllValid`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
wx.hideLoading() let list = data ? data : [];
if(list.length == 0){
this.data.currentTab = 'coupon';
}
else{
this.data.currentTab = 'goods';
}
this.setData({ this.setData({
integralCouponList: data.reverse() integralGoodsList: data? data : [],
currentTab: this.data.currentTab
}) })
} }
} }
...@@ -78,20 +96,8 @@ wxService.page({ ...@@ -78,20 +96,8 @@ wxService.page({
initIntegralCouponList() { initIntegralCouponList() {
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) });
// wxService.get(`/coupon/pointsRedemptionCouponSetting/findPage?pageNo=${pageNo}&pageSize=${pageSize}&query=${this.data.query}`).then(res => {
// const {result,data} = res.data
// if(result == 0){
// wx.hideLoading()
// this.setData({
// integralCouponList: this.data.pageNo == 1? [...data.content]: [...this.data.integralCouponList,...data.content],
// totalPages: data.totalPages
// })
// }
// }).finally(() => {
// wx.hideLoading();
// })
wxService.get(`/coupon/pointsRedemptionCouponSetting/getAllValid`).then(res => { wxService.get(`/coupon/pointsRedemptionCouponSetting/getAllValid`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
...@@ -99,7 +105,7 @@ wxService.page({ ...@@ -99,7 +105,7 @@ wxService.page({
wx.hideLoading() wx.hideLoading()
this.setData({ this.setData({
integralCouponList: data.reverse() integralCouponList: data.reverse()
}) });
} }
} }
}).finally(() => { }).finally(() => {
...@@ -117,8 +123,26 @@ wxService.page({ ...@@ -117,8 +123,26 @@ wxService.page({
}, },
// 立即兑换物品 // 立即兑换物品
exchangeGoods(e) { exchangeGoods(e) {
const { id, point } = e.currentTarget.dataset const { id, point } = e.currentTarget.dataset;
console.log('-立即兑换物品---') const { memberId } = wx.getStorageSync('_baseUserInfo')
//检查是不是可以兑换
wx.showLoading({
title: '检查兑换资格中..',
});
wxService.post(`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=${memberId}&settingId=${id}`).
then(res => {
if (res) {
wx.navigateTo({
url: '/subPackage/page/pages/exchangeAddress/exchangeAddress?id=' + id,
});
}
});
},
//跳转积分换物详情
// subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo
goIntegrateGoodsExchangeDetail(e){
const { id } = e.currentTarget.dataset
wxService.router(`/subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo?id=${id}`)
}, },
// 点击跳转至会员规则页 // 点击跳转至会员规则页
handleGoMemberRulesRules() { handleGoMemberRulesRules() {
...@@ -137,17 +161,6 @@ wxService.page({ ...@@ -137,17 +161,6 @@ wxService.page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
// if (this.data.pageNo < this.data.totalPages) {
// this.setData({
// pageNo: this.data.pageNo + 1,
// pageSize: 10,
// noMore: true
// })
// this.initIntegralCouponList(this.data.pageNo, this.data.pageSize)
// } else {
// this.setData({
// noMore: true
// })
// }
}, },
}) })
\ No newline at end of file
...@@ -8,16 +8,21 @@ ...@@ -8,16 +8,21 @@
<image class="point-img" src='/assets/imgs/integral_exchange/point.png' mode="widthFix" /> <image class="point-img" src='/assets/imgs/integral_exchange/point.png' mode="widthFix" />
</view> </view>
<view class='text-point'> <view class='text-point'>
1287 {{memberPoint.total}}
</view> </view>
</view> </view>
<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> </view>
<view class='title-time-point'>1000积分将于2020-12清零</view> <view class='title-time-point' wx:if="{{memberPoint.expirePoint > 0}}">
{{memberPoint.expirePoint}}积分将于{{memberPoint.expireDate}}清零
</view>
<view class='title-time-point' wx:if="{{memberPoint.expirePoint == 0}}">
暂无将过期积分
</view>
</view> </view>
<!-- tab --> <!-- tab -->
<view class='mall-tab'> <view class='mall-tab' wx:if="{{integralGoodsList.length > 0}}">
<view class="tab-coupon {{currentTab=='coupon' ? 'tab-active':''}}" data-tab="coupon" bindtap="handelTab">优惠券</view> <view class="tab-coupon {{currentTab=='coupon' ? 'tab-active':''}}" data-tab="coupon" bindtap="handelTab">优惠券</view>
<view class="tab-coupon-goods {{currentTab=='goods' ? 'tab-active':''}}" data-tab="goods" bindtap="handelTab">限量精品</view> <view class="tab-coupon-goods {{currentTab=='goods' ? 'tab-active':''}}" data-tab="goods" bindtap="handelTab">限量精品</view>
</view> </view>
...@@ -42,7 +47,7 @@ ...@@ -42,7 +47,7 @@
</view> </view>
<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-desc fs-24'>查看详情 >>></view> <view class='coupon-desc text-align-left fs-24'>查看详情 >>></view>
</view> </view>
</view> </view>
<view class='coupon-btn'> <view class='coupon-btn'>
...@@ -64,6 +69,9 @@ ...@@ -64,6 +69,9 @@
</view> </view>
<!-- goods --> <!-- goods -->
<view wx:if="{{currentTab =='goods'}}"> <view wx:if="{{currentTab =='goods'}}">
<view class='point-exchange-goods-records' bindtap='onTapToExchangeRecords'>
查看兑换记录 >>
</view>
<view class='coupon-wrap' wx:if="{{integralGoodsList.length}}"> <view class='coupon-wrap' wx:if="{{integralGoodsList.length}}">
<view <view
class='coupon-list' class='coupon-list'
...@@ -72,7 +80,7 @@ ...@@ -72,7 +80,7 @@
wx:for-index="k" wx:for-index="k"
wx:key="{{k}}" wx:key="{{k}}"
data-id="{{item.id}}" data-id="{{item.id}}"
bindtap="goCouponDetail" bindtap="goIntegrateGoodsExchangeDetail"
> >
<view class="coupon-item"> <view class="coupon-item">
<view class='coupon-img-title'> <view class='coupon-img-title'>
...@@ -82,7 +90,7 @@ ...@@ -82,7 +90,7 @@
</view> </view>
<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-desc fs-24'>查看详情积分</view> <view class='coupon-desc text-align-left fs-24'>查看详情积分</view>
</view> </view>
</view> </view>
<view class='coupon-btn'> <view class='coupon-btn'>
......
...@@ -95,6 +95,11 @@ page { ...@@ -95,6 +95,11 @@ page {
margin-top: 18rpx; margin-top: 18rpx;
} }
.text-align-left{
text-align: left !important;
}
.coupon-code { .coupon-code {
color: #ffffff; color: #ffffff;
word-wrap: break-word; word-wrap: break-word;
...@@ -130,14 +135,30 @@ page { ...@@ -130,14 +135,30 @@ page {
.title-img-point { .title-img-point {
display: flex; display: flex;
align-items: flex-end; align-items: center;
} }
.point-exchange-goods-records{
font-size: 28rpx;
color: #666666;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 30rpx;
padding-top: 20rpx;
}
.point-exchange-goods-records:active{
opacity: 0.7;
}
.text-point { .text-point {
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 42rpx; font-size: 42rpx;
margin-left: 10rpx;
} }
.mall-title { .mall-title {
height: 140rpx; height: 150rpx;
padding-left: 50rpx; padding-left: 50rpx;
padding-right: 42rpx; padding-right: 42rpx;
box-sizing: border-box; box-sizing: border-box;
...@@ -149,6 +170,7 @@ page { ...@@ -149,6 +170,7 @@ page {
padding-top: 30rpx; padding-top: 30rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
} }
.integral-vip-rules { .integral-vip-rules {
width: 133rpx; width: 133rpx;
...@@ -161,9 +183,10 @@ page { ...@@ -161,9 +183,10 @@ page {
} }
.title-time-point { .title-time-point {
color: rgba(102, 102, 102, 1); color: rgba(102, 102, 102, 1);
font-size: 18rpx; font-size: 20rpx;
text-align: left; text-align: left;
padding-top: 3rpx; padding-top: 3rpx;
margin-top: 15rpx;
} }
.mall-tab { .mall-tab {
......
// pages/integralMallDetail/integralMallDetail.js
const app = getApp()
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
const envInfo = require('../../../../config/index').envInfo
wxService.page({
/**
* 页面的初始数据
*/
data: {
isExchange: false,
integralMallDetail: {}
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
const { id } = this.options
// this.getIntegralCouponDetail('579702812007600128')
this.getIntegralCouponDetail(id)
},
//立即兑换
exchange() {
const { memberId } = wx.getStorageSync('_baseUserInfo');
const id = this.data.integralMallDetail.id;
//检查是不是可以兑换
wx.showLoading({
title: '检查兑换资格中..',
});
wxService.post(`/member/pointsRedemptionProductRecord/checkByMemberIdAndSettingId?memberId=${memberId}&settingId=${id}`).
then(res => {
console.log(res)
if(res){
wx.navigateTo({
url: '/subPackage/page/pages/exchangeAddress/exchangeAddress?id=' + id,
});
}
});
},
//获取积分兑换优惠券详情
getIntegralCouponDetail(id) {
wx.showLoading({
title: '加载中'
})
wxService.get(`/member/pointsRedemptionProductSetting/get/${id}`).then(res => {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
data.desc = JSON.parse(data.desc)
this.setData({
integralMallDetail: data
});
}
}).finally(() => {
wx.hideLoading()
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "积分换物详情",
"usingComponents": {
"go-home": "/component/goHome/goHome"
}
}
\ No newline at end of file
<!--pages/integralMallDetail/integralMallDetail.wxml-->
<view class='page-integral-detail'>
<view class='coupon-wrap'>
<view class='coupon-list'>
<view class='coupon-img'>
<image wx:if="{{integralMallDetail.thumbnail}}" src='{{integralMallDetail.thumbnail}}' />
<image wx:else src='/assets/imgs/qr-code.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{integralMallDetail.point}}积分</view>
<view class='coupon-desc fs-28'>{{integralMallDetail.title}}</view>
</view>
<view class='coupon-code fs-24' bindtap='exchange'>立即兑换</view>
</view>
<view class='integral-detail'>
<view class='integral-list' wx:for="{{integralMallDetail.desc}}" wx:key="{{index}}">
<text class='integral-title'>{{item.name}}</text>
<text class='integral-desc wpl'>{{item.desc}}</text>
</view>
</view>
</view>
</view>
<view class="position-bottom">
<button type='primary' class="redeem-now" bindtap='exchange'>立即兑换</button>
</view>
<!--goHome-->
<go-home/>
/* subPackage/page/pages/IntegrateGoodsExchangeInfo/IntegrateGoodsExchangeInfo.wxss */
/* pages/integralMallDetail/integralMallDetail.wxss */
@import '../../../../base/base.wxss';
.coupon-wrap{
padding: 20rpx;
clear: both;
margin-bottom: 150rpx;
}
.coupon-list{
height: 209rpx;
display: flex;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsgAAADRCAYAAADR7UQMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZ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B1b5FIk4/8ezOH8Vd2pC/dccEXrjk+jqPBZd5OZLZ/wCQ+u15v4F4U7EUGYLwcDOvcYhHd/vzPHig67Us22zcf3whkxxkfun+w33gt/xVgAJby87DGApohAAAAAElFTkSuQmCC")
}
.coupon-bg{
width: 712rpx;
height: 209rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.coupon-img {
padding: 15rpx;
box-sizing: border-box;
}
.coupon-img image{
width: 172rpx;
height: 172rpx;
}
.coupon-info{
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name{
color:#fc9210;
}
.coupon-desc{
color:#333333;
margin-top: 6rpx;
width: 360rpx;
}
.coupon-code{
color: #ffffff;
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;
}
.integral-title{
color: #999999;
vertical-align: top;
margin-right: 50rpx;
text-align: right;
width: 120rpx;
}
.integral-desc{
width: 500rpx;
color: #666666;
}
\ No newline at end of file
// subPackage/page/pages/exchangeAddress/exchangeAddress.js
const app = getApp()
const wxService = require('../../../../utils/wxService')
wxService.page({
/**
* 页面的初始数据
*/
data: {
region: [],
point : 0,
form : {
activateId: '',
name: '',
mobile: '',
distinct: '',
address: '',
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.form.activateId = options.id;
this.getIntegralCouponDetail(this.data.form.activateId);
},
//获取积分换物详情
//获取积分兑换优惠券详情
getIntegralCouponDetail(id) {
wx.showLoading({
title: '加载中'
});
wxService.get(`/member/pointsRedemptionProductSetting/get/${id}`).then(res => {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading();
this.setData({
point: data.point ? data.point : 0
});
}
}).finally(() => {
wx.hideLoading()
})
},
//省市区改变事件
bindRegionChange(e){
this.data.form.distinct = e.detail.value.join(',');
this.setData({
region: e.detail.value,
form: this.data.form
});
},
//选择微信地址
chooseWxAddress(){
let self = this;
wx.chooseAddress({
success(res) {
self.data.region = [res.provinceName, res.cityName, res.countyName];
self.data.form.distinct = self.data.region.join(',');
self.data.form.name = res.userName;
self.data.form.mobile = res.telNumber;
self.data.form.address = res.detailInfo;
self.setData({
region: self.data.region,
form: self.data.form
});
},
fail(err){
}
})
},
//输入框
onInput(e){
let prop = e.target.dataset.prop,
value = e.detail.value;
this.data.form[prop] = value;
this.setData({
form : this.data.form
})
},
//确认提交
onTapSubmit(){
if(!this.data.form.name){
wx.showToast({
title: '请输入收货人真实姓名',
icon : 'none'
});
return ;
}
if (!this.data.form.mobile) {
wx.showToast({
title: '请输入收货人手机号',
icon: 'none'
});
return;
}
if (!this.data.form.distinct) {
wx.showToast({
title: '请选择省市区',
icon: 'none'
});
return;
}
if (!this.data.form.address) {
wx.showToast({
title: '请输入详细地址',
icon: 'none'
});
return;
}
wx.showLoading({
title: '兑换中..',
});
wxService.post(`/member/pointsRedemptionProductSetting/exchange`,this.data.form).then(res => {
wx.hideLoading();
if (res.data.result == 0){
wx.showToast({
title: '兑换成功',
});
setTimeout(() => {
wx.navigateBack({
delta: 1
});
},300);
}
});
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
})
\ No newline at end of file
{
"navigationBarTitleText": "填写收货地址",
"usingComponents": {}
}
\ No newline at end of file
<!--subPackage/page/pages/exchangeAddress/exchangeAddress.wxml-->
<view class='exchange-info'>
确认使用 <label>{{point}}</label>积分兑换礼物
</view>
<view class='address'>
<view class='items'>
<text>请填写正确的收货地址,填写后无法修改</text>
<view class='choose-address' bindtap='chooseWxAddress'>获取微信地址</view>
</view>
<view class='address-form'>
<input placeholder='请输入收货人真实姓名' value='{{form.name}}' data-prop="name" bindinput='onInput' maxlength='20'></input>
</view>
<view class='address-form'>
<input placeholder='请输入收货人手机号' value='{{form.mobile}}' data-prop="mobile" bindinput='onInput' maxlength='20'></input>
</view>
<view class='address-form'>
<picker mode="region" bindchange="bindRegionChange" value="{{region}}">
<view class="picker">
{{form.distinct ? form.distinct : "请选择地区"}}
</view>
</picker>
</view>
<view class='address-form'>
<input placeholder='请输入收货人地址' value='{{form.address}}' data-prop="address" bindinput='onInput' maxlength='20'></input>
</view>
<view class='sumbit' bindtap='onTapSubmit'>确认</view>
</view>
\ No newline at end of file
/* subPackage/page/pages/exchangeAddress/exchangeAddress.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
font-size: 28rpx;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.exchange-info{
padding: 30rpx;
display: flex;
justify-content: center;
font-size: 32rpx;
color: #333333;
}
.exchange-info label{
color: #FF3333;
}
.address{
width: 100%;
height: auto;
padding: 40rpx;
}
.address .items{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
color: #666666;
margin-bottom: 20rpx;
}
.address .items .choose-address{
padding: 8rpx 15rpx;
font-size: 24rpx;
background: #76A1D5;
color: #ffffff;
border-radius: 8rpx;
}
.address .address-form{
width: 100%;
height: 70rpx;
margin-bottom: 30rpx;
}
.address .address-form input{
height: 100%;
border: solid 2rpx #eeeeee;
padding: 0 20rpx;
}
.address .address-form input::placeholder{
color: #999999;
}
.address .address-form .picker{
height: 70rpx;
border: solid 2rpx #eeeeee;
padding: 0 20rpx;
display: flex;
align-items: center;
color: #999999;
}
.address .sumbit{
width: 100%;
height: 80rpx;
background: #FF3333;
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
margin-top: 80rpx;
border-radius: 10rpx;
}
.address .sumbit:active{
opacity: 0.7;
}
\ No newline at end of file
...@@ -7,60 +7,58 @@ wxService.page({ ...@@ -7,60 +7,58 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
recordList: [ pageNo : 1,
{ pageSize : 10,
name: '500积分换xx', totalPage : 0,
time: '2019-12-2 15:20:54', recordList: [],
address: '上海市浦东新区上海市浦东新区上海市浦东新区', hasMore : false
point: '-500积分',
},
{
name: '500积分换xx',
time: '2019-12-2 15:20:54',
address: '上海市浦东新区上海市浦东新区上海市浦东新区',
point: '-500积分',
},{
name: '500积分换xx',
time: '2019-12-2 15:20:54',
address: '上海市浦东新区上海市浦东新区上海市浦东新区',
point: '-500积分',
}
]
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.showLoading({
title: '正在加载数据..',
});
this.getWxchangeRecords();
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
}, },
/** //获取兑换记录
* 生命周期函数--监听页面隐藏 getWxchangeRecords(){
*/ const { memberId } = wx.getStorageSync('_baseUserInfo')
onHide: function () { let pageNo = this.data.pageNo,
pageSize = this.data.pageSize;
}, wxService.post(`/member/pointsRedemptionProductRecord/page?pageNo=${pageNo}&pageSize=${pageSize}`,{
memberId: memberId
/** }).then(res => {
* 生命周期函数--监听页面卸载 let list = res.data.data.content ? res.data.data.content : [];
*/ this.data.totalPage = res.data.data.totalPages;
onUnload: function () { list.forEach(item => {
let proviceCity = item.exchangeInfo.distinct.split(',');
item.title = item.title ? item.title : '--';
item.fullAddress = [proviceCity, item.exchangeInfo.address].join('');
});
if(list.length > 0){
this.data.hasMore = true;
}
this.data.recordList = this.data.recordList.concat(list);
this.setData({
totalPage: this.data.totalPage,
recordList: this.data.recordList,
hasMore: this.data.hasMore
});
});
}, },
/** /**
...@@ -74,13 +72,17 @@ wxService.page({ ...@@ -74,13 +72,17 @@ wxService.page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
if(this.data.pageNo < this.data.totalPage){
this.data.pageNo ++ ;
this.getWxchangeRecords();
}
else {
if (this.data.recordList.length != 0){
this.setData({
hasMore : false,
})
}
}
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
<!--subPackage/page/pages/recordList/recordList.wxml--> <!--subPackage/page/pages/recordList/recordList.wxml-->
<view class="record-list"> <view class="record-list" wx:if="{{recordList.length > 0}}">
<block wx:for="{{recordList}}" wx:key="{{index}}" wx:for-item="item"> <block wx:for="{{recordList}}" wx:key="{{index}}" wx:for-item="item">
<view class="list-item"> <view class="list-item">
<view class="list-desc"> <view class="list-desc">
<view class="desc-name">{{item.name}}</view> <view class="desc-name">{{item.title}}</view>
<view class="desc-time">{{item.time}}</view> <view class="desc-time">{{item.createTime}}</view>
<view class="desc-address">{{item.address}}</view> <view class="desc-address">{{item.fullAddress}}</view>
</view> </view>
<view class="list-point">{{item.point}}</view> <view class="list-point">-{{item.point}}积分</view>
</view> </view>
</block> </block>
<!-- view -->
<view class='no-more' wx:if="{{!hasMore}}">-- 我也是有底线滴 --</view>
</view> </view>
<view class='empty' wx:if="{{recordList.length == 0 }}">无任何兑换记录~</view>
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
@import "/base/base.wxss"; @import "/base/base.wxss";
.record-list { .record-list {
border-top: 1px solid rgba(151, 151, 151, 1); /* border-top: 1px solid rgba(151, 151, 151, 1); */
padding: 0 20rpx; padding: 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.list-item { .list-item {
display: flex; display: flex;
height: 164rpx; height: 164rpx;
border-bottom: 1px solid rgba(151, 151, 151, 1); border-bottom: 1px solid #eeeeee;
padding: 35rpx 20rpx 34rpx 20rpx; padding: 35rpx 20rpx 34rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
...@@ -23,6 +23,18 @@ ...@@ -23,6 +23,18 @@
height: 30rpx; height: 30rpx;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 30rpx; font-size: 30rpx;
margin-bottom: 10rpx;
}
.no-more{
width: 100%;
height: auto;
padding: 30rpx 0;
color: #999999;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.desc-time, .desc-time,
......
...@@ -11,34 +11,7 @@ wxService.page({ ...@@ -11,34 +11,7 @@ wxService.page({
productData: [], productData: [],
subStoreData: [], subStoreData: [],
showDialig: false, showDialig: false,
proData: [ proData: []
{
"id": "636202018767245312",
"classifyId": "621357257015300096",
"headline": "2222",
"type": 0,
"memberPrice": 57700,
"plusPrice": 32550,
"transmitSum": 0,
"index": 0,
"url": "https://img3.bigaka.com/test/1001/201910/20191022/10015eb58657-67ec-43c2-9344-c277e0032742.jpg",
"currentType": 1,
"explain": "测试文案001/测试文案002/测试文案003"
},
{
"id": "636201959732416512",
"classifyId": "621357257015300096",
"headline": "2222",
"type": 0,
"memberPrice": 548,
"plusPrice": 220,
"transmitSum": 0,
"index": 0,
"url": "https://img3.bigaka.com/test/1001/201910/20191022/1001ccee65c3-cced-4518-bbad-16412d671075.png",
"currentType": 1,
"explain": "Bigaka Bigaka 玫瑰金皮带腕表"
}
]
}, },
/** /**
...@@ -46,6 +19,7 @@ wxService.page({ ...@@ -46,6 +19,7 @@ wxService.page({
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('options', options) console.log('options', options)
console.log(this.data)
this.setData({ this.setData({
id: options.id id: options.id
},()=>{ },()=>{
...@@ -65,6 +39,7 @@ wxService.page({ ...@@ -65,6 +39,7 @@ wxService.page({
const storeList = list ? JSON.stringify(list) : [] const storeList = list ? JSON.stringify(list) : []
wxService.router(`/subPackage/page/pages/scanCouponStoreList/scanCouponStoreList`).search({ storeList }) wxService.router(`/subPackage/page/pages/scanCouponStoreList/scanCouponStoreList`).search({ storeList })
}, },
handelGet() { handelGet() {
const { id } = this.data const { id } = this.data
wx.showLoading({ wx.showLoading({
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<view class="scan-coupon"> <view class="scan-coupon">
<view class="scan-title clearfix"> <view class="scan-title clearfix">
<view class="title-btn" bindtap="handelGet">立即领取</view> <view class="title-btn positionRe" wx:if="{{!currentHasUserInfo}}">
<button class='positionAbs' bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
立即领取
</view>
<view class="title-btn"bindtap="handelGet" wx:if="{{currentHasUserInfo}}">立即领取</view>
<view class="title-name">{{couponDetail.couponName}}</view> <view class="title-name">{{couponDetail.couponName}}</view>
<view class="title-desc">{{couponDetail.title}}</view> <view class="title-desc">{{couponDetail.title}}</view>
<view class="title-others">{{couponDetail.remark}}</view> <view class="title-others">{{couponDetail.remark}}</view>
......
...@@ -100,8 +100,8 @@ class Http { ...@@ -100,8 +100,8 @@ class Http {
method: 'GET', method: 'GET',
header: { header: {
// 'tunnel-token' : 'brand1002', // 测试 // 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'brand1001', // 开发 // 'tunnel-token' : 'brand1001', // 开发
'tentacle-content': this.getTentacle(), 'tentacle-content': this.getTentacle(),
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}' // 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
...@@ -138,8 +138,8 @@ class Http { ...@@ -138,8 +138,8 @@ class Http {
method: 'POST', method: 'POST',
header: { header: {
// 'tunnel-token' : 'brand1002', // 测试 // 'tunnel-token' : 'brand1002', // 测试
// 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试 'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产 // 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
// 'tunnel-token' : 'brand1001', // 开发 // 'tunnel-token' : 'brand1001', // 开发
'tentacle-content': this.getTentacle() 'tentacle-content': this.getTentacle()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}' // 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
......
...@@ -701,10 +701,18 @@ class WXService extends Http { ...@@ -701,10 +701,18 @@ class WXService extends Http {
}, },
//统一处理用户授权获取用户信息回调 //统一处理用户授权获取用户信息回调
_getUserInfo(res) { _getUserInfo(res) {
wx.showLoading({
title: '用户登录中..',
});
this.setData({ this.setData({
currentHasUserInfo: true currentHasUserInfo: true
}); });
_self.getAuthUserInfo(res.detail) _self.getAuthUserInfo(res.detail).then(res => {
wx.hideLoading();
}).catch(err => {
wx.hideLoading();
})
}, },
//处理分享页面打开时参数为memberId时生成触点对象信息 //处理分享页面打开时参数为memberId时生成触点对象信息
generatePointObject(tentacleInfo) { generatePointObject(tentacleInfo) {
......
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