Bläddra i källkod

[积分商城][修改][排序]

tags/C.10.02
hurui 5 år sedan
förälder
incheckning
22506af871
8 ändrade filer med 69 tillägg och 45 borttagningar
  1. +4
    -36
      components/advertisement/advertisement.js
  2. +19
    -2
      index/index.js
  3. +1
    -1
      index/index.wxml
  4. +18
    -2
      pages/integralmall/index.js
  5. +5
    -2
      pages/integralmall/index.wxml
  6. +10
    -1
      pages/integralmall/index.wxss
  7. +0
    -1
      pages/radetail/index.js
  8. +12
    -0
      utils/imgurl.js

+ 4
- 36
components/advertisement/advertisement.js Visa fil

@@ -10,46 +10,14 @@ Component({
}, },
data: { data: {
flag: false, flag: false,
alphaData: null,
gameUrl: ''
alphaData1: null,
}, },
methods: { methods: {
gotoGg: function (e) { gotoGg: function (e) {
let that = this; let that = this;
Http.get({
url: config.api.checkPhoneStatus,
data: {}
wx.navigateTo({
url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId,
}) })
.then(res => {
console.log(e.currentTarget.dataset)
wx.navigateTo({
url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId ,
})
})
.catch(err => {
if (err.code == 11005) {
// 用户手机未授权
/**
* 将值传到用户手机号授权的页面
*
*/
wx.redirectTo({
url: "/pages/getphoneInfo/index?path=index&pagePath=" + e.currentTarget.dataset.data.pagePath + "&id=" + e.currentTarget.dataset.data.id + "&couponChannelId=" + e.currentTarget.dataset.data.produceId
});
} else if (err.code == 11006) {
// 用户手机已加密
wx.redirectTo({
url: "/pages/phoneinput/phoneinput?path=index&pagePath=" + e.target.dataset.data.pagePath + "&id=" + e.currentTarget.dataset.data.id + "&couponChannelId=" + e.currentTarget.dataset.data.produceId
});
} else {
wx.showToast({
title: err.errMsg,
icon: 'none',
duration: 2000,
mask: false
});
}
})
}, },
a: function () { a: function () {
this.setData({ flag: false }) this.setData({ flag: false })
@@ -62,7 +30,7 @@ Component({
that.setData({ flag: true }) that.setData({ flag: true })
}, 500) }, 500)
animation.rotateZ(180).scale(0).opacity(0.5).step({ duration: 1000 }) animation.rotateZ(180).scale(0).opacity(0.5).step({ duration: 1000 })
that.setData({ alphaData: animation.export() });
that.setData({ alphaData1: animation.export() });
}, },
}, },
}); });

+ 19
- 2
index/index.js Visa fil

