Commit 29d38eb4 authored by wangxuelai's avatar wangxuelai

''

parent 34242bb1
......@@ -547,6 +547,13 @@
"index"
]
},
{
"root": "business/pages/scoremgt",
"name": "businessscoremgt",
"pages": [
"index"
]
},
{
"root": "business/pages/activityconsumers",
"name": "businessactivityconsumers",
......
// src/pages/activityindex/index.js
import {
wxChooseImage,
wxUploadFile
} from '../../../utilities/wxApi.js';
import {
cOssAccess,
} from '../../../service/common.js';
import {
getRandomFilename,
LocalStorage
} from '../../../utilities/index.js';
import {
userShow,
} from '../../../service/customer/themeindex.js';
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
localImageRoot: "../../../images/",
submiting: false,
sid: 0,
userInfo: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const {
sid,
} = options;
this.setData({
sid,
})
wx.hideShareMenu()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.userShow();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
userShow () {
const visitor = LocalStorage.getItem('visitor');
userShow({
school_id: this.data.sid,
consumer_id: visitor && visitor.id || 0
}).then((res) => {
const {data, code} = res;
if (code == 30005) {
this.setData({
noUserinfo: true
})
}
if (code == 200) {
if (data) {
this.setData({
userInfo: data,
noUserinfo: false,
})
} else {
this.setData({
noUserinfo: true
})
}
}
}).then(() => {
})
},
chooseImg() {
let access = {};
let filename = '';
cOssAccess().then((acc) => {
access = acc.data;
return wxChooseImage({})
}).then((res) => {
const {
tempFiles
} = res;
filename = `${access.dir}${getRandomFilename(tempFiles[0].path)}`;
wx.showLoading({
title: '图片上传中'
})
return wxUploadFile({
url: access.host,
formData: {
key: filename,
policy: access.policy,
OSSAccessKeyId: access.accessid,
signature: access.signature,
callback: access.callback,
success_action_status: '200'
},
filePath: tempFiles[0].path,
name: 'file',
})
}).then((res) => {
const {
data
} = res;
if (data == '{"status":"ok"}') {
wx.showToast({
title: '上传成功'
})
this.setData({
img: filename
})
} else {
wx.hideLoading();
wx.showModal({
title: '提示',
content: '上传失败',
showCancel: false
})
}
}).catch((err) => {
});
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "积分商城"
}
\ No newline at end of file
This diff is collapsed.
.container {
background-color: #fff;
padding-bottom: 50rpx;
}
.header-box {
display: flex;
align-items: center;
justify-content: space-around;
padding: 40rpx 0 36rpx;
}
.btnitem {
width: 120rpx;
/* display: flex; */
text-align: center;
}
.btnitem .iconbox {
margin: 0 auto;
width: 80rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
}
.btnitem .iconbox image {
display: block;
}
.btnitem .iconbox .scoresetting {
width: 64rpx;
height: 61rpx;
}
.btnitem .iconbox .addprize {
width: 75rpx;
height: 55rpx;
}
.btnitem .iconbox .exchangeprize {
width: 63rpx;
height: 63rpx;
}
.btnitem .iconbox .scan {
width: 59rpx;
height: 57rpx;
}
.btnitem .btnname {
font-size: 24rpx;
color: #000;
}
.divideline {
height: 20rpx;
background-color: #F7F7F9;
}
.areatitle {
font-size: 30rpx;
color: #000000;
font-weight: 700;
padding-left: 24rpx;
padding-top: 50rpx;
line-height: 1;
margin-bottom: 38rpx;
}
.prizecontent {
display: flex;
/* justify-content: center; */
flex-wrap: wrap;
padding: 0 24rpx;
}
.prizecardbox {
width: 50%;
margin-bottom: 24rpx;
display: flex;
/* flex-direction: column; */
}
.prizecardbox.odd{
justify-content: flex-start;
}
.prizecardbox.even{
justify-content: flex-end;
}
.prizecontent .prizecard {
border-radius: 20rpx;
overflow: hidden;
width: 310rpx;
/* margin: 0 auto; */
height: 364rpx;
box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
}
.prizecontent .prizecard .prizeimage{
display: block;
height: 270rpx;
width: 100%;
margin-bottom: 16rpx;
}
.prizecontent .prizecard .prizename {
color: #000;
font-size: 24rpx;
width: 100;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 20rpx;
margin-bottom: 18rpx;
line-height: 1;
}
.prizestatic {
padding: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.prizestatic .scoreneed{
font-size: 22rpx;
color: #FF5E15;
line-height: 1;
}
.prizestatic .prizeleft{
font-size: 22rpx;
color: #878787;
line-height: 1;
}
.couponcontent {
display: flex;
/* justify-content: center; */
flex-wrap: wrap;
padding: 0 24rpx;
}
.couponcardbox {
width: 50%;
display: flex;
}
.couponcardbox.odd {
justify-content: flex-start;
}
.couponcardbox.even {
justify-content: flex-end;
}
.couponcard {
width: 312rpx;
padding-bottom: 30rpx;
}
.couponitem {
width: 100%;
height: 184rpx;
position: relative;
margin-bottom: 25rpx;
display: flex;
}
.couponitem .couponimgbox {
width: 43%;
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
}
.couponitem .couponimgbox .couponimg {
display: block;
width: 98rpx;
height: 98rpx;
border-radius: 50%;
box-shadow: 0px 4rpx 8rpx 0px rgba(255,71,111,0.4);
}
.couponitem .couponinfobox {
width: 57%;
position: relative;
z-index: 2;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
color: #fff;
}
.couponitem .couponinfobox .top {
font-size: 30rpx;
font-weight: 700;
line-height: 1;
margin-bottom: 16rpx;
}
.couponitem .couponinfobox .middle {
font-size: 44rpx;
font-weight: 700;
line-height: 1;
margin-bottom: 18rpx;
}
.couponitem .couponinfobox .bottom {
font-size: 24rpx;
line-height: 1;
}
.couponitem .couponbg {
position: absolute;
z-index: 0;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.couponcard .couponcardname {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #000000;
font-size: 24rpx;
line-height: 1;
}
.empty-content {
padding-top: 152rpx;
}
.empty-content .empty-img-box {
width: 263rpx;
height: 219rpx;
margin: 0 auto;
}
.empty-content .empty-img-box .empty-icon {
width: 263rpx;
height: 219rpx;
}
.empty-content .empty-text {
padding-top: 47rpx;
text-align: center;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.5);
padding-bottom: 217rpx;
}
.prizecardbox .operatebox {
width: 310rpx;
}
.operatebox {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
}
.operatebox .operatebtn{
width: 60px;
height: 26px;
line-height: 26px;
background-color: #F7F7F9;
text-align: center;
font-size: 26rpx;
letter-spacing: 2rpx;
color: #878787;
border-radius: 10rpx;
}
\ No newline at end of file
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