소스 검색

显示隐藏已售

newCard
HolyKnightIX 2 년 전
부모
커밋
ccbbefbdf6
8개의 변경된 파일58개의 추가작업 그리고 12개의 파일을 삭제
  1. +15
    -1
      components/coupons/index.js
  2. +2
    -0
      components/coupons/index.wxml
  3. +10
    -0
      components/coupons/index.wxss
  4. +24
    -10
      components/optimization/optimization.js
  5. +1
    -1
      components/optimization/optimization.wxml
  6. +4
    -0
      config/config.js
  7. +1
    -0
      index/index.js
  8. +1
    -0
      pages/theme/index1/index.js

+ 15
- 1
components/coupons/index.js 파일 보기

@@ -1,4 +1,6 @@
const app = getApp()
const Http = require("../../utils/HttpBasics");
const config = require("../../config/config");
Component({
/**
* 组件的属性列表
@@ -17,7 +19,8 @@ Component({
*/
data: {
mouldType: 0,
mouldConfig:{}
mouldConfig: {},
couponListShowSelled: ''
},
attached: function () {
// 在组件实例进入页面节点树时执行
@@ -27,6 +30,17 @@ Component({
mouldConfig: app.globalData.mouldConfig
})
}

Http.get({
url: config.api.couponListShowSelled,
}).then(res => {
this.setData({
couponListShowSelled: res.data || ""
})
}).catch(err => {

})

},
methods: {
gotoDetail(e) {


+ 2
- 0
components/coupons/index.wxml 파일 보기

@@ -19,6 +19,7 @@
</view>
<view class="coupons-info">
<view class="coupons-info-name tit">{{data.title}}</view>
<text class='saleRamin' wx:if="{{couponListShowSelled && couponListShowSelled==1}}">已售{{data.inventory - data.remainInventory}}</text>
<view class="coupons-info-name subtitle">{{data.subTitle}}</view>
<view class="coupons-info-price-p">
<view class='price' wx:if="{{data.type!=10}}">
@@ -27,6 +28,7 @@
<text wx:if="{{!(data.type==5&&data.unit==1)}}" class='view02'>¥{{data.priceStr}}</text></text>
<text wx:if="{{data.targetAd == 2}}"><text class='saleprice'>抢购价</text>
<text class='rmb'>¥</text>{{data.salePriceStr}}</text>

<text wx:if="{{data.targetAd == 6}}"><text class='saleprice'>可砍至</text>
<text class='rmb'>¥</text>{{data.salePriceStr}}</text>
<text wx:if="{{data.targetAd == 7}}"><text class='saleprice'>拼团价</text>


+ 10
- 0
components/coupons/index.wxss 파일 보기

@@ -63,6 +63,8 @@
width: 100%;
}



.price {
font-size: 36rpx;
font-family: PingFang-SC-Bold;
@@ -99,6 +101,14 @@
letter-spacing: 0;
}

.saleRamin {
position: absolute;
font-size: 25rpx;
bottom: 60rpx;
left: 25rpx;
color: #333;
}

.coupons-info-price-o {
display: block;
text-align: center;


+ 24
- 10
components/optimization/optimization.js 파일 보기

@@ -1,12 +1,13 @@
// components/optimization/optimization.js
const Http = require("../../utils/HttpBasics");
const config = require("../../config/config");
Component({
/**
* 组件的属性列表
*/
properties: {
businessList:{
type:Array,
value:[]
businessList: {
type: Array,
value: []
},
businessData: {
type: Array,
@@ -18,28 +19,41 @@ Component({
* 组件的初始数据
*/
data: {
classIndex:0
classIndex: 0,
couponListShowSelled: ""
},

/**
* 组件的方法列表
*/
methods: {
goDetail(e){
goDetail(e) {
let couponChannelId = e.currentTarget.dataset.id
let couponId = e.currentTarget.dataset.couponid
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`,
})
},
setIndex(e){
setIndex(e) {
let index = e.currentTarget.dataset.index
let id = e.currentTarget.dataset.id
this.triggerEvent('businessid',id)
this.triggerEvent('businessid', id)
this.setData({
classIndex: index
})
},


},
attached() {
Http.get({
url: config.api.couponListShowSelled,
}).then(res => {
this.setData({
classIndex:index
couponListShowSelled: res.data || ""
})
}
}).catch(err => {

})
}
})

+ 1
- 1
components/optimization/optimization.wxml 파일 보기

@@ -25,7 +25,7 @@
<view class="int">{{item.salePriceStrQ?item.salePriceStrQ:item.salePriceStr}}</view>
<view class="fuhao">{{item.salePriceStrH?'.'+item.salePriceStrH:''}}</view>
</view>
<view class="priceNum r">已售 {{item.sale}}</view>
<view wx:if="{{couponListShowSelled && couponListShowSelled==1}}" class="priceNum r">已售 {{item.sale}}</view>
<view class="originalBox r">
<view class="origina">¥{{item.priceStr}}</view>
</view>


+ 4
- 0
config/config.js 파일 보기

@@ -118,6 +118,10 @@ var config = {
* 频道查询
*/
couponChannelList: "/wxCouponChannel/list",
/**
* 是否显示已售
*/
couponListShowSelled: "/sysConfig/getByKey?key=couponListShowSelled",
/**
* 换一换change
*/


+ 1
- 0
index/index.js 파일 보기

@@ -615,6 +615,7 @@ Page({

onShow: function () {
console.log("onShow--")

console.log(app.globalData.mouldType, "mouldType")
if (app.globalData.token) {
this.getmemberId(app.globalData.token);


+ 1
- 0
pages/theme/index1/index.js 파일 보기

@@ -710,6 +710,7 @@ Page({
setTimeout(function () {
that.alphaClick1();
}, 8000)

},




불러오는 중...
취소
저장