正在显示
19 个修改的文件
包含
826 行增加
和
89 行删除
1 | +<!--pages/product-detail/product-detail.wxml--> | ||
2 | +<!-- 商品详情 --> | ||
3 | +<view class="container"> | ||
4 | + <view class="productIntro"> | ||
5 | + <view class="pic"> | ||
6 | + <view style="height:750rpx"> | ||
7 | + <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000"> | ||
8 | + <block wx:for="{{swiperArray}}" wx:for-index="idx"> | ||
9 | + <swiper-item> | ||
10 | + <image src="{{item}}" class="slideImage"></image> | ||
11 | + </swiper-item> | ||
12 | + </block> | ||
13 | + </swiper> | ||
14 | + </view> | ||
15 | + <view class="countDown" wx:if="{{goodsData.youHui}}"> | ||
16 | + <text class="countDownTxt">距结束仅剩</text> | ||
17 | + <!-- 倒计时 --> | ||
18 | + <view class="countTime"> | ||
19 | + <van-count-down use-slot time="{{ time }}" bind:change="onChange1"> | ||
20 | + <text class="item">{{ timeData.hours }}</text>: | ||
21 | + <text style="color:#FF593C">:</text> | ||
22 | + <text class="item">{{ timeData.minutes }}</text>: | ||
23 | + <text style="color:#FF593C">:</text> | ||
24 | + <text class="item">{{ timeData.seconds }}</text> | ||
25 | + </van-count-down> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + <view class="productName"> | ||
30 | + {{goodsData.goodsName}} | ||
31 | + </view> | ||
32 | + <view class="productPrice"> | ||
33 | + <view class="price" wx:if="{{goodsData.type==2}}">¥{{goodsData.goodsPrice}}</view> | ||
34 | + <view class="jifen" wx:if="{{goodsData.type==1}}">积分{{goodsData.goodsPrice}}</view> | ||
35 | + <view class="share" data-id="{{goodsId}}"> | ||
36 | + <view class="shareIcon"> | ||
37 | + <image src="/images/01-03/icon_share@2x.png"></image> | ||
38 | + </view> | ||
39 | + <view class="shareTitle">分享</view> | ||
40 | + <button open-type="share" data-id="{{goodsId}}"></button> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + | ||
44 | + </view> | ||
45 | + <!-- 请选择 --> | ||
46 | + <view class="selectMain" bindtap="selectSku"> | ||
47 | + <view class="selectTitle">选择</view> | ||
48 | + <view class="selectNum"> | ||
49 | + <view>{{}}</view> | ||
50 | + <view class="selectPic"> | ||
51 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
52 | + </view> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + <!-- 评价 --> | ||
56 | + <view class='{{flags?"evaluateContent":"evaluateContents"}}'> | ||
57 | + <view class="evaluateTop"> | ||
58 | + <view class="evaluateTitle">宝贝评价({{pingjiaNum}})</view> | ||
59 | + <view class="lookMain" data-type="{{flag}}"> | ||
60 | + <view wx:if="{{flag==1}}" bindtap="openAll">查看全部</view> | ||
61 | + <view wx:if="{{flag==0}}" bindtap="openAll">收起全部</view> | ||
62 | + <view> | ||
63 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
64 | + </view> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + <view class="noData" wx:if="{{infoList.length==0}}">暂时没有相关商品的更多评价~</view> | ||
68 | + <view class="evaluateBox" wx:for="{{infoList}}" wx:if="{{infolist!==0}}"> | ||
69 | + <view class="evaluateInfo"> | ||
70 | + <view class="userImg" style="display:inline-block"> | ||
71 | + <image src="{{item.wxHeadImg}}"> </image> | ||
72 | + </view> | ||
73 | + <view class="userName" style="display:inline-block">{{item.wxName}}</view> | ||
74 | + </view> | ||
75 | + <view class="evaluateDetails">{{item.content}}</view> | ||
76 | + <view class="evaluatePic"> | ||
77 | + <view class="picBox" wx:for="{{item.images}}"> | ||
78 | + <image src="item"></image> | ||
79 | + </view> | ||
80 | + </view> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + <!-- 商品明细--> | ||
84 | + <view class="prodectDesc"> | ||
85 | + <rich-text nodes="{{richText}}"></rich-text> | ||
86 | + <!-- <view wx:for="{{deacArray}}" class="descBox"> | ||
87 | + <image src="{{item.img}}"></image> | ||
88 | + </view> --> | ||
89 | + </view> | ||
90 | +</view> | ||
91 | +<!--底部 --> | ||
92 | +<!-- <view class="bottomMain"> | ||
93 | + <van-goods-action> | ||
94 | + <van-goods-action-icon icon="chat-o" text="客服" color="#07c160" /> | ||
95 | + <van-goods-action-icon icon="cart-o" text="购物车" /> | ||
96 | + <van-goods-action-icon icon="star" text="已收藏" color="#ff5000" /> | ||
97 | + <van-goods-action-button type="warning" text="加入购物车" /> | ||
98 | + <van-goods-action-button type="danger" text="立即购买" /> | ||
99 | + </van-goods-action> | ||
100 | +</view> --> | ||
101 | +<view class="bottom"> | ||
102 | + <view class="bottom_left"> | ||
103 | + <view class="bottom_left_item" catchtap="linkKefu"> | ||
104 | + <image src="/images/01-03/kefu.png"></image> | ||
105 | + <view>客服</view> | ||
106 | + </view> | ||
107 | + <view class="bottom_left_item" catchtap="goCart"> | ||
108 | + <view class="count_cart">{{count}}</view> | ||
109 | + <image src="/images/01-03/cart.png"></image> | ||
110 | + <view>购物车</view> | ||
111 | + </view> | ||
112 | + <view class="bottom_left_item" catchtap="collection"> | ||
113 | + <view class="collectIcon"> | ||
114 | + <image src='{{"goodsData.keep==false"?"/images/01-03/shoucang.png":"/images/01-03/shoucang.png"}}'></image> | ||
115 | + <view class="collecttext">{{goodsData.keep==false?"收藏":"已收藏"}}</view> | ||
116 | + </view> | ||
117 | + <!-- <view wx:if="{{goodsData.keep==true}}"> | ||
118 | + <image src="/images/01-03/shoucang.png"></image> | ||
119 | + <view>已收藏</view> | ||
120 | + </view> --> | ||
121 | + </view> | ||
122 | + </view> | ||
123 | + <view class="bottom_right" wx:if="{{goodsData.type==2}}"> | ||
124 | + <view class="bottom_right_left" catchtap="addCart">加入购物车</view> | ||
125 | + <view class="bottom_right_right" catchtap="immediatelyPay">立即购买</view> | ||
126 | + <view class="Mask"></view> | ||
127 | + </view> | ||
128 | + <view class="bottom_right_two" wx:if="{{goodsData.type==1}}"> | ||
129 | + <view class="bottom_right_right_two" catchtap="immediatelyPay">立即兑换</view> | ||
130 | + </view> | ||
131 | +</view> | ||
132 | +<!-- 选择规格弹框 --> | ||
133 | +<view class="mask" catchtap="closeMaskSku" wx:if='{{showMaskSku}}'> | ||
134 | + <view class="diceng"> | ||
135 | + <view class="skuBox"> | ||
136 | + <view wx:for="{{goodsData.list}}" class="{{idx==index?'skuItem1':'skuItem'}}" bindtap="check" | ||
137 | + data-index="{{index}}" data-id="{{item.goodsSkuId}}">{{item.goodsSkuName}}</view> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | +</view> | ||
141 | +<!-- 加入购物车弹框 --> | ||
142 | +<view class="mask" catchtap="closeMask" wx:if='{{showMask}}'> | ||
143 | + <view class="diceng" catchtap="openMask"> | ||
144 | + <view class="info"> | ||
145 | + <image src="{{goodsData.goodsBanners[idx]}}"></image> | ||
146 | + <view class="info_right"> | ||
147 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
148 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
149 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
150 | + </view> | ||
151 | + </view> | ||
152 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
153 | + <view>{{item.group_name}}</view> | ||
154 | + <view class="attr_main"> | ||
155 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
156 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
157 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
158 | + </view> | ||
159 | + </view> | ||
160 | + <view class="pay_count"> | ||
161 | + <view>购买数量</view> | ||
162 | + <view class="count_box"> | ||
163 | + <view class="count_jian" catchtap="decNum">-</view> | ||
164 | + <view class="real_count">{{count}}</view> | ||
165 | + <view class="count_jian" catchtap="addNum">+</view> | ||
166 | + </view> | ||
167 | + </view> | ||
168 | + <view class="confrimBtn" catchtap="confrimCart">确定</view> | ||
169 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
170 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
171 | + </view> | ||
172 | +</view> | ||
173 | +<!-- 立即购买弹框 --> | ||
174 | +<view class="mask" catchtap="closeMaskTwo" wx:if='{{showMaskTwo}}'> | ||
175 | + <view class="diceng" catchtap="openMask"> | ||
176 | + <view class="info"> | ||
177 | + <image src="{{goodsData.goodsBanners[0]}}"></image> | ||
178 | + <view class="info_right"> | ||
179 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
180 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
181 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
182 | + </view> | ||
183 | + </view> | ||
184 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
185 | + <view>{{item.group_name}}</view> | ||
186 | + <view class="attr_main"> | ||
187 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
188 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
189 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
190 | + </view> | ||
191 | + </view> | ||
192 | + <view class="pay_count"> | ||
193 | + <view>购买数量</view> | ||
194 | + <view class="count_box"> | ||
195 | + <view class="count_jian" catchtap="dec">-</view> | ||
196 | + <view class="real_count">{{payCount}}</view> | ||
197 | + <view class="count_jian" catchtap="add">+</view> | ||
198 | + </view> | ||
199 | + </view> | ||
200 | + <view class="confrimBtn" catchtap="confrim">确定</view> | ||
201 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
202 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
203 | + </view> | ||
204 | +</view> |
1 | +<!--pages/product-detail/product-detail.wxml--> | ||
2 | +<!-- 商品详情 --> | ||
3 | +<view class="container"> | ||
4 | + <view class="productIntro"> | ||
5 | + <view class="pic"> | ||
6 | + <view style="height:750rpx"> | ||
7 | + <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000"> | ||
8 | + <block wx:for="{{swiperArray}}" wx:for-index="idx"> | ||
9 | + <swiper-item> | ||
10 | + <image src="{{item}}" class="slideImage"></image> | ||
11 | + </swiper-item> | ||
12 | + </block> | ||
13 | + </swiper> | ||
14 | + </view> | ||
15 | + <view class="countDown" wx:if="{{goodsData.youHui}}"> | ||
16 | + <text class="countDownTxt">距结束仅剩</text> | ||
17 | + <!-- 倒计时 --> | ||
18 | + <view class="countTime"> | ||
19 | + <van-count-down use-slot time="{{ time }}" bind:change="onChange1"> | ||
20 | + <text class="item">{{ timeData.hours }}</text>: | ||
21 | + <text style="color:#FF593C">:</text> | ||
22 | + <text class="item">{{ timeData.minutes }}</text>: | ||
23 | + <text style="color:#FF593C">:</text> | ||
24 | + <text class="item">{{ timeData.seconds }}</text> | ||
25 | + </van-count-down> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + <view class="productName"> | ||
30 | + {{goodsData.goodsName}} | ||
31 | + </view> | ||
32 | + <view class="productPrice"> | ||
33 | + <view class="price" wx:if="{{goodsData.type==2}}">¥{{goodsData.goodsPrice}}</view> | ||
34 | + <view class="jifen" wx:if="{{goodsData.type==1}}">积分{{goodsData.goodsPrice}}</view> | ||
35 | + <view class="share" data-id="{{goodsId}}"> | ||
36 | + <view class="shareIcon"> | ||
37 | + <image src="/images/01-03/icon_share@2x.png"></image> | ||
38 | + </view> | ||
39 | + <view class="shareTitle">分享</view> | ||
40 | + <button open-type="share" data-id="{{goodsId}}"></button> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + | ||
44 | + </view> | ||
45 | + <!-- 请选择 --> | ||
46 | + <view class="selectMain" bindtap="selectSku"> | ||
47 | + <view class="selectTitle">选择</view> | ||
48 | + <view class="selectNum"> | ||
49 | + <view>{{}}</view> | ||
50 | + <view class="selectPic"> | ||
51 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
52 | + </view> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + <!-- 评价 --> | ||
56 | + <view class='{{flags?"evaluateContent":"evaluateContents"}}'> | ||
57 | + <view class="evaluateTop"> | ||
58 | + <view class="evaluateTitle">宝贝评价({{pingjiaNum}})</view> | ||
59 | + <view class="lookMain" data-type="{{flag}}"> | ||
60 | + <view wx:if="{{flag==1}}" bindtap="openAll">查看全部</view> | ||
61 | + <view wx:if="{{flag==0}}" bindtap="openAll">收起全部</view> | ||
62 | + <view> | ||
63 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
64 | + </view> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + <view class="noData" wx:if="{{infoList.length==0}}">暂时没有相关商品的更多评价~</view> | ||
68 | + <view class="evaluateBox" wx:for="{{infoList}}" wx:if="{{infolist!==0}}"> | ||
69 | + <view class="evaluateInfo"> | ||
70 | + <view class="userImg" style="display:inline-block"> | ||
71 | + <image src="{{item.wxHeadImg}}"> </image>images[0] | ||
72 | + </view> | ||
73 | + <view class="userName" style="display:inline-block">{{item.wxName}}</view> | ||
74 | + </view> | ||
75 | + <view class="evaluateDetails">{{item.content}}</view> | ||
76 | + <view class="evaluatePic"> | ||
77 | + <view class="picBox" wx:for="{{item.images}}"> | ||
78 | + <image src="item"></image> | ||
79 | + </view> | ||
80 | + </view> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + <!-- 商品明细--> | ||
84 | + <view class="prodectDesc"> | ||
85 | + <rich-text nodes="{{richText}}"></rich-text> | ||
86 | + <!-- <view wx:for="{{deacArray}}" class="descBox"> | ||
87 | + <image src="{{item.img}}"></image> | ||
88 | + </view> --> | ||
89 | + </view> | ||
90 | +</view> | ||
91 | +<!--底部 --> | ||
92 | +<!-- <view class="bottomMain"> | ||
93 | + <van-goods-action> | ||
94 | + <van-goods-action-icon icon="chat-o" text="客服" color="#07c160" /> | ||
95 | + <van-goods-action-icon icon="cart-o" text="购物车" /> | ||
96 | + <van-goods-action-icon icon="star" text="已收藏" color="#ff5000" /> | ||
97 | + <van-goods-action-button type="warning" text="加入购物车" /> | ||
98 | + <van-goods-action-button type="danger" text="立即购买" /> | ||
99 | + </van-goods-action> | ||
100 | +</view> --> | ||
101 | +<view class="bottom"> | ||
102 | + <view class="bottom_left"> | ||
103 | + <view class="bottom_left_item" catchtap="linkKefu"> | ||
104 | + <image src="/images/01-03/kefu.png"></image> | ||
105 | + <view>客服</view> | ||
106 | + </view> | ||
107 | + <view class="bottom_left_item" catchtap="goCart"> | ||
108 | + <view class="count_cart">{{count}}</view> | ||
109 | + <image src="/images/01-03/cart.png"></image> | ||
110 | + <view>购物车</view> | ||
111 | + </view> | ||
112 | + <view class="bottom_left_item" catchtap="collection"> | ||
113 | + <view class="collectIcon"> | ||
114 | + <image src='{{"goodsData.keep==false"?"/images/01-03/shoucang.png":"/images/01-03/shoucang.png"}}'></image> | ||
115 | + <view class="collecttext">{{goodsData.keep==false?"收藏":"已收藏"}}</view> | ||
116 | + </view> | ||
117 | + <!-- <view wx:if="{{goodsData.keep==true}}"> | ||
118 | + <image src="/images/01-03/shoucang.png"></image> | ||
119 | + <view>已收藏</view> | ||
120 | + </view> --> | ||
121 | + </view> | ||
122 | + </view> | ||
123 | + <view class="bottom_right" wx:if="{{goodsData.type==2}}"> | ||
124 | + <view class="bottom_right_left" catchtap="addCart">加入购物车</view> | ||
125 | + <view class="bottom_right_right" catchtap="immediatelyPay">立即购买</view> | ||
126 | + <view class="Mask"></view> | ||
127 | + </view> | ||
128 | + <view class="bottom_right_two" wx:if="{{goodsData.type==1}}"> | ||
129 | + <view class="bottom_right_right_two" catchtap="immediatelyPay">立即兑换</view> | ||
130 | + </view> | ||
131 | +</view> | ||
132 | +<!-- 选择规格弹框 --> | ||
133 | +<view class="mask" catchtap="closeMaskSku" wx:if='{{showMaskSku}}'> | ||
134 | + <view class="diceng"> | ||
135 | + <view class="skuBox"> | ||
136 | + <view wx:for="{{goodsData.list}}" class="{{idx==index?'skuItem1':'skuItem'}}" bindtap="check" | ||
137 | + data-index="{{index}}" data-id="{{item.goodsSkuId}}">{{item.goodsSkuName}}</view> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | +</view> | ||
141 | +<!-- 加入购物车弹框 --> | ||
142 | +<view class="mask" catchtap="closeMask" wx:if='{{showMask}}'> | ||
143 | + <view class="diceng" catchtap="openMask"> | ||
144 | + <view class="info"> | ||
145 | + <image src="{{goodsData.goodsBanners[idx]}}"></image> | ||
146 | + <view class="info_right"> | ||
147 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
148 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
149 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
150 | + </view> | ||
151 | + </view> | ||
152 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
153 | + <view>{{item.group_name}}</view> | ||
154 | + <view class="attr_main"> | ||
155 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
156 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
157 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
158 | + </view> | ||
159 | + </view> | ||
160 | + <view class="pay_count"> | ||
161 | + <view>购买数量</view> | ||
162 | + <view class="count_box"> | ||
163 | + <view class="count_jian" catchtap="decNum">-</view> | ||
164 | + <view class="real_count">{{count}}</view> | ||
165 | + <view class="count_jian" catchtap="addNum">+</view> | ||
166 | + </view> | ||
167 | + </view> | ||
168 | + <view class="confrimBtn" catchtap="confrimCart">确定</view> | ||
169 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
170 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
171 | + </view> | ||
172 | +</view> | ||
173 | +<!-- 立即购买弹框 --> | ||
174 | +<view class="mask" catchtap="closeMaskTwo" wx:if='{{showMaskTwo}}'> | ||
175 | + <view class="diceng" catchtap="openMask"> | ||
176 | + <view class="info"> | ||
177 | + <image src="{{goodsData.goodsBanners[0]}}"></image> | ||
178 | + <view class="info_right"> | ||
179 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
180 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
181 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
182 | + </view> | ||
183 | + </view> | ||
184 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
185 | + <view>{{item.group_name}}</view> | ||
186 | + <view class="attr_main"> | ||
187 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
188 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
189 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
190 | + </view> | ||
191 | + </view> | ||
192 | + <view class="pay_count"> | ||
193 | + <view>购买数量</view> | ||
194 | + <view class="count_box"> | ||
195 | + <view class="count_jian" catchtap="dec">-</view> | ||
196 | + <view class="real_count">{{payCount}}</view> | ||
197 | + <view class="count_jian" catchtap="add">+</view> | ||
198 | + </view> | ||
199 | + </view> | ||
200 | + <view class="confrimBtn" catchtap="confrim">确定</view> | ||
201 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
202 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
203 | + </view> | ||
204 | +</view> |
1 | +<!--pages/product-detail/product-detail.wxml--> | ||
2 | +<!-- 商品详情 --> | ||
3 | +<view class="container"> | ||
4 | + <view class="productIntro"> | ||
5 | + <view class="pic"> | ||
6 | + <view style="height:750rpx"> | ||
7 | + <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000"> | ||
8 | + <block wx:for="{{swiperArray}}" wx:for-index="idx"> | ||
9 | + <swiper-item> | ||
10 | + <image src="{{item}}" class="slideImage"></image> | ||
11 | + </swiper-item> | ||
12 | + </block> | ||
13 | + </swiper> | ||
14 | + </view> | ||
15 | + <view class="countDown" wx:if="{{goodsData.youHui}}"> | ||
16 | + <text class="countDownTxt">距结束仅剩</text> | ||
17 | + <!-- 倒计时 --> | ||
18 | + <view class="countTime"> | ||
19 | + <van-count-down use-slot time="{{ time }}" bind:change="onChange1"> | ||
20 | + <text class="item">{{ timeData.hours }}</text>: | ||
21 | + <text style="color:#FF593C">:</text> | ||
22 | + <text class="item">{{ timeData.minutes }}</text>: | ||
23 | + <text style="color:#FF593C">:</text> | ||
24 | + <text class="item">{{ timeData.seconds }}</text> | ||
25 | + </van-count-down> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + <view class="productName"> | ||
30 | + {{goodsData.goodsName}} | ||
31 | + </view> | ||
32 | + <view class="productPrice"> | ||
33 | + <view class="price" wx:if="{{goodsData.type==2}}">¥{{goodsData.goodsPrice}}</view> | ||
34 | + <view class="jifen" wx:if="{{goodsData.type==1}}">积分{{goodsData.goodsPrice}}</view> | ||
35 | + <view class="share" data-id="{{goodsId}}"> | ||
36 | + <view class="shareIcon"> | ||
37 | + <image src="/images/01-03/icon_share@2x.png"></image> | ||
38 | + </view> | ||
39 | + <view class="shareTitle">分享</view> | ||
40 | + <button open-type="share" data-id="{{goodsId}}"></button> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + | ||
44 | + </view> | ||
45 | + <!-- 请选择 --> | ||
46 | + <view class="selectMain" bindtap="selectSku"> | ||
47 | + <view class="selectTitle">选择</view> | ||
48 | + <view class="selectNum"> | ||
49 | + <view>{{}}</view> | ||
50 | + <view class="selectPic"> | ||
51 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
52 | + </view> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + <!-- 评价 --> | ||
56 | + <view class='{{flags?"evaluateContent":"evaluateContents"}}'> | ||
57 | + <view class="evaluateTop"> | ||
58 | + <view class="evaluateTitle">宝贝评价({{pingjiaNum}})</view> | ||
59 | + <view class="lookMain" data-type="{{flag}}"> | ||
60 | + <view wx:if="{{flag==1}}" bindtap="openAll">查看全部</view> | ||
61 | + <view wx:if="{{flag==0}}" bindtap="openAll">收起全部</view> | ||
62 | + <view> | ||
63 | + <image src="/images/01-03/icon_more@2x.png"></image> | ||
64 | + </view> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + <view class="noData" wx:if="{{infoList.length==0}}">暂时没有相关商品的更多评价~</view> | ||
68 | + <view class="evaluateBox" wx:for="{{infoList}}" wx:if="{{infolist!==0}}"> | ||
69 | + <view class="evaluateInfo"> | ||
70 | + <view class="userImg" style="display:inline-block"> | ||
71 | + <image src="{{item.wxHeadImg}}"> </image> | ||
72 | + </view> | ||
73 | + <view class="userName" style="display:inline-block">{{item.wxName}}</view> | ||
74 | + </view> | ||
75 | + <view class="evaluateDetails">{{item.content}}</view> | ||
76 | + <view class="evaluatePic"> | ||
77 | + <view class="picBox" wx:for="{{item.images}}"> | ||
78 | + <image src="item"></image> | ||
79 | + </view> | ||
80 | + </view> | ||
81 | + </view> | ||
82 | + </view> | ||
83 | + <!-- 商品明细--> | ||
84 | + <view class="prodectDesc"> | ||
85 | + <rich-text nodes="{{richText}}"></rich-text> | ||
86 | + <!-- <view wx:for="{{deacArray}}" class="descBox"> | ||
87 | + <image src="{{item.img}}"></image> | ||
88 | + </view> --> | ||
89 | + </view> | ||
90 | +</view> | ||
91 | +<!--底部 --> | ||
92 | +<!-- <view class="bottomMain"> | ||
93 | + <van-goods-action> | ||
94 | + <van-goods-action-icon icon="chat-o" text="客服" color="#07c160" /> | ||
95 | + <van-goods-action-icon icon="cart-o" text="购物车" /> | ||
96 | + <van-goods-action-icon icon="star" text="已收藏" color="#ff5000" /> | ||
97 | + <van-goods-action-button type="warning" text="加入购物车" /> | ||
98 | + <van-goods-action-button type="danger" text="立即购买" /> | ||
99 | + </van-goods-action> | ||
100 | +</view> --> | ||
101 | +<view class="bottom"> | ||
102 | + <view class="bottom_left"> | ||
103 | + <view class="bottom_left_item" catchtap="linkKefu"> | ||
104 | + <image src="/images/01-03/kefu.png"></image> | ||
105 | + <view>客服</view> | ||
106 | + </view> | ||
107 | + <view class="bottom_left_item" catchtap="goCart"> | ||
108 | + <view class="count_cart">{{count}}</view> | ||
109 | + <image src="/images/01-03/cart.png"></image> | ||
110 | + <view>购物车</view> | ||
111 | + </view> | ||
112 | + <view class="bottom_left_item" catchtap="collection"> | ||
113 | + <view class="collectIcon"> | ||
114 | + <image src='{{"goodsData.keep==false"?"/images/01-03/shoucang.png":"/images/01-03/shoucang.png"}}'></image> | ||
115 | + <view class="collecttext">{{goodsData.keep==false?"收藏":"已收藏"}}</view> | ||
116 | + </view> | ||
117 | + <!-- <view wx:if="{{goodsData.keep==true}}"> | ||
118 | + <image src="/images/01-03/shoucang.png"></image> | ||
119 | + <view>已收藏</view> | ||
120 | + </view> --> | ||
121 | + </view> | ||
122 | + </view> | ||
123 | + <view class="bottom_right" wx:if="{{goodsData.type==2}}"> | ||
124 | + <view class="bottom_right_left" catchtap="addCart">加入购物车</view> | ||
125 | + <view class="bottom_right_right" catchtap="immediatelyPay">立即购买</view> | ||
126 | + <view class="Mask"></view> | ||
127 | + </view> | ||
128 | + <view class="bottom_right_two" wx:if="{{goodsData.type==1}}"> | ||
129 | + <view class="bottom_right_right_two" catchtap="immediatelyPay">立即兑换</view> | ||
130 | + </view> | ||
131 | +</view> | ||
132 | +<!-- 选择规格弹框 --> | ||
133 | +<view class="mask" catchtap="closeMaskSku" wx:if='{{showMaskSku}}'> | ||
134 | + <view class="diceng"> | ||
135 | + <view class="skuBox"> | ||
136 | + <view wx:for="{{goodsData.list}}" class="{{idx==index?'skuItem1':'skuItem'}}" bindtap="check" | ||
137 | + data-index="{{index}}" data-id="{{item.goodsSkuId}}">{{item.goodsSkuName}}</view> | ||
138 | + </view> | ||
139 | + </view> | ||
140 | +</view> | ||
141 | +<!-- 加入购物车弹框 --> | ||
142 | +<view class="mask" catchtap="closeMask" wx:if='{{showMask}}'> | ||
143 | + <view class="diceng" catchtap="openMask"> | ||
144 | + <view class="info"> | ||
145 | + <image src="{{goodsData.goodsBanners[idx]}}"></image> | ||
146 | + <view class="info_right"> | ||
147 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
148 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
149 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
150 | + </view> | ||
151 | + </view> | ||
152 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
153 | + <view>{{item.group_name}}</view> | ||
154 | + <view class="attr_main"> | ||
155 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
156 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
157 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
158 | + </view> | ||
159 | + </view> | ||
160 | + <view class="pay_count"> | ||
161 | + <view>购买数量</view> | ||
162 | + <view class="count_box"> | ||
163 | + <view class="count_jian" catchtap="decNum">-</view> | ||
164 | + <view class="real_count">{{count}}</view> | ||
165 | + <view class="count_jian" catchtap="addNum">+</view> | ||
166 | + </view> | ||
167 | + </view> | ||
168 | + <view class="confrimBtn" catchtap="confrimCart">确定</view> | ||
169 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
170 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
171 | + </view> | ||
172 | +</view> | ||
173 | +<!-- 立即购买弹框 --> | ||
174 | +<view class="mask" catchtap="closeMaskTwo" wx:if='{{showMaskTwo}}'> | ||
175 | + <view class="diceng" catchtap="openMask"> | ||
176 | + <view class="info"> | ||
177 | + <image src="{{goodsData.goodsBanners[0]}}"></image> | ||
178 | + <view class="info_right"> | ||
179 | + <view class="info_price">¥{{goodsData.list[idx].goodsPrice}}</view> | ||
180 | + <view class="info_stock">库存:{{goodsData.list[idx].goodsStock}}件</view> | ||
181 | + <view class="info_stock" wx:if='{{info.detai.spec_type=="20"}}'>请选择规格</view> | ||
182 | + </view> | ||
183 | + </view> | ||
184 | + <view class="attr" wx:if='{{info.detail.spec_type=="20"}}' wx:for='{{info.specData.spec_attr}}' wx:key='index'> | ||
185 | + <view>{{item.group_name}}</view> | ||
186 | + <view class="attr_main"> | ||
187 | + <view class="attr_item {{cell.flag?'activity':''}}" wx:for='{{item.spec_items}}' wx:for-item='cell' | ||
188 | + wx:for-index='cellindex' wx:key='{{cellindex}}' data-index='{{index}}' data-cellindex='{{cellindex}}' | ||
189 | + catchtap="changeAttrNum">{{cell.spec_value}}</view> | ||
190 | + </view> | ||
191 | + </view> | ||
192 | + <view class="pay_count"> | ||
193 | + <view>购买数量</view> | ||
194 | + <view class="count_box"> | ||
195 | + <view class="count_jian" catchtap="dec">-</view> | ||
196 | + <view class="real_count">{{payCount}}</view> | ||
197 | + <view class="count_jian" catchtap="add">+</view> | ||
198 | + </view> | ||
199 | + </view> | ||
200 | + <view class="confrimBtn" catchtap="confrim">确定</view> | ||
201 | + <view class="btn" wx:if='{{type==1}}' catchtap="jiagou">加入购物车</view> | ||
202 | + <view class="btn" wx:if='{{type==2}}' catchtap="lijigoumai">立即购买</view> | ||
203 | + </view> | ||
204 | +</view> |
images/classify.png
0 → 100644
21.4 KB
@@ -85,6 +85,7 @@ Page({ | @@ -85,6 +85,7 @@ Page({ | ||
85 | wx.getLocation({ | 85 | wx.getLocation({ |
86 | type: 'gcj02', | 86 | type: 'gcj02', |
87 | success(res) { | 87 | success(res) { |
88 | + console.log(res, 'rs') | ||
88 | const location = JSON.stringify({ | 89 | const location = JSON.stringify({ |
89 | latitude: res.latitude, | 90 | latitude: res.latitude, |
90 | longitude: res.longitude | 91 | longitude: res.longitude |
@@ -140,8 +141,6 @@ Page({ | @@ -140,8 +141,6 @@ Page({ | ||
140 | }) | 141 | }) |
141 | } else { | 142 | } else { |
142 | let delFlags = this.data.checked == true ? 1 : 0; | 143 | let delFlags = this.data.checked == true ? 1 : 0; |
143 | - // let region = this.data.region; | ||
144 | - // let addressStr = region[0] + "" + region[1] + "" + region[2] | ||
145 | let postData = { | 144 | let postData = { |
146 | address: this.data.value, | 145 | address: this.data.value, |
147 | area: this.data.location, | 146 | area: this.data.location, |
@@ -159,20 +158,23 @@ Page({ | @@ -159,20 +158,23 @@ Page({ | ||
159 | title: '保存成功', | 158 | title: '保存成功', |
160 | icon: 'none' | 159 | icon: 'none' |
161 | }) | 160 | }) |
162 | - wx.redirectTo({ | ||
163 | - url: '/pages/select-address/select-address?edit=1', | 161 | + // wx.redirectTo({ |
162 | + // url: '/pages/select-address/select-address?edit=1', | ||
163 | + // }) | ||
164 | + wx.navigateBack({ | ||
165 | + delta: 1, | ||
164 | }) | 166 | }) |
165 | } else { | 167 | } else { |
166 | wx.showToast({ | 168 | wx.showToast({ |
167 | title: '地址超出配送费范围请重新选择', | 169 | title: '地址超出配送费范围请重新选择', |
168 | - icon:'none' | 170 | + icon: 'none' |
169 | }) | 171 | }) |
170 | } | 172 | } |
171 | }) | 173 | }) |
172 | } | 174 | } |
173 | }, | 175 | }, |
174 | onLoad: function (options) { | 176 | onLoad: function (options) { |
175 | - | 177 | + this.map(); |
176 | }, | 178 | }, |
177 | 179 | ||
178 | /** | 180 | /** |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | <view> 退款原因</view> | 49 | <view> 退款原因</view> |
50 | </view> | 50 | </view> |
51 | <view class="reason"> | 51 | <view class="reason"> |
52 | - <view>{{text.text}}</view> | 52 | + <view>{{text}}</view> |
53 | <view style="margin-left:16rpx"> | 53 | <view style="margin-left:16rpx"> |
54 | <image src="/images/04-01/arrow.png"></image> | 54 | <image src="/images/04-01/arrow.png"></image> |
55 | </view> | 55 | </view> |
@@ -22,8 +22,59 @@ Page({ | @@ -22,8 +22,59 @@ Page({ | ||
22 | longitude: '', //经度 | 22 | longitude: '', //经度 |
23 | }, | 23 | }, |
24 | //获取定位 | 24 | //获取定位 |
25 | + getSetting(){ | ||
26 | + wx.getSetting({ | ||
27 | + success: (res) => { | ||
28 | + console.log(JSON.stringify(res)) | ||
29 | + if (res.authSetting['scope.userLocation'] != undefined && res.authSetting['scope.userLocation'] != true) { | ||
30 | + wx.showModal({ | ||
31 | + title: '请求授权当前位置', | ||
32 | + content: '需要获取您的地理位置,请确认授权', | ||
33 | + success: function (res) { | ||
34 | + if (res.cancel) { | ||
35 | + wx.showToast({ | ||
36 | + title: '拒绝授权', | ||
37 | + icon: 'none', | ||
38 | + duration: 1000 | ||
39 | + }) | ||
40 | + } else if (res.confirm) { | ||
41 | + wx.openSetting({ | ||
42 | + success: function (dataAu) { | ||
43 | + if (dataAu.authSetting["scope.userLocation"] == true) { | ||
44 | + wx.showToast({ | ||
45 | + title: '授权成功', | ||
46 | + icon: 'success', | ||
47 | + duration: 1000 | ||
48 | + }) | ||
49 | + //再次授权,调用wx.getLocation的API | ||
50 | + this.getLocations() | ||
51 | + | ||
52 | + } else { | ||
53 | + wx.showToast({ | ||
54 | + title: '授权失败', | ||
55 | + icon: 'none', | ||
56 | + duration: 1000 | ||
57 | + }) | ||
58 | + } | ||
59 | + } | ||
60 | + }) | ||
61 | + } | ||
62 | + } | ||
63 | + }) | ||
64 | + } else if (res.authSetting['scope.userLocation'] == undefined) { | ||
65 | + //调用wx.getLocation的API | ||
66 | + this.getLocations() | ||
67 | + | ||
68 | + } else { | ||
69 | + //调用wx.getLocation的API | ||
70 | + this.getLocations() | ||
71 | + } | ||
72 | + } | ||
73 | + }) | ||
74 | +}, | ||
25 | getLocations() { | 75 | getLocations() { |
26 | - let that = this | 76 | + let that = this; |
77 | + console.log("getLocations") | ||
27 | wx.getLocation({ | 78 | wx.getLocation({ |
28 | type: 'gcj02', | 79 | type: 'gcj02', |
29 | success(res) { | 80 | success(res) { |
@@ -34,8 +85,6 @@ Page({ | @@ -34,8 +85,6 @@ Page({ | ||
34 | that.location(); | 85 | that.location(); |
35 | const speed = res.speed | 86 | const speed = res.speed |
36 | const accuracy = res.accuracy | 87 | const accuracy = res.accuracy |
37 | - console.log(that.data.latitude, '维度') | ||
38 | - console.log(that.data.longitude, '经度') | ||
39 | } | 88 | } |
40 | }) | 89 | }) |
41 | }, | 90 | }, |
@@ -90,34 +139,34 @@ Page({ | @@ -90,34 +139,34 @@ Page({ | ||
90 | }, | 139 | }, |
91 | //第一次数据请求 | 140 | //第一次数据请求 |
92 | onData() { | 141 | onData() { |
93 | - console.log(this.data.lableArray,'分类') | ||
94 | - let postData = { | ||
95 | - categoryId: this.data.lableArray[0].categoryId, | ||
96 | - page: 1, | ||
97 | - size: 10 | 142 | + console.log(this.data.lableArray, '分类') |
143 | + let postData = { | ||
144 | + categoryId: this.data.lableArray[0].categoryId, | ||
145 | + page: 1, | ||
146 | + size: 10 | ||
147 | + } | ||
148 | + method.postRequest('/goods/list', postData, data => { | ||
149 | + if (data.statusCode == 0) { | ||
150 | + this.setData({ | ||
151 | + list: data.data | ||
152 | + }) | ||
98 | } | 153 | } |
99 | - method.postRequest('/goods/list', postData, data => { | ||
100 | - if (data.statusCode == 0) { | ||
101 | - this.setData({ | ||
102 | - list: data.data | ||
103 | - }) | ||
104 | - } | ||
105 | - }) | 154 | + }) |
106 | }, | 155 | }, |
107 | //分类数据请求 | 156 | //分类数据请求 |
108 | dataRequest: function (id) { | 157 | dataRequest: function (id) { |
109 | - let postData = { | ||
110 | - categoryId: id, | ||
111 | - page: 1, | ||
112 | - size: 10 | 158 | + let postData = { |
159 | + categoryId: id, | ||
160 | + page: 1, | ||
161 | + size: 10 | ||
162 | + } | ||
163 | + method.postRequest('/goods/list', postData, data => { | ||
164 | + if (data.statusCode == 0) { | ||
165 | + this.setData({ | ||
166 | + list: data.data | ||
167 | + }) | ||
113 | } | 168 | } |
114 | - method.postRequest('/goods/list', postData, data => { | ||
115 | - if (data.statusCode == 0) { | ||
116 | - this.setData({ | ||
117 | - list: data.data | ||
118 | - }) | ||
119 | - } | ||
120 | - }) | 169 | + }) |
121 | }, | 170 | }, |
122 | addCart(e) { | 171 | addCart(e) { |
123 | let id = e.currentTarget.dataset.id | 172 | let id = e.currentTarget.dataset.id |
@@ -131,7 +180,7 @@ Page({ | @@ -131,7 +180,7 @@ Page({ | ||
131 | goodsData: data.data, | 180 | goodsData: data.data, |
132 | stockNum: data.data.list[0].goodsStock | 181 | stockNum: data.data.list[0].goodsStock |
133 | }) | 182 | }) |
134 | - }else{ | 183 | + } else { |
135 | setTimeout(() => { | 184 | setTimeout(() => { |
136 | util.getUser() | 185 | util.getUser() |
137 | }, 2000) | 186 | }, 2000) |
@@ -229,7 +278,7 @@ Page({ | @@ -229,7 +278,7 @@ Page({ | ||
229 | url: '/pages/integral-order/integral-order', | 278 | url: '/pages/integral-order/integral-order', |
230 | }) | 279 | }) |
231 | } | 280 | } |
232 | - }else{ | 281 | + } else { |
233 | setTimeout(() => { | 282 | setTimeout(() => { |
234 | util.getUser() | 283 | util.getUser() |
235 | }, 2000) | 284 | }, 2000) |
@@ -252,10 +301,11 @@ Page({ | @@ -252,10 +301,11 @@ Page({ | ||
252 | */ | 301 | */ |
253 | onLoad: function (options) { | 302 | onLoad: function (options) { |
254 | // this.dataRequest(); | 303 | // this.dataRequest(); |
304 | + | ||
255 | wx.removeStorageSync('categoryId') | 305 | wx.removeStorageSync('categoryId') |
256 | wx.removeStorageSync('index') | 306 | wx.removeStorageSync('index') |
257 | this.catalog(); | 307 | this.catalog(); |
258 | - | 308 | + |
259 | }, | 309 | }, |
260 | 310 | ||
261 | /** | 311 | /** |
@@ -275,8 +325,8 @@ Page({ | @@ -275,8 +325,8 @@ Page({ | ||
275 | activeKey: index | 325 | activeKey: index |
276 | }); | 326 | }); |
277 | console.log(this.data.activeKey, 'key') | 327 | console.log(this.data.activeKey, 'key') |
278 | - this.getLocations(); | ||
279 | - this.location() | 328 | + // this.location() |
329 | + this.getSetting(); | ||
280 | }, | 330 | }, |
281 | 331 | ||
282 | /** | 332 | /** |
@@ -4,7 +4,7 @@ const util = require("../../utils/util.js"); | @@ -4,7 +4,7 @@ const util = require("../../utils/util.js"); | ||
4 | const chooseLocation = requirePlugin('chooseLocation'); | 4 | const chooseLocation = requirePlugin('chooseLocation'); |
5 | Page({ | 5 | Page({ |
6 | data: { | 6 | data: { |
7 | - id:'', //订单id | 7 | + id: '', //订单id |
8 | username: '', | 8 | username: '', |
9 | phone: '', | 9 | phone: '', |
10 | value: '', | 10 | value: '', |
@@ -158,8 +158,8 @@ Page({ | @@ -158,8 +158,8 @@ Page({ | ||
158 | address: this.data.value, | 158 | address: this.data.value, |
159 | area: this.data.location, | 159 | area: this.data.location, |
160 | delFlag: delFlags, | 160 | delFlag: delFlags, |
161 | - id:this.data.id, | ||
162 | - location: this.data.longitudes + "," + this.data.latitudes, | 161 | + id: this.data.id, |
162 | + location: this.data.longitudes + "," + this.data.latitudes, | ||
163 | name: this.data.username, | 163 | name: this.data.username, |
164 | phone: this.data.phone, | 164 | phone: this.data.phone, |
165 | zipCode: "" | 165 | zipCode: "" |
@@ -186,15 +186,20 @@ Page({ | @@ -186,15 +186,20 @@ Page({ | ||
186 | } | 186 | } |
187 | }, | 187 | }, |
188 | onLoad: function (options) { | 188 | onLoad: function (options) { |
189 | - console.log(options,'options') | ||
190 | - this.setData({ | ||
191 | - username: options.name, | ||
192 | - phone: options.phone, | ||
193 | - value: options.address, | ||
194 | - checked: options.delFlag, | ||
195 | - location:options.area, | ||
196 | - id:options.id | ||
197 | - }) | 189 | + console.log(options, 'options') |
190 | + this.setData({ | ||
191 | + username: options.name, | ||
192 | + phone: options.phone, | ||
193 | + value: options.address, | ||
194 | + checked: options.delFlag, | ||
195 | + location: options.area, | ||
196 | + locations: options.locations, | ||
197 | + latitudes: options.locations.split(",")[0], //传值给后台 | ||
198 | + longitudes:options.locations.split(",")[1], | ||
199 | + id: options.id | ||
200 | + }) | ||
201 | + console.log(this.data.latitudes,'11') | ||
202 | + console.log(this.data.longitudes,'222') | ||
198 | // } | 203 | // } |
199 | 204 | ||
200 | }, | 205 | }, |
1 | <!--pages/add-address/add-address.wxml--> | 1 | <!--pages/add-address/add-address.wxml--> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | <van-cell-group class="addContent"> | 3 | <van-cell-group class="addContent"> |
4 | - <van-field value="{{ username }}" required clearable label="姓名" icon="question-o" placeholder="请输入姓名" | 4 | + <van-field value="{{ username }}" clearable label="姓名" icon="question-o" placeholder="请输入姓名" |
5 | bind:click-icon="onClickIcon" bindinput="inputName" /> | 5 | bind:click-icon="onClickIcon" bindinput="inputName" /> |
6 | <van-field value="{{ phone }}" label="电话" placeholder="请输入电话" bindinput="inputDel" bindblur="blurPhone" /> | 6 | <van-field value="{{ phone }}" label="电话" placeholder="请输入电话" bindinput="inputDel" bindblur="blurPhone" /> |
7 | <!-- 地址 --> | 7 | <!-- 地址 --> |
1 | // pages/evaluate/evaluate.js | 1 | // pages/evaluate/evaluate.js |
2 | let method = require("../../utils/reuqest.js"); | 2 | let method = require("../../utils/reuqest.js"); |
3 | const util = require("../../utils/util.js"); | 3 | const util = require("../../utils/util.js"); |
4 | +const ary = []; | ||
4 | Page({ | 5 | Page({ |
5 | data: { | 6 | data: { |
6 | - imags: [], | 7 | + imgs: [], |
7 | list: [], | 8 | list: [], |
8 | postData: [], //商品信息 | 9 | postData: [], //商品信息 |
9 | word: '', | 10 | word: '', |
10 | length: 0, | 11 | length: 0, |
11 | - maxlength:300, | 12 | + maxlength: 300, |
12 | orderId: '', | 13 | orderId: '', |
13 | checkType: 0, | 14 | checkType: 0, |
14 | - ppath:[], | ||
15 | - cpath:[], | 15 | + ppath: [], |
16 | + cpath: [], | ||
16 | }, | 17 | }, |
17 | //订单信息加载 | 18 | //订单信息加载 |
18 | getList(orderId) { | 19 | getList(orderId) { |
@@ -62,9 +63,18 @@ Page({ | @@ -62,9 +63,18 @@ Page({ | ||
62 | mask: true | 63 | mask: true |
63 | }) | 64 | }) |
64 | var uploaderList = res.tempFilePaths; | 65 | var uploaderList = res.tempFilePaths; |
65 | - that.setData({ | ||
66 | - imgs:uploaderList | ||
67 | - }) | 66 | + // ary.push(uploaderList[0]) |
67 | + if (ary.length <= 3) { | ||
68 | + // that.setData({ | ||
69 | + // imgs: ary | ||
70 | + // }) | ||
71 | + }else{ | ||
72 | + wx.showToast({ | ||
73 | + title: '最多只能上传3张图片', | ||
74 | + icon:'none' | ||
75 | + }) | ||
76 | + } | ||
77 | + | ||
68 | console.log(uploaderList, 'liost') | 78 | console.log(uploaderList, 'liost') |
69 | if (type == 1) { | 79 | if (type == 1) { |
70 | that.setData({ | 80 | that.setData({ |
@@ -99,9 +109,13 @@ Page({ | @@ -99,9 +109,13 @@ Page({ | ||
99 | }, | 109 | }, |
100 | success: function (res) { | 110 | success: function (res) { |
101 | successUp++; | 111 | successUp++; |
102 | - // console.log('上传图片成功:', JSON.parse(res.data)); | 112 | + console.log('上传图片成功:', JSON.parse(res.data)); |
103 | var data = JSON.parse(res.data); | 113 | var data = JSON.parse(res.data); |
104 | - let url = JSON.parse(res.data).data | 114 | + let url = JSON.parse(res.data).data |
115 | + ary.push(url); | ||
116 | + that.setData({ | ||
117 | + imgs:ary | ||
118 | + }) | ||
105 | if (type == 1) { | 119 | if (type == 1) { |
106 | that.data.ppath[i] = url; | 120 | that.data.ppath[i] = url; |
107 | that.setData({ | 121 | that.setData({ |
@@ -173,6 +187,9 @@ Page({ | @@ -173,6 +187,9 @@ Page({ | ||
173 | wx.showToast({ | 187 | wx.showToast({ |
174 | title: '发布成功', | 188 | title: '发布成功', |
175 | }), | 189 | }), |
190 | + this.setData({ | ||
191 | + imgs:[] | ||
192 | + }) | ||
176 | wx.redirectTo({ | 193 | wx.redirectTo({ |
177 | url: '/pages/all-order/all-order', | 194 | url: '/pages/all-order/all-order', |
178 | }) | 195 | }) |
@@ -21,13 +21,13 @@ | @@ -21,13 +21,13 @@ | ||
21 | </view> | 21 | </view> |
22 | <!-- 分类 --> | 22 | <!-- 分类 --> |
23 | <view class="classify"> | 23 | <view class="classify"> |
24 | - <scroll-view class='wrapper' scroll-x="true"> | ||
25 | - <view wx:for="{{classifyArray}}" class="classifyItem" bindtap="classifyEvent" data-id="{{item.categoryId}}" data-index="{{index}}"> | 24 | + <scroll-view class='wrapper1' scroll-x="true"> |
25 | + <view wx:for="{{classifyArray}}" class="classifyItem" bindtap="classifyEvent" data-id="{{item.categoryId}}" | ||
26 | + data-index="{{index}}"> | ||
26 | <view class="classifyPic"> | 27 | <view class="classifyPic"> |
27 | <image src="{{item.icon}}"></image> | 28 | <image src="{{item.icon}}"></image> |
28 | </view> | 29 | </view> |
29 | <view class="classifyText">{{item.categoryName}}</view> | 30 | <view class="classifyText">{{item.categoryName}}</view> |
30 | - | ||
31 | </view> | 31 | </view> |
32 | </scroll-view> | 32 | </scroll-view> |
33 | </view> | 33 | </view> |
@@ -84,9 +84,11 @@ | @@ -84,9 +84,11 @@ | ||
84 | <view class="arrow" bindtap="morePrice"></view> | 84 | <view class="arrow" bindtap="morePrice"></view> |
85 | </view> | 85 | </view> |
86 | <view class="dayPricePicMain"> | 86 | <view class="dayPricePicMain"> |
87 | - <view wx:for="{{dayPicArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}"> | ||
88 | - <image src="{{item.goodsImg}}"></image> | ||
89 | - </view> | 87 | + <scroll-view class='wrapper' scroll-x="true"> |
88 | + <view wx:for="{{dayPicArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}"> | ||
89 | + <image src="{{item.goodsImg}}"></image> | ||
90 | + </view> | ||
91 | + </scroll-view> | ||
90 | </view> | 92 | </view> |
91 | </view> | 93 | </view> |
92 | <view class="mainly"> | 94 | <view class="mainly"> |
@@ -95,9 +97,11 @@ | @@ -95,9 +97,11 @@ | ||
95 | <view class="mainlyTitle">{{nameData.label}}</view> | 97 | <view class="mainlyTitle">{{nameData.label}}</view> |
96 | </view> | 98 | </view> |
97 | <view class="dayPricePicMain"> | 99 | <view class="dayPricePicMain"> |
98 | - <view wx:for="{{marilyArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}"> | ||
99 | - <image src="{{item.goodsImg}}"></image> | ||
100 | - </view> | 100 | + <scroll-view class='wrapper' scroll-x="true"> |
101 | + <view wx:for="{{marilyArray}}" class="dayPricePic" bindtap="goGoodsDetail" data-id="{{item.goodsId}}"> | ||
102 | + <image src="{{item.goodsImg}}"></image> | ||
103 | + </view> | ||
104 | + </scroll-view> | ||
101 | </view> | 105 | </view> |
102 | </view> | 106 | </view> |
103 | </view> | 107 | </view> |
@@ -113,12 +117,6 @@ | @@ -113,12 +117,6 @@ | ||
113 | <view class="pickTitle">{{item.goodsName}}</view> | 117 | <view class="pickTitle">{{item.goodsName}}</view> |
114 | <view class="pickDesc">{{item.goodsAttributes}}</view> | 118 | <view class="pickDesc">{{item.goodsAttributes}}</view> |
115 | <view class="userInfo"> | 119 | <view class="userInfo"> |
116 | - <!-- <view class="userBox"> | ||
117 | - <view> | ||
118 | - <image src="{{item.headPic}}"></image> | ||
119 | - </view> | ||
120 | - <view class="userName">{{item.userName}}</view> | ||
121 | - </view> --> | ||
122 | <view class="collectIcon"> | 120 | <view class="collectIcon"> |
123 | <image src="{{item.collectIcon}}"></image> | 121 | <image src="{{item.collectIcon}}"></image> |
124 | <view style="display:inline-block">¥{{item.goodsPrice}}</view> | 122 | <view style="display:inline-block">¥{{item.goodsPrice}}</view> |
@@ -87,7 +87,6 @@ | @@ -87,7 +87,6 @@ | ||
87 | .classify .classifyPic { | 87 | .classify .classifyPic { |
88 | width: 104rpx; | 88 | width: 104rpx; |
89 | height: 89rpx; | 89 | height: 89rpx; |
90 | - background-color: blueviolet; | ||
91 | } | 90 | } |
92 | 91 | ||
93 | .classify .classifyPic image { | 92 | .classify .classifyPic image { |
@@ -187,6 +186,11 @@ | @@ -187,6 +186,11 @@ | ||
187 | width: 100%; | 186 | width: 100%; |
188 | white-space: nowrap; | 187 | white-space: nowrap; |
189 | display: flex; | 188 | display: flex; |
189 | +} | ||
190 | +.wrapper1 { | ||
191 | + width: 100%; | ||
192 | + white-space: nowrap; | ||
193 | + display: flex; | ||
190 | margin-top: 28rpx; | 194 | margin-top: 28rpx; |
191 | } | 195 | } |
192 | 196 | ||
@@ -297,13 +301,15 @@ | @@ -297,13 +301,15 @@ | ||
297 | justify-content: space-between; | 301 | justify-content: space-between; |
298 | align-items: center; | 302 | align-items: center; |
299 | margin-top: 22rpx; | 303 | margin-top: 22rpx; |
304 | + width: 100%; | ||
300 | } | 305 | } |
301 | 306 | ||
302 | .dayPricePic { | 307 | .dayPricePic { |
303 | - width: 148rpx; | 308 | + width:25%; |
304 | height: 148rpx; | 309 | height: 148rpx; |
305 | padding: 8rpx 6rpx 8rpx 6rpx; | 310 | padding: 8rpx 6rpx 8rpx 6rpx; |
306 | box-sizing: border-box; | 311 | box-sizing: border-box; |
312 | + display: inline-block; | ||
307 | } | 313 | } |
308 | 314 | ||
309 | .dayPricePic image { | 315 | .dayPricePic image { |
@@ -17,6 +17,7 @@ Page({ | @@ -17,6 +17,7 @@ Page({ | ||
17 | selectNum: '30', | 17 | selectNum: '30', |
18 | pingjiaNum: 0, | 18 | pingjiaNum: 0, |
19 | infoList: [], //评价 | 19 | infoList: [], //评价 |
20 | + image:'', //评价图片 | ||
20 | flags: true, | 21 | flags: true, |
21 | deacArray: [{ | 22 | deacArray: [{ |
22 | img: '/images/1.jpg' | 23 | img: '/images/1.jpg' |
@@ -121,11 +122,11 @@ Page({ | @@ -121,11 +122,11 @@ Page({ | ||
121 | }, | 122 | }, |
122 | //进入购物车 | 123 | //进入购物车 |
123 | goCart() { | 124 | goCart() { |
124 | - if(wx.getStorageSync('Authorization')==" "){ | ||
125 | - setTimeout(()=>{ | ||
126 | - util.getUser(); | ||
127 | - },2000) | ||
128 | - }else{ | 125 | + if (wx.getStorageSync('Authorization') == " ") { |
126 | + setTimeout(() => { | ||
127 | + util.getUser(); | ||
128 | + }, 2000) | ||
129 | + } else { | ||
129 | wx.switchTab({ | 130 | wx.switchTab({ |
130 | url: '/pages/shopping-cart/shopping-cart', | 131 | url: '/pages/shopping-cart/shopping-cart', |
131 | }) | 132 | }) |
@@ -152,7 +153,7 @@ Page({ | @@ -152,7 +153,7 @@ Page({ | ||
152 | } else { | 153 | } else { |
153 | wx.showToast({ | 154 | wx.showToast({ |
154 | title: '请先登录', | 155 | title: '请先登录', |
155 | - icon:'none' | 156 | + icon: 'none' |
156 | }) | 157 | }) |
157 | setTimeout(() => { | 158 | setTimeout(() => { |
158 | util.getUser() | 159 | util.getUser() |
@@ -66,13 +66,18 @@ | @@ -66,13 +66,18 @@ | ||
66 | </view> | 66 | </view> |
67 | <view class="noData" wx:if="{{infoList.length==0}}">暂时没有相关商品的更多评价~</view> | 67 | <view class="noData" wx:if="{{infoList.length==0}}">暂时没有相关商品的更多评价~</view> |
68 | <view class="evaluateBox" wx:for="{{infoList}}" wx:if="{{infolist!==0}}"> | 68 | <view class="evaluateBox" wx:for="{{infoList}}" wx:if="{{infolist!==0}}"> |
69 | - <view class="evaluateInfo" > | 69 | + <view class="evaluateInfo"> |
70 | <view class="userImg" style="display:inline-block"> | 70 | <view class="userImg" style="display:inline-block"> |
71 | <image src="{{item.wxHeadImg}}"> </image> | 71 | <image src="{{item.wxHeadImg}}"> </image> |
72 | </view> | 72 | </view> |
73 | <view class="userName" style="display:inline-block">{{item.wxName}}</view> | 73 | <view class="userName" style="display:inline-block">{{item.wxName}}</view> |
74 | </view> | 74 | </view> |
75 | <view class="evaluateDetails">{{item.content}}</view> | 75 | <view class="evaluateDetails">{{item.content}}</view> |
76 | + <view class="evaluatePic" wx:if="{{item.images}}"> | ||
77 | + <view class="picBox" wx:for="{{item.images}}" data-item="data"> | ||
78 | + <image src="{{item}}"></image> | ||
79 | + </view> | ||
80 | + </view> | ||
76 | </view> | 81 | </view> |
77 | </view> | 82 | </view> |
78 | <!-- 商品明细--> | 83 | <!-- 商品明细--> |
@@ -306,6 +306,22 @@ | @@ -306,6 +306,22 @@ | ||
306 | letter-spacing: 1rpx; | 306 | letter-spacing: 1rpx; |
307 | margin: 0 auto; | 307 | margin: 0 auto; |
308 | margin-top: 20rpx; | 308 | margin-top: 20rpx; |
309 | + word-break: break-all; | ||
310 | +} | ||
311 | + | ||
312 | +.evaluatePic { | ||
313 | + width: 686rpx; | ||
314 | + height: 200rpx; | ||
315 | + display: flex; | ||
316 | + margin: 0 auto; | ||
317 | +} | ||
318 | + | ||
319 | +.picBox { | ||
320 | + width: 33.33%; | ||
321 | +} | ||
322 | +.picBox image{ | ||
323 | + width: 100%; | ||
324 | + height: 100%; | ||
309 | } | 325 | } |
310 | 326 | ||
311 | /* 商品详情 */ | 327 | /* 商品详情 */ |
@@ -14,8 +14,9 @@ Page({ | @@ -14,8 +14,9 @@ Page({ | ||
14 | getAddressList() { | 14 | getAddressList() { |
15 | method.getRequest("/address", data => { | 15 | method.getRequest("/address", data => { |
16 | if (data.statusCode == 0) { | 16 | if (data.statusCode == 0) { |
17 | + let lists=data.data; | ||
17 | this.setData({ | 18 | this.setData({ |
18 | - list: data.data | 19 | + list: lists.reverse() |
19 | }) | 20 | }) |
20 | } | 21 | } |
21 | }) | 22 | }) |
@@ -53,7 +54,7 @@ Page({ | @@ -53,7 +54,7 @@ Page({ | ||
53 | if (data.statusCode == 0) { | 54 | if (data.statusCode == 0) { |
54 | wx.setStorageSync('userInfo', data) | 55 | wx.setStorageSync('userInfo', data) |
55 | wx.navigateTo({ | 56 | wx.navigateTo({ |
56 | - url: '/pages/edit-address/edit-address?name=' + item.name + '&phone=' + item.phone + '&area=' + item.area + '&address=' + item.address + '&delFlag=' + item.delFlag+"&id="+id | 57 | + url: '/pages/edit-address/edit-address?name=' + item.name + '&phone=' + item.phone + '&area=' + item.area + '&address=' + item.address + '&delFlag=' + item.delFlag+"&id="+id+'&locations='+item.location |
57 | }) | 58 | }) |
58 | } else { | 59 | } else { |
59 | wx.showToast({ | 60 | wx.showToast({ |
1 | <!--pages/select-address/select-address.wxml--> | 1 | <!--pages/select-address/select-address.wxml--> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | 3 | ||
4 | - <view class="addressBox" wx:for="{{list}}" catchtap="selectAdd" data-id="{{item.id}}" data-index="{{index}}"> | ||
5 | - <view class="left"> | 4 | + <view class="addressBox" wx:for="{{list}}" data-id="{{item.id}}" data-index="{{index}}"> |
5 | + <view class="left" catchtap="selectAdd" data-id="{{item.id}}" data-index="{{index}}"> | ||
6 | <view class="userInfo"> | 6 | <view class="userInfo"> |
7 | <view class="name">{{item.name}}</view> | 7 | <view class="name">{{item.name}}</view> |
8 | <view class="tell">{{item.phone}}</view> | 8 | <view class="tell">{{item.phone}}</view> |
1 | // pages/shopping-cart/shopping-cart.js | 1 | // pages/shopping-cart/shopping-cart.js |
2 | let method = require("../../utils/reuqest.js") | 2 | let method = require("../../utils/reuqest.js") |
3 | +const util = require("../../utils/util.js") | ||
3 | Page({ | 4 | Page({ |
4 | data: { | 5 | data: { |
5 | checkType: 1, | 6 | checkType: 1, |
@@ -27,6 +28,9 @@ Page({ | @@ -27,6 +28,9 @@ Page({ | ||
27 | }, | 28 | }, |
28 | //地址信息 | 29 | //地址信息 |
29 | getAddress() { | 30 | getAddress() { |
31 | + if(wx.getStorageSync('addIndex')){ | ||
32 | + wx.setStorageSync('addIndex', 0) | ||
33 | + } | ||
30 | let index = wx.getStorageSync('addIndex') | 34 | let index = wx.getStorageSync('addIndex') |
31 | method.getRequest("/address", data => { | 35 | method.getRequest("/address", data => { |
32 | if (data.statusCode == 0) { | 36 | if (data.statusCode == 0) { |
@@ -41,6 +45,26 @@ Page({ | @@ -41,6 +45,26 @@ Page({ | ||
41 | wx.navigateTo({ | 45 | wx.navigateTo({ |
42 | url: '/pages/select-address/select-address', | 46 | url: '/pages/select-address/select-address', |
43 | }) | 47 | }) |
48 | + wx.setStorageSync("shopCartAdd",'true') | ||
49 | + }, | ||
50 | + //没有登录 | ||
51 | + goAddress1() { | ||
52 | + if(wx.getStorageSync('Authorization')){ | ||
53 | + wx.navigateTo({ | ||
54 | + url: '/pages/select-address/select-address', | ||
55 | + }) | ||
56 | + wx.setStorageSync("shopCartAdd",'true') | ||
57 | + }else{ | ||
58 | + wx.showToast({ | ||
59 | + title: '请先登录!', | ||
60 | + icon:'none' | ||
61 | + }) | ||
62 | + setTimeout(()=>{ | ||
63 | + util.getUser(); | ||
64 | + },2000) | ||
65 | + | ||
66 | + } | ||
67 | + | ||
44 | }, | 68 | }, |
45 | //配送时间 | 69 | //配送时间 |
46 | bindDateChange: function (e) { | 70 | bindDateChange: function (e) { |
1 | <!--pages/shopping-cart/shopping-cart.wxml--> | 1 | <!--pages/shopping-cart/shopping-cart.wxml--> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | <!-- 地址 --> | 3 | <!-- 地址 --> |
4 | - <view class="userInfo" bindtap="goAddress"> | 4 | + <view class="userInfo" bindtap="goAddress1"> |
5 | <view class="addHint" wx:if="{{addHint==false}}"> | 5 | <view class="addHint" wx:if="{{addHint==false}}"> |
6 | <view class="addItem1">暂未获取到收获地址</view> | 6 | <view class="addItem1">暂未获取到收获地址</view> |
7 | <view class="addItem2"> 请选择收货地址</view> | 7 | <view class="addItem2"> 请选择收货地址</view> |
-
请 注册 或 登录 后发表评论