Commit 3f592ca9 by 赵雅纹

Merge branch 'feature-zyw-sc' into 'dev_7.1.0'

Feature zyw sc

See merge request !98
parents 8c5db006 6996a568
......@@ -57,13 +57,11 @@ Component({
"scene": '123',
"width": 100
}
console.log('---', this.data.pagePath)
wxService.post(`/merchant/contentMobileTerminal/getAppletQrCode`, data).then(res => {
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
const { result, data } = res.data
if (result == 0) {
this.setData({
codeImg: app.globalData.imageUrl + '/' + data.codeUrl
codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
})
if (this.data.codeImg) {
......@@ -86,6 +84,5 @@ Component({
})
}
}
})
// component/plus/plus.js
const wxService = require('../../utils/wxService')
Component({
/**
* 组件的属性列表
......@@ -14,7 +16,7 @@ Component({
* 组件的初始数据
*/
data: {
currentTab:0
currentTab:'999'
},
/**
......@@ -22,10 +24,56 @@ Component({
*/
methods: {
switchNav(e){
console.log(e)
this.setData({
currentTab: e.currentTarget.dataset.current
currentTab: e.currentTarget.dataset.current,
id: e.currentTarget.dataset.id
})
},
payPlus() {
if (!this.data.id){
wx.showToast({
title: '请先选择会员卡',
icon: 'none',
mask: true
})
return
}
// 下单
wx.showLoading({
title: '加载中'
})
}
// 获取支付参数
wxService.post(`/sale/payment/premium/buyer/preorder/wxa`, {
premiumId: this.data.id
}).then(res => {
if (!res) return false;
const { result, data } = res && res.data || res && res.result
if (result == 0) {
console.log('data', data)
wx.requestPayment(Object.assign({
success(res) {
wx.hideLoading()
// wx.showToast({
// title: '支付成功',
// icon: 'none',
// mask: true
// })
// 支付成功页面
console.log(res)
wxService.router('/subPackage/page/pages/paymentStatus/paymentStatus')
},
fail(res) {
wx.hideLoading()
wx.showToast({
title: '支付失败',
icon: 'none',
mask: true
})
}
}, data))
}
})
},
}
})
......@@ -16,16 +16,17 @@
data-btnText="{{navItem.buttonText}}"
data-id="{{navItem.id}}"
bindtap="switchNav"
style="background-image:url({{navItem.coverImgUrl}})"
>
<view class="plus-choose">
<text>每月仅¥25</text>
<text>每月仅¥{{navItem.price / navItem.duration * 30}}</text>
</view>
<view class="card-kinds">
全年卡· 366 天
{{navItem.name}}
</view>
<view class="plus-price">
<text class="rmb">¥</text>
<text class="amount">100</text>
<text class="amount">{{navItem.price}}</text>
</view>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color">
......@@ -36,7 +37,7 @@
</block>
</scroll-view>
<view class="pay">
<button class="btn btn-primary">
<button class="btn btn-primary" bindtap="payPlus">
<text>立即支付</text>
<text>¥158</text>
</button>
......
......@@ -67,6 +67,7 @@ wxService.page({
delete data.appId
wx.requestPayment(Object.assign({
success(res) {
console.log('000000',res)
wx.hideLoading()
// 支付成功页面
wxService.router('/subPackage/page/pages/paymentStatus/paymentStatus')
......
// subPackage/page/pages/orderBenefit/orderBenefit.js
Page({
const app = getApp()
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.page({
/**
* 页面的初始数据
*/
data: {
pageNum: 1,
pageSize: 10,
totalPages: 0,
orderBenefitList:[]
},
/**
......@@ -26,35 +34,42 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
this.getOrderBenefit(1,10)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
getOrderBenefit(pageNum, pageSize){
wx.showLoading({
title: '加载中',
mask: true
})
wxService.post(`/marketing/awardRecord/queryAward?pageNum=${pageNum}&pageSize=${pageSize}`, {
// userId: memberId
}).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
this.setData({
orderBenefitList: this.data.pageNo == 1 ? [...data.content] : [...this.data.orderBenefitList, ...data.content],
totalPages: data.totalPages
}, () => {
})
}
}
})
},
/**
* 页面上拉触底事件的处理函数
*/
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.pageNum < this.data.totalPages) {
this.setData({
pageNum: this.data.pageNum + 1,
}, () => {
this.getOrderBenefit(this.data.pageNum, 10)
})
}
},
/**
......
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单收益",
"usingComponents": {}
}
\ No newline at end of file
<!--subPackage/page/pages/orderBenefit/orderBenefit.wxml-->
<view class="page-order-benefit">
<view class="order-benefit-wrap">
<view class="order-benefit-list">
<view class="order-benefit-list" wx:for="{{orderBenefitList}}" wx:key="{{index}}">
<view class="top-info">
<view class="order-num">订单号:334444444</view>
<view class="order-date">2019-03-24 至 2019-06-23</view>
</view>
<view class="bottom-info">
<view>
<image src="/assets/imgs/7_1_0/integral-icon.png" class="integral-icon" mode="widthFix"></image>
<text class="benefit-num">100</text>
</view>
<view>
<image src="/assets/imgs/7_1_0/coupon-icon.png" class="coupon-icon" mode="widthFix"></image>
<text class="benefit-num">100</text>
</view>
<view>
<image src="/assets/imgs/7_1_0/experience.png" class="experience-icon" mode="widthFix"></image>
<text class="benefit-num">100</text>
</view>
<view>
<image src="/assets/imgs/7_1_0/share-value.png" class="share-value" mode="widthFix"></image>
<text class="benefit-num">100</text>
</view>
</view>
</view>
<view class="order-benefit-list">
<view class="top-info">
<view class="order-num">订单号:334444444</view>
<view class="order-date">2019-03-24 至 2019-06-23</view>
<view class="order-num">订单号:{{item.id}}</view>
<view class="order-date">{{item.createTime}}</view>
</view>
<view class="bottom-info">
<view>
......
......@@ -6,36 +6,7 @@ wxService.page({
* 页面的初始数据
*/
data: {
skuVOList:[
{
mainImgUrl:"http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount:0.06
},
{
mainImgUrl:"http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount:0.06
},
{
mainImgUrl:"http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount:0.06
},
{
mainImgUrl:"http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount:0.06
},
{
mainImgUrl: "http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount: 0.06
},
{
mainImgUrl: "http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount: 0.06
},
{
mainImgUrl: "http://testimg3.bigaka.com/group3/M00/00/17/Cv6CBF1Z9TKAU6T1AAAG8CvHO2o415.png",
amount: 0.06
}
],
skuVOList:[]
},
/**
......
<!--subPackage/home/pages/plus/plus.wxml-->
<view class="plus">
<!-- plus 动态页面 -->
</view>
<plus sku-list="{{skuVOList}}"/>
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