@@ -55,6 +55,7 @@ Page({
loading: true, loading: true,
fistLogin: null, fistLogin: null,
alphaData: null, alphaData: null,
alphaData1: null,
swiperCurrent: 0, swiperCurrent: 0,
title: null, title: null,
weappShareTitle: '', //分享标题 weappShareTitle: '', //分享标题
@@ -68,6 +69,7 @@ Page({
couponId: '', //游戏返回时传回的字段 couponId: '', //游戏返回时传回的字段
played: false, //从游戏页面跳回首页返回true played: false, //从游戏页面跳回首页返回true
havePlayEd: app.globalData.havePlayEd, havePlayEd: app.globalData.havePlayEd,
havePlayEd1:app.globalData.havePlayEd1,
staticGamedata: {}, staticGamedata: {},
showIf: false, showIf: false,
showPages: false, showPages: false,
@@ -79,6 +81,15 @@ Page({
showGg: false, showGg: false,
ggdata:{} ggdata:{}
}, },
alphaClick1: function (even) {
var animation = wx.createAnimation({})
animation.opacity(0).step({
duration: 2000
})
this.setData({
alphaData: animation.export()
})
},
alphaClick: function(even) { alphaClick: function(even) {
var animation = wx.createAnimation({}) var animation = wx.createAnimation({})
animation.opacity(0).step({ animation.opacity(0).step({
@@ -252,8 +263,10 @@ Page({
} }
let that = this; let that = this;
that.setData({ that.setData({
havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false
havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false,
havePlayEd1:app.globalData.havePlayEd1?app.globalData.havePlayEd1 : false
}) })

/** /**
* couponNum 是否有普通的优惠券购买 * couponNum 是否有普通的优惠券购买
* couponNum2 是否有新买的消费卡 * couponNum2 是否有新买的消费卡
@@ -280,6 +293,10 @@ Page({
setTimeout(function() { setTimeout(function() {
that.alphaClick(); that.alphaClick();
}, 8000) }, 8000)
// 如果有广告
setTimeout(function () {
that.alphaClick1();
}, 8000)
}, },
getmemberId: function(token) { getmemberId: function(token) {
let that = this; let that = this;
@@ -663,7 +680,7 @@ Page({
showGg: false showGg: false
}) })
that.getGameOne(app.globalData.token) that.getGameOne(app.globalData.token)
that.alphaClick();
that.alphaClick1();
}) })
}, },
/** /**


+ 1
- 1
index/index.wxml Visa fil

@@ -108,7 +108,7 @@
<!-- 游戏蒙层 --> <!-- 游戏蒙层 -->
<g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" /> <g-entry id="listss" wx:if="{{showGame&&!played&&!havePlayEd}}" gamedata="{{gamedata}}" bind:myevent="" />
<!-- 广告蒙层 --> <!-- 广告蒙层 -->
<c-advertisement id="advertisement" wx:if="{{showGg&&!played&&!havePlayEd}}" ggdata="{{ggdata}}"/>
<c-advertisement id="advertisement" wx:if="{{showGg&&!havePlayEd1}}" ggdata="{{ggdata}}"/>
</view> </view>
<!-- 顶部签到成长值 --> <!-- 顶部签到成长值 -->
<view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}"> <view class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}">


+ 18
- 2
pages/integralmall/index.js Visa fil

@@ -30,7 +30,9 @@ Page({
reloadIf: false, reloadIf: false,
creditAmount: 0, creditAmount: 0,
score: '0', score: '0',
sort:imgurl.sort.url,
up:imgurl.up.url,
down:imgurl.down.url
}, },
qrcodeH: function () { qrcodeH: function () {
var that = this; var that = this;
@@ -84,7 +86,6 @@ Page({
showEdit: true showEdit: true
}) })
} }

that.setData({ that.setData({
score: res.data.score, score: res.data.score,
levelName: res.data.levelName, levelName: res.data.levelName,
@@ -186,6 +187,21 @@ Page({
url: '/pages/integralmall/integraHistory/index', url: '/pages/integralmall/integraHistory/index',
}) })
}, },
//我可换购
canSort(){
},
//所需积分
need(e){
var that = this;
// if()
console.log(e.target)
let clickNum = []

that.setData({
sort :imgurl.down.url
})
},
getList(pageNum) { getList(pageNum) {
var that = this; var that = this;
if (that.data.allow_load) { if (that.data.allow_load) {


+ 5
- 2
pages/integralmall/index.wxml Visa fil

@@ -42,8 +42,11 @@
<view class='no-data-text'>暂无数据</view> <view class='no-data-text'>暂无数据</view>
</view> </view>
<view class='sort'> <view class='sort'>
<view>我可换购</view>
<view>所需积分</view>
<view bindtap='can'>我可换购</view>
<view class='need' bindtap='need'>
<text>所需积分</text>
<image src='{{sort}}' moda="aspectFill" ></image>
</view>
</view> </view>
<view class='content' wx:if='{{lists.length>0}}'> <view class='content' wx:if='{{lists.length>0}}'>
<view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> <view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'>


+ 10
- 1
pages/integralmall/index.wxss Visa fil

@@ -477,7 +477,6 @@ button::after{ border: none; }
padding: 0 3% padding: 0 3%
} }
.sort view{ .sort view{
height:60rpx;
width: 180rpx; width: 180rpx;
line-height: 60rpx; line-height: 60rpx;
color: #fff; color: #fff;
@@ -485,4 +484,14 @@ button::after{ border: none; }
text-align: center; text-align: center;
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%);
border-radius: 20rpx; border-radius: 20rpx;
}
.need{
justify-content: center;/*水平居中*/
align-items: center; /*垂直居中*/
display: flex;
}
.need image{
margin-left:5rpx;
width: 40rpx;
height: 40rpx;
} }

+ 0
- 1
pages/radetail/index.js Visa fil

@@ -50,7 +50,6 @@ Page({
that.setData({ that.setData({
data: res.data.activity data: res.data.activity
}) })

that.setData({ that.setData({
activityStartTime: util.formatTime(res.data.activity.activityStartTime, "yyyy-MM-dd hh:mm:ss"), activityStartTime: util.formatTime(res.data.activity.activityStartTime, "yyyy-MM-dd hh:mm:ss"),
activityEndTime: util.formatTime(res.data.activity.activityEndTime, "yyyy-MM-dd hh:mm:ss"), activityEndTime: util.formatTime(res.data.activity.activityEndTime, "yyyy-MM-dd hh:mm:ss"),


+ 12
- 0
utils/imgurl.js Visa fil

@@ -721,4 +721,16 @@ module.exports = {
'url': baseUrl + "we.png", 'url': baseUrl + "we.png",
'name': '' 'name': ''
}, },
"sort":{
"url":baseUrl + "noSort.png",
'name':''
},
'up':{
'url' : baseUrl + 'up.png',
'name':''
},
'down':{
'url' : baseUrl + 'down.png',
'name':''
}
} }

Laddar…
Avbryt
Spara