Commit c53424b8 by 谢中龙

修改接口地址和部分

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