瀏覽代碼

获取使用门店数据修改

soldDate
HolyKnightIX 2 年之前
父節點
當前提交
fe7571d7b6
共有 7 個文件被更改,包括 84 次插入46 次删除
  1. +12
    -0
      components/shop/shop.js
  2. +4
    -0
      components/shop/shop.json
  3. +2
    -0
      components/shop/shop.ttml
  4. +1
    -0
      components/shop/shop.ttss
  5. +4
    -4
      ext.json
  6. +26
    -13
      pages/coupon/detail/index.js
  7. +35
    -29
      pages/coupon/detail/index.ttml

+ 12
- 0
components/shop/shop.js 查看文件

@@ -0,0 +1,12 @@
// c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.js
Component({
data: {

},
properties: {

},
methods: {

}
})

+ 4
- 0
components/shop/shop.json 查看文件

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

+ 2
- 0
components/shop/shop.ttml 查看文件

@@ -0,0 +1,2 @@
<!-- c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttml -->
<text>c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttml</text>

+ 1
- 0
components/shop/shop.ttss 查看文件

@@ -0,0 +1 @@
/* c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttss */

+ 4
- 4
ext.json 查看文件

@@ -1,17 +1,17 @@
{
"ext": {
"attr": {
"configUrl": "https://c.malls.iformall.com/C/api"
"configUrl": "https://ctest.malls.iformall.com/C/api"
},
"name": "沧州吾悦广场",
"weappId": "tt9f35e988000a035401"
"name": "富茂券券集团版",
"weappId": "tt620e14b3fd30264101"
},
"window": {
"backgroundTextStyle": "light",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff"
},
"extAppid": "tt9f35e988000a035401",
"extAppid": "tt620e14b3fd30264101",
"extEnable": true,
"directCommit": false,
"networkTimeout": {


+ 26
- 13
pages/coupon/detail/index.js 查看文件

@@ -598,20 +598,33 @@ Page({
couponChannelId: couponChannelId
}
}).then(res => {
if (res.data && res.data.length) {
let merchantVoList = res.data
let idList = []
merchantVoList.map(item => {
idList.push(item.id)
})
this.setData({
idList: idList
})
this.getCouponList(idList) //获取推荐列表
}
this.setData({
merchantVoList: res.data
console.log(res.data, 'Merchant')
const keys = Object.keys(res.data)
const mallList = []
keys.forEach(item => {
const arr = item.split('|')
const obj = {
tenantId: arr[0],
mallName: arr[1],
merchantVoList: res.data[item]
}
mallList.push(obj)
})
console.log(mallList, 'mallList');
// if (res.data && res.data.length) {
// let merchantVoList = res.data
// let idList = []
// merchantVoList.map(item => {
// idList.push(item.id)
// })
// this.setData({
// idList: idList
// })
// this.getCouponList(idList) //获取推荐列表
// }
// this.setData({
// merchantVoList: res.data
// })
})
},



+ 35
- 29
pages/coupon/detail/index.ttml 查看文件

@@ -49,9 +49,9 @@
</view>
</view>
<text class='title'>{{data.title}}<text class="elecard" tt:if="{{data.type==100}}">电子卡</text></text>
<!-- 预购 -->
<view class="moneyBox" tt:if="{{data.type==10}}">
<view class="earnest">定金:</view>
@@ -77,18 +77,21 @@
<text class='jifen'>积分</text>
</view>

<text class='throgh' tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text>
<text class='throgh'
tt:if="{{data.unit==0&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}元</text>
<text tt:if="{{data.unit==1&&data.type!=50&&data.type!=51}}">{{priceAndStockObj.price/100}}小时</text>

</view>
<view class="fl" tt:if="{{data.type==8}}">
<text class="pri01">{{priceAndStockObj.salePrice/100}}</text>
<text class='presslimit' tt:if="{{data.type==8}}"><text>{{data.pressLimitNum+'人可砍至底价'}}</text></text>
<text class='throgh'>{{priceAndStockObj.price/100}}元</text>

</view>
<view class="sellBox"> {{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}</view>
<view class="sellBox">
{{'已售'+(priceAndStockObj.inventory-priceAndStockObj.remainInventory)+'|'+'库存'+priceAndStockObj.remainInventory}}
</view>
</view>

<!-- <view class="subTitleBox">
@@ -107,17 +110,17 @@
<view class="childMoney">¥{{item.priceStr}}</view>
</view>
</view>
<vieW class="groupTitleBox">
<view class="groupTitle" tt:if="{{data.itemGroup.length>0}}">餐饮搭配</view>
<view class="groupTitle" tt:if="{{data.Description.length>0}}">商品描述</view>
</vieW>
<view class="groupTextBox" tt:if="{{data.itemGroup.length>0}}" tt:for="{{data.itemGroup}}">
<view class="groupTitleS">{{item.group_name}}</view>
<view class="groupDetailsBox" tt:for="{{item.item_list}}" tt:for-item="itemChi">
<view class="groupTiemBox" >
<view class="groupTiemBox">
<view class="yuandian"></view>
<view class="groupTiemName">{{itemChi.name}}({{itemChi.count}}份)</view>
<view class="groupTiemPay">¥{{itemChi.price/100}}</view>
@@ -131,17 +134,18 @@


<!-- 适用门店 -->
<store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store>
<!-- <store merchantVoList="{{merchantVoList}}" tt:if="{{data.type!=12}}"></store> -->

<view class='notes'>
<view class="notesH">购买须知</view>
<view class="notesH">购买须知</view>
<view class="timeText">有效期</view>
<view class="Hchild">• {{validStartDate}}至{{validEndDate}}</view>
<view class="timeText">可用时间</view>
<view class="Hchild">• 商家营业时间内到店使用</view>
<view class="Hchild" tt:if="{{data.can_no_use_date.weekend}}">• 周末不支持使用</view>
<view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用</view>
<view class="Hchild" tt:if="{{data.can_no_use_date.HolidaysFlag}}">• 节假日(元旦、春节、清明、劳动节、端午节、中秋节、国庆节、情人节、圣诞节)不支持使用
</view>

<view class="timeText">购买限制</view>
<view class="Hchild">• 每个用户限购{{data.useLimitQuantity}}单</view>

@@ -149,7 +153,7 @@
<view class="Hchild" tt:if="{{!data.subscribeSing}}">• 无需预约,高峰时段可能等位</view>
<view class="Hchild" tt:if="{{data.subscribeSing}}">• {{data.subscribeSing}}</view>

<view class="timeText" tt:if="{{data.rec_person_num_max}}">适用人数</view>
<view class="Hchild" tt:if="{{data.rec_person_num_max}}">• 该团购劵最多{{data.rec_person_num_max}}人使用</view>

@@ -157,8 +161,9 @@
<view class="Hchild">• 团购券不支持配送或外卖</view>
<view class="Hchild" tt:if="{{data.pack}}">• 该团购商品{{data.pack=='false'?'不支持':'支持'}}打包</view>
<view class="Hchild" tt:if="{{data.besides}}">• {{data.besides=="false"?'不可以':'可以'}}外带餐食</view>
<view class="Hchild" tt:if="{{data.superimposed_discounts}}">• {{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view>

<view class="Hchild" tt:if="{{data.superimposed_discounts}}">•
{{data.superimposed_discounts=="false"?'不可以':'可以'}}享受店内其他优惠</view>
<view class="Hchild" tt:if="{{data.private_room}}">• {{data.private_room=="false"?'不可以使用':'可以使用'}}包间</view>

<view class="notesH">使用规则</view>
@@ -172,9 +177,10 @@
<text class="Hchild">{{item.content}}</text>
</view>
</view>
<view tt:if="{{couponList.length!=0}}"
style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;font-weight: bold;">其他活动
style="color: #333;letter-spacing: 0;font-size: 30rpx;height: 70rpx;line-height: 70rpx;margin-left: 35rpx;font-weight: bold;">
其他活动
</view>
<view class='couponsL clearfix'>
<c-coupons tt:if="{{couponList.length!=0}}" tt:for="{{couponList}}" from="fromMerchant" paramAtoB="{{loading}}"
@@ -185,7 +191,7 @@
</view>
</view>

<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType!=1}}">
<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType!=1}}">
<view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};">
<button class='goback' bindtap='goback'>
<image src='{{homeSelectedO}}' mode="widthFix"></image>
@@ -215,14 +221,14 @@
<button class='buy' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button>
<button id='noBuy' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button>
</view>
</form>
</form>

