| | |
| | | import { Request } from './utils/http' |
| | | import { updateManager } from './utils/appExtends' |
| | | import {webSocket, socketReconnect} from './utils/websocket' |
| | | let livePlayer = requirePlugin('live-player-plugin'); |
| | | // let livePlayer = requirePlugin('live-player-plugin'); |
| | | // promisify all wx‘s api |
| | | promisifyAll(); |
| | | |
| | |
| | | // 直播间 |
| | | if((options.scene == 1007 || options.scene == 1008 || options.scene == 1044)&&options.path.includes('/pages/live-player-plugin')){ |
| | | console.log('通过直播分享卡片进入小程序', options); |
| | | livePlayer.getShareParams() |
| | | .then((res)=>{ |
| | | console.log('获取直播 room id', res.room_id); // 房间号 |
| | | console.log('获取直播 openid', res.openid); // 用户openid |
| | | console.log('获取直播 share openid', res.share_openid); // 分享者openid,分享卡片进入场景才有 |
| | | console.log('获取 custom params', res.custom_params); // 开发者在跳转进入直播间页面时,页面路径上携带的自定义参数,这里传回给开发者 |
| | | let FromUserId = res.custom_params.FromUserId || ''; |
| | | this.handleFromUserIdChange(FromUserId); |
| | | }).catch(err => { |
| | | console.log('获取直播 share params', err) |
| | | }) |
| | | // livePlayer.getShareParams() |
| | | // .then((res)=>{ |
| | | // console.log('获取直播 room id', res.room_id); // 房间号 |
| | | // console.log('获取直播 openid', res.openid); // 用户openid |
| | | // console.log('获取直播 share openid', res.share_openid); // 分享者openid,分享卡片进入场景才有 |
| | | // console.log('获取 custom params', res.custom_params); // 开发者在跳转进入直播间页面时,页面路径上携带的自定义参数,这里传回给开发者 |
| | | // let FromUserId = res.custom_params.FromUserId || ''; |
| | | // this.handleFromUserIdChange(FromUserId); |
| | | // }).catch(err => { |
| | | // console.log('获取直播 share params', err) |
| | | // }) |
| | | } |
| | | // 不是初次打开 |
| | | else if(!this.isFirstOpenApp){ |
| | |
| | | "text": "商城" |
| | | }, |
| | | { |
| | | "pagePath": "pages/classify2/classify2", |
| | | "pagePath": "pages/classify/classify", |
| | | "iconPath": "imgs/icon/classify.png", |
| | | "selectedIconPath": "imgs/icon/classify-s.png", |
| | | "text": "分类" |
| | |
| | | "c-contact": "/component/contact/contact", |
| | | "c-wxparse": "/component/wxparse/wxparse", |
| | | "van-dialog": "/src/vant-weapp/dialog/index", |
| | | "van-divider": "/src/vant-weapp/divider/index" |
| | | "van-divider": "/src/vant-weapp/divider/index", |
| | | "van-tag": "/src/vant-weapp/tag/index", |
| | | "van-button": "/src/vant-weapp/button/index", |
| | | "van-cell": "/src/vant-weapp/cell/index", |
| | | "van-goods-action": "/src/vant-weapp/goods-action/index", |
| | | "van-goods-action-button": "/src/vant-weapp/goods-action-button/index" |
| | | }, |
| | | "navigateToMiniProgramAppIdList": [ |
| | | "wxa20000d674f09912", |
| | |
| | | } |
| | | }, |
| | | "plugins": { |
| | | "live-player-plugin": { |
| | | "version": "1.2.2", |
| | | "provider": "wx2b03c6e691cd7370" |
| | | }, |
| | | |
| | | "chooseLocation": { |
| | | "version": "1.0.5", |
| | | "provider": "wx76a9a06e5b4e693e" |
| | |
| | | .my-goods-action .van-goods-action--safe { |
| | | padding-bottom: 2rpx; |
| | | } |
| | | |
| | | .inline-block{ |
| | | display: inline-block; |
| | | } |
| | | |
| | | .font-size-14{ |
| | | font-size: 28rpx; |
| | | } |
| | | .font-size-16{ |
| | | font-size: 32rpx; |
| | | } |
| | |
| | | this.setData({ |
| | | isShow: false |
| | | }) |
| | | this.triggerEvent('closeDialog',{ |
| | | isShow: false |
| | | }) |
| | | }, |
| | | showDialog() { |
| | | this.setData({ |
| | |
| | | // console.log(oldVal); |
| | | // } |
| | | }, |
| | | isCanBuy:{ |
| | | type:Boolean, |
| | | value:true |
| | | }, |
| | | goodsItem:{ |
| | | type: Object, |
| | | value: {} |
| | |
| | | let dialogLayer = this.selectComponent('#dialogLayer'); |
| | | dialogLayer.closeDialog(); |
| | | }, |
| | | showDialog2(){ |
| | | let dialogLayer = this.selectComponent('#dialogLayer2'); |
| | | dialogLayer.showDialog(); |
| | | this.setData({ |
| | | isShowDetails:true |
| | | }) |
| | | }, |
| | | bindCloseDialog(){ |
| | | // console.log(999); |
| | | this.setData({ |
| | | isShowDetails:false |
| | | }) |
| | | }, |
| | | closeDialog2(){ |
| | | let dialogLayer = this.selectComponent('#dialogLayer2'); |
| | | dialogLayer.closeDialog(); |
| | | }, |
| | | goIndex(){ |
| | | this.triggerEvent('goIndex', { |
| | | isShow: false |
| | |
| | | }, |
| | | groupBuying(e){ |
| | | this.closeDialog(); |
| | | if (!this.data.isCanBuy) return; |
| | | this.triggerEvent('buyTap', { |
| | | name:'group', |
| | | groupCode:e.currentTarget.dataset.groupCode, |
| | | }) |
| | | }, |
| | | onCountDownFinish(){ |
| | | console.log('0000'); |
| | | async showGroupBuyingOrderList(e){ |
| | | let groupBuyingDocCode = e.currentTarget.dataset.groupCode; |
| | | this.showDialog2(); |
| | | let [errMsg,listRes] = await this.getGroupBuyingOrderList(groupBuyingDocCode); |
| | | if (errMsg) { |
| | | return; |
| | | } |
| | | console.log(listRes); |
| | | this.setData({ |
| | | isDisabled:true |
| | | }) |
| | | } |
| | | groupBuyingListDetail:listRes.groupBuyingList, |
| | | }); |
| | | }, |
| | | async getGroupBuyingOrderList(groupCode){ |
| | | let data = {}; |
| | | // let groupBuyingDocCode = groupCode; |
| | | data.groupBuyingDocCode = groupCode; |
| | | console.log(data); |
| | | let [errMsg,res] = await utils.to( |
| | | wx.$http.request({ |
| | | url:'/shopping/groupBuyingOrderList.do', |
| | | data |
| | | }) |
| | | ) |
| | | return [errMsg,res]; |
| | | |
| | | }, |
| | | // onCountDownFinish(){ |
| | | // console.log('0000'); |
| | | // this.setData({ |
| | | // isDisabled:true |
| | | // }) |
| | | // } |
| | | |
| | | } |
| | | }); |
| | |
| | | </view> |
| | | <view class="content"> |
| | | <!-- <van-cell-group class="my-cell-group" border="{{false}}">--> |
| | | <van-cell class="my-cell" title-width="280rpx" center wx:for="{{groupBuyingList}}" wx:if="{{index<2}}" wx:key="key" border="{{index!==arrayList.length-1?true:false}}"> |
| | | <van-cell class="my-cell" title-width="250rpx" center wx:for="{{groupBuyingList}}" wx:if="{{index<2}}" wx:key="key" border="{{index!==arrayList.length-1?true:false}}" data-group-code="{{item.GroupBuyingDocCode}}" bind:tap="showGroupBuyingOrderList"> |
| | | <view slot="icon"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | |
| | | </view> |
| | | <view class="font-bold flex-between"> |
| | | <view class=""> |
| | | <view class="van-cell-text">{{item.GroupBuyingMembers}}人成团,还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></view> |
| | | <view class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view> |
| | | <view class="van-cell-text">{{item.GroupBuyingMembers}}人成团,<block wx:if="{{item.GroupBuyingMembersBalance>0}}">还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></block><block wx:else>已成功拼团</block></view> |
| | | <!-- <view class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+1*1000 }}" /></view>--> |
| | | </view> |
| | | <van-button size="small" disabled="{{isDisabled}}" data-group-code="{{item.GroupBuyingDocCode}}" class="margin-left" type="danger" bind:click="groupBuying">去拼单</van-button> |
| | | <van-button size="small" disabled="{{!isCanBuy}}" data-group-code="{{item.GroupBuyingDocCode}}" class="margin-left" type="danger" catch:tap="groupBuying">去拼单</van-button> |
| | | </view> |
| | | </van-cell> |
| | | <!-- </van-cell-group>--> |
| | | </view> |
| | | </view> |
| | | |
| | | <c-dialog-layer id="dialogLayer"> |
| | | <view slot="title" class="dialog-title"> |
| | | 正在拼单 |
| | | <view hidden="{{isShowDetails}}"> |
| | | <c-dialog-layer id="dialogLayer" > |
| | | <view slot="title" class="dialog-title"> |
| | | 正在拼单 |
| | | </view> |
| | | <scroll-view scroll-y="true" style="height:{{280}}px;"> |
| | | <view class="content"> |
| | | <!-- <van-cell-group class="my-cell-group" border="{{false}}">--> |
| | | <van-cell class="my-cell" title-width="150rpx" center wx:for="{{groupBuyingList}}" wx:key="key" border="{{index!==arrayList.length-1?true:false}}" data-group-code="{{item.GroupBuyingDocCode}}" bind:tap="showGroupBuyingOrderList"> |
| | | <view slot="icon"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | </view> |
| | | <view class="slot-title" slot="title"> |
| | | <view class="van-cell-text no-wrap margin-left">{{item.NickName}}</view> |
| | | </view> |
| | | <view class="font-bold flex-between"> |
| | | <view class=""> |
| | | <view class="van-cell-text">{{item.GroupBuyingMembers}}人成团,<block wx:if="{{item.GroupBuyingMembersBalance>0}}">还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></block><block wx:else>已成功拼团</block></view> |
| | | <!-- <view class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view>--> |
| | | </view> |
| | | <van-button size="small" disabled="{{!isCanBuy}}" class="margin-left" type="danger" catch:tap="groupBuying" data-group-code="{{item.GroupBuyingDocCode}}">去拼单</van-button> |
| | | </view> |
| | | </van-cell> |
| | | <!-- </van-cell-group>--> |
| | | </view> |
| | | </scroll-view> |
| | | </c-dialog-layer> |
| | | </view> |
| | | |
| | | |
| | | <c-dialog-layer id="dialogLayer2" bind:closeDialog="bindCloseDialog"> |
| | | <view slot="title" class="dialog-title2" wx:for="{{groupBuyingListDetail}}" wx:key="key" wx:if="{{item.isGroupBuyingMaster}}"> |
| | | <view class="avatar-view2"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | <van-tag round color="#ffab33" class="group-tag">拼主</van-tag> |
| | | </view> |
| | | <view>{{item.NickName}}</view> |
| | | <view class="van-cell-text2">{{item.EnterDate}} 发起拼单</view> |
| | | </view> |
| | | <scroll-view scroll-y="true" style="height:{{280}}px;"> |
| | | <view class="content"> |
| | | <!-- <van-cell-group class="my-cell-group" border="{{false}}">--> |
| | | <van-cell class="my-cell" title-width="180rpx" center wx:for="{{groupBuyingList}}" wx:key="key" border="{{index!==arrayList.length-1?true:false}}"> |
| | | <van-cell class="my-cell" title-width="120rpx" center wx:for="{{groupBuyingListDetail}}" wx:key="key" wx:if="{{!item.isGroupBuyingMaster}}" border="{{index!==arrayList.length-1?true:false}}"> |
| | | <view slot="icon"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | </view> |
| | | <view class="slot-title" slot="title"> |
| | | <view class="van-cell-text no-wrap margin-left">{{item.NickName}}</view> |
| | | <view class="slot-title2" slot="title"> |
| | | <view class="no-wrap margin-left">{{item.NickName}}</view> |
| | | </view> |
| | | <view class="font-bold flex-between"> |
| | | <view class=""> |
| | | <view class="van-cell-text">{{item.GroupBuyingMembers}}人成团,还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></view> |
| | | <view class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view> |
| | | </view> |
| | | <van-button size="small" disabled="{{isDisabled}}" class="margin-left" type="danger" bind:click="groupBuying" data-group-code="{{item.GroupBuyingDocCode}}">去拼单</van-button> |
| | | <view class="font-bold"> |
| | | <view class="van-cell-text2">{{item.EnterDate}} 拼单成功</view> |
| | | </view> |
| | | </van-cell> |
| | | <!-- </van-cell-group>--> |
| | | </view> |
| | | </scroll-view> |
| | | </c-dialog-layer> |
| | | |
| | | <van-goods-action class="my-goods-action"> |
| | | <van-goods-action-icon icon="shop-o" text="店铺" bind:click="goIndex" /> |
| | | <van-goods-action-icon icon="cart-o" text="购物车" bind:click="goCart" /> |
| | | <van-goods-action-button color="#f4aba7" bind:click="buyTap" data-name="order"> |
| | | <van-goods-action-button color="{{isCanBuy?'#f4aba7':'e02e24'}}" bind:click="buyTap" data-name="order"> |
| | | <view class="goods-btn-text"> |
| | | <view> |
| | | {{goodsItem.CurrencySign}}{{goodsItem.Price}} |
| | |
| | | </view> |
| | | </view> |
| | | </van-goods-action-button> |
| | | <van-goods-action-button color="#e02e24" bind:click="buyTap" data-name="group"> |
| | | <van-goods-action-button color="#e02e24" bind:click="buyTap" data-name="group" disabled="{{!isCanBuy}}"> |
| | | <view class="goods-btn-text"> |
| | | <view> |
| | | {{goodsItem.CurrencySign}}{{goodsItem.GroupBuyingPrice}} |
| | |
| | | /*@import "../../src/src.wxss";*/
|
| | |
|
| | | .group-buying-container view{
|
| | | overflow: visible;
|
| | | }
|
| | | .goods-btn-text view{
|
| | | font-size: 30rpx;
|
| | | }
|
| | |
| | | .mark{
|
| | | color: #f23232;
|
| | | }
|
| | |
|
| | | .dialog-title2{
|
| | | text-align: center;
|
| | | padding: 10rpx 0;
|
| | | }
|
| | | .group-tag{
|
| | | position: absolute;
|
| | | left: -15rpx;
|
| | | top: -10rpx;
|
| | | }
|
| | | .slot-title2{
|
| | | margin-left: 20rpx;
|
| | | }
|
| | | .van-cell-text2{
|
| | | color: #a9a9a9;
|
| | | }
|
| | | .my-cell-content2{
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: flex-end;
|
| | | }
|
| | | .my-cell-content2 .iconfont{
|
| | | font-size: 42rpx;
|
| | | }
|
| | | .avatar-view2{
|
| | | position: relative;
|
| | | display: inline-block;
|
| | |
|
| | | }
|
| | |
| | | <view class="goods-title" wx:if="{{item.isShowMatCode}}">{{item.MatCode}}</view> |
| | | <view class="goods-label" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view> |
| | | <view class="goods-label" wx:if="{{item.isShowSpecial}}">{{item.Special}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}"> |
| | | <block wx:for="{{10}}" wx:for-item="sku" wx:key="key"> |
| | | {{item['skuName'+(index+1)]}} |
| | | <!-- {{'skuName'+index+1}}--> |
| | | </block> |
| | | </van-tag> |
| | | <view class="goods-price" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}</view> |
| | | <c-cartInput class="buy-num" catchtap="inp" bind:quantityEdit="quantityEdit" data-cart-id="{{item.CartId}}" data-index="{{index}}" order-process="{{generateOrderProcess}}" data-id="{{item.MatCode}}" item-data="{{item}}"></c-cartInput> |
| | | <!-- <view class="buy-num" catchtap="inp"> |
| | | <view class="jian-btn {{item.Quantity<=1? 'disabled' : ''}}" catchtap="jianBtnTap" data-index="{{index}} " data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">-</view> |
| | | <input type="number" value="{{item.Quantity}}" bindblur="inputNum" data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}"/> |
| | | <view class="jia-btn {{item.Quantity>=9999? 'disabled' : ''}}" catchtap="jiaBtnTap" data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">+</view> |
| | | <view class="jia-btn {{item.Quantity>=9999? 'disabled' : ''}}" catchtap="jiaBtnTap" data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">+</view> |
| | | |
| | | </view> --> |
| | | </view> |
| | |
| | | <view class="total" hidden="{{goodsList.noSelect}}">合计:¥{{goodsList.totalPrice}}</view> |
| | | </view> |
| | | <!-- <form bindsubmit="formIdSubmit"> |
| | | |
| | | |
| | | <button form-type="submit" open-type="getUserInfo" class="get-userinfo to-pay-btn {{goodsList.noSelect?'no-select':''}}" hidden="{{!goodsList.edit}}" bindgetuserinfo="toPayOrder" >去结算</button> |
| | | </form> --> |
| | | <c-authorize-phone is-must-authorize="{{true}}" bind:authorize="toPayOrder"> |
| | |
| | | <!--<template is="contactBtnTemplate" data="{{unreadMsgNum,newMsg,animationData}}" />--> |
| | | <!-- <template is="tabBar" data="{{tabBar:bindData.tabBar}}"/> --> |
| | | </view> |
| | | <c-contact></c-contact> |
| | | <c-contact></c-contact> |
| | |
| | | background-color: #e64340;
|
| | | font-size: 32rpx;
|
| | | color: #fff;
|
| | | |
| | |
|
| | | }
|
| | | .get-userinfo{
|
| | | border-radius: 0;
|
| | |
| | | color: #e64340;
|
| | | font-size: 26rpx;
|
| | | }
|
| | | .goods-tag .van-tag{
|
| | | margin-bottom: 45rpx;
|
| | | }
|
| | |
| | | ], |
| | | isShow: false, |
| | | isCanBuy:true, |
| | | isCanBuy2:true, |
| | | actionType: "payOrder", |
| | | Quantity: { |
| | | quantity: 1, |
| | |
| | | ['Quantity.quantity']: res.data.list.Mininum||1 |
| | | // price: goodsItem.Price |
| | | }) |
| | | this.handleNoticeText(res.data.list); |
| | | |
| | | let { |
| | | Quantity, |
| | | isRestrictQuantity, |
| | | isStartupPanicBuying, |
| | | PanicBuyingStartTimeBalance, |
| | | PanicBuyingEndTimeBalance, |
| | | PanicBuyingStartTime, |
| | | PanicBuyingEndTime, |
| | | } = res.data.list; |
| | | if (isStartupPanicBuying&&PanicBuyingStartTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`未开抢,开抢时间${PanicBuyingStartTime}至${PanicBuyingEndTime}`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | else if (isStartupPanicBuying&&PanicBuyingStartTimeBalance<=0&&PanicBuyingEndTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`商品抢购中,结束时间为${PanicBuyingEndTime}`, |
| | | isCanBuy:true |
| | | }) |
| | | } |
| | | else if (isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0) { |
| | | this.setData({ |
| | | noticeText:`本次商品抢购已结束`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | if (isRestrictQuantity&&Quantity<=0) { |
| | | this.setData({ |
| | | noticeText:`该商品已售罄`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | // WxParse.wxParse('article', 'html', res.data.list.Description, that, 5); |
| | | this.getPosterQrCode(); |
| | | this.handleCurrentGoods(); |
| | |
| | | * 4.target为Page对象,一般为this(必填) |
| | | * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选) |
| | | */ |
| | | }, |
| | | |
| | | handleNoticeText(res){ |
| | | let { |
| | | Quantity, |
| | | isRestrictQuantity, |
| | | isStartupPanicBuying, |
| | | PanicBuyingStartTimeBalance, |
| | | PanicBuyingEndTimeBalance, |
| | | PanicBuyingStartTime, |
| | | PanicBuyingEndTime, |
| | | isStartupGroupBuying, |
| | | GroupBuyingMembers, |
| | | GroupBuyingPrice, |
| | | GroupBuyingStartTime, |
| | | GroupBuyingEndTime, |
| | | GroupBuyingStartTimeBalance, |
| | | GroupBuyingEndTimeBalance |
| | | } = res; |
| | | if (isStartupPanicBuying&&PanicBuyingStartTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`未开抢,开抢时间${PanicBuyingStartTime}至${PanicBuyingEndTime}`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | else if (isStartupPanicBuying&&PanicBuyingStartTimeBalance<=0&&PanicBuyingEndTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`商品抢购中,结束时间为${PanicBuyingEndTime}`, |
| | | isCanBuy:true |
| | | }) |
| | | } |
| | | else if (isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0) { |
| | | this.setData({ |
| | | noticeText:`本次商品抢购已结束`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | |
| | | if (isStartupGroupBuying&&GroupBuyingStartTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`未开抢,开抢时间${GroupBuyingStartTime}至${GroupBuyingEndTime}`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | else if (isStartupGroupBuying&&GroupBuyingStartTimeBalance<=0&&GroupBuyingEndTimeBalance>0) { |
| | | this.setData({ |
| | | noticeText:`商品拼团抢购中,结束时间为${GroupBuyingEndTime}`, |
| | | isCanBuy:true |
| | | }) |
| | | } |
| | | else if (isStartupGroupBuying&&GroupBuyingEndTimeBalance<=0) { |
| | | this.setData({ |
| | | noticeText:`本次商品限时团购已结束`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | |
| | | if (isRestrictQuantity&&Quantity<=0) { |
| | | this.setData({ |
| | | noticeText:`该商品已售罄`, |
| | | isCanBuy:false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | btnTap: function (e) { |
| | |
| | | var that = this; |
| | | utils.hideLayer(that, "translateY", 500); |
| | | this.setData({ |
| | | ['Quantity.quantity']: this.data.Mininum||1 |
| | | ['Quantity.quantity']: this.data.Mininum||1, |
| | | isSelectedSku: false |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | selectedSku(){ |
| | | // console.log(888); |
| | | if (!this.data.isCanBuy) return; |
| | | this.setData({ |
| | | isSelectedSku: true |
| | | }) |
| | | if (this.data.isShow) { |
| | | this.hideLayer(); |
| | | } else { |
| | | this.showLayer(); |
| | | } |
| | | }, |
| | | |
| | | handleCurrentGoods(){ |
| | | /* |
| | | * |
| | |
| | | let MatCode = this.data.goodsItem.MatCode; |
| | | let selectedSkuId = []; |
| | | let selectedSkuName = []; |
| | | let skuIdStrings = []; |
| | | let goodsSkuIdStrings = []; |
| | | let goodsSkuIdList = []; |
| | | let skuIdList = []; |
| | | let skuSetName = []; |
| | | SkuParameterList.forEach((item) => { |
| | | let arr = []; |
| | | item.skuList.forEach((item) => { |
| | | arr.push(item.skuId) |
| | | }) |
| | | skuIdList.push(arr); |
| | | skuSetName.push(item.skuSetName); |
| | | }) |
| | | SkuMatCodeList.forEach((item,index)=>{ |
| | | let skuIdString = ''; |
| | | let skuIdArr = []; |
| | | for (let i = 1; i < 11; i++) { |
| | | if (item.MatCode === MatCode && item[`skuId${i}`]){ |
| | | selectedSkuId.push(item[`skuId${i}`]) |
| | |
| | | } |
| | | if (item[`skuId${i}`]){ |
| | | skuIdString+=item[`skuId${i}`] |
| | | skuIdArr.push(item[`skuId${i}`]) |
| | | } |
| | | } |
| | | skuIdStrings.push(skuIdString) |
| | | goodsSkuIdStrings.push(skuIdString) |
| | | goodsSkuIdList.push(skuIdArr) |
| | | }) |
| | | this.setData({ |
| | | selectedSkuId, |
| | | selectedSkuName, |
| | | skuIdStrings |
| | | selectedSkuNameStr: selectedSkuName.join(' '), |
| | | goodsSkuIdStrings, |
| | | skuIdList, |
| | | goodsSkuIdList, |
| | | skuSetName, |
| | | skuSetNameStr:skuSetName.join(','), |
| | | }) |
| | | console.log('selectedSkuId',selectedSkuId); |
| | | console.log('selectedSkuName',selectedSkuName); |
| | | console.log('skuIdStrings',skuIdStrings); |
| | | |
| | | console.log('goodsSkuIdStrings',goodsSkuIdStrings); |
| | | console.log('skuIdList',skuIdList); |
| | | console.log('goodsSkuIdList',goodsSkuIdList); |
| | | console.log('skuSetName',skuSetName); |
| | | this.handleSkuIds(); |
| | | }, |
| | | selectGoodsAttr(e){ |
| | | async selectGoodsAttr(e){ |
| | | |
| | | console.log(e); |
| | | |
| | | let attrIndex = e.currentTarget.dataset.i; |
| | | let listIndex = e.currentTarget.dataset.index; |
| | | let skuId = e.currentTarget.dataset.skuId; |
| | | let skuName = e.currentTarget.dataset.skuName; |
| | | let isEnabled = e.currentTarget.dataset.isEnabled; |
| | | let selectedSkuId = this.data.selectedSkuId; |
| | | selectedSkuId[attrIndex] = skuId; |
| | | let skuIdStrings = this.data.skuIdStrings; |
| | | let hasSkuId = skuIdStrings.includes(selectedSkuId.join('')); |
| | | console.log(skuIdStrings,selectedSkuId.join('')); |
| | | if (skuIdStrings.includes(selectedSkuId.join(''))){ |
| | | this.setData({ |
| | | [`selectedSkuId[${attrIndex}]`]:skuId |
| | | }) |
| | | } else{ |
| | | let selectedSkuName = this.data.selectedSkuName; |
| | | let length = selectedSkuId.length; |
| | | console.log(e,selectedSkuId); |
| | | if (!isEnabled) return; |
| | | |
| | | selectedSkuId[attrIndex] = skuId; |
| | | selectedSkuName[attrIndex] = skuName; |
| | | selectedSkuId.forEach((item,index)=>{ |
| | | if (index>attrIndex){ |
| | | selectedSkuId[index] = '' |
| | | selectedSkuName[index] = '' |
| | | length--; |
| | | } |
| | | }) |
| | | this.setData({ |
| | | // [`selectedSkuId[${attrIndex}]`]:skuId, |
| | | selectedSkuId:selectedSkuId, |
| | | // [`selectedskuName[${attrIndex}]`]:skuName, |
| | | // [`selectedskuName[${attrIndex}]`]:skuName, |
| | | selectedSkuNameStr: selectedSkuName.join(' '), |
| | | selectedSkuIdLength: length |
| | | }) |
| | | console.log(selectedSkuId,selectedSkuName,this.data.selectedSkuIdLength); |
| | | // console.log(await this.getSkuParameterByMatCode()); |
| | | let [errMsg,spRes] = await this.getSkuParameterByMatCode(); |
| | | if (errMsg) { |
| | | return; |
| | | } |
| | | console.log(spRes); |
| | | if (length<selectedSkuId.length) { |
| | | this.setData({ |
| | | SkuParameterList:spRes.SkuParameterList, |
| | | isCanBuy2:false, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | SkuParameterList:spRes.SkuParameterList, |
| | | CouponList:spRes.CouponList, |
| | | goodsItem:spRes.list, |
| | | groupBuyingList:spRes.groupBuyingList, |
| | | isCanBuy2:true, |
| | | }) |
| | | matcode = spRes.list.MatCode |
| | | this.handleNoticeText(spRes.list); |
| | | } |
| | | |
| | | // selectedSkuId[attrIndex] = skuId; |
| | | // let goodsSkuIdStrings = this.data.goodsSkuIdStrings; |
| | | // let hasSkuId = goodsSkuIdStrings.includes(selectedSkuId.join('')); |
| | | // console.log(goodsSkuIdStrings,selectedSkuId.join('')); |
| | | // if (goodsSkuIdStrings.includes(selectedSkuId.join(''))){ |
| | | // this.setData({ |
| | | // [`selectedSkuId[${attrIndex}]`]:skuId |
| | | // }) |
| | | // } else{ |
| | | // |
| | | // } |
| | | // this.handleDisabledSkuId(); |
| | | /* |
| | | * 遍历第一列,把没有的标记 |
| | | * 点击第一列可选的项后,遍历剩下所有列,把没有的标记 |
| | |
| | | // }) |
| | | |
| | | }, |
| | | async getSkuParameterByMatCode(){ |
| | | this.handleSkuIds(); |
| | | let data = this.data.skuIds; |
| | | let [errMsg,res] = await utils.to( |
| | | wx.$http.request({ |
| | | url:'/shopping/getSkuParameterByMatCode.do', |
| | | data |
| | | }) |
| | | ) |
| | | return [errMsg,res]; |
| | | |
| | | }, |
| | | handleSkuIds(){ |
| | | let data = {}; |
| | | let selectedSkuId = this.data.selectedSkuId; |
| | | let selectedSkuIdLength = this.data.selectedSkuIdLength; |
| | | for (let i = 1; i < 11; i++) { |
| | | if (selectedSkuId[i-1]){ |
| | | data[`skuId${i}`] = selectedSkuId[i-1] |
| | | } else { |
| | | data[`skuId${i}`] = '' |
| | | } |
| | | } |
| | | if (selectedSkuIdLength<selectedSkuId.length) { |
| | | data.matcode = this.data.goodsItem.MatCode; |
| | | } |
| | | console.log(selectedSkuIdLength,selectedSkuId.length); |
| | | console.log(data); |
| | | this.setData({ |
| | | skuIds:data |
| | | }); |
| | | }, |
| | | |
| | | handleDisabledSkuId(){ |
| | | let SkuMatCodeList = this.data.SkuMatCodeList; |
| | | let skuIdList = this.data.skuIdList; |
| | | let goodsSkuIdList = this.data.goodsSkuIdList.flat(2); |
| | | // console.log(goodsSkuIdList); |
| | | let disabledSkuId = []; |
| | | let selectedSkuId = this.data.selectedSkuId; |
| | | // SkuMatCodeList.forEach((item,index)=>{ |
| | | // let disabledArr = []; |
| | | // if (skuIdList[0].includes(item.skuId1)) { |
| | | // disabledArr.push() |
| | | // } |
| | | // }) |
| | | let disabledArr = []; |
| | | skuIdList.forEach((list,index)=>{ |
| | | if (index === 0){ |
| | | list.forEach((item,i)=>{ |
| | | if (goodsSkuIdList.includes(item)){ |
| | | disabledArr.push(true) |
| | | } else{ |
| | | disabledArr.push(false) |
| | | } |
| | | }) |
| | | disabledSkuId.push(disabledArr); |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | quantityEdit(e){ |
| | | // console.log(e) |
| | |
| | | }, |
| | | groupBuying(e){ |
| | | console.log('准备团购'); |
| | | if (!this.data.isCanBuy) return; |
| | | if (!this.data.isCanBuy2) { |
| | | wx.showToast({ |
| | | title: '请选择正确的分类', |
| | | icon:'none' |
| | | }) |
| | | return |
| | | }; |
| | | let quantity = this.data.Quantity.quantity; |
| | | let matCode = this.data.goodsItem.MatCode; |
| | | let groupCode = this.data.groupCode; |
| | | let goodsItem = this.data.goodsItem; |
| | | let skuIds = this.data.skuIds; |
| | | // let eventChannel = this.getOpenerEventChannel(); |
| | | //?quantity=${quantity}&matcode=${matcode}&groupCode=${groupCode} |
| | | wx.navigateTo({ |
| | |
| | | quantity, |
| | | matCode, |
| | | groupCode, |
| | | goodsItem |
| | | goodsItem, |
| | | skuIds |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | // 加入购物车触发事件 |
| | | addCart: function(e) { |
| | | if (!this.data.isCanBuy) return; |
| | | // utils.isAuthorize(this); |
| | | // console.log(this.data.isAuthorize,333) |
| | | // if(!this.data.isAuthorize){ |
| | |
| | | var title = this.data.goodsItem.MatCode; |
| | | var img = this.data.goodsItem.images[0]; |
| | | console.log(this.data.Quantity) |
| | | |
| | | let skuIds = this.data.skuIds; |
| | | |
| | | |
| | | wx.request({ |
| | |
| | | }, |
| | | data: { |
| | | matcode: title, |
| | | quantity: num |
| | | quantity: num, |
| | | ...skuIds |
| | | }, |
| | | success: function(res) { |
| | | wx.hideLoading(); |
| | |
| | | }, |
| | | // 立即购买触发事件 |
| | | payOrder: function(e) { |
| | | if (!this.data.isCanBuy) return; |
| | | if (!this.data.isCanBuy2) { |
| | | wx.showToast({ |
| | | title: '请选择正确的分类', |
| | | icon:'none' |
| | | }) |
| | | return |
| | | }; |
| | | // utils.subscribeMessage({ |
| | | // callback:()=>{ |
| | | |
| | |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | | |
| | | let skuIds = this.data.skuIds; |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/cart.do?m=add&action=goshop'), |
| | | header: { |
| | |
| | | }, |
| | | data: { |
| | | matcode: id, |
| | | quantity: num |
| | | quantity: num, |
| | | ...skuIds |
| | | }, |
| | | success: res=> { |
| | | wx.hideLoading(); |
| | |
| | | </block> |
| | | </swiper> |
| | | <view class="detail-price" wx:if="{{goodsItem.Price!=null}}"> |
| | | <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} |
| | | <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.isStartupGroupBuying?goodsItem.GroupBuyingPrice:goodsItem.Price}} |
| | | <text class="des-sale-price" wx:if="{{goodsItem.isShowPrice&&goodsItem.Price!=goodsItem.SalesPrice&&goodsItem.SalesPrice!=0}}">{{goodsItem.CurrencySign}}{{goodsItem.SalesPrice}}</text> |
| | | </view> |
| | | <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance>0}}"> |
| | |
| | | <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance<=0&&goodsItem.PanicBuyingEndTimeBalance>0}}"> |
| | | <view style="color:#fff;">距离本商品结束还剩:</view> |
| | | <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.PanicBuyingEndTimeBalance*1000 }}" /></view> |
| | | </view> |
| | | |
| | | <view class="contdown" wx:if="{{goodsItem.isStartupGroupBuying&&goodsItem.GroupBuyingStartTimeBalance>0}}"> |
| | | <view style="color:#fff;">距离本商品团购开抢还剩:</view> |
| | | <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingStartTimeBalance*1000 }}" /></view> |
| | | </view> |
| | | <view class="contdown" wx:if="{{goodsItem.isStartupGroupBuying&&goodsItem.GroupBuyingStartTimeBalance<=0&&goodsItem.GroupBuyingEndTimeBalance>0}}"> |
| | | <view style="color:#fff;">距离本商品团购结束还剩:</view> |
| | | <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance*1000 }}" /></view> |
| | | </view> |
| | | </view> |
| | | <view class="des"> |
| | |
| | | <!-- <c-posterCreate id="posterCreate" bind:createPoster="createPoster" bind:createCanvas="createCanvas"></c-posterCreate> --> |
| | | <!-- <canvas type="2d" style="width: 375px;height: 667px;position:fixed;top:9999px" id="myCanvas" /> --> |
| | | </view> |
| | | |
| | | <view class="selected-container" wx:if="{{skuSetNameStr}}"> |
| | | <van-cell is-link title-width="100rpx" bind:tap="selectedSku"> |
| | | <view slot="title"> |
| | | <text class="van-cell-text font-size-16">{{selectedSkuNameStr?'已选':'选择'}}</text> |
| | | </view> |
| | | <view class="font-size-16 my-cell no-wrap">{{selectedSkuNameStr?selectedSkuNameStr:skuSetNameStr}}</view> |
| | | </van-cell> |
| | | </view> |
| | | <view class="ticket-list" wx:if="{{CouponList.length>0}}"> |
| | | <block wx:for="{{CouponList}}" wx:key="index"> |
| | | <view class="ticket-li" wx:if="{{item.Status!==2&&item.Status!==4}}"> |
| | |
| | | <text>{{goodsItem.MatName4}}</text> |
| | | </view> |
| | | </view> |
| | | <c-group-buying wx:if="{{goodsItem.isStartupGroupBuying&&isCanBuy}}" bind:goCart="goCart" bind:goIndex="goIndex" bind:buyTap="buyTap" group-buying-list="{{groupBuyingList}}" goods-item="{{goodsItem}}"></c-group-buying> |
| | | <c-group-buying wx:if="{{goodsItem.isStartupGroupBuying}}" bind:goCart="goCart" bind:goIndex="goIndex" bind:buyTap="buyTap" is-can-buy="{{isCanBuy}}" group-buying-list="{{groupBuyingList}}" goods-item="{{goodsItem}}"></c-group-buying> |
| | | <!-- <image src="https://bkimg.cdn.bcebos.com/pic/2934349b033b5bb571dc8c5133d3d539b600bc12?x-bce-process=image/resize,m_lfit,w_268,limit_1/format,f_jpg" bindtap="viewImg" data-src="https://bkimg.cdn.bcebos.com/pic/2934349b033b5bb571dc8c5133d3d539b600bc12?x-bce-process=image/resize,m_lfit,w_268,limit_1/format,f_jpg" mode="widthFix"></image> --> |
| | | <!-- <block wx:for="{{goodsItem.images}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="key"> |
| | | <image src="{{listItem}}" bindtap="viewImg" data-src="{{listItem}}" mode="widthFix"></image> |
| | |
| | | <view> |
| | | <view> |
| | | <van-notice-bar |
| | | wx:if="{{goodsItem.isStartupPanicBuying||goodsItem.isStartupGroupBuying}}" |
| | | class="notice-bar" |
| | | wx:if="{{goodsItem.isStartupPanicBuying}}" |
| | | text="{{noticeText}}" |
| | | scrollable="{{false}}" |
| | | /> |
| | | </view> |
| | | |
| | | <view class="buy-nav" wx:if="{{!goodsItem.isStartupGroupBuying||(goodsItem.isStartupGroupBuying&&!isCanBuy)}}"> |
| | | <view class="buy-nav" wx:if="{{!goodsItem.isStartupGroupBuying}}"> |
| | | <view class="buy-nav-left"> |
| | | <view class="icon" bindtap="goIndex"> |
| | | <view class="iconfont icon-shouye"></view> |
| | |
| | | <!--对话框标题--> |
| | | <view class="goods-layer"> |
| | | <view class="goods-row"> |
| | | <image src="{{goodsItem.images[0]}}" /> |
| | | <image bind:tap="viewImg" data-src="{{goodsItem.images[0]}}" src="{{goodsItem.images[0]}}" /> |
| | | <view class="goods-row-txt"> |
| | | <view class="goods-title no-wrap">{{goodsItem.MatName}}</view> |
| | | <view class="goods-price">{{goodsItem.CurrencySign}}{{goodsItem.Price}}</view> |
| | | <view class="goods-price">{{goodsItem.CurrencySign}}{{goodsItem.isStartupGroupBuying&&actionType=='groupBuying'?goodsItem.GroupBuyingPrice:goodsItem.Price}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{selectedSkuNameStr}}"> |
| | | {{selectedSkuNameStr}} |
| | | </van-tag> |
| | | </view> |
| | | <view class="iconfont icon-cuowuguanbiquxiao-xianxingyuankuang" bindtap="hideLayer"></view> |
| | | </view> |
| | |
| | | <view class="goods-tags" > |
| | | <block wx:for="{{item.skuList}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="key"> |
| | | <!-- <van-tag round class="goods-tag {{listItem.checked?'checked':''}}" size="medium" color="#ddd" data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-i="{{index}}">{{listItem.skuName}}</van-tag>--> |
| | | <van-tag round class="goods-tag {{listItem.skuId===selectedSkuId[index]?'checked':''}}" size="medium" color="#ddd" data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-sku-id="{{listItem.skuId}}" data-i="{{index}}">{{listItem.skuName}}</van-tag> |
| | | <van-tag round class="goods-tag {{listItem.skuId===selectedSkuId[index]?'checked':'' }} {{listItem.isEnableSelection?'':'disabled-tag'}}" size="medium" color="#ddd" data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-sku-id="{{listItem.skuId}}" data-sku-name="{{listItem.skuName}}" data-is-enabled="{{listItem.isEnableSelection}}" data-i="{{index}}" >{{listItem.skuName}}</van-tag> |
| | | |
| | | </block> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <!--对话框按钮--> |
| | | <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}" bind:authorize="{{actionType}}"> |
| | | <button slot="content" class="btn-next"> |
| | | 下一步 |
| | | </button> |
| | | </c-authorize-phone> |
| | | <view wx:if="{{!isSelectedSku}}"> |
| | | <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}" wx:if="{{!skuSetNameStr}}" bind:authorize="{{actionType}}" > |
| | | <button slot="content" class="btn-next" disabled="{{!isCanBuy}}"> |
| | | 下一步 |
| | | </button> |
| | | </c-authorize-phone> |
| | | <view wx:else> |
| | | <van-goods-action class="btn-cell-group" wx:if="{{!goodsItem.isStartupGroupBuying}}" safe-area-inset-bottom="{{false}}"> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="addCart"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell cart-btn" type="warning"> |
| | | 加入购物车 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="payOrder"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell" type="danger"> |
| | | 立即购买 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | </van-goods-action> |
| | | <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}" wx:else bind:authorize="{{actionType}}" > |
| | | <button slot="content" disabled="{{!isCanBuy}}" class="btn-next"> |
| | | 下一步 |
| | | </button> |
| | | </c-authorize-phone> |
| | | </view> |
| | | |
| | | </view> |
| | | <view wx:else> |
| | | <van-goods-action class="btn-cell-group" wx:if="{{!goodsItem.isStartupGroupBuying}}" safe-area-inset-bottom="{{false}}"> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="addCart"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell cart-btn" type="warning"> |
| | | 加入购物车 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="payOrder"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell" type="danger"> |
| | | 立即购买 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | </van-goods-action> |
| | | <van-goods-action class="btn-cell-group" wx:else safe-area-inset-bottom="{{false}}"> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="payOrder"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round color="#f4aba7" slot="content" class="btn-cell disabled-btn"> |
| | | 单独购买 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}" bind:authorize="groupBuying"> |
| | | <van-goods-action-button disabled="{{!isCanBuy}}" round type="danger" slot="content" class="btn-cell"> |
| | | 发起拼单 |
| | | </van-goods-action-button> |
| | | </c-authorize-phone> |
| | | </van-goods-action> |
| | | </view> |
| | | |
| | | <!-- <button open-type="getUserInfo" class="btn-next" bindgetuserinfo="{{actionType}}"> |
| | | 下一步 |
| | |
| | | }
|
| | |
|
| | | .goods-row .goods-title {
|
| | | line-height: 80rpx;
|
| | | /* line-height: 80rpx; */
|
| | | font-size: 30rpx;
|
| | | max-width: 500rpx;
|
| | | overflow: hidden;
|
| | |
| | | }
|
| | | .goods-tag{
|
| | | margin-right: 30rpx;
|
| | | margin-bottom: 20rpx;
|
| | | }
|
| | | .goods-tag .van-tag{
|
| | | padding: 8rpx 20rpx;
|
| | | color:#333;
|
| | | box-sizing: border-box;
|
| | | }
|
| | | .goods-tag.checked .van-tag{
|
| | | border: 1rpx solid #f23232;
|
| | | background-color: #f8dede !important;
|
| | | color: #f23232 !important;
|
| | |
|
| | | }
|
| | |
|
| | | .goods-tag.disabled-tag .van-tag{
|
| | | background-color: #f8f8f8 !important;
|
| | | color: #d3d3d3 !important;
|
| | | text-decoration:line-through;
|
| | | }
|
| | | .selected-container{
|
| | | background-color: #f8f8f8;
|
| | | padding: 20rpx 0;
|
| | | }
|
| | | .my-cell.no-wrap{
|
| | | max-width: 580rpx;
|
| | | }
|
| | |
|
| | | /*.btn-cell-group{*/
|
| | | /* display: flex;*/
|
| | | /* justify-content: space-between;*/
|
| | | /*}*/
|
| | | .btn-cell-group .van-goods-action{
|
| | | position: relative;
|
| | | }
|
| | | .flex1{
|
| | | flex:1;
|
| | | }
|
| | | .btn-cell .van-button__text{
|
| | | font-size: 28rpx;
|
| | | }
|
| | | /*.selected-container .van-cell-text{*/
|
| | | /* font-size: 2*/
|
| | | /*}*/
|
| | |
| | | </block> |
| | | </swiper> |
| | | <view class="detail-price"> |
| | | <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} |
| | | <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} |
| | | <text class="des-sale-price" wx:if="{{goodsItem.isShowPrice&&goodsItem.Price!=goodsItem.SalesPrice&&goodsItem.SalesPrice!=0}}">{{goodsItem.CurrencySign}}{{goodsItem.SalesPrice}}</text> |
| | | </view> |
| | | <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance>0}}"> |
| | |
| | | class="notice-bar" |
| | | wx:if="{{goodsItem.isStartupPanicBuying}}" |
| | | text="{{noticeText}}" |
| | | scrollable="{{false}}" |
| | | /> |
| | | </view> |
| | | <view class="buy-nav"> |
| | |
| | | <view wx:if="{{isPaidDeposit}}" class="now-buy bought" data-name="order"> |
| | | 已经抢购 |
| | | </view> |
| | | |
| | | |
| | | <!-- <c-authorize-info style="width:100%;" wx:else bind:authorize="buyNow"> |
| | | <view >66666666</view> |
| | | <view slot="content" class="now-buy" data-name="order"> |
| | |
| | | 支付{{goodsItem.CurrencySign+goodsItem.DepositAmount||0}}立即抢订 |
| | | </view> |
| | | </c-authorize-phone> |
| | | |
| | | |
| | | <!-- <button wx:else class="now-buy clear-btn" open-type="getUserInfo" bindgetuserinfo="buyNow" data-name="order"> |
| | | 支付{{goodsItem.CurrencySign+goodsItem.DepositAmount||0}}立即抢订 |
| | | </button> --> |
| | |
| | | |
| | | <c-contact></c-contact> |
| | | |
| | | <!-- <c-authorize-tel bind:getPhoneNumber="getPhoneNumber" wx:if="{{isPullTelephone&&!cltcode}}"></c-authorize-tel> --> |
| | | <!-- <c-authorize-tel bind:getPhoneNumber="getPhoneNumber" wx:if="{{isPullTelephone&&!cltcode}}"></c-authorize-tel> --> |
| | |
| | | <image class="goods-item-img border-radius" src="{{goods.PhotoPath}}"></image> |
| | | <view class="img-info" wx:if="{{goods.isRestrictQuantity&&goods.Quantity<=0}}">已抢光</view> |
| | | <view class="img-info" wx:elif="{{goods.isStartupPanicBuying&&goods.PanicBuyingEndTimeBalance<=0}}">已结束</view> |
| | | |
| | | <van-tag wx:if="{{goods.isStartupGroupBuying&&goods.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag> |
| | | </view> |
| | | |
| | | |
| | | <text class="goods-item-title">{{goods.isShowMatCode?goods.ShopMatCode:''}}</text> |
| | | <text class="goods-item-title" wx:if="{{goods.isShowMatName}}">{{goods.MatName}}</text> |
| | | <view class="price"> |
| | | <text class="goods-item-price" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.Price}}</text> |
| | | <text class="goods-item-price" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.isStartupGroupBuying?goods.GroupBuyingPrice:goods.Price}}</text> |
| | | <text class="goods-item-costprice" wx:if="{{goods.isShowPrice&&goods.Price&&goods.Price!=goods.SalesPrice&&goods.SalesPrice!=0}}">{{goods.CurrencySign}}{{goods.SalesPrice}}</text> |
| | | </view> |
| | | <text class="goods-item-info" wx:if="{{goods.isStartupPanicBuying}}">预售: {{goods.PanicBuyingStartTime}}</text> |
| | |
| | | <!-- <c-single-goods-item wx:for="{{item.list}}" wx:for-item="btnItem" wx:key="index" is-go-events="{{true}}" goods-item="{{btnItem}}"></c-single-goods-item> --> |
| | | <button bindtap="goDetailEvents" wx:for="{{item.list}}" wx:for-item="btnItem" wx:key="index" class="item-container formid-btn" data-goods-id="{{btnItem.MatCode}}" data-index="{{index}}" data-external-url="{{btnItem.ExternalUrl}}" data-deposit-doccode="{{btnItem.DepositDocCode}}" data-deposit-rowid="{{btnItem.DepositRowId}}"> |
| | | <view class="items border-radius"> |
| | | <van-tag wx:if="{{btnItem.isStartupGroupBuying&&btnItem.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag> |
| | | <image class="goods-item-img" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' src="{{btnItem.PhotoPath}}"></image> |
| | | <text class=" goods-item-title" style='width:{{item.ImageWidthWhenScrolling|| 200}}px'>{{btnItem.isShowMatCode?btnItem.ShopMatCode:''}}</text> |
| | | <text class="goods-item-title" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowMatName}}">{{btnItem.MatName}}</text> |
| | | <view class="price"> |
| | | <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.Price}}</text> |
| | | <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.isStartupGroupBuying?btnItem.GroupBuyingPrice:btnItem.Price}}</text> |
| | | <text class="goods-item-costprice" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice&&btnItem.SalesPrice&&btnItem.SalesPrice!==btnItem.Price}}">{{btnItem.CurrencySign}}{{btnItem.SalesPrice}}</text> |
| | | </view> |
| | | <view class="order-price" wx:if="{{!btnItem.isPaidDeposit}}"> |
| | |
| | | <!-- <button class="hide-btn" form-type="submit"></button> --> |
| | | <view class="items border-radius"> |
| | | <view style="position:relative;"> |
| | | <van-tag wx:if="{{btnItem.isStartupGroupBuying&&btnItem.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag> |
| | | <image class="goods-item-img" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' src="{{btnItem.PhotoPath}}"></image> |
| | | <view class="img-info" wx:if="{{btnItem.isRestrictQuantity&&btnItem.Quantity<=0}}">已抢光</view> |
| | | <view class="img-info" wx:elif="{{btnItem.isStartupPanicBuying&&btnItem.PanicBuyingEndTimeBalance<=0}}">已结束</view> |
| | |
| | | <text class=" goods-item-title" style='width:{{item.ImageWidthWhenScrolling || 200}}px'>{{btnItem.isShowMatCode?btnItem.ShopMatCode:''}}</text> |
| | | <text class="goods-item-title" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowMatName}}">{{btnItem.MatName}}</text> |
| | | <view class="price"> |
| | | <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.Price}}</text> |
| | | <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.isStartupGroupBuying?btnItem.GroupBuyingPrice:btnItem.Price}}</text> |
| | | <text class="goods-item-costprice" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice&&btnItem.SalesPrice&&btnItem.SalesPrice!==btnItem.Price}}">{{btnItem.CurrencySign}}{{btnItem.SalesPrice}}</text> |
| | | </view> |
| | | <!-- <scroll-view wx:if="{{isStartupPanicBuying}}" class="goods-item-info" scroll-x="{{true}}"> |
| | |
| | | border-radius: 40rpx;
|
| | |
|
| | | } */
|
| | | .group-tag{
|
| | | position: absolute;
|
| | | left: -2rpx;
|
| | | top: 10rpx;
|
| | | }
|
| | |
| | | console.log(getCurrentPages()) |
| | | |
| | | |
| | | if (!this.data.isFirstShow&&selectedCartIds) { |
| | | if (!this.data.isFirstShow) { |
| | | console.log('非第一次显示页面、、、', this.data.isFirstShow); |
| | | |
| | | this.getOrderData(); |
| | | this.getAddressList(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | refresh(){ |
| | | console.log('电话头像授权完成'); |
| | | if (selectedCartIds){ |
| | | this.getOrderData() |
| | | } |
| | | |
| | | this.getOrderData(); |
| | | this.getAddressList(); |
| | | }, |
| | | |
| | | |
| | |
| | | url: '../addressList/addressList?way=select' |
| | | }) |
| | | }, |
| | | |
| | | getOrderData(){ |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }); |
| | | getAddressList() { |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo&selectedCartIds='+selectedCartIds), |
| | | url: utils.getUrl('/shopping/confirm.do?m=getConfirmAddress'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | |
| | | |
| | | this.setData({ |
| | | Address: res.data.Address, |
| | | deliveryMethod: res.data.FreeList |
| | | }) |
| | | let Address = res.data.Address; |
| | | if (Address&&Address.TransDistance) { |
| | | let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm' |
| | | this.setData({ |
| | | ['Address.TransDistance']: distance |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | fail: function (errmsg) { |
| | | utils.requestFail(errmsg, '/shopping/confirm.do?m=getConfirmAddress'); |
| | | } |
| | | }) |
| | | }, |
| | | getOrderData(){ |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }); |
| | | let url = ''; |
| | | let quantity=this.data.quantity; |
| | | let matcode=this.data.matCode; |
| | | let data = {}; |
| | | if (selectedCartIds){ |
| | | url = '/shopping/confirm.do?m=getConfirmInfo&selectedCartIds='+selectedCartIds |
| | | } else{ |
| | | let skuIds = this.data.skuIds; |
| | | url = `/shopping/confirm.do?m=getConfirmInfo&matcode=${matcode}&quantity=${quantity}` |
| | | data={ |
| | | ...skuIds |
| | | } |
| | | } |
| | | wx.request({ |
| | | url: utils.getUrl(url), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | | return false; |
| | | } |
| | | |
| | | this.setData({ |
| | | // Address: res.data.Address, |
| | | totalMoney: res.data.PayAmount, |
| | | CartList: res.data.CartList, |
| | | CouponList: res.data.CouponList, |
| | |
| | | balance2: res.data.Balance, |
| | | isAllowPayable:res.data.isAllowPayable, |
| | | VoucherAmount:res.data.VoucherList.VoucherAmount || 0, |
| | | deliveryMethod: res.data.FreeList |
| | | // deliveryMethod: res.data.FreeList |
| | | }) |
| | | let Address = res.data.Address; |
| | | if (Address&&Address.TransDistance) { |
| | | let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm' |
| | | this.setData({ |
| | | ['Address.TransDistance']: distance |
| | | }) |
| | | } |
| | | // let Address = res.data.Address; |
| | | // if (Address&&Address.TransDistance) { |
| | | // let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm' |
| | | // this.setData({ |
| | | // ['Address.TransDistance']: distance |
| | | // }) |
| | | // } |
| | | |
| | | if (res.data.Balance>0){ |
| | | this.setData({ |
| | |
| | | id:0, |
| | | }) |
| | | } |
| | | isUsingCoupon=true; |
| | | if (selectedCartIds){ |
| | | isUsingCoupon=true; |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function (errmsg) { |
| | |
| | | }) |
| | | // console.log('进入order页',deliveryMethod,this.data.isAllowSelectDeliveryMethod) |
| | | this.getOrderData(); |
| | | this.getAddressList(); |
| | | } |
| | | |
| | | this.setData({ |
| | | RewardStatus:app.globalData.RewardStatus, |
| | | isAllowSelectDeliveryMethod:app.globalData.isAllowSelectDeliveryMethod, |
| | |
| | | this.setData({ |
| | | ...res |
| | | }) |
| | | this.getOrderData(); |
| | | this.getAddressList(); |
| | | }); |
| | | |
| | | }, |
| | |
| | | Balance: 0 |
| | | }) |
| | | } |
| | | |
| | | let data = {}; |
| | | if (selectedCartIds){ |
| | | data = { |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon, |
| | | selectedCartIds |
| | | } |
| | | } else{ |
| | | data = { |
| | | couponCode:'', |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon:false, |
| | | quantity: this.data.quantity, |
| | | matcode: this.data.matCode, |
| | | ...this.data.skuIds, |
| | | } |
| | | } |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data: { |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon, |
| | | selectedCartIds |
| | | }, |
| | | data, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | |
| | | isSelected2: false |
| | | }) |
| | | } |
| | | |
| | | let data = {}; |
| | | if (selectedCartIds){ |
| | | data = { |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon, |
| | | selectedCartIds |
| | | } |
| | | } else{ |
| | | data = { |
| | | couponCode:'', |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon:false, |
| | | quantity: this.data.quantity, |
| | | matcode: this.data.matCode, |
| | | ...this.data.skuIds, |
| | | } |
| | | } |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data: { |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.Balance, |
| | | isUsingCoupon, |
| | | selectedCartIds |
| | | }, |
| | | data, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | |
| | | // }) |
| | | // return false |
| | | // } |
| | | wx.showLoading() |
| | | let data = {}; |
| | | let url = ''; |
| | | if (selectedCartIds){ |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/confirm.do?m=save'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | // method:'POST', |
| | | data:{ |
| | | paymentaddress: this.data.Address.paymentaddress, |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | presenddate: event.detail.value.date, |
| | | paymentcomment: event.detail.value.remark, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.isChecked ? this.data.Balance : 0, |
| | | isUsingCoupon, |
| | | freeid:delivery.FreeId||'', |
| | | FromOpenId:app.globalData.FromOpenId||'', |
| | | selectedCartIds |
| | | }, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | | return false; |
| | | } |
| | | // utils.cartNum(); |
| | | // let weiXinPayAmount = 0 |
| | | if (res.data.weiXinPayAmount == 0){ |
| | | url = '/shopping/confirm.do?m=save'; |
| | | data = { |
| | | paymentaddress: this.data.Address.paymentaddress, |
| | | couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | presenddate: event.detail.value.date, |
| | | paymentcomment: event.detail.value.remark, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.isChecked ? this.data.Balance : 0, |
| | | isUsingCoupon, |
| | | freeid:delivery.FreeId||'', |
| | | FromOpenId:app.globalData.FromOpenId||'', |
| | | selectedCartIds |
| | | } |
| | | } else{ |
| | | url = '/shopping/confirm.do?m=saveGroupBuyingOrder'; |
| | | data = { |
| | | paymentaddress: this.data.Address.paymentaddress, |
| | | couponCode: "", |
| | | presenddate: event.detail.value.date, |
| | | paymentcomment: event.detail.value.remark, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.isChecked ? this.data.Balance : 0, |
| | | isUsingCoupon:false, |
| | | freeid:delivery.FreeId||'', |
| | | FromOpenId:app.globalData.FromOpenId||'', |
| | | quantity:this.data.quantity, |
| | | matcode: this.data.matCode, |
| | | ...this.data.skuIds, |
| | | groupBuyingDocCode:this.data.groupCode |
| | | } |
| | | } |
| | | wx.showLoading() |
| | | wx.request({ |
| | | url: utils.getUrl(url), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | // method:'POST', |
| | | data, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | | return false; |
| | | } |
| | | // utils.cartNum(); |
| | | // let weiXinPayAmount = 0 |
| | | if (res.data.weiXinPayAmount == 0){ |
| | | |
| | | // docstatus = 0 and isAllowPayable = 0 |
| | | wx.redirectTo({ |
| | | url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid, |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | |
| | | if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){ |
| | | // docstatus = 0 and isAllowPayable = 0 |
| | | wx.redirectTo({ |
| | | url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid, |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | |
| | | if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){ |
| | | // docstatus = 0 and isAllowPayable = 0 |
| | | wx.redirectTo({ |
| | | url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid, |
| | | }) |
| | | } else { |
| | | wx.redirectTo({ |
| | | url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function (errmsg) { |
| | | utils.requestFail(errmsg,'/shopping/confirm.do'); |
| | | } |
| | | }) |
| | | } |
| | | else{ |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/confirm.do?m=saveGroupBuyingOrder'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | // method:'POST', |
| | | data:{ |
| | | paymentaddress: this.data.Address.paymentaddress, |
| | | // couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode, |
| | | presenddate: event.detail.value.date, |
| | | paymentcomment: event.detail.value.remark, |
| | | points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount, |
| | | balance: this.data.isChecked ? this.data.Balance : 0, |
| | | // isUsingCoupon, |
| | | freeid:delivery.FreeId||'', |
| | | FromOpenId:app.globalData.FromOpenId||'', |
| | | // selectedCartIds |
| | | quantity:this.data.quantity, |
| | | matcode: this.data.matCode, |
| | | groupBuyingDocCode:this.data.groupCode |
| | | }, |
| | | success: res => { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | | return false; |
| | | } |
| | | // utils.cartNum(); |
| | | // let weiXinPayAmount = 0 |
| | | if (res.data.weiXinPayAmount == 0){ |
| | | |
| | | // docstatus = 0 and isAllowPayable = 0 |
| | | wx.redirectTo({ |
| | | url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid, |
| | | url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid, |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | |
| | | if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){ |
| | | // docstatus = 0 and isAllowPayable = 0 |
| | | wx.redirectTo({ |
| | | url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid, |
| | | }) |
| | | } else { |
| | | wx.redirectTo({ |
| | | url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function (errmsg) { |
| | | utils.requestFail(errmsg,'/shopping/confirm.do'); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function (errmsg) { |
| | | utils.requestFail(errmsg,'/shopping/confirm.do'); |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | onDialogClose(){ |
| | |
| | | <view class="item-title" wx:if="{{goods.isShowMatName}}">{{goods.MatName}}</view> |
| | | <view class="item-title" wx:if="{{goods.isShowMatCode}}">编号:{{goods.MatCode}}</view> |
| | | <view class="item-title" wx:if="{{goods.isShowSpecial}}">规格:{{goods.Special}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{goods.skuName1}}"> |
| | | <block wx:for="{{10}}" wx:key="key"> |
| | | {{goods['skuName'+(index+1)]}} |
| | | <!-- {{'skuName'+index+1}}--> |
| | | </block> |
| | | </van-tag> |
| | | <!-- <view class="item-title">型号:{{goods.MatCode}}</view> --> |
| | | <!-- <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> --> |
| | | <view class="item-total" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.Price}} {{goods.Quantity?'*':goods.Quantity}} {{goods.Quantity}}</view> |
| | |
| | | </view> |
| | | </block> |
| | | |
| | | <view class="goods-item" wx:if="{{goodsItem}}" data-id="{{goodsItem.CartId}}"> |
| | | <image src="{{goodsItem.PhotoPath}}" class="item-img" /> |
| | | <view class="item"> |
| | | <view class="item-title" wx:if="{{goodsItem.isShowMatName}}">{{goodsItem.MatName}}</view> |
| | | <view class="item-title" wx:if="{{goodsItem.isShowMatCode}}">编号:{{goodsItem.MatCode}}</view> |
| | | <view class="item-title" wx:if="{{goodsItem.isShowSpecial}}">规格:{{goodsItem.Special}}</view> |
| | | <!-- <view class="item-title">型号:{{goods.MatCode}}</view> --> |
| | | <!-- <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> --> |
| | | <view class="item-total" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} {{quantity?'*':quantity}} {{quantity}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="goods-item" wx:if="{{goodsItem}}" data-id="{{goodsItem.CartId}}">--> |
| | | <!-- <image src="{{goodsItem.PhotoPath}}" class="item-img" />--> |
| | | <!-- <view class="item">--> |
| | | <!-- <view class="item-title" wx:if="{{goodsItem.isShowMatName}}">{{goodsItem.MatName}}</view>--> |
| | | <!-- <view class="item-title" wx:if="{{goodsItem.isShowMatCode}}">编号:{{goodsItem.MatCode}}</view>--> |
| | | <!-- <view class="item-title" wx:if="{{goodsItem.isShowSpecial}}">规格:{{goodsItem.Special}}</view>--> |
| | | <!-- <!– <view class="item-title">型号:{{goods.MatCode}}</view> –>--> |
| | | <!-- <!– <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> –>--> |
| | | <!-- <view class="item-total" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} {{quantity?'*':quantity}} {{quantity}}</view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | |
| | | <!-- <picker class="order-row invoice" bindchange="bindPickerChange" name="invoice" value="{{index}}" range="{{invoice}}" range-key="name"> |
| | | <view class="order-row-left">发票信息</view> |
| | |
| | | let matcode = e.currentTarget.dataset.matcode; |
| | | let rowid = e.currentTarget.dataset.rowid; |
| | | let quantity = e.currentTarget.dataset.quantity; |
| | | let index = e.currentTarget.dataset.index; |
| | | let list = this.data.orderDetail.list; |
| | | let skuIds = {} |
| | | let data = { |
| | | matcode, |
| | | quantity, |
| | | formid |
| | | }; |
| | | if (list[index].skuId1){ |
| | | for (let i = 0; i < 10; i++) { |
| | | let item = list[index]['skuId'+(i +1)]; |
| | | if (item){ |
| | | skuIds['skuId'+(i +1)] = list[index]['skuId'+(i +1)] |
| | | } else{ |
| | | skuIds['skuId'+(i +1)] = '' |
| | | } |
| | | } |
| | | console.log(skuIds); |
| | | data = { |
| | | matcode, |
| | | quantity, |
| | | formid, |
| | | ...skuIds |
| | | } |
| | | } |
| | | |
| | | wx.showLoading(); |
| | | wx.request({ |
| | |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data: { |
| | | matcode, |
| | | quantity, |
| | | formid |
| | | }, |
| | | data, |
| | | success: res=> { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | |
| | | <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}"> |
| | | <block wx:for="{{10}}" wx:for-item="sku" wx:key="key"> |
| | | {{item['skuName'+(index+1)]}} |
| | | <!-- {{'skuName'+index+1}}--> |
| | | </block> |
| | | </van-tag> |
| | | <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.Currency}}{{item.costprice}}</text> --> |
| | | <view class="item-total" wx:if="{{item.isShowPrice}}"> |
| | | {{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view> |
| | |
| | | |
| | | </view> --> |
| | | |
| | | <van-cell class="my-cell" color="#ff751a" title-width="400rpx" bind:tap="showDialog"> |
| | | <view class="order-group" wx:if="{{orderDetail.groupBuyingList.length>0}}"> |
| | | <van-cell class="my-cell" color="#ff751a" title-width="400rpx" bind:tap="showDialog" border="{{false}}"> |
| | | <view slot="title"> |
| | | 拼单成功 |
| | | <block wx:if="{{orderDetail.GroupBuyingMembersBalance>=0}}"> |
| | | 拼单成功 |
| | | </block> |
| | | <block wx:else> |
| | | 拼单中 |
| | | </block> |
| | | </view> |
| | | <view> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{Headimgurl}}"/> |
| | | <view class="my-cell-content"> |
| | | <view wx:for="{{orderDetail.groupBuyingList}}" wx:if="{{index<2}}" class="avatar-view"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | <view class="img-mask" wx:if="{{index==1&&orderDetail.groupBuyingList.length>2}}">+{{orderDetail.groupBuyingList.length-2}}</view> |
| | | </view> |
| | | <text class="iconfont icon-xiayiyeqianjinchakangengduo "></text> |
| | | </view> |
| | | |
| | | </van-cell> |
| | | </view> |
| | | <c-dialog-layer id="dialogLayer"> |
| | | <view slot="title" class="dialog-title"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{Headimgurl}}"/> |
| | | <view>key</view> |
| | | <view>2021年1月31日15:46:25 发起拼单</view> |
| | | <view slot="title" class="dialog-title" wx:for="{{orderDetail.groupBuyingList}}" wx:key="key" wx:if="{{item.isGroupBuyingMaster}}"> |
| | | <view class="avatar-view"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | <van-tag round color="#ffab33" class="group-tag">拼主</van-tag> |
| | | </view> |
| | | <view>{{item.NickName}}</view> |
| | | <view class="van-cell-text">{{item.EnterDate}} 发起拼单</view> |
| | | </view> |
| | | <scroll-view scroll-y="true" style="height:{{280}}px;"> |
| | | <view class="content"> |
| | | <!-- <van-cell-group class="my-cell-group" border="{{false}}">--> |
| | | <van-cell class="my-cell" title-width="180rpx" center wx:for="{{groupBuyingList}}" wx:key="key" border="{{index!==arrayList.length-1?true:false}}"> |
| | | <van-cell class="my-cell" title-width="120rpx" center wx:for="{{orderDetail.groupBuyingList}}" wx:key="key" wx:if="{{!item.isGroupBuyingMaster}}" border="{{index!==arrayList.length-1?true:false}}"> |
| | | <view slot="icon"> |
| | | <van-image round width="80rpx" height="80rpx" class="van-image" |
| | | src="{{item.Headimgurl}}"/> |
| | | </view> |
| | | <view class="slot-title" slot="title"> |
| | | <view class="van-cell-text no-wrap margin-left">{{item.NickName}}</view> |
| | | <view class="no-wrap margin-left">{{item.NickName}}</view> |
| | | </view> |
| | | <view class="font-bold flex-between"> |
| | | <view class="van-cell-text">xxx 时间 拼单成功</view> |
| | | <view class="van-cell-text">{{item.EnterDate}} 拼单成功</view> |
| | | </view> |
| | | </van-cell> |
| | | <!-- </van-cell-group>--> |
| | | </view> |
| | | </scroll-view> |
| | | </c-dialog-layer> |
| | |
| | | right: 520rpx;
|
| | | }
|
| | | .share-btn{
|
| | | |
| | |
|
| | | display: inline;
|
| | | font-size: 12px;
|
| | | border: 1rpx solid #1aad19;
|
| | |
| | | justify-content: flex-end;
|
| | | padding: 10rpx 0 20rpx 0;
|
| | | background-color: #fff;
|
| | | |
| | |
|
| | | }
|
| | | .price-input{
|
| | | border-bottom: 1rpx solid #dbdbdb;
|
| | |
| | | .dialog-title{
|
| | | text-align: center;
|
| | | }
|
| | | .order-group{
|
| | | margin-top: 20rpx;
|
| | | padding: 0 10rpx;
|
| | | background-color: #fff;
|
| | | }
|
| | | .my-cell .van-cell{
|
| | | align-items: center;
|
| | | /* padding: 0; */
|
| | | }
|
| | | .avatar-view{
|
| | | position: relative;
|
| | | display: inline-block;
|
| | | }
|
| | | .img-mask{
|
| | | top: 0;
|
| | | position: absolute;
|
| | | /*opacity: 0.3;*/
|
| | | background-color: #666666aa;
|
| | | right: 0;
|
| | | left: 0;
|
| | | border-radius: 50%;
|
| | | height: 80rpx;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | color: #fff;
|
| | | justify-content: center;
|
| | | }
|
| | | .group-tag{
|
| | | position: absolute;
|
| | | left: -15rpx;
|
| | | top: -10rpx;
|
| | | }
|
| | | .slot-title{
|
| | | margin-left: 20rpx;
|
| | | }
|
| | | .van-cell-text{
|
| | | color: #a9a9a9;
|
| | | }
|
| | | .my-cell-content{
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: flex-end;
|
| | | }
|
| | | .my-cell-content .iconfont{
|
| | | font-size: 42rpx;
|
| | | }
|
| | |
| | | <import src="../template/goods-item-row/goods-item-row-template" /> |
| | | <form bindsubmit="placeOrder"> |
| | | <view style="padding-bottom:120rpx;"> |
| | | |
| | | |
| | | |
| | | <view class="payway"> |
| | | |
| | |
| | | {{orderDetail.StatusDesc||""}} |
| | | <!-- <icon class="iconfont icon-lajixiang" bindtap="deleteTap" wx:if="{{orderDetail.isShowCancelButton}}"></icon> --> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view wx:for="{{orderDetail.list}}" wx:key="key"> |
| | | <!-- {{item}} --> |
| | |
| | | <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}"> |
| | | <block wx:for="{{10}}" wx:for-item="sku" wx:key="key"> |
| | | {{item['skuName'+(index+1)]}} |
| | | <!-- {{'skuName'+index+1}}--> |
| | | </block> |
| | | </van-tag> |
| | | <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.Currency}}{{item.costprice}}</text> --> |
| | | <view class="item-total" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view> |
| | | <text>送货时间</text><view>{{orderDetail.DeliveryDate||"-"}}</view></view> |
| | | </view> |
| | | |
| | | |
| | | <view class="order-total"> |
| | | |
| | | |
| | | <view> |
| | | <view>商品总额 |
| | | <text>{{orderDetail.CurrencySign}}{{orderDetail.SumTotalMoney2}}</text> |
| | |
| | | </view> |
| | | |
| | | </view> |
| | | </form> |
| | | </form> |
| | |
| | | |
| | | // } |
| | | // conlist.push(orderList); |
| | | // conlist.push(waitPay); |
| | | // conlist.push(waitPay); |
| | | // conlist.push(waitRec); |
| | | // conlist.push(complete); |
| | | // conlist.push(cancle); |
| | |
| | | // }) |
| | | // }, |
| | | goReceipt: function(e) { |
| | | |
| | | |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/orderReceipt.do'), |
| | |
| | | title: '收货成功', |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function(errmsg) { |
| | | utils.requestFail(errmsg,'/shopping/orderReceipt.do'); |
| | |
| | | let rowid = e.currentTarget.dataset.rowid; |
| | | let quantity = e.currentTarget.dataset.quantity; |
| | | |
| | | let index = e.currentTarget.dataset.index; |
| | | let zindex = e.currentTarget.dataset.zindex; |
| | | let list = this.data.conlist[this.data.selected][zindex].OrderDetailList; |
| | | console.log(list); |
| | | let skuIds = {} |
| | | let data = { |
| | | matcode, |
| | | quantity, |
| | | }; |
| | | if (list[index].skuId1){ |
| | | for (let i = 0; i < 10; i++) { |
| | | let item = list[index]['skuId'+(i +1)]; |
| | | if (item){ |
| | | skuIds['skuId'+(i +1)] = list[index]['skuId'+(i +1)] |
| | | } else{ |
| | | skuIds['skuId'+(i +1)] = '' |
| | | } |
| | | } |
| | | console.log(skuIds); |
| | | data = { |
| | | matcode, |
| | | quantity, |
| | | ...skuIds |
| | | } |
| | | } |
| | | // return; |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/cart.do?m=add&action=goshop'), |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data: { |
| | | matcode, |
| | | quantity |
| | | }, |
| | | data, |
| | | success: res=> { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | |
| | | // onShareAppMessage: function() { |
| | | |
| | | // } |
| | | }) |
| | | }) |
| | |
| | | |
| | | <view bindtap="goOrderDetail" data-docstatus="{{orderlist.DocStatus}}" data-ispay="{{orderlist.isAllowPayable}}" data-doccode="{{orderlist.doccode}}" data-formid="{{orderlist.FormId}}"> |
| | | <!-- {{item}} --> |
| | | <view class="goods-item" data-id="{{item.MatCode}}" wx:for="{{orderlist.OrderDetailList}}" wx:key="index"> |
| | | <image src="{{item.PhotoPath}}" class="item-img" /> |
| | | <view class="goods-item" data-id="{{item.MatCode}}" wx:for="{{orderlist.OrderDetailList}}" wx:for-index="listIndex" wx:key="index"> |
| | | <view> |
| | | <image src="{{item.PhotoPath}}" class="item-img" /> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view> |
| | | <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view> |
| | | <van-tag plain round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}"> |
| | | <block wx:for="{{10}}" wx:for-item="sku" wx:key="key"> |
| | | {{item['skuName'+(index+1)]}} |
| | | <!-- {{'skuName'+index+1}}--> |
| | | </block> |
| | | </van-tag> |
| | | <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.CurrencySign}}{{item.costprice}}</text> --> |
| | | <view class="item-total" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view> |
| | | <text class="buy-again" data-matCode="{{item.MatCode}}" data-rowid="{{item.RowId}}" data-quantity="{{item.Quantity}}" data-index="{{index}}" catchtap="buyAgain">再次购买</text> |
| | | <text class="buy-again" data-matCode="{{item.MatCode}}" data-rowid="{{item.RowId}}" data-quantity="{{item.Quantity}}" data-index="{{listIndex}}" data-zindex="{{index}}" catchtap="buyAgain">再次购买</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="order-info"> |
| | | <view class="pay-txt"> |
| | | 共 |
| | | <text class="shop-num">{{orderlist.TotalQuantity}}</text>件商品 |
| | | <text class="true-payed">实付款:</text> |
| | | <text class="pay-num">¥{{orderlist.PayableAmount}}</text> |
| | | <view class=""> |
| | | <view class="pay-txt order-desc"> |
| | | <view class="group-mark" wx:if="{{orderlist.GroupBuyingDocCode}}"> |
| | | {{orderlist.DocType}} |
| | | <!-- <block wx:if="{{orderlist.GroupBuyingMembersBalance>=0}}">--> |
| | | <!-- 拼单成功--> |
| | | <!-- </block>--> |
| | | <!-- <block wx:else>--> |
| | | <!-- 拼单中--> |
| | | <!-- </block>--> |
| | | </view> |
| | | <view> |
| | | 共 |
| | | <text class="shop-num">{{orderlist.TotalQuantity}}</text>件商品 |
| | | <text class="true-payed">实付款:</text> |
| | | <text class="pay-num">¥{{orderlist.PayableAmount}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="order-info-btn"> |
| | | <!-- <text bindtap="deleteTap" data-doccode="{{orderlist.doccode}}">删除订单</text> --> |
| | |
| | | }
|
| | | .item {
|
| | | line-height: 42rpx;
|
| | | } |
| | | }
|
| | |
|
| | | .order-desc{
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | }
|
| | | .group-mark{
|
| | | color: #f23232;
|
| | | }
|
| | |
| | | var rowid = ""; |
| | | var mIndex = ""; |
| | | let formid = ''; |
| | | let reasonid = ''; |
| | | let hdmemo = ''; |
| | | |
| | | Page({ |
| | | |
| | |
| | | |
| | | // 提交按钮 |
| | | submitForm:function(e){ |
| | | let reasonid = this.data.index; |
| | | reasonid = this.data.index; |
| | | // let reasonid = e.detail.value.why; |
| | | let hdmemo = this.data.explain; |
| | | hdmemo = this.data.explain || ''; |
| | | |
| | | var that = this; |
| | | var imageList = this.data.imageList; |
| | |
| | | utils.subscribeMessage({ |
| | | ids:[orderTemplateId.returnsNoticeTemplateId], |
| | | callback:()=>{ |
| | | |
| | | |
| | | this.refundRequest(); |
| | | } |
| | | }) |
| | |
| | | // }) |
| | | |
| | | console.log(options); |
| | | |
| | | |
| | | |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/pay/getReturnReasonList.do'), |
| | |
| | | <image class="goods-item-img border-radius" mode="aspectFill" src="{{PhotoPath}}"></image>
|
| | | <view class="img-info" wx:if="{{isRestrictQuantity&&Quantity<=0}}">已抢光</view>
|
| | | <view class="img-info" wx:elif="{{isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0}}">已结束</view>
|
| | | |
| | | <van-tag wx:if="{{isStartupGroupBuying&&GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag>
|
| | | </view>
|
| | | |
| | |
|
| | | <text class="goods-item-title">{{isShowMatCode?ShopMatCode:''}}</text>
|
| | | <text class="goods-item-title" wx:if="{{isShowMatName}}">{{MatName}}</text>
|
| | | <view class="price">
|
| | | <text class="goods-item-price" wx:if="{{isShowPrice}}">{{CurrencySign}}{{Price}}</text>
|
| | | <text class="goods-item-price" wx:if="{{isShowPrice}}">{{CurrencySign}}{{isStartupGroupBuying?GroupBuyingPrice:Price}}</text>
|
| | | <text class="goods-item-costprice" wx:if="{{isShowPrice&&Price&&Price!=SalesPrice&&SalesPrice!=0}}">{{CurrencySign}}{{SalesPrice}}</text>
|
| | | </view>
|
| | | <!-- <scroll-view wx:if="{{isStartupPanicBuying}}" class="goods-item-info" scroll-x="{{true}}">
|
| | |
| | | font-weight: bold;
|
| | | }
|
| | | .price{
|
| | | padding: 0 10rpx 5rpx; |
| | | } |
| | | padding: 0 10rpx 5rpx;
|
| | | }
|
| | | .goods-item-price {
|
| | | margin-bottom: 16rpx;
|
| | | font-size: 27rpx;
|
| | |
| | | }
|
| | | .info-text{
|
| | | color:#ff0000;
|
| | | } |
| | | }
|
| | | .group-tag {
|
| | | position: absolute;
|
| | | left: -2rpx;
|
| | | top: 10rpx;
|
| | | }
|
| | |
| | | "compileHotReLoad": false, |
| | | "useMultiFrameRuntime": true, |
| | | "useApiHook": true, |
| | | "useApiHostProcess": false, |
| | | "babelSetting": { |
| | | "ignore": [], |
| | | "disablePlugins": [], |
| | |
| | | "userConfirmedBundleSwitch": false, |
| | | "packNpmManually": false, |
| | | "packNpmRelationList": [], |
| | | "minifyWXSS": true, |
| | | "useApiHostProcess": true |
| | | "minifyWXSS": true |
| | | }, |
| | | "compileType": "miniprogram", |
| | | "libVersion": "2.15.0", |
| | |
| | | "scene": null |
| | | }, |
| | | { |
| | | "id": 9, |
| | | "name": "订单详情", |
| | | "pathName": "pages/orderDetailEdit/orderDetailEdit", |
| | | "query": "doccode=WXD200402001", |
| | | "query": "doccode=WXD201126003", |
| | | "scene": null |
| | | }, |
| | | { |