作者 韩昌

修改:评论

@@ -166,6 +166,12 @@ const getOrderPays = async () => { @@ -166,6 +166,12 @@ const getOrderPays = async () => {
166 proxy.$methods.pay(res) 166 proxy.$methods.pay(res)
167 canclePop() 167 canclePop()
168 console.log('getOrderPay', res) 168 console.log('getOrderPay', res)
  169 + if (defaultMode.value === 1) {
  170 + uni.showToast({ title: '支付成功', icon: 'none' })
  171 + setTimeout(() => {
  172 + uni.navigateBack()
  173 + }, 1500)
  174 + }
169 // 保存数据 175 // 保存数据
170 } catch (err) { 176 } catch (err) {
171 uni.showToast({ title: err, icon: 'none' }) 177 uni.showToast({ title: err, icon: 'none' })
@@ -32,7 +32,8 @@ @@ -32,7 +32,8 @@
32 <view class="topBox flexJ"> 32 <view class="topBox flexJ">
33 <view class="titles"> 33 <view class="titles">
34 <view class="title">特价专区</view> 34 <view class="title">特价专区</view>
35 - <text>Special price zone</text> 35 + <!-- <text>Special price zone</text> -->
  36 + <text>SPECIAL PRICE ZONE</text>
36 </view> 37 </view>
37 <view class="more flexA" @click="toBargainPriceMoreHandler"> 38 <view class="more flexA" @click="toBargainPriceMoreHandler">
38 更多 39 更多
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <image src="/static/indexIc/orangeRight.png" mode=""></image> 33 <image src="/static/indexIc/orangeRight.png" mode=""></image>
34 </view> 34 </view>
35 </view> 35 </view>
36 - <view v-if="commentList.length > 0"> 36 + <view v-if="commentList.length">
37 <comment :commentList="commentList"></comment> 37 <comment :commentList="commentList"></comment>
38 </view> 38 </view>
39 <!-- 暂无评论 --> 39 <!-- 暂无评论 -->
@@ -155,7 +155,7 @@ const getShopDetailes = async id => { @@ -155,7 +155,7 @@ const getShopDetailes = async id => {
155 moreSpec.value = res.specData //多规格 155 moreSpec.value = res.specData //多规格
156 shopType.value = res.detail.goodstatus //商品类型 156 shopType.value = res.detail.goodstatus //商品类型
157 value.value = res.cartNum 157 value.value = res.cartNum
158 - console.log('getShopDetaile', res) 158 + // console.log('评论数据', commentList.value)
159 // 保存数据 159 // 保存数据
160 } catch (err) { 160 } catch (err) {
161 uni.showToast({ title: err, icon: 'none' }) 161 uni.showToast({ title: err, icon: 'none' })
@@ -36,29 +36,39 @@ import { onShow, onLoad } from '@dcloudio/uni-app' @@ -36,29 +36,39 @@ import { onShow, onLoad } from '@dcloudio/uni-app'
36 import { getComment } from '@/api/' 36 import { getComment } from '@/api/'
37 const count = ref(5) //最高可选星星数 37 const count = ref(5) //最高可选星星数
38 const value = ref(0) //星星选中数 38 const value = ref(0) //星星选中数
39 -let photoList = reactive([]) //图片 39 +let photoList = reactive([]) // 显示图片
  40 +const imgList = ref([])
40 let desc = ref('') //评论 41 let desc = ref('') //评论
41 const { proxy } = getCurrentInstance() //获取当前实例 42 const { proxy } = getCurrentInstance() //获取当前实例
42 // 提交评论 43 // 提交评论
43 const submit = () => { 44 const submit = () => {
44 getComments() 45 getComments()
45 } 46 }
  47 +
  48 +const evaluateOrderId = ref(0) // 评价订单 id
  49 +
  50 +onLoad(e => {
  51 + evaluateOrderId.value = e.id
  52 +})
  53 +
46 // 上传图片 54 // 上传图片
47 const addPhoto = () => 55 const addPhoto = () =>
48 proxy.$methods.upload('http://health.shs.broing.cn/api/common/upload', imgUrl => { 56 proxy.$methods.upload('http://health.shs.broing.cn/api/common/upload', imgUrl => {
49 console.log('返回图片', imgUrl) 57 console.log('返回图片', imgUrl)
  58 + imgList.value.push(imgUrl.upImg)
50 photoList.push(imgUrl.avatar) 59 photoList.push(imgUrl.avatar)
51 }) 60 })
52 // 删除图片 61 // 删除图片
53 const delPhoto = index => { 62 const delPhoto = index => {
  63 + imgList.value.splice(index, 1)
54 photoList.splice(index, 1) 64 photoList.splice(index, 1)
55 } 65 }
56 // 写评论 66 // 写评论
57 const getComments = async () => { 67 const getComments = async () => {
58 try { 68 try {
59 let params = { 69 let params = {
60 - goods_id: 86, //integer 否 商品id  
61 - image: photoList.join(','), //string 是 图片 70 + id: evaluateOrderId.value,
  71 + image: imgList.value.join(','), //string 是 图片
62 content: desc.value //integer 否 内容 72 content: desc.value //integer 否 内容
63 } 73 }
64 const res = await getComment(params) 74 const res = await getComment(params)
@@ -36,21 +36,20 @@ @@ -36,21 +36,20 @@
36 </view> 36 </view>
37 </view> 37 </view>
38 <view class="classBox flexJ"> 38 <view class="classBox flexJ">
39 - <view class="items flexV" v-for="(item,index) in classList" :key="item.id" @click="orderStatus(index)"> 39 + <view class="items flexV" v-for="(item, index) in classList" :key="item.id" @click="orderStatus(index)">
40 <view class="badge"> 40 <view class="badge">
41 - <u-badge absolute :offset="[-4,-10]" color="#FFFFFF" bgColor="#F74637" max="99"  
42 - :value="item.num"></u-badge> 41 + <u-badge absolute :offset="[-4, -10]" color="#FFFFFF" bgColor="#F74637" max="99" :value="item.num"></u-badge>
43 <image :src="item.ic" mode=""></image> 42 <image :src="item.ic" mode=""></image>
44 </view> 43 </view>
45 - <text>{{item.name}}</text> 44 + <text>{{ item.name }}</text>
46 </view> 45 </view>
47 </view> 46 </view>
48 </view> 47 </view>
49 <view class="functionBox"> 48 <view class="functionBox">
50 - <view class="item flexJ" v-for="(item,index) in functionList" :key="item.id" @click="functionC(index)"> 49 + <view class="item flexJ" v-for="(item, index) in functionList" :key="item.id" @click="functionC(index)">
51 <view class="itemIc flexA"> 50 <view class="itemIc flexA">
52 <image :src="item.ic" mode=""></image> 51 <image :src="item.ic" mode=""></image>
53 - <text>{{item.name}}</text> 52 + <text>{{ item.name }}</text>
54 </view> 53 </view>
55 <image src="/static/mineIc/gayRight.png" mode=""></image> 54 <image src="/static/mineIc/gayRight.png" mode=""></image>
56 </view> 55 </view>
@@ -68,77 +67,81 @@ @@ -68,77 +67,81 @@
68 </template> 67 </template>
69 68
70 <script setup> 69 <script setup>
71 - import { ref,reactive} from 'vue'  
72 - import {onShow,onLoad} from '@dcloudio/uni-app'  
73 - import { getMine } from '@/api/'  
74 - onShow(()=>{ 70 +import { ref, reactive } from 'vue'
  71 +import { onShow, onLoad } from '@dcloudio/uni-app'
  72 +import { getMine } from '@/api/'
  73 +onShow(() => {
75 getMines() 74 getMines()
76 - })  
77 - let classList = reactive([{id:1,name:'待付款',num:0,ic:'/static/mineIc/obligation.png'},  
78 - {id:2,name:'待发货',num:0,ic:'/static/mineIc/shipped.png'},  
79 - {id:3,name:'待收货',num:0,ic:'/static/mineIc/received.png'},  
80 - {id:4,name:'待评价',num:0,ic:'/static/mineIc/evaluated.png'},  
81 - {id:5,name:'售后',num:0,ic:'/static/mineIc/afterSales.png'}])  
82 - let functionList = reactive([{id:1,name:'我的余额',ic:'/static/mineIc/balance.png'},  
83 - {id:2,name:'我的积分',ic:'/static/mineIc/collect.png'},  
84 - {id:3,name:'我的地址',ic:'/static/mineIc/addressBlack.png'}])  
85 - let info = ref({})  
86 - // 订单跳转  
87 - const orderStatus = (index)=> { 75 +})
  76 +let classList = reactive([
  77 + { id: 1, name: '待付款', num: 0, ic: '/static/mineIc/obligation.png' },
  78 + { id: 2, name: '待发货', num: 0, ic: '/static/mineIc/shipped.png' },
  79 + { id: 3, name: '待收货', num: 0, ic: '/static/mineIc/received.png' },
  80 + { id: 4, name: '待评价', num: 0, ic: '/static/mineIc/evaluated.png' },
  81 + { id: 5, name: '售后', num: 0, ic: '/static/mineIc/afterSales.png' }
  82 +])
  83 +let functionList = reactive([
  84 + { id: 1, name: '我的余额', ic: '/static/mineIc/balance.png' },
  85 + { id: 2, name: '我的积分', ic: '/static/mineIc/collect.png' },
  86 + { id: 3, name: '我的地址', ic: '/static/mineIc/addressBlack.png' }
  87 +])
  88 +let info = ref({})
  89 +// 订单跳转
  90 +const orderStatus = index => {
88 uni.navigateTo({ 91 uni.navigateTo({
89 - url:`/pages/mine/myOrder?status=${index==5 ? 0 : Number(index) + 1}` 92 + url: `/pages/mine/myOrder?status=${index == 5 ? 0 : Number(index) + 1}`
90 }) 93 })
91 - }  
92 - // 功能跳转  
93 - const functionC = (index)=> { 94 +}
  95 +// 功能跳转
  96 +const functionC = index => {
94 // uni.navigateTo({ 97 // uni.navigateTo({
95 // url:'/pages/mine/' + ( index < 2 ? 'myPoints' : index==1 ? 'myCollection' :'myAddress' ) 98 // url:'/pages/mine/' + ( index < 2 ? 'myPoints' : index==1 ? 'myCollection' :'myAddress' )
96 // }) 99 // })
97 - if(index < 2) { 100 + if (index < 2) {
98 uni.navigateTo({ 101 uni.navigateTo({
99 - url:`/pages/mine/myPoints?type=${index}` 102 + url: `/pages/mine/myPoints?type=${index}`
100 }) 103 })
101 } else { 104 } else {
102 uni.navigateTo({ 105 uni.navigateTo({
103 - url:'/pages/mine/myAddress' 106 + url: '/pages/mine/myAddress'
104 }) 107 })
105 } 108 }
106 - }  
107 - // 跳转充值中心  
108 - const toRecharg = ()=> { 109 +}
  110 +// 跳转充值中心
  111 +const toRecharg = () => {
109 uni.navigateTo({ 112 uni.navigateTo({
110 - url:'/pages/mine/recharge' 113 + url: '/pages/mine/recharge'
111 }) 114 })
112 - }  
113 - // 个人信息  
114 - const getMines = async ()=>{ 115 +}
  116 +// 个人信息
  117 +const getMines = async () => {
115 try { 118 try {
116 const res = await getMine() 119 const res = await getMine()
117 classList[0].num = res.dfk 120 classList[0].num = res.dfk
118 classList[1].num = res.dfh 121 classList[1].num = res.dfh
119 classList[2].num = res.dsh 122 classList[2].num = res.dsh
120 - classList[3].num = res.ywc 123 + classList[3].num = res.dpj
121 classList[4].num = res.yth 124 classList[4].num = res.yth
122 info.value = res.userInfo 125 info.value = res.userInfo
123 console.log('getMine', res) 126 console.log('getMine', res)
124 // 保存数据 127 // 保存数据
125 } catch (err) { 128 } catch (err) {
126 - uni.showToast({ title:err,icon:'none' }) 129 + uni.showToast({ title: err, icon: 'none' })
127 console.log('getMine', err) 130 console.log('getMine', err)
128 } 131 }
129 - } 132 +}
130 </script> 133 </script>
131 134
132 <style lang="scss"> 135 <style lang="scss">
133 - .u-icon__icon { 136 +.u-icon__icon {
134 display: none !important; 137 display: none !important;
135 - } 138 +}
136 139
137 - page {  
138 - background-color: #F6F8FA;  
139 - } 140 +page {
  141 + background-color: #f6f8fa;
  142 +}
140 143
141 - .topBgBox { 144 +.topBgBox {
142 width: 100%; 145 width: 100%;
143 height: 520rpx; 146 height: 520rpx;
144 padding: 202rpx 24rpx 26rpx; 147 padding: 202rpx 24rpx 26rpx;
@@ -209,9 +212,9 @@ @@ -209,9 +212,9 @@
209 } 212 }
210 } 213 }
211 } 214 }
212 - } 215 +}
213 216
214 - .mainBox { 217 +.mainBox {
215 width: 100%; 218 width: 100%;
216 padding: 0 24rpx; 219 padding: 0 24rpx;
217 box-sizing: border-box; 220 box-sizing: border-box;
@@ -244,7 +247,6 @@ @@ -244,7 +247,6 @@
244 } 247 }
245 248
246 .classBox { 249 .classBox {
247 -  
248 .items { 250 .items {
249 .badge { 251 .badge {
250 position: relative; 252 position: relative;
@@ -301,7 +303,6 @@ @@ -301,7 +303,6 @@
301 height: 104rpx; 303 height: 104rpx;
302 304
303 .service { 305 .service {
304 -  
305 image { 306 image {
306 margin-right: 24rpx; 307 margin-right: 24rpx;
307 width: 36rpx; 308 width: 36rpx;
@@ -330,5 +331,5 @@ @@ -330,5 +331,5 @@
330 } 331 }
331 } 332 }
332 } 333 }
333 - } 334 +}
334 </style> 335 </style>
@@ -7,17 +7,17 @@ @@ -7,17 +7,17 @@
7 <view class="topBox flexJ"> 7 <view class="topBox flexJ">
8 <view class="nameBox flexA"> 8 <view class="nameBox flexA">
9 <image src="/static/mineIc/redAddress.png" mode=""></image> 9 <image src="/static/mineIc/redAddress.png" mode=""></image>
10 - <view class="name">{{item.name}}</view>  
11 - <text>{{item.mobile}}</text> 10 + <view class="name">{{ item.name }}</view>
  11 + <text>{{ item.mobile }}</text>
12 </view> 12 </view>
13 <view class="rightIc flexA"> 13 <view class="rightIc flexA">
14 <image @click.stop="del(item.id)" src="/static/mineIc/delAddress.png" mode=""></image> 14 <image @click.stop="del(item.id)" src="/static/mineIc/delAddress.png" mode=""></image>
15 - <image @click.stop="newAdd(0,item.id)" src="/static/mineIc/edit.png" mode=""></image> 15 + <image @click.stop="newAdd(0, item.id)" src="/static/mineIc/edit.png" mode=""></image>
16 </view> 16 </view>
17 </view> 17 </view>
18 <view class="area"> 18 <view class="area">
19 - {{item.diqu}}  
20 - <test>{{item.address}}</test> 19 + {{ item.diqu }}
  20 + <test>{{ item.address }}</test>
21 </view> 21 </view>
22 </view> 22 </view>
23 </view> 23 </view>
@@ -33,32 +33,36 @@ @@ -33,32 +33,36 @@
33 </template> 33 </template>
34 34
35 <script setup> 35 <script setup>
36 - import { ref, reactive } from 'vue'  
37 - import {onShow,onLoad} from '@dcloudio/uni-app'  
38 - import { getAdressList,getDelAdres } from '@/api/'  
39 - onShow(()=>{ 36 +import { ref, reactive } from 'vue'
  37 +import { onShow, onLoad } from '@dcloudio/uni-app'
  38 +import { getAdressList, getDelAdres } from '@/api/'
  39 +
  40 +const addressList = ref([])
  41 +
  42 +onShow(() => {
  43 + addressList.value.splice(0)
40 getAdressLists() //地址列表 44 getAdressLists() //地址列表
41 - })  
42 - onLoad((e)=> { 45 +})
  46 +onLoad(e => {
43 isCheck.value = e.isCheck //是否选这地址 47 isCheck.value = e.isCheck //是否选这地址
44 - })  
45 - const addressList = ref([])  
46 - //type==0 修改地址 - 新建地址  
47 - const newAdd = (type,id)=> { 48 +})
  49 +//type==0 修改地址 - 新建地址
  50 +const newAdd = (type, id) => {
  51 + console.log(type, id, 'type id是什么')
48 uni.navigateTo({ 52 uni.navigateTo({
49 - url:`/pages/mine/newAddress?id=${type == 0 ? id :''}` 53 + url: `/pages/mine/newAddress?id=${type == 0 ? id : ''}`
50 }) 54 })
51 - }  
52 - let isCheck = ref(0)  
53 - // 选这地址  
54 - const checkAddress = (item)=> {  
55 - if(isCheck.value == 1) {  
56 - const pop = getCurrentPages().pop();  
57 - pop.$vm.getOpenerEventChannel().emit("steBack", item) 55 +}
  56 +let isCheck = ref(0)
  57 +// 选这地址
  58 +const checkAddress = item => {
  59 + if (isCheck.value == 1) {
  60 + const pop = getCurrentPages().pop()
  61 + pop.$vm.getOpenerEventChannel().emit('steBack', item)
58 uni.navigateBack() 62 uni.navigateBack()
59 } 63 }
60 - }  
61 - const del = (id)=> { 64 +}
  65 +const del = id => {
62 uni.showModal({ 66 uni.showModal({
63 title: '提示', 67 title: '提示',
64 content: '确认删除此地址吗', 68 content: '确认删除此地址吗',
@@ -67,38 +71,38 @@ @@ -67,38 +71,38 @@
67 getDelAdress(id) 71 getDelAdress(id)
68 } 72 }
69 } 73 }
70 - });  
71 - }  
72 - // 删除地址  
73 - const getDelAdress = async (ids)=> { 74 + })
  75 +}
  76 +// 删除地址
  77 +const getDelAdress = async ids => {
74 try { 78 try {
75 const res = await getDelAdres(ids) 79 const res = await getDelAdres(ids)
76 - uni.showToast({ title:'删除成功!',icon:'none' }) 80 + uni.showToast({ title: '删除成功!', icon: 'none' })
77 getAdressLists() 81 getAdressLists()
78 console.log('getDelAdres', res) 82 console.log('getDelAdres', res)
79 // 保存数据 83 // 保存数据
80 } catch (err) { 84 } catch (err) {
81 console.log('getDelAdres', err) 85 console.log('getDelAdres', err)
82 } 86 }
83 - }  
84 - // 获取地址列表  
85 - const getAdressLists = async ()=>{ 87 +}
  88 +// 获取地址列表
  89 +const getAdressLists = async () => {
86 try { 90 try {
87 const res = await getAdressList() 91 const res = await getAdressList()
88 addressList.value = res 92 addressList.value = res
89 - let defaultAdres = res.find(item=>item.is_default == 1) //默认地址  
90 - uni.setStorageSync('defaultAdres',defaultAdres) 93 + let defaultAdres = res.find(item => item.is_default == 1) //默认地址
  94 + uni.setStorageSync('defaultAdres', defaultAdres)
91 console.log('getAdressList', res) 95 console.log('getAdressList', res)
92 // 保存数据 96 // 保存数据
93 } catch (err) { 97 } catch (err) {
94 - uni.showToast({ title:err,icon:'none' }) 98 + uni.showToast({ title: err, icon: 'none' })
95 console.log('getAdressList', err) 99 console.log('getAdressList', err)
96 } 100 }
97 - } 101 +}
98 </script> 102 </script>
99 103
100 <style lang="scss"> 104 <style lang="scss">
101 - .mainBox { 105 +.mainBox {
102 background: #f8f9feff; 106 background: #f8f9feff;
103 107
104 .addressBox { 108 .addressBox {
@@ -149,9 +153,9 @@ @@ -149,9 +153,9 @@
149 } 153 }
150 } 154 }
151 } 155 }
152 - } 156 +}
153 157
154 - .addressNull { 158 +.addressNull {
155 margin-top: 266rpx; 159 margin-top: 266rpx;
156 160
157 image { 161 image {
@@ -163,9 +167,9 @@ @@ -163,9 +167,9 @@
163 color: #00000066; 167 color: #00000066;
164 font-size: 26rpx; 168 font-size: 26rpx;
165 } 169 }
166 - } 170 +}
167 171
168 - .btnBox { 172 +.btnBox {
169 position: fixed; 173 position: fixed;
170 left: 0; 174 left: 0;
171 bottom: 0; 175 bottom: 0;
@@ -183,5 +187,5 @@ @@ -183,5 +187,5 @@
183 margin: 0 auto; 187 margin: 0 auto;
184 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 188 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
185 } 189 }
186 - } 190 +}
187 </style> 191 </style>
@@ -77,7 +77,7 @@ onLoad(e => { @@ -77,7 +77,7 @@ onLoad(e => {
77 }) 77 })
78 onShow(() => { 78 onShow(() => {
79 console.log('订单状态', tabStatus.value) 79 console.log('订单状态', tabStatus.value)
80 - getOrderLists(tabStatus.value == 5 ? 21 : tabStatus.value * 1) 80 + getOrderLists(tabStatus.value == 5 ? 21 : tabStatus.value == 4 ? 5 : tabStatus.value * 1)
81 }) 81 })
82 let tabStatus = ref(0) //订单状态 82 let tabStatus = ref(0) //订单状态
83 let orderList = ref([]) //订单 83 let orderList = ref([]) //订单
@@ -94,7 +94,7 @@ const operateOrder = (item, type) => { @@ -94,7 +94,7 @@ const operateOrder = (item, type) => {
94 getReceipts() //确认收货 94 getReceipts() //确认收货
95 } else if (type == 4) { 95 } else if (type == 4) {
96 uni.navigateTo({ 96 uni.navigateTo({
97 - url: '/pages/mine/evaluate' 97 + url: `/pages/mine/evaluate?id=${item.id}`
98 }) 98 })
99 } else if (type == 5) { 99 } else if (type == 5) {
100 toDetaile(item.id) 100 toDetaile(item.id)
@@ -134,7 +134,7 @@ const click = e => { @@ -134,7 +134,7 @@ const click = e => {
134 console.log(e) 134 console.log(e)
135 getOrderLists(e.index == 5 ? 21 : e.index == 4 ? 5 : e.index) 135 getOrderLists(e.index == 5 ? 21 : e.index == 4 ? 5 : e.index)
136 } 136 }
137 -//订单状态: 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后 137 +// 订单状态: 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后
138 const getOrderLists = async status => { 138 const getOrderLists = async status => {
139 try { 139 try {
140 const res = await getOrderList(status) 140 const res = await getOrderList(status)
@@ -65,7 +65,7 @@ const getyues = async () => { @@ -65,7 +65,7 @@ const getyues = async () => {
65 const getMoneyDetails = async () => { 65 const getMoneyDetails = async () => {
66 try { 66 try {
67 const res = await getMoneyDetail() 67 const res = await getMoneyDetail()
68 - recordList.value = res.mingxi 68 + recordList.value = res
69 console.log('getMoneyDetail', res) 69 console.log('getMoneyDetail', res)
70 // 保存数据 70 // 保存数据
71 } catch (err) { 71 } catch (err) {
1 <template> 1 <template>
2 <!-- 新建地址 --> 2 <!-- 新建地址 -->
3 <view> 3 <view>
4 - <u-navbar placeholder :title=" editId=='' ? '新建地址' : '修改地址' " bgColor="#f7f8faff" :autoBack="true"></u-navbar> 4 + <u-navbar placeholder :title="editId == '' ? '新建地址' : '修改地址'" bgColor="#f7f8faff" :autoBack="true"></u-navbar>
5 <view class="formBox flexA" v-for="item in formList" :key="item.id"> 5 <view class="formBox flexA" v-for="item in formList" :key="item.id">
6 - <view class="formTitle">{{item.name}}</view>  
7 - <input type="text" v-model="item.model" placeholder-class="gay" :placeholder="item.place" v-if="item.type == 'input'">  
8 - <view class="checkBox flexJ" :class="item.model!= ''? 'black' :'' " v-else @click="showPop">  
9 - <text>{{item.model == '' ? '选择地区' : item.model}}</text> 6 + <view class="formTitle">{{ item.name }}</view>
  7 + <input type="text" v-model="item.model" placeholder-class="gay" :placeholder="item.place" v-if="item.type == 'input'" />
  8 + <view class="checkBox flexJ" :class="item.model != '' ? 'black' : ''" v-else @click="showPop">
  9 + <text>{{ item.model == '' ? '选择地区' : item.model }}</text>
10 <image src="/static/mineIc/rightGayS.png" mode=""></image> 10 <image src="/static/mineIc/rightGayS.png" mode=""></image>
11 </view> 11 </view>
12 </view> 12 </view>
@@ -22,41 +22,43 @@ @@ -22,41 +22,43 @@
22 </template> 22 </template>
23 23
24 <script setup> 24 <script setup>
25 - import { ref, reactive } from 'vue'  
26 - import {onShow,onLoad} from '@dcloudio/uni-app'  
27 - import chekcArea from '@/componets/areaCheck.vue'  
28 - import { getEdit,getadresDetail } from '@/api/'  
29 - onLoad((e)=> { 25 +import { ref, reactive } from 'vue'
  26 +import { onShow, onLoad } from '@dcloudio/uni-app'
  27 +import chekcArea from '@/componets/areaCheck.vue'
  28 +import { getEdit, getadresDetail } from '@/api/'
  29 +onLoad(e => {
30 editId.value = e.id //修改地址id 30 editId.value = e.id //修改地址id
31 - console.log('修改地址id',e.id)  
32 - if(e.id) { 31 + console.log('修改地址id', e.id)
  32 + if (e.id) {
33 getadresDetails(e.id) //地址详情 33 getadresDetails(e.id) //地址详情
34 } 34 }
35 - })  
36 - const formList = reactive([{id:1,name:'收货人',model:'',type:'input',place:'姓名'},  
37 - {id:2,name:'手机号',model:'',type:'input',place:'手机号码'},  
38 - {id:3,name:'所在地区',model:'',type:'check',place:'选这地区'},  
39 - {id:4,name:'详细地址',model:'',type:'input',place:'请填写详细地址'}])  
40 - let shows = ref(false)  
41 - const showPop = ()=> { 35 +})
  36 +const formList = reactive([
  37 + { id: 1, name: '收货人', model: '', type: 'input', place: '姓名' },
  38 + { id: 2, name: '手机号', model: '', type: 'input', place: '手机号码' },
  39 + { id: 3, name: '所在地区', model: '', type: 'check', place: '选这地区' },
  40 + { id: 4, name: '详细地址', model: '', type: 'input', place: '请填写详细地址' }
  41 +])
  42 +let shows = ref(false)
  43 +const showPop = () => {
42 shows.value = true 44 shows.value = true
43 - }  
44 - const close = (data)=> { 45 +}
  46 +const close = data => {
45 shows.value = false 47 shows.value = false
46 - }  
47 - const popShow = (data)=> { 48 +}
  49 +const popShow = data => {
48 shows.value = false 50 shows.value = false
49 formList[2].model = data.join('-') 51 formList[2].model = data.join('-')
50 - console.log('省市区数据',data)  
51 - }  
52 - const isDefault = ref(false)  
53 - // 默认地址  
54 - const change = (e)=> {  
55 - console.log('默认地址', e); 52 + console.log('省市区数据', data)
  53 +}
  54 +const isDefault = ref(false)
  55 +// 默认地址
  56 +const change = e => {
  57 + console.log('默认地址', e)
56 isDefault.value = e 58 isDefault.value = e
57 - }  
58 - // 地址详情  
59 - const getadresDetails = async (id)=>{ 59 +}
  60 +// 地址详情
  61 +const getadresDetails = async id => {
60 try { 62 try {
61 const res = await getadresDetail(id) 63 const res = await getadresDetail(id)
62 formList[0].model = res.name 64 formList[0].model = res.name
@@ -67,42 +69,42 @@ @@ -67,42 +69,42 @@
67 console.log('getadresDetail', res) 69 console.log('getadresDetail', res)
68 // 保存数据 70 // 保存数据
69 } catch (err) { 71 } catch (err) {
70 - uni.showToast({ title:err,icon:'none' }) 72 + uni.showToast({ title: err, icon: 'none' })
71 console.log('getadresDetail', err) 73 console.log('getadresDetail', err)
72 } 74 }
73 - }  
74 - let editId = ref('') //修改地址的id  
75 - // 修改 / 新建地址  
76 - const getEdits = async ()=>{ 75 +}
  76 +let editId = ref('') //修改地址的id
  77 +// 修改 / 新建地址
  78 +const getEdits = async () => {
77 try { 79 try {
78 let params = { 80 let params = {
79 - id:editId.value, //integer 否 地址ID—修改时必须  
80 - name:formList[0].model, //string 是 姓名  
81 - mobile:formList[1].model, //string 是 联系方式  
82 - diqu:formList[2].model, //string 是 所在地区  
83 - is_default:isDefault.value ? 1 : 0, //string 是 是否为默认地址1是  
84 - address:formList[3].model, //string 是 详细地址 81 + id: editId.value, //integer 否 地址ID—修改时必须
  82 + name: formList[0].model, //string 是 姓名
  83 + mobile: formList[1].model, //string 是 联系方式
  84 + diqu: formList[2].model, //string 是 所在地区
  85 + is_default: isDefault.value ? 1 : 0, //string 是 是否为默认地址1是
  86 + address: formList[3].model //string 是 详细地址
85 } 87 }
86 const res = await getEdit(params) 88 const res = await getEdit(params)
87 - uni.showToast({ title: editId.value == '' ? '新建地址成功' : '已修改',icon:'none' })  
88 - setTimeout(()=> { 89 + uni.showToast({ title: editId.value == '' ? '新建地址成功' : '已修改', icon: 'none' })
  90 + setTimeout(() => {
89 uni.navigateBack() 91 uni.navigateBack()
90 - },1000) 92 + }, 1000)
91 console.log('getEdit', res) 93 console.log('getEdit', res)
92 // 保存数据 94 // 保存数据
93 } catch (err) { 95 } catch (err) {
94 - uni.showToast({ title:err,icon:'none' }) 96 + uni.showToast({ title: err, icon: 'none' })
95 console.log('getEdit', err) 97 console.log('getEdit', err)
96 } 98 }
97 - } 99 +}
98 </script> 100 </script>
99 101
100 <style lang="scss"> 102 <style lang="scss">
101 - page { 103 +page {
102 background: #f7f8faff; 104 background: #f7f8faff;
103 - } 105 +}
104 106
105 - .formBox { 107 +.formBox {
106 padding: 32rpx; 108 padding: 32rpx;
107 background: #fff; 109 background: #fff;
108 110
@@ -144,9 +146,9 @@ @@ -144,9 +146,9 @@
144 font-size: 28rpx; 146 font-size: 28rpx;
145 font-weight: 700; 147 font-weight: 700;
146 } 148 }
147 - } 149 +}
148 150
149 - .btn { 151 +.btn {
150 width: 686rpx; 152 width: 686rpx;
151 height: 88rpx; 153 height: 88rpx;
152 border-radius: 12rpx; 154 border-radius: 12rpx;
@@ -155,5 +157,5 @@ @@ -155,5 +157,5 @@
155 font-weight: 700; 157 font-weight: 700;
156 margin: 188rpx auto 0; 158 margin: 188rpx auto 0;
157 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 159 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
158 - } 160 +}
159 </style> 161 </style>
@@ -46,7 +46,15 @@ @@ -46,7 +46,15 @@
46 <view v-if="btnType == 1 || btnType == 3" class="red flexC" @click="btns(1)">{{ btnType == 1 ? '立即支付' : '确认收货' }}</view> 46 <view v-if="btnType == 1 || btnType == 3" class="red flexC" @click="btns(1)">{{ btnType == 1 ? '立即支付' : '确认收货' }}</view>
47 </view> 47 </view>
48 <!-- 选择支付方式 --> 48 <!-- 选择支付方式 -->
49 - <payMode @canclePop="modeShow = false" :orderId="orderId" :isOrderPay="true" :totalPrice="orderList.total_price" :modeShow="modeShow"></payMode> 49 + <payMode
  50 + @canclePop="modeShow = false"
  51 + :balance="balance"
  52 + :orderId="orderId"
  53 + :isOrderPay="true"
  54 + :totalPrice="orderList.total_price"
  55 + :modeShow="modeShow"
  56 + ></payMode>
  57 +
50 <!-- 提示弹窗 --> 58 <!-- 提示弹窗 -->
51 <tipPops @pointsBtns="pointsBtns" :integral="integral" :tipType="tipType" :tipShow="tipShow"></tipPops> 59 <tipPops @pointsBtns="pointsBtns" :integral="integral" :tipType="tipType" :tipShow="tipShow"></tipPops>
52 </view> 60 </view>
@@ -59,7 +67,7 @@ import shopAddres from '@/componets/address.vue' @@ -59,7 +67,7 @@ import shopAddres from '@/componets/address.vue'
59 import orderShops from '@/componets/orderShop.vue' 67 import orderShops from '@/componets/orderShop.vue'
60 import tipPops from '@/componets/tipPop.vue' 68 import tipPops from '@/componets/tipPop.vue'
61 import PayMode from '@/componets/checkPayMode.vue' 69 import PayMode from '@/componets/checkPayMode.vue'
62 -import { getOrderdetail, getCancleOrder, getRefund, getReceipt } from '@/api/' 70 +import { getOrderdetail, getCancleOrder, getRefund, getReceipt, getyue } from '@/api/'
63 onLoad(e => { 71 onLoad(e => {
64 console.log(e.id) 72 console.log(e.id)
65 orderId.value = e.id 73 orderId.value = e.id
@@ -72,6 +80,7 @@ let orderId = ref('') //订单id @@ -72,6 +80,7 @@ let orderId = ref('') //订单id
72 let btnType = ref(1) //按钮状态 80 let btnType = ref(1) //按钮状态
73 let integral = ref(0) //积分 81 let integral = ref(0) //积分
74 let tipType = ref(1) //1取消支付 2取消订单 82 let tipType = ref(1) //1取消支付 2取消订单
  83 +let balance = ref(0) //余额
75 let placeOrder = ref([ 84 let placeOrder = ref([
76 { id: 1, name: '订单编号', text: '1212' }, 85 { id: 1, name: '订单编号', text: '1212' },
77 { id: 2, name: '支付方式', text: '1212' }, 86 { id: 2, name: '支付方式', text: '1212' },
@@ -79,6 +88,21 @@ let placeOrder = ref([ @@ -79,6 +88,21 @@ let placeOrder = ref([
79 { id: 4, name: '快递编号', text: '1212' } 88 { id: 4, name: '快递编号', text: '1212' }
80 ]) 89 ])
81 90
  91 +onShow(() => {
  92 + getyues()
  93 +})
  94 +
  95 +const getyues = async () => {
  96 + try {
  97 + const res = await getyue()
  98 + balance.value = res.money
  99 + // 保存数据
  100 + } catch (err) {
  101 + uni.showToast({ title: err, icon: 'none' })
  102 + console.log('getyue', err)
  103 + }
  104 +}
  105 +
82 const leftClickHandler = () => { 106 const leftClickHandler = () => {
83 // const pages = getCurrentPages() 107 // const pages = getCurrentPages()
84 // const page = pages[pages.length - 2] 108 // const page = pages[pages.length - 2]
@@ -134,6 +134,12 @@ const _sfc_main = { @@ -134,6 +134,12 @@ const _sfc_main = {
134 proxy.$methods.pay(res); 134 proxy.$methods.pay(res);
135 canclePop(); 135 canclePop();
136 console.log("getOrderPay", res); 136 console.log("getOrderPay", res);
  137 + if (defaultMode.value === 1) {
  138 + common_vendor.index.showToast({ title: "\u652F\u4ED8\u6210\u529F", icon: "none" });
  139 + setTimeout(() => {
  140 + common_vendor.index.navigateBack();
  141 + }, 1500);
  142 + }
137 } catch (err) { 143 } catch (err) {
138 common_vendor.index.showToast({ title: err, icon: "none" }); 144 common_vendor.index.showToast({ title: err, icon: "none" });
139 console.log("getOrderPay", err); 145 console.log("getOrderPay", err);
1 -<view><u-navbar wx:if="{{a}}" u-s="{{['left']}}" u-i="0a7f8b7d-0" bind:__l="__l" u-p="{{a}}"><view class="u-nav-slot" slot="left">大健康商城</view></u-navbar><view class="topBgBox"><image src="/static/indexIc/topBg.png" mode=""></image><view class="searchBox"><search u-i="0a7f8b7d-1" bind:__l="__l"></search><view class="vip flexC" bindtap="{{b}}"><image src="/static/indexIc/vip.png" mode=""></image></view></view></view><view class="classBox"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="itemClss flexV" bindtap="{{item.d}}"><image src="{{item.a}}" mode=""></image><text>{{item.b}}</text></view><view class="itemClss flexV" bindtap="{{d}}"><image src="/static/indexIc/classIc.png" mode=""></image><text>更多</text></view></view><view class="specialOffer"><image class="pinkBg" src="/static/indexIc/pinkBg.png" mode=""></image><view class="special"><view class="topBox flexJ"><view class="titles"><view class="title">特价专区</view><text>Special price zone</text></view><view class="more flexA" bindtap="{{e}}"> 更多 <image src="/static/indexIc/orangeRight.png" mode=""></image></view></view><view class="shop"><shops wx:if="{{f}}" u-i="0a7f8b7d-2" bind:__l="__l" u-p="{{f}}"></shops></view></view></view><view class="recom flexA"><image src="/static/indexIc/recommendIc.png" mode=""></image> 推荐商品 <text>限时限量好物推荐</text></view><view class="recomBox"><shops wx:if="{{g}}" u-i="0a7f8b7d-3" bind:__l="__l" u-p="{{g}}"></shops></view></view>  
  1 +<view><u-navbar wx:if="{{a}}" u-s="{{['left']}}" u-i="0a7f8b7d-0" bind:__l="__l" u-p="{{a}}"><view class="u-nav-slot" slot="left">大健康商城</view></u-navbar><view class="topBgBox"><image src="/static/indexIc/topBg.png" mode=""></image><view class="searchBox"><search u-i="0a7f8b7d-1" bind:__l="__l"></search><view class="vip flexC" bindtap="{{b}}"><image src="/static/indexIc/vip.png" mode=""></image></view></view></view><view class="classBox"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="itemClss flexV" bindtap="{{item.d}}"><image src="{{item.a}}" mode=""></image><text>{{item.b}}</text></view><view class="itemClss flexV" bindtap="{{d}}"><image src="/static/indexIc/classIc.png" mode=""></image><text>更多</text></view></view><view class="specialOffer"><image class="pinkBg" src="/static/indexIc/pinkBg.png" mode=""></image><view class="special"><view class="topBox flexJ"><view class="titles"><view class="title">特价专区</view><text>SPECIAL PRICE ZONE</text></view><view class="more flexA" bindtap="{{e}}"> 更多 <image src="/static/indexIc/orangeRight.png" mode=""></image></view></view><view class="shop"><shops wx:if="{{f}}" u-i="0a7f8b7d-2" bind:__l="__l" u-p="{{f}}"></shops></view></view></view><view class="recom flexA"><image src="/static/indexIc/recommendIc.png" mode=""></image> 推荐商品 <text>限时限量好物推荐</text></view><view class="recomBox"><shops wx:if="{{g}}" u-i="0a7f8b7d-3" bind:__l="__l" u-p="{{g}}"></shops></view></view>
@@ -77,7 +77,6 @@ const _sfc_main = { @@ -77,7 +77,6 @@ const _sfc_main = {
77 moreSpec.value = res.specData; 77 moreSpec.value = res.specData;
78 shopType.value = res.detail.goodstatus; 78 shopType.value = res.detail.goodstatus;
79 value.value = res.cartNum; 79 value.value = res.cartNum;
80 - console.log("getShopDetaile", res);  
81 } catch (err) { 80 } catch (err) {
82 common_vendor.index.showToast({ title: err, icon: "none" }); 81 common_vendor.index.showToast({ title: err, icon: "none" });
83 console.log("", err); 82 console.log("", err);
@@ -111,8 +110,8 @@ const _sfc_main = { @@ -111,8 +110,8 @@ const _sfc_main = {
111 }, common_vendor.unref(commentList).length > 0 ? { 110 }, common_vendor.unref(commentList).length > 0 ? {
112 k: common_vendor.o(seeAll) 111 k: common_vendor.o(seeAll)
113 } : {}, { 112 } : {}, {
114 - l: common_vendor.unref(commentList).length > 0  
115 - }, common_vendor.unref(commentList).length > 0 ? { 113 + l: common_vendor.unref(commentList).length
  114 + }, common_vendor.unref(commentList).length ? {
116 m: common_vendor.p({ 115 m: common_vendor.p({
117 commentList: common_vendor.unref(commentList) 116 commentList: common_vendor.unref(commentList)
118 }) 117 })
@@ -17,23 +17,30 @@ const _sfc_main = { @@ -17,23 +17,30 @@ const _sfc_main = {
17 const count = common_vendor.ref(5); 17 const count = common_vendor.ref(5);
18 const value = common_vendor.ref(0); 18 const value = common_vendor.ref(0);
19 let photoList = common_vendor.reactive([]); 19 let photoList = common_vendor.reactive([]);
  20 + const imgList = common_vendor.ref([]);
20 let desc = common_vendor.ref(""); 21 let desc = common_vendor.ref("");
21 const { proxy } = common_vendor.getCurrentInstance(); 22 const { proxy } = common_vendor.getCurrentInstance();
22 const submit = () => { 23 const submit = () => {
23 getComments(); 24 getComments();
24 }; 25 };
  26 + const evaluateOrderId = common_vendor.ref(0);
  27 + common_vendor.onLoad((e) => {
  28 + evaluateOrderId.value = e.id;
  29 + });
25 const addPhoto = () => proxy.$methods.upload("http://health.shs.broing.cn/api/common/upload", (imgUrl) => { 30 const addPhoto = () => proxy.$methods.upload("http://health.shs.broing.cn/api/common/upload", (imgUrl) => {
26 console.log("\u8FD4\u56DE\u56FE\u7247", imgUrl); 31 console.log("\u8FD4\u56DE\u56FE\u7247", imgUrl);
  32 + imgList.value.push(imgUrl.upImg);
27 photoList.push(imgUrl.avatar); 33 photoList.push(imgUrl.avatar);
28 }); 34 });
29 const delPhoto = (index) => { 35 const delPhoto = (index) => {
  36 + imgList.value.splice(index, 1);
30 photoList.splice(index, 1); 37 photoList.splice(index, 1);
31 }; 38 };
32 const getComments = async () => { 39 const getComments = async () => {
33 try { 40 try {
34 let params = { 41 let params = {
35 - goods_id: 86,  
36 - image: photoList.join(","), 42 + id: evaluateOrderId.value,
  43 + image: imgList.value.join(","),
37 content: desc.value 44 content: desc.value
38 }; 45 };
39 const res = await api_index.getComment(params); 46 const res = await api_index.getComment(params);
@@ -57,7 +57,7 @@ const _sfc_main = { @@ -57,7 +57,7 @@ const _sfc_main = {
57 classList[0].num = res.dfk; 57 classList[0].num = res.dfk;
58 classList[1].num = res.dfh; 58 classList[1].num = res.dfh;
59 classList[2].num = res.dsh; 59 classList[2].num = res.dsh;
60 - classList[3].num = res.ywc; 60 + classList[3].num = res.dpj;
61 classList[4].num = res.yth; 61 classList[4].num = res.yth;
62 info.value = res.userInfo; 62 info.value = res.userInfo;
63 console.log("getMine", res); 63 console.log("getMine", res);
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 display: none !important; 28 display: none !important;
29 } 29 }
30 page { 30 page {
31 - background-color: #F6F8FA; 31 + background-color: #f6f8fa;
32 } 32 }
33 .topBgBox { 33 .topBgBox {
34 width: 100%; 34 width: 100%;
@@ -13,14 +13,16 @@ if (!Math) { @@ -13,14 +13,16 @@ if (!Math) {
13 } 13 }
14 const _sfc_main = { 14 const _sfc_main = {
15 setup(__props) { 15 setup(__props) {
  16 + const addressList = common_vendor.ref([]);
16 common_vendor.onShow(() => { 17 common_vendor.onShow(() => {
  18 + addressList.value.splice(0);
17 getAdressLists(); 19 getAdressLists();
18 }); 20 });
19 common_vendor.onLoad((e) => { 21 common_vendor.onLoad((e) => {
20 isCheck.value = e.isCheck; 22 isCheck.value = e.isCheck;
21 }); 23 });
22 - const addressList = common_vendor.ref([]);  
23 const newAdd = (type, id) => { 24 const newAdd = (type, id) => {
  25 + console.log(type, id, "type id\u662F\u4EC0\u4E48");
24 common_vendor.index.navigateTo({ 26 common_vendor.index.navigateTo({
25 url: `/pages/mine/newAddress?id=${type == 0 ? id : ""}` 27 url: `/pages/mine/newAddress?id=${type == 0 ? id : ""}`
26 }); 28 });
@@ -24,7 +24,7 @@ const _sfc_main = { @@ -24,7 +24,7 @@ const _sfc_main = {
24 }); 24 });
25 common_vendor.onShow(() => { 25 common_vendor.onShow(() => {
26 console.log("\u8BA2\u5355\u72B6\u6001", tabStatus.value); 26 console.log("\u8BA2\u5355\u72B6\u6001", tabStatus.value);
27 - getOrderLists(tabStatus.value == 5 ? 21 : tabStatus.value * 1); 27 + getOrderLists(tabStatus.value == 5 ? 21 : tabStatus.value == 4 ? 5 : tabStatus.value * 1);
28 }); 28 });
29 let tabStatus = common_vendor.ref(0); 29 let tabStatus = common_vendor.ref(0);
30 let orderList = common_vendor.ref([]); 30 let orderList = common_vendor.ref([]);
@@ -40,7 +40,7 @@ const _sfc_main = { @@ -40,7 +40,7 @@ const _sfc_main = {
40 getReceipts(); 40 getReceipts();
41 } else if (type == 4) { 41 } else if (type == 4) {
42 common_vendor.index.navigateTo({ 42 common_vendor.index.navigateTo({
43 - url: "/pages/mine/evaluate" 43 + url: `/pages/mine/evaluate?id=${item.id}`
44 }); 44 });
45 } else if (type == 5) { 45 } else if (type == 5) {
46 toDetaile(item.id); 46 toDetaile(item.id);
@@ -44,7 +44,7 @@ const _sfc_main = { @@ -44,7 +44,7 @@ const _sfc_main = {
44 const getMoneyDetails = async () => { 44 const getMoneyDetails = async () => {
45 try { 45 try {
46 const res = await api_index.getMoneyDetail(); 46 const res = await api_index.getMoneyDetail();
47 - recordList.value = res.mingxi; 47 + recordList.value = res;
48 console.log("getMoneyDetail", res); 48 console.log("getMoneyDetail", res);
49 } catch (err) { 49 } catch (err) {
50 common_vendor.index.showToast({ title: err, icon: "none" }); 50 common_vendor.index.showToast({ title: err, icon: "none" });
1 -<view><u-navbar wx:if="{{a}}" u-i="d543e3d0-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:for="{{b}}" wx:for-item="item" wx:key="i" class="formBox flexA"><view class="formTitle">{{item.a}}</view><input wx:if="{{item.b}}" type="text" placeholder-class="gay" placeholder="{{item.c}}" value="{{item.d}}" bindinput="{{item.e}}"></input><view wx:else class="{{['checkBox', 'flexJ', item.g]}}" bindtap="{{item.h}}"><text>{{item.f}}</text><image src="/static/mineIc/rightGayS.png" mode=""></image></view></view><view class="formBox flexJ"><view class="defaults">设置为默认地址</view><view class="switch"><u-switch wx:if="{{e}}" bindchange="{{c}}" u-i="d543e3d0-1" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></u-switch></view></view><view class="btn flexC" bindtap="{{f}}">保存</view><chekc-area wx:if="{{i}}" bindclose="{{g}}" bindpopShow="{{h}}" u-i="d543e3d0-2" bind:__l="__l" u-p="{{i}}"></chekc-area></view>  
  1 +<view><u-navbar wx:if="{{a}}" u-i="d543e3d0-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:for="{{b}}" wx:for-item="item" wx:key="i" class="formBox flexA"><view class="formTitle">{{item.a}}</view><input wx:if="{{item.b}}" type="text" placeholder-class="gay" placeholder="{{item.c}}" value="{{item.d}}" bindinput="{{item.e}}"/><view wx:else class="{{['checkBox', 'flexJ', item.g]}}" bindtap="{{item.h}}"><text>{{item.f}}</text><image src="/static/mineIc/rightGayS.png" mode=""></image></view></view><view class="formBox flexJ"><view class="defaults">设置为默认地址</view><view class="switch"><u-switch wx:if="{{e}}" bindchange="{{c}}" u-i="d543e3d0-1" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></u-switch></view></view><view class="btn flexC" bindtap="{{f}}">保存</view><chekc-area wx:if="{{i}}" bindclose="{{g}}" bindpopShow="{{h}}" u-i="d543e3d0-2" bind:__l="__l" u-p="{{i}}"></chekc-area></view>
@@ -28,12 +28,25 @@ const _sfc_main = { @@ -28,12 +28,25 @@ const _sfc_main = {
28 let btnType = common_vendor.ref(1); 28 let btnType = common_vendor.ref(1);
29 let integral = common_vendor.ref(0); 29 let integral = common_vendor.ref(0);
30 let tipType = common_vendor.ref(1); 30 let tipType = common_vendor.ref(1);
  31 + let balance = common_vendor.ref(0);
31 let placeOrder = common_vendor.ref([ 32 let placeOrder = common_vendor.ref([
32 { id: 1, name: "\u8BA2\u5355\u7F16\u53F7", text: "1212" }, 33 { id: 1, name: "\u8BA2\u5355\u7F16\u53F7", text: "1212" },
33 { id: 2, name: "\u652F\u4ED8\u65B9\u5F0F", text: "1212" }, 34 { id: 2, name: "\u652F\u4ED8\u65B9\u5F0F", text: "1212" },
34 { id: 3, name: "\u4E0B\u5355\u65F6\u95F4", text: "1212" }, 35 { id: 3, name: "\u4E0B\u5355\u65F6\u95F4", text: "1212" },
35 { id: 4, name: "\u5FEB\u9012\u7F16\u53F7", text: "1212" } 36 { id: 4, name: "\u5FEB\u9012\u7F16\u53F7", text: "1212" }
36 ]); 37 ]);
  38 + common_vendor.onShow(() => {
  39 + getyues();
  40 + });
  41 + const getyues = async () => {
  42 + try {
  43 + const res = await api_index.getyue();
  44 + balance.value = res.money;
  45 + } catch (err) {
  46 + common_vendor.index.showToast({ title: err, icon: "none" });
  47 + console.log("getyue", err);
  48 + }
  49 + };
37 const leftClickHandler = () => { 50 const leftClickHandler = () => {
38 common_vendor.index.navigateBack({ delta: 1 }); 51 common_vendor.index.navigateBack({ delta: 1 });
39 }; 52 };
@@ -155,6 +168,7 @@ const _sfc_main = { @@ -155,6 +168,7 @@ const _sfc_main = {
155 } : {}, { 168 } : {}, {
156 s: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false), 169 s: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false),
157 t: common_vendor.p({ 170 t: common_vendor.p({
  171 + balance: common_vendor.unref(balance),
158 orderId: common_vendor.unref(orderId), 172 orderId: common_vendor.unref(orderId),
159 isOrderPay: true, 173 isOrderPay: true,
160 totalPrice: common_vendor.unref(orderList).total_price, 174 totalPrice: common_vendor.unref(orderList).total_price,