作者 lihongjuan

提交

1 //app.js 1 //app.js
2 App({ 2 App({
3 onLaunch: function () { 3 onLaunch: function () {
  4 +
  5 + wx.getSystemInfo({
  6 + success: res => {
  7 + //导航高度
  8 + this.globalData.navHeight = res.statusBarHeight + 46;
  9 + }, fail(err) {
  10 + console.log(err);
  11 + }
  12 + })
  13 +
4 // 展示本地存储能力 14 // 展示本地存储能力
5 var logs = wx.getStorageSync('logs') || [] 15 var logs = wx.getStorageSync('logs') || []
6 logs.unshift(Date.now()) 16 logs.unshift(Date.now())
@@ -218,6 +228,7 @@ App({ @@ -218,6 +228,7 @@ App({
218 globalData: { 228 globalData: {
219 userInfo: null, 229 userInfo: null,
220 cid: null, 230 cid: null,
221 - class_id: null 231 + class_id: null,
  232 + navHeight: 0
222 } 233 }
223 }) 234 })
1 { 1 {
2 "pages": [ 2 "pages": [
  3 +
3 "pages/index/index", 4 "pages/index/index",
  5 + "pages/mine/eOrder/eOrder",
4 "pages/homeindex/homeindex", 6 "pages/homeindex/homeindex",
5 "pages/kind/kind", 7 "pages/kind/kind",
6 "pages/homeindex/search/search", 8 "pages/homeindex/search/search",
@@ -10,7 +12,6 @@ @@ -10,7 +12,6 @@
10 "pages/kind/firm_order1/firm_order1", 12 "pages/kind/firm_order1/firm_order1",
11 "pages/kind/success/success", 13 "pages/kind/success/success",
12 "pages/mine/contactUs/contactUs", 14 "pages/mine/contactUs/contactUs",
13 - "pages/mine/eOrder/eOrder",  
14 "pages/mine/myOrder/myOrder", 15 "pages/mine/myOrder/myOrder",
15 "pages/mine/addr_2/addr_2", 16 "pages/mine/addr_2/addr_2",
16 "pages/mine/addr_1/addr_1", 17 "pages/mine/addr_1/addr_1",
@@ -28,3 +28,27 @@ @@ -28,3 +28,27 @@
28 .icon-kefu:before { 28 .icon-kefu:before {
29 content: "\e658"; 29 content: "\e658";
30 } 30 }
  31 +
  32 +
  33 +.ping{
  34 + display:flex;
  35 + justify-content: center
  36 +}
  37 +.noorder{
  38 + width:270rpx;
  39 + height:270rpx;
  40 + font-size: 0;
  41 + margin:0 auto;
  42 +
  43 +
  44 +}
  45 +.noorder image{
  46 + width:100%;
  47 + height:100%;
  48 +}
  49 +.noordertitle{
  50 + color:#999999;
  51 + font-size: 26rpx;
  52 + text-align: center;
  53 + margin-top:20rpx
  54 +}
@@ -20,7 +20,8 @@ Page({ @@ -20,7 +20,8 @@ Page({
20 seconds: 0, 20 seconds: 0,
21 over:true, 21 over:true,
22 short:[], 22 short:[],
23 - seemore:true 23 + seemore:true,
  24 + images:[]
24 }, 25 },
25 26
26 /** 27 /**
@@ -35,6 +36,45 @@ Page({ @@ -35,6 +36,45 @@ Page({
35 this.detaiFun(options.id) 36 this.detaiFun(options.id)
36 37
37 }, 38 },
  39 + slectpic(e){
  40 + let that=this;
  41 + console.log(e)
  42 + let idx=e.currentTarget.dataset.idx;
  43 + let newassess = that.data.assess;
  44 + for (var i = 0; i < newassess.length;i++){
  45 + if(i==idx){
  46 + that.setData({
  47 + images: newassess[i].img
  48 + })
  49 + }
  50 +
  51 + }
  52 +
  53 + console.log(that.data.images)
  54 + },
  55 +
  56 + // 图片预览
  57 + previewImage: function (e) {
  58 +
  59 + let that = this;
  60 + console.log(e)
  61 + let idx = e.currentTarget.dataset.idx;
  62 + let newassess = that.data.assess;
  63 + for (var i = 0; i < newassess.length; i++) {
  64 + if (i == idx) {
  65 + that.setData({
  66 + images: newassess[i].img
  67 + })
  68 + }
  69 +
  70 + }
  71 +
  72 + var current = e.target.dataset.src
  73 + wx.previewImage({
  74 + current: current,
  75 + urls: this.data.images
  76 + })
  77 + },
38 78
39 //已成团 79 //已成团
40 group(){ 80 group(){
@@ -51,9 +91,32 @@ Page({ @@ -51,9 +91,32 @@ Page({
51 }) 91 })
52 }, 92 },
53 moresee(){ 93 moresee(){
54 - this.setData({ 94 + let that = this;
  95 + that.setData({
55 seemore:false 96 seemore:false
56 }) 97 })
  98 +
  99 +
  100 + let url = "home/index/shopMessage";
  101 + let header = {
  102 + "XX-Token": wx.getStorageSync('token'),
  103 + "XX-Device-Type": 'wxapp'
  104 + }
  105 + let params = {
  106 + shop_id: that.data.detail_id,
  107 + }
  108 + app.post(url, params, header).then((res) => {
  109 + console.log(res)
  110 + let masarr = []
  111 +
  112 + that.setData({
  113 + // short: masarr,
  114 + //assess: res.data
  115 + assess:res.data
  116 + })
  117 + }).catch((err) => {
  118 + console.log(err)
  119 + })
57 }, 120 },
58 121
59 122
@@ -163,15 +226,18 @@ Page({ @@ -163,15 +226,18 @@ Page({
163 console.log(res) 226 console.log(res)
164 let masarr=[] 227 let masarr=[]
165 for (var i = 0; i < res.data.length;i++){ 228 for (var i = 0; i < res.data.length;i++){
166 - if(i<10){ 229 + if(i<5){
167 masarr.push(res.data[i]) 230 masarr.push(res.data[i])
168 } 231 }
169 232
170 } 233 }
171 that.setData({ 234 that.setData({
172 - short: masarr,  
173 - assess: res.data 235 + // short: masarr,
  236 + //assess: res.data
  237 + assess: masarr
174 }) 238 })
  239 +
  240 + console.log(that.data.assess)
175 }).catch((err) => { 241 }).catch((err) => {
176 console.log(err) 242 console.log(err)
177 }) 243 })
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 3
4 <view class="pagecontainer"> 4 <view class="pagecontainer">
5 5
6 -<import src="../../../wxParse/wxParse.wxml" />  
7 -<view class='container'> 6 + <import src="../../../wxParse/wxParse.wxml" />
  7 + <view class='container'>
8 <view class='ware_box'> 8 <view class='ware_box'>
9 <view class='ware_top'> 9 <view class='ware_top'>
10 <view class='ware_1'> 10 <view class='ware_1'>
@@ -62,14 +62,14 @@ @@ -62,14 +62,14 @@
62 <view class='ware_bot_txt'>{{detailCon.recommend}}</view> 62 <view class='ware_bot_txt'>{{detailCon.recommend}}</view>
63 </view> 63 </view>
64 </view> 64 </view>
65 -</view>  
66 -<!-- 商品规格 -->  
67 -<view class='spec'> 65 + </view>
  66 + <!-- 商品规格 -->
  67 + <view class='spec'>
68 <view class='spec_txt'>商品规格</view> 68 <view class='spec_txt'>商品规格</view>
69 <view class='spec_txt2'>{{detailCon.shop_type1}}</view> 69 <view class='spec_txt2'>{{detailCon.shop_type1}}</view>
70 -</view>  
71 -<!-- 商品详情 -->  
72 -<view class='ware_detail'> 70 + </view>
  71 + <!-- 商品详情 -->
  72 + <view class='ware_detail'>
73 <view class='ware_detail_tit'> 73 <view class='ware_detail_tit'>
74 <view class="ware_detail_box {{index == 1 ? 'ware_active' : ''}}" bindtap='goy' data-id="1">商品详情</view> 74 <view class="ware_detail_box {{index == 1 ? 'ware_active' : ''}}" bindtap='goy' data-id="1">商品详情</view>
75 <view class="ware_detail_box {{index == 2 ? 'ware_active' : ''}}" bindtap='goy' data-id="2">用户评价</view> 75 <view class="ware_detail_box {{index == 2 ? 'ware_active' : ''}}" bindtap='goy' data-id="2">用户评价</view>
@@ -82,7 +82,18 @@ @@ -82,7 +82,18 @@
82 </view> 82 </view>
83 <!-- 用户评价 --> 83 <!-- 用户评价 -->
84 <view class='ware_assess' wx:if="{{index == 2}}"> 84 <view class='ware_assess' wx:if="{{index == 2}}">
85 - <view class='ware_assess_li' wx:for="{{assess}}" wx:key="index"> 85 +
  86 + <view class="noping" wx:if="{{assess.length==0}}">
  87 + <view class="noorder">
  88 + <image src="/img/noorder.png" mode="widthFix"></image>
  89 + </view>
  90 +
  91 + <view class="noordertitle">暂无评价</view>
  92 + </view>
  93 +
  94 + <view wx:else>
  95 + <!-- <block wx:if="{{seemore}}">
  96 + <view class='ware_assess_li 345' wx:for="{{short}}" wx:key="index">
86 <view class='assess_header'> 97 <view class='assess_header'>
87 <view class='assess_headerImg'> 98 <view class='assess_headerImg'>
88 <image src='{{item.avatar}}'></image> 99 <image src='{{item.avatar}}'></image>
@@ -93,47 +104,60 @@ @@ -93,47 +104,60 @@
93 {{item.text}} 104 {{item.text}}
94 </view> 105 </view>
95 <block wx:if="{{item.img.length!=0}}"> 106 <block wx:if="{{item.img.length!=0}}">
96 - <view class='ware_pic' wx:for="{{item.img}}" wx:key=''>  
97 - <view class='ware_picBox'> 107 + <view class='ware_pic'>
  108 + <view class='ware_picBox' wx:for="{{item.img}}" wx:key=''>
98 <image src='{{item}}'></image> 109 <image src='{{item}}'></image>
99 </view> 110 </view>
100 </view> 111 </view>
101 </block> 112 </block>
102 <view class='assess_time'>2019/07/01</view> 113 <view class='assess_time'>2019/07/01</view>
103 </view> 114 </view>
104 - <!-- <view class='ware_assess_li'> 115 + </block> -->
  116 + <block>
  117 + <view class='ware_assess_li 123' wx:for="{{assess}}" wx:key="index" wx:for-item="items" wx:for-index="indexs">
105 <view class='assess_header'> 118 <view class='assess_header'>
106 <view class='assess_headerImg'> 119 <view class='assess_headerImg'>
107 - <image src='../../../img/jujia@2x.png'></image> 120 + <image src='{{items.avatar}}'></image>
108 </view> 121 </view>
109 - <view class='assess_headerTxt'>朱*明</view> 122 + <view class='assess_headerTxt'>{{items.user_nickname}}</view>
110 </view> 123 </view>
111 <view class='assess_say'> 124 <view class='assess_say'>
112 - 质量很不错,很喜欢。 125 + {{items.text}}
113 </view> 126 </view>
114 - <view class='ware_pic'>  
115 - <view class='ware_picBox'>  
116 - <image src='../../../img/gerenzhingxinbeijing@2x.png'></image> 127 + <block wx:if="{{item.img.length!=0}}">
  128 + <view class='ware_pic' >
  129 + <view class='ware_picBox' wx:for="{{items.img}}" wx:key=''>
  130 + <image src='{{item}}' bindtap="previewImage" data-src="{{item}}" data-idx="{{indexs}}"></image>
117 </view> 131 </view>
118 - <view class='ware_picBox'>  
119 - <image src='../../../img/gerenzhingxinbeijing@2x.png'></image>  
120 </view> 132 </view>
  133 + </block>
  134 + <view class='assess_time'>{{items.create_time}}</view>
121 </view> 135 </view>
122 - <view class='assess_time'>2019/07/01</view>  
123 - </view> --> 136 + </block>
  137 +
  138 +
  139 +
  140 +
  141 +
  142 +
  143 + <block wx:if="{{assess.length==5}}">
124 <view class='whole' wx:if="{{seemore}}" bindtap="moresee"> 144 <view class='whole' wx:if="{{seemore}}" bindtap="moresee">
125 查看全部评价 145 查看全部评价
126 </view> 146 </view>
  147 +
  148 + </block>
127 </view> 149 </view>
  150 +
128 </view> 151 </view>
129 -</view>  
130 -<!-- footer底部 -->  
131 -<view class='footer'> 152 + </view>
  153 + </view>
  154 + <!-- footer底部 -->
  155 + <view class='footer'>
132 156
133 -<view class="kefu"> 157 + <view class="kefu">
134 <view class="iconfont icon-kefu"></view> 158 <view class="iconfont icon-kefu"></view>
135 <button class="remaindetail" open-type="contact" style="margin-left: 0"></button> 159 <button class="remaindetail" open-type="contact" style="margin-left: 0"></button>
136 -</view> 160 + </view>
137 <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==0}}">加入收藏</view> 161 <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==0}}">加入收藏</view>
138 <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==1}}">取消收藏</view> 162 <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==1}}">取消收藏</view>
139 163
@@ -143,11 +167,11 @@ @@ -143,11 +167,11 @@
143 </view> 167 </view>
144 168
145 <view class='footer_over' wx:else bindtap="gameover">活动结束</view> 169 <view class='footer_over' wx:else bindtap="gameover">活动结束</view>
146 -</view>  
147 -<!-- 遮罩层 -->  
148 -<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>  
149 -<!-- 弹出层 -->  
150 -<view class="modalDlg" wx:if="{{showModal}}"> 170 + </view>
  171 + <!-- 遮罩层 -->
  172 + <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
  173 + <!-- 弹出层 -->
  174 + <view class="modalDlg" wx:if="{{showModal}}">
151 <view class='modalDlg_p'> 175 <view class='modalDlg_p'>
152 <view class='m_top'> 176 <view class='m_top'>
153 <view class='m_topImg'> 177 <view class='m_topImg'>
@@ -174,5 +198,5 @@ @@ -174,5 +198,5 @@
174 </view> 198 </view>
175 <button class='m_btn' bindtap='goFirm_order1' data-id="{{detailCon.shop_id}}">确认</button> 199 <button class='m_btn' bindtap='goFirm_order1' data-id="{{detailCon.shop_id}}">确认</button>
176 </view> 200 </view>
177 -</view> 201 + </view>
178 </view> 202 </view>
@@ -353,12 +353,13 @@ page { @@ -353,12 +353,13 @@ page {
353 } 353 }
354 354
355 .ware_pic { 355 .ware_pic {
356 - display: flex;  
357 - width: 100%;  
358 - margin-top: 10rpx; 356 + display:flex;
  357 + margin-top: 16rpx;
  358 + flex-wrap: wrap;
359 } 359 }
360 360
361 .ware_picBox { 361 .ware_picBox {
  362 + flex:0 0 auto;
362 margin-right: 16rpx; 363 margin-right: 16rpx;
363 } 364 }
364 365
@@ -22,32 +22,67 @@ Page({ @@ -22,32 +22,67 @@ Page({
22 hours: '', 22 hours: '',
23 minutes: '', 23 minutes: '',
24 seconds: '', 24 seconds: '',
  25 + navH: '',
  26 + nav:''
25 }, 27 },
26 28
27 /** 29 /**
28 * 生命周期函数--监听页面加载 30 * 生命周期函数--监听页面加载
29 */ 31 */
30 onLoad: function (options) { 32 onLoad: function (options) {
  33 + console.log(options)
  34 + if(options.nav!=undefined){
  35 + this.setData({
  36 + nav:1
  37 + })
  38 + }
31 39
32 console.log(options.num) 40 console.log(options.num)
33 this.setData({ 41 this.setData({
34 shop_id: options.id, 42 shop_id: options.id,
35 - shopnum:options.num 43 + shopnum:options.num,
  44 +
  45 + })
  46 +
  47 + this.setData({
  48 + navH: app.globalData.navHeight
36 }) 49 })
37 console.log(options.id) 50 console.log(options.id)
38 51
39 }, 52 },
  53 +
  54 + go() {
  55 + if (this.data.nav == 1) {
  56 + wx.switchTab({
  57 +
  58 + url: '/pages/homeindex/homeindex',
  59 + })
  60 + } else {
  61 + wx.navigateBack({
  62 + checked: true
  63 + })
  64 + }
  65 +
  66 + },
40 //输入备注 67 //输入备注
41 entertext(e){ 68 entertext(e){
42 this.setData({ 69 this.setData({
43 text:e.detail.value 70 text:e.detail.value
44 }) 71 })
45 }, 72 },
  73 + //选择地址
  74 + selectplace(){
  75 + wx.navigateTo({
  76 + url: '/pages/mine/addr_1/addr_1?shop_id='+this.data.shop_id+'&shopnum='+this.data.shopnum,
  77 + })
  78 + wx.setStorageSync('shopid', this.data.shop_id)
  79 + wx.setStorageSync('shopnum', this.data.shopnum)
  80 + },
46 81
47 //添加收货地址 82 //添加收货地址
48 addplace(){ 83 addplace(){
49 wx.navigateTo({ 84 wx.navigateTo({
50 - url: '/pages/mine/addr_2/addr_2', 85 + url: '/pages/mine/addr_2/addr_2?noorder=' + 1 + '&noorderid=' + this.data.shop_id + '&num=' + this.data.shopnum,
51 }) 86 })
52 }, 87 },
53 88
@@ -65,13 +100,18 @@ Page({ @@ -65,13 +100,18 @@ Page({
65 } 100 }
66 app.post(url, params, header).then((res) => { 101 app.post(url, params, header).then((res) => {
67 console.log(res) 102 console.log(res)
  103 + if(res.data.address_id==0){
  104 + that.setData({
  105 + address: true,
  106 + })
  107 + }
68 that.setData({ 108 that.setData({
69 order_list: res.data, 109 order_list: res.data,
70 shop_numb: res.data.shop_numb, 110 shop_numb: res.data.shop_numb,
71 goods: res.data.goods, 111 goods: res.data.goods,
72 address_id: res.data.address_id, 112 address_id: res.data.address_id,
73 text: that.data.text, 113 text: that.data.text,
74 - address:false, 114 +
75 shopinfo:true 115 shopinfo:true
76 }) 116 })
77 117
@@ -147,9 +187,9 @@ Page({ @@ -147,9 +187,9 @@ Page({
147 } 187 }
148 }) 188 })
149 189
150 - that.setData({  
151 - address:true  
152 - }) 190 + // that.setData({
  191 + // address:true
  192 + // })
153 } else if (err.msg == "商品已到时"){ 193 } else if (err.msg == "商品已到时"){
154 wx.showModal({ 194 wx.showModal({
155 title: '提示', 195 title: '提示',
@@ -194,14 +234,15 @@ Page({ @@ -194,14 +234,15 @@ Page({
194 }, 234 },
195 paynow(){ 235 paynow(){
196 let that = this; 236 let that = this;
197 - // if(that.data.text==''){  
198 - // wx.showToast({  
199 - // title: '请输入备注信息',  
200 - // icon:'none'  
201 - // }) 237 + console.log(that.data.address_id)
  238 + if (that.data.address_id==0){
  239 + wx.showToast({
  240 + title: '请选择收货地址',
  241 + icon:'none'
  242 + })
202 243
203 - // return false  
204 - // } 244 + return false
  245 + }
205 let url = "home/index/pay"; 246 let url = "home/index/pay";
206 let header = { 247 let header = {
207 "XX-Token": wx.getStorageSync('token'), 248 "XX-Token": wx.getStorageSync('token'),
1 { 1 {
2 "navigationBarTitleText": "确认订单", 2 "navigationBarTitleText": "确认订单",
3 "navigationBarBackgroundColor": "#6EAC3D", 3 "navigationBarBackgroundColor": "#6EAC3D",
4 - "navigationBarTextStyle": "white" 4 + "navigationBarTextStyle": "white",
  5 + "navigationStyle": "custom"
5 } 6 }
1 <!--pages/kind/firm_order1/firm_order1.wxml--> 1 <!--pages/kind/firm_order1/firm_order1.wxml-->
2 -<view class='container'> 2 +<view>
  3 + <view class='nav bg-white' style='height:{{navH}}px' catchtap='go'>
  4 + <view class="rowback">
  5 + <!-- <image src="/img/aicon_08@2x.png"></image> -->
  6 + <view class="iconfont icon-jiantou-copy"></view>
  7 + </view>
  8 +
  9 + <view class='nav-title'>
  10 + 确认订单
  11 + <image src='../../images/back.png' mode='aspectFit' class='back' bindtap='navBack'></image>
  12 + </view>
  13 + </view>
  14 + <scroll-view class='bg-gray overflow' style='height:calc(100vh - {{navH}}px)' scroll-y>
  15 +
  16 + <view class='container'>
3 <!-- 顶部背景 --> 17 <!-- 顶部背景 -->
4 <view class='header'></view> 18 <view class='header'></view>
5 <!-- 订单详情 --> 19 <!-- 订单详情 -->
6 <view class='order_box'> 20 <view class='order_box'>
7 <!-- 个人信息 --> 21 <!-- 个人信息 -->
8 - <view class='o_top'> 22 + <view class='o_top' wx:if="{{address==true}}" bindtap="addplace">
9 <view class='o_topIn'> 23 <view class='o_topIn'>
10 <view class='o_topImg'> 24 <view class='o_topImg'>
11 <image src='../../../img/jujia@2x.png'></image> 25 <image src='../../../img/jujia@2x.png'></image>
12 </view> 26 </view>
13 27
14 - <view class='o_text' wx:if="{{address==true}}" bindtap="addplace"> 28 + <view class='o_text'>
15 <view class='name shouhuo'>请选择收货地址</view> 29 <view class='name shouhuo'>请选择收货地址</view>
16 </view> 30 </view>
17 - <view class='o_text' wx:else> 31 +
  32 + <image class='o_right' src='../../../img/right_1.png'></image>
  33 + </view>
  34 + <image class='o_top_bottom' src='../../../img/kuaidi@2x.png'></image>
  35 + </view>
  36 +
  37 + <view class='o_top' wx:else bindtap="selectplace">
  38 + <view class='o_topIn'>
  39 + <view class='o_topImg'>
  40 + <image src='../../../img/jujia@2x.png'></image>
  41 + </view>
  42 +
  43 +
  44 + <view class='o_text' >
18 <view class='o_namePhone'> 45 <view class='o_namePhone'>
19 <view class='name'>{{order_list.name}}</view> 46 <view class='name'>{{order_list.name}}</view>
20 <view class='phone'>{{order_list.mobile}}</view> 47 <view class='phone'>{{order_list.mobile}}</view>
@@ -75,8 +102,8 @@ @@ -75,8 +102,8 @@
75 </view> 102 </view>
76 </view> 103 </view>
77 </view> 104 </view>
78 -</view>  
79 -<view class='footer' wx:if="{{shopinfo==true}}"> 105 + </view>
  106 + <view class='footer' wx:if="{{shopinfo==true}}">
80 <view class='footer_in'> 107 <view class='footer_in'>
81 <view class='f_txt1'>共{{order_list.shop_numb}}件商品</view> 108 <view class='f_txt1'>共{{order_list.shop_numb}}件商品</view>
82 <view class='f_txt2'>合计: 109 <view class='f_txt2'>合计:
@@ -84,4 +111,7 @@ @@ -84,4 +111,7 @@
84 </view> 111 </view>
85 <view class='f_btn' bindtap='paynow'>立即支付</view> 112 <view class='f_btn' bindtap='paynow'>立即支付</view>
86 </view> 113 </view>
  114 + </view>
  115 +
  116 + </scroll-view>
87 </view> 117 </view>
1 /* pages/kind/firm_order1/firm_order1.wxss */ 1 /* pages/kind/firm_order1/firm_order1.wxss */
  2 +@import '../../../iconfont/iconfont.wxss';
  3 +.icon-jiantou-copy{
  4 + font-size:35rpx;
  5 + color:#fff;
  6 + transform:rotate(180deg);
  7 + /* font-weight: bold; */
2 8
  9 +}
3 page { 10 page {
4 background: #f7f7f7; 11 background: #f7f7f7;
5 } 12 }
@@ -319,3 +326,66 @@ page { @@ -319,3 +326,66 @@ page {
319 color:#999; 326 color:#999;
320 margin-top:27rpx; 327 margin-top:27rpx;
321 } 328 }
  329 +/* 高度的设置 */
  330 +
  331 +.nav {
  332 + width: 100%;
  333 + overflow: hidden;
  334 + position: relative;
  335 + top: 0;
  336 + left: 0;
  337 + z-index: 10;
  338 + background: #6EAC3D
  339 +}
  340 +
  341 +.nav-title {
  342 + width: 100%;
  343 + height: 45px;
  344 + line-height: 45px;
  345 + text-align: center;
  346 + position: absolute;
  347 + bottom: 0;
  348 + left: 0;
  349 + z-index: 10;
  350 + font-family: PingFang-SC-Medium;
  351 + font-size: 28rpx;
  352 + letter-spacing: 2px;
  353 + color:#fff;
  354 +}
  355 +
  356 +.nav .back {
  357 + width: 22px;
  358 + height: 22px;
  359 + position: absolute;
  360 + bottom: 0;
  361 + left: 0;
  362 + padding: 10px 15px;
  363 +
  364 +}
  365 +
  366 +.bg-white {
  367 + background-color: #6EAC3D;
  368 +}
  369 +
  370 +.bg-gray {
  371 + background-color: #f7f7f7;
  372 +}
  373 +
  374 +.overflow {
  375 + overflow: auto;
  376 +}
  377 +
  378 +.hidden {
  379 + overflow: hidden;
  380 +}
  381 +.rowback{
  382 + width:15rpx;
  383 + height:27rpx;
  384 + font-size: 0;
  385 + margin:79rpx 0 0 30rpx;
  386 + transform:rotate(180deg)
  387 +}
  388 +.rowback image{
  389 + width:100%;
  390 + height:100%;
  391 +}
@@ -9,11 +9,21 @@ Page({ @@ -9,11 +9,21 @@ Page({
9 orderlist: [], 9 orderlist: [],
10 address_id: '', 10 address_id: '',
11 status: 0, 11 status: 0,
  12 + shop_id:'',
  13 + shopnum:''
12 }, 14 },
13 /** 15 /**
14 * 生命周期函数--监听页面加载 16 * 生命周期函数--监听页面加载
15 */ 17 */
16 onLoad: function (options) { 18 onLoad: function (options) {
  19 + console.log(options)
  20 + if(options.shop_id!=undefined){
  21 + this.setData({
  22 + shop_id:options.shop_id,
  23 + shopnum:options.shopnum
  24 + })
  25 +
  26 + }
17 this.getaddresslist() 27 this.getaddresslist()
18 28
19 // this.setData({ 29 // this.setData({
@@ -132,6 +142,16 @@ Page({ @@ -132,6 +142,16 @@ Page({
132 * 生命周期函数--监听页面卸载 142 * 生命周期函数--监听页面卸载
133 */ 143 */
134 onUnload: function () { 144 onUnload: function () {
  145 + let shopid=wx.getStorageSync("shopid");
  146 + let shopnum=wx.getStorageSync('shopnum')
  147 + if (shopid!=''){
  148 + wx.reLaunch({
  149 + url: '/pages/kind/firm_order1/firm_order1?id=' + shopid + '&num=' + shopnum + '&nav=' + 1,
  150 + })
  151 + }
  152 +
  153 + wx.setStorageSync('shopid', '')
  154 + wx.setStorageSync('shopnum ', '')
135 155
136 }, 156 },
137 157
@@ -102,11 +102,12 @@ Page({ @@ -102,11 +102,12 @@ Page({
102 name: res.data.name, 102 name: res.data.name,
103 mobile: res.data.mobile, 103 mobile: res.data.mobile,
104 status: res.data.status, 104 status: res.data.status,
  105 + type: res.data.status,
105 province: res.data.province, 106 province: res.data.province,
106 city: res.data.city, 107 city: res.data.city,
107 county: res.data.city, 108 county: res.data.city,
108 address: res.data.address, 109 address: res.data.address,
109 - 110 + selectregion:res.data.province+res.data.city+res.data.county
110 }) 111 })
111 112
112 113
@@ -189,6 +190,7 @@ Page({ @@ -189,6 +190,7 @@ Page({
189 console.log(that.data.noorder) 190 console.log(that.data.noorder)
190 if (that.data.noorder==1){ 191 if (that.data.noorder==1){
191 setTimeout(function () { 192 setTimeout(function () {
  193 + console.log(that.data.num)
192 wx.navigateTo({ 194 wx.navigateTo({
193 url: '/pages/kind/firm_order1/firm_order1?num='+that.data.num+'&id='+that.data.noorderid, 195 url: '/pages/kind/firm_order1/firm_order1?num='+that.data.num+'&id='+that.data.noorderid,
194 }) 196 })
@@ -2,7 +2,17 @@ @@ -2,7 +2,17 @@
2 <view class='container'> 2 <view class='container'>
3 <view class='mid'> 3 <view class='mid'>
4 4
5 - <view class="nodata" wx:if='{{collectList.length==0}}'>暂无数据</view> 5 + <view class="nodata" wx:if='{{collectList.length==0}}'>
  6 +
  7 + <view class="noorder">
  8 + <image src="/img/noorder.png" mode="widthFix"></image>
  9 + </view>
  10 +
  11 + <view class="noordertitle">暂无收藏数据</view>
  12 +
  13 +
  14 +
  15 + </view>
6 <block wx:else> 16 <block wx:else>
7 <view class='mid_item' wx:for="{{collectList}}" wx:key=""> 17 <view class='mid_item' wx:for="{{collectList}}" wx:key="">
8 <!-- 顶部 --> 18 <!-- 顶部 -->
@@ -281,6 +281,6 @@ @@ -281,6 +281,6 @@
281 white-space: nowrap; 281 white-space: nowrap;
282 } 282 }
283 .nodata{ 283 .nodata{
284 - margin-top: 20rpx; 284 + margin-top: 350rpx;
285 font-size: 30rpx; 285 font-size: 30rpx;
286 } 286 }
@@ -36,6 +36,15 @@ Page({ @@ -36,6 +36,15 @@ Page({
36 // 发表评价 36 // 发表评价
37 submitComment() { 37 submitComment() {
38 let that = this; 38 let that = this;
  39 + if (that.data.text==''){
  40 +
  41 + wx.showToast({
  42 + title: '请输入评论内容',
  43 + icon:'none'
  44 + })
  45 +
  46 + return false
  47 + }
39 let url = 'user/index/message'; 48 let url = 'user/index/message';
40 let params = { 49 let params = {
41 goods_id : that.data.goods_id, 50 goods_id : that.data.goods_id,
@@ -101,7 +110,7 @@ Page({ @@ -101,7 +110,7 @@ Page({
101 console.log('上传文件' + JSON.stringify(res)); 110 console.log('上传文件' + JSON.stringify(res));
102 let data = JSON.parse(JSON.stringify(res)) 111 let data = JSON.parse(JSON.stringify(res))
103 console.log(data) 112 console.log(data)
104 - let arr=[]; 113 + let arr=that.data.images;
105 arr.push(data.url) 114 arr.push(data.url)
106 that.setData({ 115 that.setData({
107 images: arr 116 images: arr
@@ -151,12 +160,15 @@ Page({ @@ -151,12 +160,15 @@ Page({
151 // }); 160 // });
152 }, 161 },
153 delete: function (e) { 162 delete: function (e) {
  163 + let that=this
154 var index = e.currentTarget.dataset.index; 164 var index = e.currentTarget.dataset.index;
155 var images = that.data.images; 165 var images = that.data.images;
156 images.splice(index, 1); 166 images.splice(index, 1);
157 that.setData({ 167 that.setData({
158 images: images 168 images: images
159 }); 169 });
  170 +
  171 + console.log(that.data.images)
160 }, 172 },
161 173
162 /** 174 /**
@@ -393,18 +393,3 @@ margin-top:24rpx; @@ -393,18 +393,3 @@ margin-top:24rpx;
393 margin-top: 350rpx; 393 margin-top: 350rpx;
394 font-size: 30rpx; 394 font-size: 30rpx;
395 } 395 }
396 -.noorder{  
397 - width:270rpx;  
398 - height:270rpx;  
399 - font-size: 0  
400 -}  
401 -.noorder image{  
402 - width:100%;  
403 - height:100%;  
404 -}  
405 -.noordertitle{  
406 - color:#999999;  
407 - font-size: 26rpx;  
408 - text-align: center;  
409 - margin-top:20rpx  
410 -}  
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 "list": [] 39 "list": []
40 }, 40 },
41 "miniprogram": { 41 "miniprogram": {
42 - "current": 7, 42 + "current": 8,
43 "list": [ 43 "list": [
44 { 44 {
45 "id": -1, 45 "id": -1,
@@ -94,6 +94,13 @@ @@ -94,6 +94,13 @@
94 "id": -1, 94 "id": -1,
95 "name": "搜索结果", 95 "name": "搜索结果",
96 "pathName": "pages/homeindex/result/result", 96 "pathName": "pages/homeindex/result/result",
  97 + "query": "",
  98 + "scene": null
  99 + },
  100 + {
  101 + "id": -1,
  102 + "name": "评价",
  103 + "pathName": "pages/mine/eOrder/eOrder",
97 "scene": null 104 "scene": null
98 } 105 }
99 ] 106 ]