瀏覽代碼

返回首页图标替换

tags/富茂链客4.1.0
刘晖 6 年之前
父節點
當前提交
4c54c79373
共有 4 個文件被更改,包括 6 次插入247 次删除
  1. +1
    -0
      pages/ConsumeDetail/ConsumeDetail.js
  2. +1
    -1
      pages/ConsumeDetail/ConsumeDetail.wxml
  3. +0
    -246
      pages/spellDetail/index.js
  4. +4
    -0
      utils/imgurl.js

+ 1
- 0
pages/ConsumeDetail/ConsumeDetail.js 查看文件

@@ -14,6 +14,7 @@ Page({
quesBgUrl: imgurl.ques_bg.url, quesBgUrl: imgurl.ques_bg.url,
dingdanUrl: imgurl.dingdan.url, dingdanUrl: imgurl.dingdan.url,
weixinTitle: imgurl.weixinTitle.url, weixinTitle: imgurl.weixinTitle.url,
home: imgurl.home.url,
cardDetail: null, cardDetail: null,
data: { data: {
title: null title: null


+ 1
- 1
pages/ConsumeDetail/ConsumeDetail.wxml 查看文件

@@ -37,7 +37,7 @@
<text>暂无交易明细</text> <text>暂无交易明细</text>
</view> </view>
<view class='share-bottom'> <view class='share-bottom'>
<button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button>
<button class='goback' wx:if="{{supportTransfer==1}}" bindtap='gotoIndex'><image src='{{home}}' mode="widthFix"></image></button>
<button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> <button type="primary" open-type="share" wx:if="{{supportTransfer==1}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button>
</view> </view>
</view> </view>

+ 0
- 246
pages/spellDetail/index.js 查看文件

@@ -1,246 +0,0 @@
// pages/spellDetail/index.js
var config = require("../../config/config.js");
const Http = require("../../utils/HttpBasics");
const imgurl = require("../../utils/imgurl");
const {spellStatus} = require("../../utils/spell");
Page({

/**
* 页面的初始数据
*/
data: {
tuanzhang: imgurl.tuanzhang.url,
spellBg: imgurl.spellBg.url,
position: imgurl.position.url,
close03: imgurl.close03.url,
paramData:null,
data:null,
clock: "00",
day: "00",
hour: "00",
min: "00",
sec: "00",
spellStatusList: spellStatus,
isMyself:false,
showAlert:false
},
gotoAgain(){
let data = this.data.data;
wx.navigateTo({
url: `/pages/spellGroup/mySpellGroup/index?couponId=${data.couponId}&couponChannelId=${data.couponChannelId}`,
})
},
gotoshare(){
wx.navigateTo({
url: `/pages/spellGroup/mySpellGroup/index?orderId=${this.data.paramData.orderId}&couponId=${this.data.paramData.couponId}&orderGroupId=${this.data.paramData.orderGroupId}&couponChannelId=${this.data.paramData.couponChannelId}`,
})
},
gotoSearch(){
wx.navigateTo({
url: `/pages/spellGroup/spellGroup`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(this.data.spellStatusList, options,7777777)
this.setData({
paramData:options
})
this.getDetail(options);
this.checkUser(options)
// 关闭来自于左上角的分享
wx.hideShareMenu()
},
/**
* 判断用户是否已经在团中
*/
checkUser(options) {
let that = this;
Http.get({
url: config.api.queryAttendStatus,
data: {
id: options.orderGroupId,
}
}).then(res => {
console.log(res.data,3333333333)
that.setData({
isMyself: res.data.attend
})
});
},
/**
* 去使用
*/
gotoUse() {
wx.navigateTo({
url: `/pages/couponorder/index/index`
});
},
/**
* 拼团状态字段转换
*/
changeSatus(status){
console.log(spellStatus,8888888)
return spellStatus.filter(item=>item.value==status)[0].name;
},
// 时间格式化输出,如11:03 25:19 每1s都会调用一次
dateformat(micro_second) {
// 总秒数
var second = Math.floor(micro_second / 1000);
// 天数
var day = Math.floor(second / 3600 / 24) < 10 ? "0" + Math.floor(second / 3600 / 24) : Math.floor(second / 3600 / 24);
// 小时
var hr = Math.floor(second / 3600 % 24) < 10 ? "0" + Math.floor(second / 3600 % 24) : Math.floor(second / 3600 % 24);
// 分钟
var min = Math.floor(second / 60 % 60) < 10 ? "0" + Math.floor(second / 60 % 60) : Math.floor(second / 60 % 60);
// 秒
var sec = Math.floor(second % 60) < 10 ? "0" + Math.floor(second % 60) : Math.floor(second % 60);

// return day + "天" + hr + "小时" + min + "分钟" + sec + "秒";
return {
a1: day,
b1: hr,
c1: min,
d1: sec
}
},
countdown(end_time) {
let that = this;
var EndTime = end_time;
var NowTime = new Date().getTime();
var total_micro_second = EndTime - NowTime || [];
// 渲染倒计时时钟
let obj = that.dateformat(total_micro_second);
if (total_micro_second > 0) {
that.setData({
clock: obj,
day: obj.a1,
hour: obj.b1,
min: obj.c1,
sec: obj.d1,
})
} else {
that.setData({
clock: "00",
day: "00",
hour: "00",
min: "00",
sec: "00",
})
}
setTimeout(function () {
total_micro_second -= 1000;
that.countdown(end_time);
}, 1000)
},
//关闭弹框
gotoClose(){
this.setData({
showAlert:false
})
},
//跳转拼团列表
gotoSpellList(){
wx.navigateTo({
url: '/pages/spellGroup/spellGroup',
})
},
getDetail(){
let that = this;
Http.get({
url: config.api.queryOrderGroupStatus,
data: {
orderId: this.data.paramData.orderId,
couponId: this.data.paramData.couponId,
id: this.data.paramData.orderGroupId
}
}).then(res => {
console.log(res,555555555)
let data=res.data;
data.statustext=that.changeSatus(data.status);
if(data.status!=11){
that.countdown(data.expiredDate);
}
data.salePrice = (data.salePrice/100).toFixed(2)
for (let i = 0; i < data.remainPeople;i++){
let a={};
data.userList.push(a)
}
if (res.data.couponStatus!=0){
that.setData({
showAlert: true
})
}
that.setData({
data:res.data
})
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},
/**
* 用户点击右上角分享
*/
// paramData
onShareAppMessage: function (res) {
if (res.from === 'button') {
console.log(res, 3333333333333333333333)
// 来自页面内转发按钮
let _this = this;
return {
title: '拼团',
path: `/pages/index/index?couponId=${_this.data.data.couponId}&orderGroupId=${_this.data.data.orderGroupId}&couponChannelId=${_this.data.paramData.couponChannelId}&orderId=${_this.data.data.orderId}`,
imageUrl: _this.data.data.coverImg,
success: function (res) {
// 转发成功
},
fail: function (res) {
// 转发失败
}
}
} else {
console.log(res, 444444444444444444)
}
}
})

+ 4
- 0
utils/imgurl.js 查看文件

@@ -380,4 +380,8 @@ module.exports = {
'url': baseUrl + 'close03.png', 'url': baseUrl + 'close03.png',
'name': '拼团页面关闭图标' 'name': '拼团页面关闭图标'
}, },
'home': {
'url': baseUrl + 'home.png',
'name': '返回首页图标'
},
} }

Loading…
取消
儲存