<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}">
<form data-type='{{data.type}}' report-submit='true' tt:if="{{mouldType==1}}">
<view class="app-border-topX" style="position:fixed;z-index:{{zIndex}}; bottom: 0;">
<view class="biaoz">{{data.type!=50?'¥':''}}</view>
<view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view>
<view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view>
<view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view>
<button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX'
tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
马上购买</button>
@@ -248,8 +254,8 @@
<button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button>
<!-- <view class="sell">已售出<span class="sellP">{{data.inventory-priceAndStockObj.remainInventory}}</span>件</view> -->
<button class="serviceBox" open-type="contact">
<view class="fuwuLogoBox f" >
<image class="itemLogo" src="../../../assets/images/service1.png" />
<view class="fuwuLogoBox f">
<image class="itemLogo" src="../../../assets/images/service1.png" />
</view>
</button>
</view>
@@ -262,7 +268,7 @@
<image src='{{homeSelectedO}}' mode="widthFix"></image>
<text class='btnTxt'>首页</text>
</button>
<form report-submit='true' class="fl">
<form report-submit='true' class="fl">
<button bindtap="gotopay" style='background:transparent;color:#fff;' data-discount='discount1'
disabled='{{showbutton}}'>
<text>¥{{priceAndStockObj.price/100}}</text>
@@ -297,7 +303,7 @@
</label>
</radio-group>
<!-- 多选 -->
<checkbox-group bindchange="checkboxChange" tt:if="{{questionnaire.flag=='multi'}}" >
<checkbox-group bindchange="checkboxChange" tt:if="{{questionnaire.flag=='multi'}}">
<label class="radio ques" tt:for="{{questionnaire.answers}}" tt:key="index">
<checkbox value="{{item.id}}" />{{item.name}}
</label>
@@ -352,4 +358,4 @@
</button>
</view> -->
<phoen showBox="{{showBox}}" bind:hiePhoen="setPhone" bind:heiBox="setBox" />
</view>
</view>

Loading…
取消
儲存