Commit c53424b8 by 谢中龙

修改接口地址和部分

parent 333d78d8
...@@ -167,20 +167,27 @@ class Scratch { ...@@ -167,20 +167,27 @@ class Scratch {
const pos = this.drawRect(e.touches[0].x, e.touches[0].y) const pos = this.drawRect(e.touches[0].x, e.touches[0].y)
this.ctx.clearRect(pos[0], pos[1], pos[2], pos[2]) this.ctx.clearRect(pos[0], pos[1], pos[2], pos[2])
this.ctx.draw(true) this.ctx.draw(true)
this.areaIsOk();
} }
touchEnd (e) { touchEnd (e) {
if (!this.isStart) return if (!this.isStart) return
// 自动清楚采用点范围值方式判断 // 自动清楚采用点范围值方式判断
const { canvasWidth, canvasHeight, minX, minY, maxX, maxY } = this this.areaIsOk();
if (maxX - minX > .2 * canvasWidth && maxY - minY > .2 * canvasHeight) { }
this.ctx.draw()
this.endCallBack && this.endCallBack() //清除
this.isStart = false areaIsOk(){
this.page.setData({ const { canvasWidth, canvasHeight, minX, minY, maxX, maxY } = this
'isScroll': true if (maxX - minX > .2 * canvasWidth && maxY - minY > .2 * canvasHeight) {
}) this.ctx.draw()
} this.endCallBack && this.endCallBack()
this.isStart = false
this.page.setData({
'isScroll': true
})
}
} }
reset () { reset () {
......
...@@ -68,7 +68,7 @@ wxService.page({ ...@@ -68,7 +68,7 @@ wxService.page({
//记录分享数据 //记录分享数据
markShareRecords(memberId,activityId){ markShareRecords(memberId,activityId){
wxService.post(`/marketing/lotteryMobile/shareRecord`,{ wxService.post(`/marketing/lottery/shareRecord`,{
activityId : activityId, activityId : activityId,
memberId : memberId memberId : memberId
}).then(res => {}); }).then(res => {});
...@@ -92,7 +92,7 @@ wxService.page({ ...@@ -92,7 +92,7 @@ wxService.page({
//获取活动详情 //获取活动详情
getActivityInfo(){ getActivityInfo(){
wxService.get(`/marketing/lottery/findById?id=${this.data.activityId}`).then(res => { wxService.get(`/marketing/lotterySet/findById?id=${this.data.activityId}`).then(res => {
let {result , data} = res.data; let {result , data} = res.data;
if(result == 0 && data){ if(result == 0 && data){
this.data.activityInfo = data; this.data.activityInfo = data;
...@@ -130,7 +130,7 @@ wxService.page({ ...@@ -130,7 +130,7 @@ wxService.page({
} ; } ;
const { memberId } = wx.getStorageSync('_baseUserInfo'); const { memberId } = wx.getStorageSync('_baseUserInfo');
let activityId = this.data.activityInfo.id; let activityId = this.data.activityInfo.id;
wxService.post(`/marketing/lotteryMobile/getLotteryNumber?activityId=${activityId}&memberId=${memberId}`).then(res => { wxService.post(`/marketing/lottery/getLotteryNumber?activityId=${activityId}&memberId=${memberId}`).then(res => {
if(res){ if(res){
let count = res.data.data ? res.data.data : 0; let count = res.data.data ? res.data.data : 0;
this.data.leftNum = count; this.data.leftNum = count;
...@@ -213,7 +213,7 @@ wxService.page({ ...@@ -213,7 +213,7 @@ wxService.page({
const { memberId } = wx.getStorageSync('_baseUserInfo'); const { memberId } = wx.getStorageSync('_baseUserInfo');
let activityId = this.data.activityInfo.id; let activityId = this.data.activityInfo.id;
let self = this; let self = this;
wxService.get(`/marketing/lotteryMobile/lottery?activityId=${activityId}&memberId=${memberId}`).then(res => { wxService.get(`/marketing/lottery/lottery?activityId=${activityId}&memberId=${memberId}`).then(res => {
if(res){ if(res){
if(res.data.result == 0){ if(res.data.result == 0){
if(!res.data.data){ if(!res.data.data){
......
...@@ -201,7 +201,6 @@ class Http { ...@@ -201,7 +201,6 @@ class Http {
}); });
} }
else if (error.msg && error.msg !='该用户尚未登录'){ else if (error.msg && error.msg !='该用户尚未登录'){
setTimeout(() => { setTimeout(() => {
wx.showToast({ wx.showToast({
title: `${error.msg}`, title: `${error.msg}`,
......
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