Commit bf5bcbe6 by 谢中龙

新增界面

parent 1815875d
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
"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": [
{ {
...@@ -75,7 +74,8 @@ ...@@ -75,7 +74,8 @@
"pages/userInfo/userInfo", "pages/userInfo/userInfo",
"pages/qrcode/qrcode", "pages/qrcode/qrcode",
"pages/userList/userList", "pages/userList/userList",
"pages/couponQrcode/couponQrcode" "pages/couponQrcode/couponQrcode",
"pages/welcomGuider/welcomGuider"
] ]
} }
], ],
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 58, "current": 59,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -430,6 +430,12 @@ ...@@ -430,6 +430,12 @@
"name": "导购展示优惠券二维码", "name": "导购展示优惠券二维码",
"pathName": "shoppingGuid/page/pages/couponQrcode/couponQrcode", "pathName": "shoppingGuid/page/pages/couponQrcode/couponQrcode",
"query": "" "query": ""
},
{
"id": -1,
"name": "导购授权页面",
"pathName": "shoppingGuid/page/pages/welcomGuider/welcomGuider",
"query": ""
} }
] ]
} }
......
// shoppingGuid/page/pages/couponQrcode/couponQrcode.js // shoppingGuid/page/pages/couponQrcode/couponQrcode.js
Page({ const wxService = require('../../../../utils/wxService')
const app = getApp();
wxService.page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
qrcodeImg : '',
couponInfo : {}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let couponInfo = wx.getStorageSync('_guidCouponInfo');
}, this.setData({
couponInfo: couponInfo,
/** },() => {
* 生命周期函数--监听页面初次渲染完成 this.getMiniQrcode(couponInfo.id);
*/ })
onReady: function () {
}, },
...@@ -28,39 +31,24 @@ Page({ ...@@ -28,39 +31,24 @@ Page({
onShow: function () { onShow: function () {
}, },
//获取小程序码
getMiniQrcode(id){
// subPackage / page / pages / scanCoupon / scanCoupon
let data = {
"autoColor": true,
"page": 'pages/index/index',
"scene": 'id=' + id,
"width": 260
}
/** wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
* 生命周期函数--监听页面隐藏 const { result, data } = res.data
*/ if (result == 0) {
onHide: function () { this.setData({
qrcodeImg: app.globalData.imageUrl + data
}, });
}
/** })
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
<!--shoppingGuid/page/pages/couponQrcode/couponQrcode.wxml--> <!-- 优惠券二维码 -->
<text>shoppingGuid/page/pages/couponQrcode/couponQrcode.wxml</text> <view class='main-container'>
<!-- 优惠券福利 -->
<view class='coupons'>
<view class='coupon-item' style='background-image:url(https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png)'>
<view class='coupon-item-lf'>
<view class='coupon-price'>
¥ <text>5</text>
</view>
<view>折扣券</view>
</view>
<view class='coupon-item-rg'>
<view class='coupon-title'>满10减5</view>
<view class='op'>
<view class='text-btn'>
<text class='theme-text-color'>数量:100</text>
</view>
</view>
</view>
</view>
</view>
<!-- 二维码 -->
<view class='qrcode-con'>
<view class='qrcode'>
<image src='{{qrcodeImg}}' mode='aspectFit'></image>
<view class='coupon-num'>优惠券码:1234564564759</view>
</view>
</view>
</view>
\ No newline at end of file
/* shoppingGuid/page/pages/couponQrcode/couponQrcode.wxss */ /* shoppingGuid/page/pages/couponQrcode/couponQrcode.wxss */
/* shoppingGuid/page/pages/welfare/welfare.wxss */
page{
background: #f2f2f2;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.main-container{
width: 100%;
height: auto;
}
.coupon{
font-size: 24rpx;
display: flex;
align-items: center;
margin-top: 10rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.coupon image{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.coupon text{
margin-right: 10rpx;
}
.price .plus{
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.price .plus image{
width: 70rpx;
margin-left: 10rpx;
}
/* 优惠券 */
.coupons{
padding: 30rpx;
width: 100%;
}
.coupons .coupon-item{
width: 100%;
height: 180rpx;
/* background: #ffffff; */
display: flex;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-bottom: 10rpx;
}
.coupons .coupon-item .coupon-item-lf{
flex: 0;
min-width: 180rpx;
max-width: 180rpx;
height: 180rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #0091FF ;
font-size: 24rpx;
justify-content: center;
}
.coupon-price{
margin-bottom: 6rpx;
}
.coupon-price text{
font-size: 38rpx;
font-weight: bold;
}
.coupons .coupon-item .coupon-item-rg{
flex: 1;
padding: 30rpx;
position: relative;
}
.coupons .coupon-item .coupon-item-rg .qrcode{
position: absolute;
right: 30rpx;
top: 30rpx;
width: 40rpx;
height: 40rpx;
}
.coupons .coupon-item .coupon-item-rg .qrcode image{
width: 100%;
height: 100%;
display: block;
}
.coupons .coupon-item .coupon-item-rg .coupon-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 15rpx;
margin-top: 15rpx;
}
.coupons .coupon-item .coupon-item-rg .op{
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
}
.coupons .coupon-item .coupon-item-rg .op .text-btn{
flex: 1;
font-size: 24rpx;
}
.coupons .coupon-item .coupon-item-rg .op .info-btn{
width: 160rpx;
height: 50rpx;
background: #0091FF ;
color: #ffffff;
display: flex;
align-items: center;
font-size: 24rpx;
}
/* 二维码展示区 */
.qrcode-con{
padding: 0 30rpx;
width: 100%;
}
.qrcode-con .qrcode{
width: 100%;
height: auto;
padding: 30rpx;
background: #ffffff;
box-shadow: 0 0 10rpx 4rpx rgba(0,0,0,0.1);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.qrcode-con .qrcode image{
width: 500rpx;
height: 500rpx;
}
.qrcode-con .qrcode .coupon-num{
font-size: 28rpx;
color: #666;
margin-top: 20rpx;
}
\ No newline at end of file
// shoppingGuid/page/pages/welcomGuider/welcomGuider.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--shoppingGuid/page/pages/welcomGuider/welcomGuider.wxml-->
<text>shoppingGuid/page/pages/welcomGuider/welcomGuider.wxml</text>
/* shoppingGuid/page/pages/welcomGuider/welcomGuider.wxss */
\ No newline at end of file
...@@ -258,6 +258,11 @@ wxService.page({ ...@@ -258,6 +258,11 @@ wxService.page({
onTapShowQrcode(e){ onTapShowQrcode(e){
console.log(e) console.log(e)
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
wx.setStorageSync('_guidCouponInfo', item);
wx.navigateTo({
url: '/shoppingGuid/page/pages/couponQrcode/couponQrcode',
});
}, },
......
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