ソースを参照

[bug修改]

tags/同保楼3.3.1
meo 6年前
コミット
123745bf13
12個のファイルの変更87行の追加75行の削除
  1. +3
    -3
      config/config.js
  2. +1
    -2
      pages/bargain/bargain.js
  3. +15
    -18
      pages/bargain/bargain.wxml
  4. +4
    -1
      pages/bargain/bargain.wxss
  5. +8
    -2
      pages/coupon/detail/index.js
  6. +1
    -1
      pages/coupon/detail/index.wxss
  7. +33
    -41
      pages/czdetail/czdetail.js
  8. +2
    -2
      pages/czdetail/czdetail.wxml
  9. +17
    -2
      pages/order/detail/index.js
  10. +1
    -1
      pages/order/detail/index.wxml
  11. +1
    -1
      pages/passCar/choicecoupon/choicecoupon.js
  12. +1
    -1
      project.config.json

+ 3
- 3
config/config.js ファイルの表示

@@ -1,9 +1,9 @@
var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
var appId = extConfig.appId; var appId = extConfig.appId;
var config = { var config = {
url: "https://ciformall.youlane.cn/C/api",
// url: "https://ciformall.youlane.cn/C/api",
// url:"https://c.malls.iformall.com/C/api", // url:"https://c.malls.iformall.com/C/api",
// url:'https://ctest.malls.iformall.com/C/api',
url:'https://ctest.malls.iformall.com/C/api',
// url:'http://10.100.33.68:7000/C/api', // url:'http://10.100.33.68:7000/C/api',
// url: 'http://202.165.179.86:4000/C/api', // url: 'http://202.165.179.86:4000/C/api',
api: { api: {
@@ -219,7 +219,7 @@ var config = {
}, },


weapp: { weapp: {
AppId: "wxea71200db93d756b"
AppId: "wx649b3be73c1afe47"
}, },
ErrorCode: { ErrorCode: {


+ 1
- 2
pages/bargain/bargain.js ファイルの表示

@@ -21,10 +21,9 @@ Page({
loadingUrl: imgurl.loading.url, loadingUrl: imgurl.loading.url,
flag: 'bargaingoods', flag: 'bargaingoods',
}, },
onShow: function () {
onLoad: function () {
let that = this; let that = this;
that.getBannerlist(); that.getBannerlist();
console.log("onShow")
var todayDate=new Date().getTime(); var todayDate=new Date().getTime();
that.setData({ that.setData({
todayDate:todayDate todayDate:todayDate


+ 15
- 18
pages/bargain/bargain.wxml ファイルの表示

@@ -4,7 +4,7 @@
<c-banner wx:key="unique" list="{{list}}" /> <c-banner wx:key="unique" list="{{list}}" />
</view> </view>
<view class="list" hover-class="none" hover-stop-propagation="false"> <view class="list" hover-class="none" hover-stop-propagation="false">
<view class="listitem clearfix" wx:for="{{lists}}" wx:key="{{index}}" hover-class="none" hover-stop-propagation="false" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'>
<view class="listitem clearfix" wx:for="{{lists}}" wx:key="{{index}}" hover-stop-propagation="false" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'>
<image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true" binderror="" <image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true" binderror=""
bindload=""></image> bindload=""></image>
<view class="fl ri" hover-class="none" hover-stop-propagation="false"> <view class="fl ri" hover-class="none" hover-stop-propagation="false">
@@ -15,17 +15,12 @@
</view> </view>
<view class="botton" hover-class="none" hover-stop-propagation="false">发起砍价</view> <view class="botton" hover-class="none" hover-stop-propagation="false">发起砍价</view>
</view> </view>
<view class='dingdan' wx:if="{{list.length==0}}">
<image src="{{actUrl}}" mode="widthFix"></image>
<text>请您敬请期待</text>
<text>我们正在筹备一大波优惠活动</text>
</view>
<view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view> <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view>
<view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view>
<!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> -->
</view> </view>
</view> </view>
<view class="list mybargain" wx:if="{{mybargain}}" hover-class="none" hover-stop-propagation="false"> <view class="list mybargain" wx:if="{{mybargain}}" hover-class="none" hover-stop-propagation="false">
<view class="listitem clearfix" wx:for="{{lists}}" wx:key="index" wx:if="{{item.orderStatus == 6||item.orderStatus == 7|| item.orderStatus == 8 || item.orderStatus == 9}}" hover-class="none" hover-stop-propagation="false">
<view class="listitem clearfix" wx:for="{{lists}}" wx:key="index" hover-stop-propagation="false">
<image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true"></image> <image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true"></image>
<view class="fl ri" hover-class="none" hover-stop-propagation="false"> <view class="fl ri" hover-class="none" hover-stop-propagation="false">
<text class="txt01">{{item.title}}</text> <text class="txt01">{{item.title}}</text>
@@ -37,29 +32,31 @@
<view class='again' wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend"> <view class='again' wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend">
<view class="botton1">邀请好友砍价</view> <view class="botton1">邀请好友砍价</view>
</view> </view>
<view class='again' wx:if="{{item.orderStatus == 7}}" data-id="{{item.id}}" bindtap="inviteFriend"> <view class='again' wx:if="{{item.orderStatus == 7}}" data-id="{{item.id}}" bindtap="inviteFriend">
<view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view> <view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view>
<image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true"/> <image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true"/>
</view> </view>

<view class='again' wx:if="{{item.orderStatus == 1}}" data-id="{{item.id}}" bindtap="inviteFriend">
<!-- <view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view> -->
<image class="icon" style='margin-top:60rpx;' src="./../../assets/images/bargainsuccess.png" lazy-load="true"/>
</view>
<view class='again' wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain"> <view class='again' wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain">
<view class="botton3" hover-class="none" hover-stop-propagation="false">重新砍价</view> <view class="botton3" hover-class="none" hover-stop-propagation="false">重新砍价</view>
<image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true"/> <image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true"/>
</view> </view>


<view wx:if="{{item.orderStatus == 9}}">
<image class="icon" src="./../../assets/images/bargaincancel.png" lazy-load="true"/>
<view wx:if="{{item.orderStatus == 2}}">
<image class="icon" style="margin-top:60rpx;" src="./../../assets/images/bargaincancel.png" lazy-load="true"/>
</view> </view>
</view> </view>
<view class='dingdan' wx:if="{{list.length==0}}">
<image src="{{actUrl}}" mode="widthFix"></image>
<text>请您敬请期待</text>
<text>我们正在筹备一大波优惠活动</text>
</view>
<view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view> <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view>
<view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view>
<!-- <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> -->
</view> </view>
<view class='dingdan' wx:if="{{lists.length==0}}">
<image src="{{actUrl}}" mode="widthFix"></image>
<text>请您敬请期待</text>
<text>我们正在筹备一大波优惠活动</text>
</view>
<view class="clearfix buttonfix" hover-class="none" hover-stop-propagation="false"> <view class="clearfix buttonfix" hover-class="none" hover-stop-propagation="false">
<view class="{{bargaingoods?'active1':''}}" hover-class="none" hover-stop-propagation="false" bindtap="bargaingoods">砍价商品</view> <view class="{{bargaingoods?'active1':''}}" hover-class="none" hover-stop-propagation="false" bindtap="bargaingoods">砍价商品</view>
<view class="{{ mybargain?'active1':''}} line" hover-class="none" hover-stop-propagation="false" bindtap="mybargain">我的砍价</view> <view class="{{ mybargain?'active1':''}} line" hover-class="none" hover-stop-propagation="false" bindtap="mybargain">我的砍价</view>


+ 4
- 1
pages/bargain/bargain.wxss ファイルの表示

@@ -78,7 +78,7 @@ page{
.listitem{ .listitem{
position: relative; position: relative;
padding: 21rpx 0; padding: 21rpx 0;
border-bottom: 1rpx solid #F9F9F9;
border-bottom: 1rpx solid #ededed;
} }
.botton{ .botton{
position: absolute; position: absolute;
@@ -413,4 +413,7 @@ page{
position: relative; position: relative;
width: 686rpx; width: 686rpx;
height: 200rpx; height: 200rpx;
}
.banner{
margin-bottom: 20rpx;
} }

+ 8
- 2
pages/coupon/detail/index.js ファイルの表示

@@ -348,13 +348,19 @@ Page({
data: {} data: {}
}) })
.then(res => { .then(res => {
if (discount == 'discount' || discount == 'discount1') {
if (discount == 'discount') {
var data = { var data = {
couponChannelId: "" + that.data.couponChannelId, couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId, couponId: "" + that.data.couponId,
press: true press: true
} }
} else if (that.data.couponChannelId == null) {
} else if (discount == 'discount1'){
var data = {
couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId,
press: false
}
}else if (that.data.couponChannelId == null) {
var data = { var data = {
couponId: "" + that.data.couponId couponId: "" + that.data.couponId
}; };


+ 1
- 1
pages/coupon/detail/index.wxss ファイルの表示

@@ -3,7 +3,7 @@
page { page {
background: #fff; background: #fff;
} }
button::after{ border: none; }
.coupons { .coupons {
width: 100%; width: 100%;
position: relative; position: relative;


+ 33
- 41
pages/czdetail/czdetail.js ファイルの表示

@@ -2,6 +2,7 @@ var config = require("../../config/config.js");
var app = getApp(); var app = getApp();
const Http = require("../../utils/HttpBasics"); const Http = require("../../utils/HttpBasics");
let util = require("../../utils/util"); let util = require("../../utils/util");
const imgurl = require("../../utils/imgurl");
Page({ Page({


/** /**
@@ -12,7 +13,9 @@ Page({
pageNum:1, pageNum:1,
list:[], list:[],
showcontent:false, showcontent:false,
loading:""
loading:"",
loadingUrl: imgurl.loading.url,
allow_load: true
}, },


/** /**
@@ -32,55 +35,44 @@ Page({
onShow: function () { onShow: function () {
let that = this; let that = this;
that.getScore(); that.getScore();
let pageNum = that.data.pageNum;
let pageSize = that.data.pageSize;
that.record(pageNum, pageSize);
that.record(1, 15);
}, },
record: function (pageNum) {
let that = this;
Http.get({
record(pageNum) {
var that = this;
console
if (that.data.allow_load) {
Http.get({
url: config.api.scoreHistory, url: config.api.scoreHistory,
data: { data: {
pageNum: pageNum, pageNum: pageNum,
pageSize: 15
pageSize: 20,
} }
})
.then(res => {
console.log(res)
if (res.data.list.length > 0 && res.data.pageNum >= pageNum) {
var tmpArr = that.data.list.concat(res.data.list);
tmpArr.map(file => {
file.createDate = util.formatTime(file.createDate, "yyyy-MM-dd hh:mm:ss")
});
}).then(res => {
res.data.list.map(file => {
file.createDate = util.formatTime(
file.createDate,
"yyyy-MM-dd hh:mm:ss"
);
});
if (pageNum >= res.data.pages) {
that.setData({ that.setData({
list:tmpArr
})
setTimeout(function(){
wx.hideLoading()
},1200)
}
else if (res.data.list.length == 0){
that.setData({
loading:"暂无数据"
})
setTimeout(function () {
wx.hideLoading()
}, 1200)
}
else{
setTimeout(function () {
wx.hideLoading()
}, 1200)
allow_load: false
});
} }
that.data.list = that.data.list.concat(res.data.list);
that.setData({
list: that.data.list
});
}) })
.catch(err => {
wx.showModal({
title: '抱歉',
content: err.message,
showCancel:false
.catch(err => {
wx.showToast({
title: err.errMsg,
icon: 'none',
duration: 2000,
mask: false
});
}) })
})
}
}, },
getScore: function() { getScore: function() {
let that = this; let that = this;


+ 2
- 2
pages/czdetail/czdetail.wxml ファイルの表示

@@ -26,6 +26,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class='loading'>
{{loading}}
<view class="loading" wx:if="{{loading}}">
<image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}
</view> </view>

+ 17
- 2
pages/order/detail/index.js ファイルの表示

@@ -21,7 +21,8 @@ Page({
mystatus: '', mystatus: '',
staticGamedata: {}, staticGamedata: {},
showIf: false, showIf: false,
showPage:false
showPage:false,
showButton:false
}, },


phone: function (e) { phone: function (e) {
@@ -139,12 +140,20 @@ Page({
}) })
}) })
}, },

onShow:function(){
let that = this;
that.setData({
showButton: false
})
},
/** /**
* 发起支付 * 发起支付
*/ */
orderFunc(e) { orderFunc(e) {
var that = this; var that = this;
that.setData({
showButton: true
})
wx.showLoading({ wx.showLoading({
title: "加载中..." title: "加载中..."
}); });
@@ -159,6 +168,9 @@ Page({
} }
}).then(res => { }).then(res => {
/// Begin payment ---- /// Begin payment ----
that.setData({
showButton: false
})
var payOrderId = "" + res.data.payOrderId; var payOrderId = "" + res.data.payOrderId;
wx.hideLoading(); wx.hideLoading();
wx.requestPayment({ wx.requestPayment({
@@ -190,6 +202,9 @@ Page({
} }
}, },
fail: res => { fail: res => {
that.setData({
showButton:false
})
that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail',that); that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail',that);
return; return;
}, },


+ 1
- 1
pages/order/detail/index.wxml ファイルの表示

@@ -72,7 +72,7 @@
</view> </view>
<!-- 待付款 显示立即购买的按钮 --> <!-- 待付款 显示立即购买的按钮 -->
<view wx:if="{{order.orderStatus==0&&order.salePrice!=0||order.orderStatus==7&&order.salePrice!=0}}" class="buy-view app-border-top"> <view wx:if="{{order.orderStatus==0&&order.salePrice!=0||order.orderStatus==7&&order.salePrice!=0}}" class="buy-view app-border-top">
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" class='buy'>立即支付</button>
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button>
</view> </view>
<view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}"> <view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}">
<view class='game-entry'> <view class='game-entry'>


+ 1
- 1
pages/passCar/choicecoupon/choicecoupon.js ファイルの表示

@@ -60,7 +60,7 @@ Page({
"yyyy-MM-dd hh:mm:ss" "yyyy-MM-dd hh:mm:ss"
); );
}); });
if (pageNum > res.data.pages) {
if (pageNum >= res.data.pages) {
that.setData({ that.setData({
allow_load: false allow_load: false
}); });


+ 1
- 1
project.config.json ファイルの表示

@@ -13,7 +13,7 @@
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.0.9", "libVersion": "2.0.9",
"appid": "wxea71200db93d756b",
"appid": "wx649b3be73c1afe47",
"projectname": "C", "projectname": "C",
"isGameTourist": false, "isGameTourist": false,
"condition": { "condition": {


読み込み中…
キャンセル
保存