Commit e7fc7c0c by jscat

nyx weapp: 调整流程

parent 5e5035d4
{ {
{ {
"pages": [ "pages": [
"pages/activity/activity", "pages/activity/activity",
"pages/activity/quiz-detail/quiz-detail",
"pages/activity/quiz-result/quiz-result", "pages/activity/quiz-result/quiz-result",
"pages/activity/quiz-info/quiz-info", "pages/activity/quiz-info/quiz-info",
"pages/key/key", "pages/key/key",
"pages/activity/act-address/act-address", "pages/activity/act-address/act-address",
"pages/activity/act-writer/act-writer", "pages/activity/act-writer/act-writer",
"pages/my/my", "pages/my/my",
"pages/key/matchDaily/matchDaily", "pages/key/matchTest/matchTest",
"pages/my/points/points", "pages/my/points/points",
"pages/my/user/user", "pages/my/user/user",
"pages/my/myposts/myposts", "pages/my/myposts/myposts",
......
//config.js API全局域名配置 //config.js API全局域名配置
...@@ -44,6 +44,7 @@ var config={ ...@@ -44,6 +44,7 @@ var config={
user_reg_url: host_key + "/api/nyx/user/reg", user_reg_url: host_key + "/api/nyx/user/reg",
userinfo_query_url: host_key + "/api/nyx/userinfo/query", userinfo_query_url: host_key + "/api/nyx/userinfo/query",
notes_query_url: host_key + "/api/nyx/post/query", notes_query_url: host_key + "/api/nyx/post/query",
activity_query_url: host_key + "/api/nyx/activity/query",
points_query_url: host_key + "/api/nyx/match/point/query", points_query_url: host_key + "/api/nyx/match/point/query",
bonus_query_url: host_key + "/api/nyx/match/bonus/query/id", bonus_query_url: host_key + "/api/nyx/match/bonus/query/id",
socket_url: socket_url, socket_url: socket_url,
......
// pages/activity/activity.js // pages/activity/activity.js
...@@ -10,10 +10,10 @@ Page({ ...@@ -10,10 +10,10 @@ Page({
data: { data: {
category: [ // 导航栏内容数据 category: [ // 导航栏内容数据
{ name: '竞答', id: 'jingda' }, { name: '竞答', id: 'jingda' },
{ name: '饮事', id: 'yinshi' }, { name: '活动', id: 'huodong' },
], ],
curIndex: 0, // 给选中的tab加粗 curIndex: 0, // 给选中的tab加粗
notes: [ activities: [],
// { // {
// note_image: [ "https://1.jpg", "https://2.jpg"], // note_image: [ "https://1.jpg", "https://2.jpg"],
// title: "一天", // title: "一天",
...@@ -21,7 +21,6 @@ Page({ ...@@ -21,7 +21,6 @@ Page({
// writer_name: "无敌花木兰", // writer_name: "无敌花木兰",
// writer_image: "../../icon/icon_avatar3.png" // writer_image: "../../icon/icon_avatar3.png"
// }, // },
],
//分页加载部分 //分页加载部分
isHideLoadMore: false, isHideLoadMore: false,
...@@ -54,7 +53,7 @@ Page({ ...@@ -54,7 +53,7 @@ Page({
this.setData({ this.setData({
curIndex: curIndex, curIndex: curIndex,
}) })
_this.getNotes(0, 1, 4, strCategory); _this.getActivities(0, 1, 4, strCategory);
}, },
// 搜索点击事件 // 搜索点击事件
entrySearch(e) { entrySearch(e) {
...@@ -87,13 +86,13 @@ Page({ ...@@ -87,13 +86,13 @@ Page({
title: '酒肆活动', title: '酒肆活动',
}) })
//初始载入四个推荐notes //初始载入四个推荐的竞答活动
if(_this.__data__.notes.length == 0) if(_this.__data__.activities.length == 0)
{ {
//getNotes(strCategory)
var curIndex = _this.__data__.curIndex var curIndex = _this.__data__.curIndex
var strCategory = _this.__data__.category[curIndex].name var strCategory = _this.__data__.category[curIndex].name
_this.getNotes(0, 1, 4, strCategory);
_this.getActivities(0, 1, 4, strCategory);
} }
}, },
...@@ -151,7 +150,7 @@ Page({ ...@@ -151,7 +150,7 @@ Page({
console.log('加载更多') console.log('加载更多')
setTimeout(() => { setTimeout(() => {
_this.getNotes(1, pageIndex, 4, strSearch); _this.getActivities(1, pageIndex, 4, strSearch);
}, 1000) }, 1000)
} }
else { else {
...@@ -170,17 +169,22 @@ Page({ ...@@ -170,17 +169,22 @@ Page({
* 用户自定义函数 * 用户自定义函数
* *
*/ */
// 获取notes数据 // 获取Activities数据
// scrollType: 是否是翻页 // scrollType: 是否是翻页
getNotes: function (scrollType,pageNum, pageCount, strSearch) { /*
搜索逻辑:
1. 搜索框, tag=strSearch + title=strSearch
2. tab, tag=strSearch
3. 新增的search tab, '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
*/
getActivities: function (scrollType, pageNum, pageCount, strSearch) {
var _this = this; var _this = this;
//如果是"推荐"和"搜索",需要单独处理 // 如果是"推荐"和"搜索",需要单独处理
//搜索时候,需要转换为搜索的关键词 // '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
strSearch = strSearch == "搜索" ? _this.__data__.strSearch : strSearch strSearch = strSearch == "搜索" ? _this.__data__.strSearch : strSearch
var query_url = strSearch == "推荐" ? '&top=1' : '&tag=' + strSearch + '&title=' + strSearch var query_url = '&tag=' + strSearch + '&title=' + strSearch
var strUrl = config.activity_query_url + "?pageCount=" + pageCount
var strUrl = config.notes_query_url + "?pageCount=" + pageCount
+ "&pageNum=" + pageNum + query_url + "&pageNum=" + pageNum + query_url
config.debug == 1 ? console.log("===strUrl is: \"" + strUrl + "\"") : "" config.debug == 1 ? console.log("===strUrl is: \"" + strUrl + "\"") : ""
wx.request({ wx.request({
...@@ -200,25 +204,39 @@ Page({ ...@@ -200,25 +204,39 @@ Page({
} }
for (var i = 0; i < res.data.data.length; i++) { for (var i = 0; i < res.data.data.length; i++) {
var result = {} var result = {}
result["post_id"] = res.data.data[i].postId result["activity_id"] = res.data.data[i].activityId
result["note_image"] = res.data.data[i].noteImage.split("::") result["member_name"] = res.data.data[i].memberName
result["title"] = res.data.data[i].title result["member_slogan"] = res.data.data[i].memberSlogan
result["member_id"] = res.data.data[i].memberId
result["member_status"] = res.data.data[i].memberStatus
result["tag"] = res.data.data[i].tag result["tag"] = res.data.data[i].tag
result["title"] = res.data.data[i].title
result["num_like"] = res.data.data[i].numLike
result["content"] = res.data.data[i].content result["content"] = res.data.data[i].content
result["like"] = res.data.data[i].numLike result["quiz"] = res.data.data[i].quiz
result["writer_name"] = res.data.data[i].nickName == null ? "匿名用户" : res.data.data[i].nickName result["point"] = res.data.data[i].point
result["writer_image"] = res.data.data[i].avatarUrl == null ? '/icon/icon_avatar1.png' : res.data.data[i].avatarUrl result["product_desc"] = res.data.data[i].productDesc
result["price"] = res.data.data[i].price
result["note_image"] = res.data.data[i].noteImage.split("::")
var url = "../activity/quiz-info/quiz-info?"
+"&note_image="+res.data.data[i].noteImage //传递原始string数据, List不正确
+"&title="+result["title"]
+"&content="+result["content"]
+"&like="+result["num_like"]
+"&quiz="+result["quiz"]
+"&member_name="+result["member_name"]
+"&member_slogan="+result["member_slogan"]
result["url"] = url
list.push(result) list.push(result)
} }
//进行翻页设置(加载更多) //进行翻页设置(加载更多)
if (scrollType == 1) { if (scrollType == 1) {
var notesList = _this.__data__.notes; var activitiesList = _this.__data__.activities;
list = notesList.concat(list) list = activitiesList.concat(list)
} }
_this.setData({ _this.setData({
notes: list, activities: list,
pageIndex: pageNum + 1, pageIndex: pageNum + 1,
isHideLoadMore: bisHideLoadMoreType, isHideLoadMore: bisHideLoadMoreType,
}) })
...@@ -247,7 +265,7 @@ Page({ ...@@ -247,7 +265,7 @@ Page({
curIndex: 1, curIndex: 1,
}); });
var strCategory = _this.__data__.category[1].name var strCategory = _this.__data__.category[1].name
_this.getNotes(0, 1, 4, strCategory); _this.getActivities(0, 1, 4, strCategory);
}, },
// * 删除输入字符串 // * 删除输入字符串
clearInput: function(){ clearInput: function(){
...@@ -262,7 +280,7 @@ Page({ ...@@ -262,7 +280,7 @@ Page({
var strSearch = e.detail.value var strSearch = e.detail.value
var cat = _this.__data__.category var cat = _this.__data__.category
console.log("===input search text_" + strSearch) console.log("===input search text_" + strSearch)
_this.getNotes(0, 1, 4, strSearch); _this.getActivities(0, 1, 4, strSearch);
if(cat[cat.length-1].name != "搜索") if(cat[cat.length-1].name != "搜索")
{ {
cat.push({ cat.push({
...@@ -293,16 +311,16 @@ Page({ ...@@ -293,16 +311,16 @@ Page({
if (res.statusCode == 200) { if (res.statusCode == 200) {
//表示查询成功 //表示查询成功
console.log(res.data); console.log(res.data);
var notesList = _this.data.notes var activitiesList = _this.data.activities
var likeDict = _this.data.likeDict var likeDict = _this.data.likeDict
for (var j = 0; j < notesList.length; j++) { for (var j = 0; j < activitiesList.length; j++) {
if (notesList[j].post_id == postId) if (activitiesList[j].post_id == postId)
notesList[j].like = parseInt(notesList[j].like) + 1 activitiesList[j].like = parseInt(activitiesList[j].like) + 1
likeDict[postId] = 1 likeDict[postId] = 1
} }
_this.setData({ _this.setData({
likeDict: likeDict, likeDict: likeDict,
notes: notesList, activities: activitiesList,
}) })
} }
} }
......
<view class="page"> <view class="page">
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
<!-- 文章列表 --> <!-- 文章列表 -->
<scroll-view class="list-block" scroll-y="true" style="height:{{noteHeight}}px"> <scroll-view class="list-block" scroll-y="true" style="height:{{noteHeight}}px">
<!-- 文章封面内容 --> <!-- 文章封面内容 -->
<view class="notes-block" wx:for="{{notes}}" wx:for-item="item" wx:key="{{index}}"> <view class="notes-block" wx:for="{{activities}}" wx:for-item="item" wx:key="{{index}}">
<view class="note-info"> <view class="note-info">
<navigator url="../activity/quiz-info/quiz-info?title={{item.title}}&content={{item.content}}&like={{item.like}}&note_image={{item.note_image}}&writer_name={{item.writer_name}}&writer_image={{item.writer_image}}" > <navigator url="{{item.url}}" >
<view class="note-img"> <view class="note-img">
<image src="{{item.note_image[0]}}"/> <image src="{{item.note_image[0]}}"/>
</view> </view>
...@@ -74,10 +74,15 @@ ...@@ -74,10 +74,15 @@
<view class="note-handle"> <view class="note-handle">
<navigator class="writer" url="../activity/act-writer/act-writer"> <navigator class="writer" url="../activity/act-writer/act-writer">
</navigator> </navigator>
<span class="name">{{item.writer_name}}</span> <block wx:if="{{item.tag=='竞答'}}" >
<span class="name">{{item.member_name}}</span>
</block>
<block wx:else>
<span class="price">¥{{item.price}}</span>
</block>
<view class="like" bindtap="onSubmitLike" data-post-id="{{item.post_id}}"> <view class="like" bindtap="onSubmitLike" data-post-id="{{item.post_id}}">
<image class="like-icon" src="../../icon/activity/like.png" style="width:30rpx;height:30rpx"/> <image class="like-icon" src="../../icon/activity/like.png" style="width:30rpx;height:30rpx"/>
<span>{{item.like}}</span> <span>{{item.num_like}}</span>
</view> </view>
</view> </view>
</view> </view>
......
/* /*
...@@ -82,10 +82,20 @@ ...@@ -82,10 +82,20 @@
} }
.name{ .name{
margin-left: 0px; margin-left: 0px;
margin-right : 40rpx;
text-align: center; text-align: center;
line-height: 38px; line-height: 38px;
font-size: 28rpx; font-size: 28rpx;
} }
.price{
margin-left: 0px;
margin-right : 40rpx;
text-align: center;
line-height: 38px;
font-size: 28rpx;
color: #F00;
font-weight: bold;
}
.writer image{ .writer image{
width: 30px; width: 30px;
height: 30px; height: 30px;
......
// pages/index/note-info/note-info.js // pages/index/note-info/note-info.js
...@@ -11,7 +11,7 @@ Page({ ...@@ -11,7 +11,7 @@ Page({
contentHeight: "", contentHeight: "",
scrollLeft: 0, //切换栏的滚动条位置 scrollLeft: 0, //切换栏的滚动条位置
curIndex : 0, curIndex : 0,
notes: {}, quiz: {},
}, },
...@@ -28,15 +28,18 @@ Page({ ...@@ -28,15 +28,18 @@ Page({
contentHeight : windowHeight * 0.675, contentHeight : windowHeight * 0.675,
}) })
var notes = _this.__data__.notes var quiz = _this.__data__.quiz
if (Object.keys(notes).length==0 && options.title != "") if (Object.keys(quiz).length==0 && options.title != "")
{ {
notes['title'] = options.title; quiz['note_image'] = options.note_image.split("::");
notes['content'] = options.content; quiz['title'] = options.title;
notes['note_image'] = options.note_image.split(","); quiz['content'] = options.content.split("::");
notes['like'] = options.like; quiz['like'] = options.like;
notes['writer_name'] = options.writer_name == "null" ? "匿名用户" : options.writer_name; quiz['quiz'] = options.quiz;
notes['writer_image'] = options.writer_image == "null" ? '/icon/icon_avatar1.png' : options.writer_image; quiz['member_name'] = options.member_name;
quiz['member_slogan'] = options.member_slogan;
quiz['writer_name'] = options.writer_name == "null" ? "匿名用户" : options.writer_name;
quiz['writer_image'] = options.writer_image == "null" ? '/icon/icon_avatar1.png' : options.writer_image;
} }
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
...@@ -45,7 +48,7 @@ Page({ ...@@ -45,7 +48,7 @@ Page({
_this.setData( _this.setData(
{ {
notes: notes, quiz: quiz,
} }
) )
...@@ -120,13 +123,13 @@ Page({ ...@@ -120,13 +123,13 @@ Page({
getSelectItem: function (e) { getSelectItem: function (e) {
var that = this; var that = this;
var preCurIndex = that.data.curIndex; var preCurIndex = that.data.curIndex;
var itemWidth = e.detail.scrollWidth / that.data.notes.note_image.length;//每个商品的宽度 var itemWidth = e.detail.scrollWidth / that.data.quiz.note_image.length;//每个商品的宽度
var scrollLeft = e.detail.scrollLeft;//滚动宽度 var scrollLeft = e.detail.scrollLeft;//滚动宽度
var curIndex = Math.round(scrollLeft / itemWidth);//通过Math.round方法对滚动大于一半的位置进行进位 var curIndex = Math.round(scrollLeft / itemWidth);//通过Math.round方法对滚动大于一半的位置进行进位
var newScrollLeft = 0 var newScrollLeft = 0
// 目标: 始终让图片居中显示 // 目标: 始终让图片居中显示
if (curIndex != preCurIndex if (curIndex != preCurIndex
|| (curIndex == that.data.notes.note_image.length - 1 && scrollLeft > that.data.windowWidth * (that.data.notes.note_image.length - 1)) || (curIndex == that.data.quiz.note_image.length - 1 && scrollLeft > that.data.windowWidth * (that.data.quiz.note_image.length - 1))
) )
{ {
newScrollLeft = that.data.windowWidth * curIndex newScrollLeft = that.data.windowWidth * curIndex
...@@ -144,7 +147,7 @@ Page({ ...@@ -144,7 +147,7 @@ Page({
//跳转到知识竞答页面 //跳转到知识竞答页面
toGame: function (e) { toGame: function (e) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/key/matchDaily/matchDaily" url: "/pages/key/matchTest/matchTest"
}); });
}, },
......
<view class="page"> <view class="page">
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- 图片 --> <!-- 图片 -->
<scroll-view class="scroll-view_H" scroll-x scroll-with-animation style="width: 100%;height: 90%;" bindscroll="getSelectItem" scroll-left="{{scrollLeft}}"> <scroll-view class="scroll-view_H" scroll-x scroll-with-animation style="width: 100%;height: 90%;" bindscroll="getSelectItem" scroll-left="{{scrollLeft}}">
<block wx:for="{{notes.note_image}}" wx:key="unique" wx:for-index="id" wx:for-item="item"> <block wx:for="{{quiz.note_image}}" wx:key="unique" wx:for-index="id" wx:for-item="item">
<view class="scroll_item {{item.selected ? 'selected' : ''}}" data-index='{{item.index}}' bindtap='selectProItem'> <view class="scroll_item {{item.selected ? 'selected' : ''}}" data-index='{{item.index}}' bindtap='selectProItem'>
<image src="{{item}}" mode="widthFix"/> <image src="{{item}}" mode="widthFix"/>
</view> </view>
...@@ -13,22 +13,22 @@ ...@@ -13,22 +13,22 @@
<view class="note"> <view class="note">
<view class="note-title" style="font-weight: bold"> <view class="note-title" style="font-weight: bold">
Renaissance Bar知识竞答 {{quiz.member_name}} {{quiz.title}}
</view> </view>
<view class="note-content"> <view class="note-content">
共10题 {{quiz.content[0]}}
</view> </view>
<view class="note-content"> <view class="note-content">
可获得5积分 {{quiz.content[1]}}
</view> </view>
</view> </view>
<!-- 企业信息 --> <!-- 企业信息 -->
<view class="note-row"> <view class="note-row">
<image class="writer-image" src="{{notes.writer_image}}"/> <image class="writer-image" src="{{quiz.writer_image}}"/>
<view class="note-column"> <view class="note-column">
<span class="name">Renaissance Bar</span> <span class="name">{{quiz.member_name}}</span>
<span class="name">充满爱与温度,自由放松的bar</span> <span class="name">{{quiz.member_slogan}}</span>
</view> </view>
</view> </view>
......
// pages/index/note-info/note-info.js // pages/index/note-info/note-info.js
...@@ -104,7 +104,7 @@ Page({ ...@@ -104,7 +104,7 @@ Page({
//跳转到知识竞答页面 //跳转到知识竞答页面
toGame: function (e) { toGame: function (e) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/key/matchDaily/matchDaily" url: "/pages/key/matchTest/matchTest"
}); });
}, },
......
<!--pages/key/key.wxml--> <!--pages/key/key.wxml-->
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- start key view --> <!-- start key view -->
<view class="weui-cells"> <view class="weui-cells">
<scroll-view scroll-y="true" style="height:{{keyHeight}}px;position:fixed; top:0;"> <scroll-view scroll-y="true" style="height:{{keyHeight}}px;position:fixed; top:0;">
<navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/key/matchDaily/matchDaily"> <navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/key/matchTest/matchTest">
<view class="weui-cell__hd"> <view class="weui-cell__hd">
<image src="/icon/daily.png" /> <image src="/icon/daily.png" />
</view> </view>
......
// pages/key/matchDaily/matchDaily.js // pages/key/matchTest/matchTest.js
// pages/key/matchDaily/matchDaily.js // pages/key/matchTest/matchTest.js
var item_list = []; var item_list = [];
var choiceString = []; var choiceString = [];
......
<!--pages/key/matchTest/matchTest.wxml--> <!--pages/key/matchTest/matchTest.wxml-->
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
<view class="weui-flex"> <view class="weui-flex">
<view class="weui-flex__item" bindtap="{{button_disabled==0?'onGetComment':'onTypeNext'}}"> <view class="weui-flex__item" bindtap="{{button_disabled==0?'onGetComment':'onTypeNext'}}">
<view class="placeholder-button"> <view class="placeholder-button">
<image src="{{button_disabled==0?(comment_hidden_type==1?'/icon/matchDaily/checkComment.png':'/icon/matchDaily/checkComment.png'):'/icon/matchDaily/next.png'}}" style="vertical-align:middle;width:60rpx;height:60rpx" /> <image src="{{button_disabled==0?(comment_hidden_type==1?'/icon/matchTest/checkComment.png':'/icon/matchTest/checkComment.png'):'/icon/matchTest/next.png'}}" style="vertical-align:middle;width:60rpx;height:60rpx" />
{{button_disabled==0?(comment_hidden_type==1?"查看评论":"隐藏评论"):"下一题"}}</view> {{button_disabled==0?(comment_hidden_type==1?"查看评论":"隐藏评论"):"下一题"}}</view>
</view> </view>
<view class="weui-flex__item"><view class="{{button_disabled==0?'placeholder-button':'placeholder-button-disabled'}}" bind:tap="onReportBug"> <view class="weui-flex__item"><view class="{{button_disabled==0?'placeholder-button':'placeholder-button-disabled'}}" bind:tap="onReportBug">
<image src="{{button_disabled==0?'/icon/matchDaily/question.png':'/icon/matchDaily/question_0.png'}}" style="vertical-align:middle;width:60rpx;height:60rpx" />这题有问题</view> <image src="{{button_disabled==0?'/icon/matchTest/question.png':'/icon/matchTest/question_0.png'}}" style="vertical-align:middle;width:60rpx;height:60rpx" />这题有问题</view>
</view> </view>
</view> </view>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<view class="weui-media-box__desc" style="font-size:30rpx"> <view class="weui-media-box__desc" style="font-size:30rpx">
{{item.numLike}} {{item.numLike}}
<view bindtap="onSubmitLike" data-comment-id="{{item.commentId}}"> <view bindtap="onSubmitLike" data-comment-id="{{item.commentId}}">
<image src="/icon/matchDaily/like.png" style="width:30rpx;height:30rpx" /> <image src="/icon/matchTest/like.png" style="width:30rpx;height:30rpx" />
</view> </view>
</view> </view>
<!-- end 点赞数 + 图标 --> <!-- end 点赞数 + 图标 -->
......
// pages/post/post.js // pages/post/post.js
...@@ -94,7 +94,7 @@ Page({ ...@@ -94,7 +94,7 @@ Page({
2. 进行图片编辑 2. 进行图片编辑
3. 点击下一步验证图片是否合法合规 navigateToEdit 3. 点击下一步验证图片是否合法合规 navigateToEdit
通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满) 通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满)
1) > 2M会出现45002, content size out of limit错误 1) > 2M会出现 45002, content size out of limit 错误
2) 自动裁剪成4:3 或 1:1 2) 自动裁剪成4:3 或 1:1
*/ */
...@@ -194,7 +194,7 @@ Page({ ...@@ -194,7 +194,7 @@ Page({
// 通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满) // 通过size或其他方式判断是否进行图片处理(裁切,填满,留白,充满)
// 1) > 2M会出现45002, content size out of limit错误 // 1) > 2M会出现45002, content size out of limit错误
// 2) 自动裁剪成4:3(高/宽 1080) 或 1:1 // 2) 自动裁剪成4:3(高/宽 1080) 或 1:1 有品默认1:1
// refer1 微信小程序图片压缩 https://www.jianshu.com/p/1b8a1e96a6d5 // refer1 微信小程序图片压缩 https://www.jianshu.com/p/1b8a1e96a6d5
// refer2 小程序压缩图片(canvas) https://www.jianshu.com/p/ec1f95008dce // refer2 小程序压缩图片(canvas) https://www.jianshu.com/p/ec1f95008dce
onEditPic(res, canvasId) { onEditPic(res, canvasId) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论