Browse Source

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

tags/C.10.02
hurui 5 years ago
parent
commit
22506af871
8 changed files with 69 additions and 45 deletions
  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 View File

@@ -10,46 +10,14 @@ Component({
},
data: {
flag: false,
alphaData: null,
gameUrl: ''
alphaData1: null,
},
methods: {
gotoGg: function (e) {
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 () {
this.setData({ flag: false })
@@ -62,7 +30,7 @@ Component({
that.setData({ flag: true })
}, 500)
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 View File

@@ -55,6 +55,7 @@ Page({
loading: true,
fistLogin: null,
alphaData: null,
alphaData1: null,
swiperCurrent: 0,
title: null,
weappShareTitle: '', //分享标题
@@ -68,6 +69,7 @@ Page({
couponId: '', //游戏返回时传回的字段
played: false, //从游戏页面跳回首页返回true
havePlayEd: app.globalData.havePlayEd,
havePlayEd1:app.globalData.havePlayEd1,
staticGamedata: {},
showIf: false,
showPages: false,
@@ -79,6 +81,15 @@ Page({
showGg: false,
ggdata:{}
},
alphaClick1: function (even) {
var animation = wx.createAnimation({})
animation.opacity(0).step({
duration: 2000
})
this.setData({
alphaData: animation.export()
})
},
alphaClick: function(even) {
var animation = wx.createAnimation({})
animation.opacity(0).step({
@@ -252,8 +263,10 @@ Page({
}
let that = this;
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 是否有普通的优惠券购买
* couponNum2 是否有新买的消费卡
@@ -280,6 +293,10 @@ Page({
setTimeout(function() {
that.alphaClick();
}, 8000)
// 如果有广告
setTimeout(function () {
that.alphaClick1();
}, 8000)
},
getmemberId: function(token) {
let that = this;
@@ -663,7 +680,7 @@ Page({
showGg: false
})
that.getGameOne(app.globalData.token)
that.alphaClick();
that.alphaClick1();
})
},
/**


+ 1
- 1
index/index.wxml View File

@@ -108,7 +108,7 @@
<!-- 游戏蒙层 -->
<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 class='signin' wx:if="{{fistLogin}}" animation="{{alphaData}}">


+ 18
- 2
pages/integralmall/index.js View File

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

that.setData({
score: res.data.score,
levelName: res.data.levelName,
@@ -186,6 +187,21 @@ Page({
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) {
var that = this;
if (that.data.allow_load) {


+ 5
- 2
pages/integralmall/index.wxml View File

@@ -42,8 +42,11 @@
<view class='no-data-text'>暂无数据</view>
</view>
<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 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'>


+ 10
- 1
pages/integralmall/index.wxss View File

@@ -477,7 +477,6 @@ button::after{ border: none; }
padding: 0 3%
}
.sort view{
height:60rpx;
width: 180rpx;
line-height: 60rpx;
color: #fff;
@@ -485,4 +484,14 @@ button::after{ border: none; }
text-align: center;
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%);
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 View File

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

that.setData({
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"),


+ 12
- 0
utils/imgurl.js View File

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

Loading…
Cancel
Save