Commit a7f26c3b by jscat

nyx weapp, 主流程

1. 为活动创建添加代码
parent 7332bcd8
//app.js
//app.js
......@@ -49,6 +49,9 @@ App({
},
//activity-submit跳转后需要带上category的index
switchId : "",
},
onLaunch: function () {
......
{
{
{
"pages": [
"pages/member/activity-post/activity-submit/activity-submit",
"pages/member/activity-post/activity-edit/activity-edit",
"pages/activity/activity",
"pages/mall/order/order",
"pages/member/schedule/schedule",
"pages/key/key",
"pages/member/schedule/schedule",
"pages/member/activity-post/activity-post",
"pages/activity/quiz-result/quiz-result",
"pages/activity/quiz-info/quiz-info",
"pages/activity/activity-info/activity-info",
"pages/key/key",
"pages/activity/act-address/act-address",
"pages/activity/act-writer/act-writer",
"pages/my/my",
......
@import './theme/iconfont.wxss';
@import './theme/iconfont.wxss';
......@@ -101,9 +101,10 @@
width: 14.286014285714286%;
}
/* 高度调整=date+活动名 */
.date-wrap {
width: 100%;
height: 185rpx;
height: 215rpx;
position: relative;
left: 0;
top: 0;
......@@ -131,15 +132,15 @@
width: 100%;
border-radius: 0;
}
/* date之间高度 */
.date-desc {
width: 280%;
height: 130rpx;
height: 160rpx;
font-size: 26rpx;
line-height: 32rpx;
position: absolute;
left: 50%;
transform: translate(-50%, 95%);
transform: translate(-50%, 91%);
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
......

26.2 KB | W: | H:

4.88 KB | W: | H:

增值产品-小程序及app/nyx-master/icon/add.png
增值产品-小程序及app/nyx-master/icon/add.png
增值产品-小程序及app/nyx-master/icon/add.png
增值产品-小程序及app/nyx-master/icon/add.png
  • 2-up
  • Swipe
  • Onion skin
// pages/activity/activity-info/activity-info.js
// pages/activity/activity-info/activity-info.js
......@@ -211,5 +211,15 @@ Page({
});
},
//点击clone后跳转至活动创建页面
onClickClone: function (e) {
var _this = this;
var url = "/pages/member/activity-post/activity-post?"
+ "&activity_id=" + "aid_123"
wx.navigateTo({
url: url
});
},
})
\ No newline at end of file
<view class="page">
<view class="page">
......@@ -14,7 +14,7 @@
<view class="note-price" style="font-weight: bold">
<view class="clone">
<view class="clone-left">¥{{activityInfo.unit_price}}</view>
<view class="clone-right" bindtap="onClickPoints" data-id='{{index}}'>
<view class="clone-right" bindtap="onClickClone" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<image src="../../../icon/activity/clone.png"></image>
克隆
......
// pages/activity/activity.js
// pages/activity/activity.js
......@@ -87,18 +87,23 @@ Page({
})
wx.setNavigationBarTitle({
title: '酒肆活动',
})
})
//初始载入四个推荐的竞答活动
if(_this.__data__.activities.length == 0)
{
var curIndex = _this.__data__.curIndex
var switchId = app.globalData.switchId
var curIndex = switchId != ""? switchId : _this.__data__.curIndex
var strCategory = _this.__data__.category[curIndex].name
this.setData({
curIndex: curIndex,
});
app.globalData.switchId = ""
_this.getActivities(0, 1, 4, strCategory);
}
}
},
/**
......
// pages/member/activity-post/activity-edit/activity-edit.js
// pages/member/activity-post/activity-edit/activity-edit.js
var config = wx.getStorageSync("config");
var app = getApp();
var log = require('./../../../../utils/log.js')
var util = require('./../../../../utils/util.js')
Page({
data: {
product_listData: [],
attributeArray: ['活动类别', '价格', '库存'],
},
onLoad: function () {
var that = this;
wx.getSystemInfo({
success: function (res) {
var a = res.windowHeight;
that.setData({
scrollTop: a-200
})
}
})
var product_listData = [
{ product_desc: "会员", unit_price: 59.00, stock: 10, },
{ product_desc: "普通用户", unit_price: 99.00, stock: 10, },
]
this.setData({
product_listData: product_listData,
});
},
onReady: function (e) {
},
// Page Flow
navigateToSubmit() {
let promise = app.onCheckText(app.globalData.postData.photoTag)
//在本轮event loop(事件循环)运行完成之前,回调函数是不会被调用的
//then后的括号里应该是参数param
//https://www.cnblogs.com/qlongbg/p/11603328.html
promise.then(function (value) {
console.log("===enter promise then_pass_" + value)
wx.navigateTo({ url: './../activity-submit/activity-submit' })
},
function (value) {
console.log("===enter promise then_failed_" + value)
},);
},
// Date Flow
// 输入该组图片的标签
bindKeyInput(e) {
var _this = this;
_this.setData({
inputValue: e.detail.value
})
//全局赋值
app.globalData.postData.photoTag = e.detail.value
},
addList: function(){
var _this = this;
var list = _this.data.product_listData;
var newData = { product_desc: "会员", unit_price: 59.00, stock: 10, };
list.push(newData);//实质是添加lists数组内容,使for循环多一次
this.setData({
product_listData: list,
})
},
delList: function (e) {
var _this = this;
var dataId = e.currentTarget.dataset.id
var product_listData = _this.data.product_listData;
product_listData.splice( dataId,1);
this.setData({
product_listData: product_listData,
})
},
})
{
{
"navigationBarTitleText": "添加详情"
}
\ No newline at end of file
<!-- /page/post/edit/edit 添加分类的标签,以及自定义标签 -->
<!-- /page/post/edit/edit 添加分类的标签,以及自定义标签 -->
<view class="page" style="height:100%;width:100%">
<block>
<button type="default" bindtap="navigateToSubmit">下一步</button>
</block>
<view class="weui-cells__title">#添加标题</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell ">
<view class="weui-cell__bd">
<input class="weui-input" bindinput="bindKeyInput" placeholder="请输入标题" />
</view>
</view>
</view>
<view class="weui-cells__title">#添加标签</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell ">
<view class="weui-cell__bd">
<input class="weui-input" bindinput="bindKeyInput" placeholder="请输入标签" />
</view>
</view>
</view>
<view class="weui-cells__title">#添加活动内容</view>
<!-- 添加表格: 序号, 类别描述, 价格, 个数 -->
<view class='table'>
<view class='table_header'>
<view class="th" style='width:70rpx;background-color:white'>
<view class='centerclass cell_label'>序号</view>
</view>
<block wx:for="{{attributeArray}}">
<view class='th'>
<view class="cell_label centerclass">{{item}}</view>
</view>
</block>
<view class="th" style='width:70rpx;background-color:white'>
<view class='centerclass cell_label'>
</view>
</view>
</view>
<block wx:for="{{product_listData}}" wx:for-item="item" wx:key="{{index}}">
<view class='table_main'>
<!--上午下午晚上 -->
<view class='td' style='width:70rpx;background-color:white;'>
<view class="cell_label centerclass">{{index}}</view>
</view>
<!-- 周一 -->
<view class='td'>
<view class='table_Text_last_class'>
{{item.product_desc}}
</view>
</view>
<view class='td'>
<view class='table_Text_last_class'>
{{item.unit_price}}
</view>
</view>
<view class='td'>
<view class='table_Text_last_class'>
{{item.stock}}
</view>
</view>
<!-- start 删除新行按钮 -->
<view class="th" style='width:70rpx;background-color:white'>
<view class='centerclass cell_label' bindtap='delList' data-id="{{index}}">
<image src="../../../../icon/del.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
</view>
<!-- end 删除新行按钮 -->
</view>
</block>
<!-- start 添加新行按钮 -->
<view class='table_header'>
<view class="th" style='width:70rpx;background-color:white'>
<view class='centerclass cell_label' bindtap='addList'>
<image src="../../../../icon/add.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
</view>
</view>
<!-- end 添加新行按钮 -->
</view>
</view>
\ No newline at end of file
page{
page{
height: 100%;
background-color:#f5f8fa;
}
.post{
position: absolute;
bottom: 0;
right:0px;
}
/* 表格 */
.table{
display: inline-flex;
flex-direction: column;
border: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 0;
}
.scrollClass {
display: flex;
width: 100%;
white-space: nowrap;
margin-top: 23px;
height: 100%;
background-color: white;
}
.table_header {
display: inline-flex;
}
.th {
display: flex;
flex-direction: column;
width: 200rpx;
height: 90rpx;
background: rgba(241, 252, 255, 1);
border-right: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
justify-content: center;
align-items: center;
overflow-x: auto;
}
.cell_label{
font-size: 26rpx;
color: rgba(74, 74, 74, 1);
}
.cell_date_label{
font-size: 20rpx;
color: rgba(74, 74, 74, 1);
}
.table_main {
display: inline-flex;
flex-direction: row;
}
.right-item{
display: flex;
flex-direction: row;
}
.td {
display: flex;
flex-direction: column;
width: 200rpx;
/* height: 90rpx; */
background: white;
justify-content: center;
align-items: center;
border: 1rpx solid rgba(218, 217, 217, 1);
border-top: 0;
border-left:0;
}
.table_Text_class {
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
word-break: normal;
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
}
.table_Text_last_class{
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
word-break: normal;
}
\ No newline at end of file
// pages/member/activity-post/activity-post.js
// pages/member/activity-post/activity-post.js
var config = wx.getStorageSync("config");
var app = getApp();
var log = require('./../../../utils/log.js')
var util = require('./../../../utils/util.js')
/*
提交流程
1. post.js 生成图片的临时路径
2. edit.js 编辑标签
3. submit.js 上传阿里云oss, 将内容上传到数据库
- 获取token
- 上传oss
- 上传数据库
*/
const base64 = require('./../../../utils/base64.js');//Base64,hmac,sha1,crypto相关算法
Page({
onLoad: function () {
var that = this;
wx.getSystemInfo({
success: function (res) {
var a = res.windowHeight;
that.setData({
scrollTop: a-200
})
}
})
},
data: {
photoArray: [],
sourceTypeIndex: 2,
sourceType: ['拍照', '相册', '拍照或相册'],
sizeTypeIndex: 2,
sizeType: ['压缩', '原图', '压缩或原图'],
countIndex: 8,
count: [1, 2, 3, 4, 5, 6, 7, 8, 9],
//定义图片尺寸
imageSize: '',
},
sourceTypeChange(e) {
this.setData({
sourceTypeIndex: e.detail.value
})
},
sizeTypeChange(e) {
this.setData({
sizeTypeIndex: e.detail.value
})
},
countChange(e) {
this.setData({
countIndex: e.detail.value
})
},
//在进入页面时就执行,用于初始化
onReady: function (e) {
},
// Page Flow
navigateToEdit() {
var _this = this;
var newFilePaths = _this.data.photoArray
// let promise = app.onCheckPic(newFilePaths)
// //在本轮event loop(事件循环)运行完成之前,回调函数是不会被调用的
// //then后的括号里应该是参数param
// //https://www.cnblogs.com/qlongbg/p/11603328.html
// promise.then(function (value) {
// console.log("===checkPic_enter promise then_" + value)
// //同步更新全局变量
// app.globalData.postData.photoArray = newFilePaths
// wx.navigateTo({ url: './edit/edit' })
// });
app.globalData.postData.photoArray = newFilePaths
wx.navigateTo({ url: './activity-edit/activity-edit' })
},
// Date Flow
/*
step1: 选定图片,可以预览
step2: 添加描述文字,选择tag
step3: 上传
1. chooseImage
2. 进行图片编辑
3. 点击下一步验证图片是否合法合规 navigateToEdit
通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满)
1) > 2M会出现 45002, content size out of limit 错误
2) 自动裁剪成4:3 或 1:1
*/
addPhoto: function (res) {
var _this = this;
_this.setData({
photoArray: []
})
console.log("===this is addPhoto");
wx.chooseImage({
sizeType: ['original, compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var canvasId = "photoCanvasId";
console.log("===addPhoto_上传图片参数", res)
_this.onEditPic(res, canvasId)
}
})
},
previewImage(e) {
const current = e.target.dataset.src
wx.previewImage({
current,
urls: this.data.photoArray
})
},
//保存图形的tmp地址
saveData(newFilePaths){
var _this = this;
console.log("===saveData", newFilePaths)
_this.setData({
photoArray: newFilePaths
})
app.globalData.postData.photoArray = newFilePaths;
},
//小程序图片处理主函数
editPic(tempFilePaths, index, canvasId) {
var _this = this;
var photoArray = _this.data.photoArray
if (index < tempFilePaths.length){
var pic = tempFilePaths[index]
wx.getImageInfo({
src: pic, //图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径,
success: function (res) {
// util.imageUtil 用于计算长宽比
var i = index + 1
console.log("第"+i+"张上传图片参数", res)
var imageSize = util.imageUtil(res);
console.log("success on getImageInfo_"+index);
console.log(imageSize)
_this.setData({
imageSize: imageSize
})
const ctx = wx.createCanvasContext(canvasId);
//ctx.drawImage(pic, 0, 0, imageSize.swidth, imageSize.sheight);
ctx.drawImage(pic, imageSize.sx, imageSize.sy, imageSize.swidth, imageSize.sheight,
imageSize.x, imageSize.y, imageSize.width, imageSize.height);
// 需要注意的是 draw 方法是异步的,如果图片还没加载成功,有可能画出来的是空的
// 所以 draw 方法通常都会带有定时器这样的回调
ctx.draw(false, setTimeout(function () {
//ctx.draw(false, function () {
var i = index + 1
console.log("==enter draw_"+i);
wx.canvasToTempFilePath({
canvasId: canvasId,
fileType:"jpg",
success: function (res) {
console.log("===success_", res)
console.log("===第"+i+"图处理成功")
photoArray.push(res.tempFilePath)
_this.setData({
photoArray: photoArray
})
index = index + 1
_this.editPic(tempFilePaths, index, canvasId); // 用于多个图片压缩
},
fail: function (e) {
var i = index + 1
console.log("===第"+i+"图处理失败")
}
});
},1000));
//});
},
fail: function(e) {
console.log("failed", e);
},
complete: function(e) {
var i = index + 1
console.log("complete on getImageInfo_"+i, e);
}
})
}
},
// 通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满)
// 1) > 2M会出现45002, content size out of limit错误
// 2) 自动裁剪成4:3(高/宽 1080) 或 1:1 有品默认1:1
// refer1 微信小程序图片压缩 https://www.jianshu.com/p/1b8a1e96a6d5
// refer2 小程序压缩图片(canvas) https://www.jianshu.com/p/ec1f95008dce
onEditPic(res, canvasId) {
var _this = this;
var tempFilePaths = res.tempFilePaths;
var index = 0;
_this.editPic(tempFilePaths, index, canvasId)
}
})
{
{
"navigationBarTitleText": "活动创建"
}
\ No newline at end of file
<!-- /pages/member/activity-post/activity-post.wxml -->
<!-- /pages/member/activity-post/activity-post.wxml -->
<view class="page" style="height:100%;width:100%">
<block>
<button type="default" bindtap="navigateToEdit">下一步</button>
</block>
<form>
<view class="weui-cells">
<view class="weui-cell">
<view class="weui-cell__bd">
<view class="weui-uploader">
<view class="weui-uploader__hd">
<view class="weui-uploader__title">图片上传</view>
<view class="weui-uploader__info">{{photoArray.length}}/{{count[countIndex]}}</view>
</view>
<view class="weui-uploader__bd">
<view class="weui-uploader__files">
<block wx:for="{{photoArray}}" wx:for-item="image">
<view class="weui-uploader__file">
<image class="weui-uploader__img" src="{{image}}" data-src="{{image}}" bindtap="previewImage"></image>
</view>
</block>
</view>
<view class="weui-uploader__input-box">
<view class="weui-uploader__input" bindtap="addPhoto"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</form>
<canvas canvas-id='photoCanvasId' class='myCanvas' style='width:{{imageSize.width}}px;height:{{imageSize.height}}px'>
</canvas>
</view>
\ No newline at end of file
page{
page{
height: 100vh;
background-color:#f5f8fa;
}
.banner{
position: relative;
}
.banner image{
height: 200px;
width:100%;
}
.post{
position: absolute;
bottom: 0;
right:0px;
}
.banner .play{
width: 40px;
height: 40px;
position: absolute;
bottom: 10px;
right:10px;
z-index: 10;
}
.mdetail{
overflow: hidden;
height:55px;
padding:5px 10px;
border-bottom:1px solid #dbdbdb;
}
.mdetail image{
float:left;
width:55px;
height:55px;
}
.minfo{
float:left;
margin-left:10px;
padding:10px 0;
}
.detailLeft{
float:left;
}
.detailRight{
float:right;
}
.mname{
font-size: 14px;
margin-bottom:10px;
}
.mauthor{
font-size: 12px;
color:#dbdbdb;
}
/*
隐藏 canvas,避免显示错误
*/
.myCanvas {
position: absolute;
top: -9999px;
left: -9999px;
}
// pages/member/activity-post/activity-submit/activity-submit.js
// pages/member/activity-post/activity-submit/activity-submit.js
const base64 = require('../../../../utils/base64.js');//Base64,hmac,sha1,crypto相关算法
var config = wx.getStorageSync("config");
var app = getApp();
Page({
onLoad: function () {
var that = this;
wx.getSystemInfo({
success: function (res) {
var a = res.windowHeight;
that.setData({
scrollTop: a-200
})
}
})
},
data : {
//阿里云 OSS相关参数
accessid: "",
policy: "",
signature: "",
host: "",
dir: "",
expire: "",
securityToken: "",
//评论标题+内容相关参数
inputTitle: "",
inputContent: "",
},
onReady: function (e) {
var _this = this;
//进入页面就自动获取oss参数
_this.oss();
},
// Date Flow
// 提交oss和数据库
onSubmitPost: function (e) {
var _this = this;
var title = e.detail.value.inputTitle;//获取title
var content = e.detail.value.inputContent;//获取content
app.globalData.postData.title = title
app.globalData.postData.content = content
if (content != undefined && content != "") {
//step1, 上传至oss-获取token,在onReady()提前准备
//_this.oss();
//step2, 判断文本是否合规
let promise = app.onCheckText(title+content)
//在本轮event loop(事件循环)运行完成之前,回调函数是不会被调用的
//then后的括号里应该是参数param
//https://www.cnblogs.com/qlongbg/p/11603328.html
promise.then(function (value) {
console.log("===enter promise then_pass_" + value)
//step3, 上传至oss-上传图片
//_this.releaseOss(title, content);
_this.switchTab()
},
function (value) {
console.log("===enter promise then_failed_" + value)
});
//step4, 上传信息到数据库
//上传数据库在oss sdk的callback函数里设置
//需要java后台支持
}
},
oss: function () {
var _this = this;
console.log("===this is oss");
//token信息
var strUrl = config.oss_token_url + "?tokenName=ios&userName=1234"
wx.request({
url: strUrl,
method: 'GET',
header: {
'content-type': 'application/json'
},
success: res => {
if (res.statusCode == 200) {
console.log("=== oss getToken 返回值_", res.data)
_this.setData({
accessid: res.data.data.accessid,
policy: res.data.data.policy,
signature: res.data.data.signature,
host: res.data.data.host,
dir: res.data.data.dir,
expire: res.data.data.expire,
securityToken: res.data.data.securityToken,
})
}
}
})
},
//上传照片(阿里云)
uploadAli: function (tag, title, content, photoArr) {
var _this = this;
console.log("===uploadAli_data_tag: ",tag)
console.log("===uploadAli_data_title: ",title)
console.log("===uploadAli_data_content: ",content)
console.log("===uploadAli_data_photoArr: ",photoArr)
var promise = Promise.all(photoArr.map((pic, index) => {
//pic是多图上传模式中的单张图片 index => 0 : length-1
console.log(pic)
//传给阿里云的参数
var policy = this.data.policy;
var accessid = this.data.accessid;
var securityToken = this.data.securityToken;
var signature = this.data.signature;
var path = this.data.host + "/" + this.data.dir;
console.log("policy: " + policy);
console.log("signature: " + signature);
console.log("accessid: " + accessid);
console.log("path: " + path)
var babyData = {
'Filename': '${filename}',
'name': pic.replace('http://tmp/', "").replace('wxfile://', ""),
'key': this.data.dir + '${filename}',
'policy': policy,
'OSSAccessKeyId': accessid,
'success_action_status': '200', //让服务端返回200,不然,默认会返回204
'signature': signature,
'x-oss-security-token': securityToken
}
// 多图n上传流程,通过promise.all实现异步控制
// n-1图直接上传
// 第n图上传+设置callback,在java后台提交参数到数据库
if (index == photoArr.length - 1)
{
var photoArrsm = [];
//由于微信小程序生成的临时路径在上传阿里云的时候不需要上传.所以需要对路径进行处理,但是在手机端上传和PC端上传,图片临时路径的前缀不同,所以需要进行分别的处理
// pc: http://tmp/
// wx: wxfile://
for (let i = 0; i < photoArr.length; i++) {
photoArrsm.push(path + photoArr[i].replace('http://tmp/', "").replace('wxfile://', ""));
}
//生成最终的文件字符串 file1.jpg::file2.png (数据库解析格式)
var image = photoArrsm.join("::")
var userId = wx.getStorageSync('nyxCode')
var strUrl = config.oss_callback_url
var callback_param = {
'callbackUrl': strUrl,
'callbackBody': 'filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}&tag=' + encodeURI(encodeURI(tag)) + '&title=' + encodeURI(encodeURI(title)) + '&content=' + encodeURI(encodeURI(content)) + '&image=' + image + '&userId=' + userId,
'callbackBodyType': "application/x-www-form-urlencoded",
}
var base64_callback_body = base64.encode(JSON.stringify(callback_param));
babyData['callback'] = base64_callback_body
}
return new Promise(function (resolve, reject) {
var host = _this.data.host;
wx.uploadFile({
url: host,
formData: babyData,
name: 'file',
filePath: pic,
header: {
'content-type': 'multipart/form-data'
},
success: function (res) {
console.log("=== index_"+index)
console.log(res)
resolve(res.data);
},
fail: function (err) {
reject(new Error('failed to upload file'));
console.log("fail to upload file")
},
complete: function () {
console.log("complete to upload file");
}
});
});
})).then(_this.switchTab());
},
//发布按钮
releaseOss: function (title, content) {
var _this = this;
console.log("===this is releaseOss");
//获取照片数组
var photoArr = app.globalData.postData.photoArray;
//时间搓
var expire = this.data.expire;
//获取当前时间搓
var expireNow = Date.parse(new Date()) / 1000;
//如果当前时间大于获取的时间 则重新获取oss;
if (expire == undefined || expireNow > expire) {
//重新获取oss
_this.oss();
expire = this.data.expire;
}
var tag = app.globalData.postData.photoTag
this.uploadAli(tag, title, content, photoArr)
},
switchTab() {
//跳转到/activity.wxml页面
app.globalData.switchId = 1
wx.switchTab({
url: '/pages/activity/activity'
});
},
})
{
{
"navigationBarTitleText": "活动发布"
}
\ No newline at end of file
<view class="post" style="height:100%;width:100%">
<view class="post" style="height:100%;width:100%">
<view class="page-body">
<form catchsubmit="onSubmitPost" >
<view class="btn-area">
<button type="normal" formType="submit">活动发布</button>
</view>
<view class="weui-cells__title">#添加内容</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell">
<view class="weui-cell__bd">
<textarea class="weui-textarea" bindinput='bindKeyInput' name="inputContent" placeholder="请输入内容" style="height: 3.3em" />
<view class="weui-textarea-counter">{{inputContent.length}}/300</view>
</view>
</view>
</view>
</form>
</view>
</view>
\ No newline at end of file
page{
page{
height: 100%;
background-color:#f5f8fa;
}
.post{
position: absolute;
bottom: 0;
right:0px;
}
// pages/schedule/schedule.js
// pages/schedule/schedule.js
......@@ -139,47 +139,62 @@ Page({
{
year: 2020,
month: 8,
day: 23,
todoText: '夏日精酿夜\n红酒生蚝趴',
day: 15,
todoText: '周年庆\n烤肉海鲜自助',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
}
]
});
this.calendar.setTodoLabels({
// 待办点标记设置
pos: 'bottom', // 待办点标记位置 ['top', 'bottom']
dotColor: '', // 待办点标记颜色
circle: false, // 待办圆圈标记设置(如圆圈标记已签到日期),该设置与点标记设置互斥
showLabelAlways: false, // 点击时是否显示待办事项(圆点/文字),在 circle 为 true 及当日历配置 showLunar 为 true 时,此配置失效
days: [
},
{
year: 2020,
month: 8,
day: 30,
todoText: '夏日精酿夜\n红酒生蚝趴',
day: 8,
todoText: '599/6瓶套装',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
}
]
});
this.calendar.setTodoLabels({
// 待办点标记设置
pos: 'bottom', // 待办点标记位置 ['top', 'bottom']
dotColor: '', // 待办点标记颜色
circle: false, // 待办圆圈标记设置(如圆圈标记已签到日期),该设置与点标记设置互斥
showLabelAlways: false, // 点击时是否显示待办事项(圆点/文字),在 circle 为 true 及当日历配置 showLunar 为 true 时,此配置失效
days: [
},
{
year: 2020,
month: 8,
day: 31,
todoText: '新西兰活动周\n盲品活动\n品鉴会',
day: 16,
todoText: '帝王嘉品鉴会',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
}
},
{
year: 2020,
month: 8,
day: 3,
todoText: '盲品活动',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
},
{
year: 2020,
month: 8,
day: 1,
todoText: '埃特纳红葡',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
},
{
year: 2020,
month: 8,
day: 13,
todoText: '陈年主题专场',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
},
{
year: 2020,
month: 8,
day: 8,
todoText: '红丹魄白丹魄',
color: '#f40' // 单独定义代办颜色 (标记点、文字)
},
]
});
},
......
<!--pages/my/my-members/my-members.wxml-->
<!--pages/my/my-members/my-members.wxml-->
......@@ -7,7 +7,7 @@
<text class="title">活动</text>
<view class="list">
<view class="items">
<navigator url="matchStudyDetail/matchStudyDetail?studyType=wset1">
<navigator url="/pages/member/activity-post/activity-post">
<image src="/icon/my/activity.png"></image>
</navigator>
<text>活动创建</text>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论