作者 韩昌

10.47修改bug

正在显示 49 个修改的文件 包含 902 行增加705 行删除
1 export default { 1 export default {
2 // 上传图片 2 // 上传图片
3 - upload (url, callBack) { 3 + upload(url, callBack) {
4 let arr = {} 4 let arr = {}
5 uni.chooseImage({ 5 uni.chooseImage({
6 success: chooseImageRes => { 6 success: chooseImageRes => {
@@ -26,34 +26,34 @@ export default { @@ -26,34 +26,34 @@ export default {
26 }, 26 },
27 //支付 27 //支付
28 pay(res) { 28 pay(res) {
29 - if(res.appId) { 29 + if (res.appId) {
30 uni.requestPayment({ 30 uni.requestPayment({
31 - "provider": "wxpay", 31 + provider: 'wxpay',
32 timeStamp: res.timeStamp, // 时间戳(单位:秒) 32 timeStamp: res.timeStamp, // 时间戳(单位:秒)
33 nonceStr: res.nonceStr, // 随机字符串1 33 nonceStr: res.nonceStr, // 随机字符串1
34 package: res.package, // 固定值 34 package: res.package, // 固定值
35 signType: res.signType, // 签名,这里用的 MD5/RSA 签名 35 signType: res.signType, // 签名,这里用的 MD5/RSA 签名
36 appid: res.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致1 36 appid: res.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致1
37 - paySign:res.paySign, 37 + paySign: res.paySign,
38 success(res) { 38 success(res) {
39 console.log('支付成功') 39 console.log('支付成功')
40 - uni.showToast({ title: '支付成功~'})  
41 - setTimeout(()=>{ 40 + uni.showToast({ title: '支付成功~' })
  41 + setTimeout(() => {
42 uni.navigateBack() 42 uni.navigateBack()
43 - },1500) 43 + }, 1500)
44 }, 44 },
45 fail(e) { 45 fail(e) {
46 - console.log('支付失败',e)  
47 - uni.showToast({ title: '支付取消~', icon: "none", }) 46 + console.log('支付失败', e)
  47 + uni.showToast({ title: '支付取消~', icon: 'none' })
48 } 48 }
49 }) 49 })
50 } 50 }
51 }, 51 },
52 // 提示,一秒后返回上一页 52 // 提示,一秒后返回上一页
53 showTN(title) { 53 showTN(title) {
54 - uni.showToast({title: title,icon:"none"})  
55 - setTimeout(()=>{ 54 + uni.showToast({ title: title, icon: 'none' })
  55 + setTimeout(() => {
56 uni.navigateBack() 56 uni.navigateBack()
57 - },1000) 57 + }, 1000)
58 } 58 }
59 } 59 }
@@ -4,12 +4,12 @@ @@ -4,12 +4,12 @@
4 <u-popup :show="modeShow" bgColor="#F6F8FA" :closeable="true" round="12" @close="canclePop"> 4 <u-popup :show="modeShow" bgColor="#F6F8FA" :closeable="true" round="12" @close="canclePop">
5 <view class="popBox iosAuto"> 5 <view class="popBox iosAuto">
6 <view class="title">选择支付方式</view> 6 <view class="title">选择支付方式</view>
7 - <view class="popModeBox flexJ" v-for="(item,index) in payMode" :key="item.id" @click="checkPay(index)"> 7 + <view class="popModeBox flexJ" v-for="(item, index) in payMode" :key="item.id" @click="checkPay(index)">
8 <view class="mode flexA"> 8 <view class="mode flexA">
9 <image :src="item.modeUrl" mode=""></image> 9 <image :src="item.modeUrl" mode=""></image>
10 - {{item.name}} 10 + {{ item.name }}
11 </view> 11 </view>
12 - <image v-if="item.shows" :src=" defaultMode == index ? '/static/shopCarIc/modeCheck.png': '/static/shopCarIc/checks.png'" mode=""></image> 12 + <image v-if="item.shows" :src="defaultMode == index ? '/static/shopCarIc/modeCheck.png' : '/static/shopCarIc/checks.png'" mode=""></image>
13 <view class="insufficient flexA" v-else @click="goRecharge"> 13 <view class="insufficient flexA" v-else @click="goRecharge">
14 余额不足 14 余额不足
15 <view class="go flexA"> 15 <view class="go flexA">
@@ -25,127 +25,129 @@ @@ -25,127 +25,129 @@
25 </template> 25 </template>
26 26
27 <script setup> 27 <script setup>
28 - import { ref,reactive,onMounted,getCurrentInstance,defineEmits,watchEffect } from 'vue'  
29 - import {onShow,onLoad} from '@dcloudio/uni-app'  
30 - import { getPay,getOrderPay,getCarPay } from '@/api/'  
31 - const props = defineProps({  
32 - payParams:{  
33 - type:Object,  
34 - default:{} 28 +import { ref, reactive, onMounted, getCurrentInstance, defineEmits, watchEffect } from 'vue'
  29 +import { onShow, onLoad } from '@dcloudio/uni-app'
  30 +import { getPay, getOrderPay, getCarPay } from '@/api/'
  31 +const props = defineProps({
  32 + payParams: {
  33 + type: Object,
  34 + default: {}
35 }, 35 },
36 - modeShow:{  
37 - type:Boolean,  
38 - default:false 36 + modeShow: {
  37 + type: Boolean,
  38 + default: false
39 }, 39 },
40 - adressId:{  
41 - type:String,  
42 - default:'' 40 + adressId: {
  41 + type: String,
  42 + default: ''
43 }, 43 },
44 // 商品总价 44 // 商品总价
45 - totalPrice:{  
46 - type:String,  
47 - default:0 45 + totalPrice: {
  46 + type: String,
  47 + default: 0
48 }, 48 },
49 // 余额 49 // 余额
50 - balance:{  
51 - type:String,  
52 - default:0 50 + balance: {
  51 + type: String,
  52 + default: 0
53 }, 53 },
54 // 是否订单支付 54 // 是否订单支付
55 - isOrderPay:{  
56 - type:Boolean,  
57 - default:false 55 + isOrderPay: {
  56 + type: Boolean,
  57 + default: false
58 }, 58 },
59 - orderId:{  
60 - type:String,  
61 - default:'' 59 + orderId: {
  60 + type: String,
  61 + default: ''
62 }, 62 },
63 // 购物车id 63 // 购物车id
64 - carId:{  
65 - type:String,  
66 - default:''  
67 - }  
68 - })  
69 - onMounted(()=> {  
70 - setTimeout(()=>{  
71 - if(props.totalPrice >props.balance) { 64 + carId: {
  65 + type: String,
  66 + default: ''
  67 + }
  68 +})
  69 +onMounted(() => {
  70 + setTimeout(() => {
  71 + if (props.totalPrice > props.balance) {
72 payMode[1].shows = false 72 payMode[1].shows = false
73 } 73 }
74 - },100)  
75 - })  
76 - watchEffect(()=>{ 74 + }, 100)
  75 +})
  76 +watchEffect(() => {
77 // console.log('余额',props.balance) 余额不足点击充值,返回页面刷新余额 77 // console.log('余额',props.balance) 余额不足点击充值,返回页面刷新余额
78 - if(props.totalPrice < props.balance) { 78 + if (props.totalPrice < props.balance) {
79 payMode[1].shows = true 79 payMode[1].shows = true
80 } 80 }
81 - })  
82 - // 支付方式数组  
83 - const payMode = reactive([{id:1,name:'微信支付',check:true,modeUrl:'/static/shopCarIc/weCaat.png',shows:true},  
84 - {id:2,name:'余额支付',check:false,modeUrl:'/static/shopCarIc/yue.png',shows:true}])  
85 - // 余额是否为0  
86 - let balance = ref(0)  
87 - // 默认支付方式  
88 - let defaultMode = ref(0)  
89 - // 选择支付方式  
90 - let checkPay = (index)=> { 81 +})
  82 +// 支付方式数组
  83 +const payMode = reactive([
  84 + { id: 1, name: '微信支付', check: true, modeUrl: '/static/shopCarIc/weCaat.png', shows: true },
  85 + { id: 2, name: '余额支付', check: false, modeUrl: '/static/shopCarIc/yue.png', shows: true }
  86 +])
  87 +// 余额是否为0
  88 +let balance = ref(0)
  89 +// 默认支付方式
  90 +let defaultMode = ref(0)
  91 +// 选择支付方式
  92 +let checkPay = index => {
91 defaultMode.value = index 93 defaultMode.value = index
92 - }  
93 - // 支付方式弹窗提交订单按钮  
94 - const subOrder = ()=> {  
95 - if(props.car_Id) {  
96 - console.log('购物车支付',props.car_Id) 94 +}
  95 +// 支付方式弹窗提交订单按钮
  96 +const subOrder = () => {
  97 + if (props.car_Id) {
  98 + console.log('购物车支付', props.car_Id)
97 getCarPays() 99 getCarPays()
98 } else { 100 } else {
99 - console.log('dindan支付',props.car_Id) 101 + console.log('dindan支付', props.car_Id)
100 102
101 //订单支付 普通支付 103 //订单支付 普通支付
102 props.isOrderPay ? getOrderPays() : getPays() 104 props.isOrderPay ? getOrderPays() : getPays()
103 } 105 }
104 - }  
105 - // 去充值  
106 - const goRecharge = ()=> {  
107 - uni.navigateTo({ url:'/pages/mine/recharge' })  
108 - }  
109 - const emit = defineEmits(['canclePop'])  
110 - const canclePop = ()=> { 106 +}
  107 +// 去充值
  108 +const goRecharge = () => {
  109 + uni.navigateTo({ url: '/pages/mine/recharge' })
  110 +}
  111 +const emit = defineEmits(['canclePop'])
  112 +const canclePop = () => {
111 emit('canclePop') 113 emit('canclePop')
112 - }  
113 - const { proxy } = getCurrentInstance() //获取当前实例  
114 - // 支付  
115 - const getPays = async ()=>{ 114 +}
  115 +const { proxy } = getCurrentInstance() //获取当前实例
  116 +// 支付
  117 +const getPays = async () => {
116 try { 118 try {
117 - let { id,num,specId } = props.payParams 119 + let { id, num, specId } = props.payParams
118 let params = { 120 let params = {
119 - goods_id:id, //integer 是 商品ID  
120 - num:num, //integer 是 数量  
121 - goods_spec_id:specId, //integer 是 规格ID  
122 - address_id:props.adressId, //integer 是 地址ID  
123 - fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:1是微信支付,2是余额支付  
124 - remark:'' //string 否 备注 121 + goods_id: id, //integer 是 商品ID
  122 + num: num, //integer 是 数量
  123 + goods_spec_id: specId, //integer 是 规格ID
  124 + address_id: props.adressId, //integer 是 地址ID
  125 + fangs: defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:1是微信支付,2是余额支付
  126 + remark: '' //string 否 备注
125 } 127 }
126 const res = await getPay(params) 128 const res = await getPay(params)
127 proxy.$methods.pay(res) 129 proxy.$methods.pay(res)
128 canclePop() 130 canclePop()
129 - console.log('getPay', res)  
130 - uni.showToast({ title: '支付成功', icon: 'none' })  
131 - setTimeout(() => {  
132 - uni.navigateBack() 131 + // console.log('getPay', res)
  132 + // uni.showToast({ title: '支付成功', icon: 'none' })
  133 + // setTimeout(() => {
  134 + // uni.navigateBack()
133 135
134 - }, 1500); 136 + // }, 1500);
135 // 保存数据 137 // 保存数据
136 } catch (err) { 138 } catch (err) {
137 - uni.showToast({ title:err,icon:'none' }) 139 + uni.showToast({ title: err, icon: 'none' })
138 console.log('getPay', err) 140 console.log('getPay', err)
139 } 141 }
140 - }  
141 - // 购物车支付  
142 - const getCarPays = async ()=> { 142 +}
  143 +// 购物车支付
  144 +const getCarPays = async () => {
143 try { 145 try {
144 let params = { 146 let params = {
145 - cart_ids:props.car_Id, //string 是 购物车ID,多个英文逗号隔开  
146 - address_id:props.adressId, //integer 是 地址ID  
147 - remark:'', //string 否 备注  
148 - fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:2是余额支付 147 + cart_ids: props.car_Id, //string 是 购物车ID,多个英文逗号隔开
  148 + address_id: props.adressId, //integer 是 地址ID
  149 + remark: '', //string 否 备注
  150 + fangs: defaultMode.value == 0 ? 1 : 2 //integer 否 支付方式:2是余额支付
149 } 151 }
150 const res = await getCarPay(params) 152 const res = await getCarPay(params)
151 proxy.$methods.showTN('余额支付成功~') 153 proxy.$methods.showTN('余额支付成功~')
@@ -153,27 +155,27 @@ @@ -153,27 +155,27 @@
153 console.log('getCarPay', res) 155 console.log('getCarPay', res)
154 // 保存数据 156 // 保存数据
155 } catch (err) { 157 } catch (err) {
156 - uni.showToast({ title:err,icon:'none' }) 158 + uni.showToast({ title: err, icon: 'none' })
157 console.log('getCarPay', err) 159 console.log('getCarPay', err)
158 } 160 }
159 - }  
160 - // 订单支付  
161 - const getOrderPays = async ()=> { 161 +}
  162 +// 订单支付
  163 +const getOrderPays = async () => {
162 try { 164 try {
163 - const res = await getOrderPay(props.orderId,defaultMode.value == 0 ? 1 : 2) 165 + const res = await getOrderPay(props.orderId, defaultMode.value == 0 ? 1 : 2)
164 proxy.$methods.pay(res) 166 proxy.$methods.pay(res)
165 canclePop() 167 canclePop()
166 console.log('getOrderPay', res) 168 console.log('getOrderPay', res)
167 // 保存数据 169 // 保存数据
168 } catch (err) { 170 } catch (err) {
169 - uni.showToast({ title:err,icon:'none' }) 171 + uni.showToast({ title: err, icon: 'none' })
170 console.log('getOrderPay', err) 172 console.log('getOrderPay', err)
171 } 173 }
172 - } 174 +}
173 </script> 175 </script>
174 176
175 <style lang="scss"> 177 <style lang="scss">
176 - .popBox { 178 +.popBox {
177 padding: 32rpx 24rpx 0; 179 padding: 32rpx 24rpx 0;
178 180
179 .title { 181 .title {
@@ -214,7 +216,7 @@ @@ -214,7 +216,7 @@
214 .go { 216 .go {
215 margin-left: 8rpx; 217 margin-left: 8rpx;
216 font-size: 24rpx; 218 font-size: 24rpx;
217 - color: #FB3E3C; 219 + color: #fb3e3c;
218 line-height: 32rpx; 220 line-height: 32rpx;
219 221
220 image { 222 image {
@@ -234,5 +236,5 @@ @@ -234,5 +236,5 @@
234 font-weight: 700; 236 font-weight: 700;
235 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 237 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
236 } 238 }
237 - } 239 +}
238 </style> 240 </style>
@@ -12,14 +12,14 @@ @@ -12,14 +12,14 @@
12 <view class="priceBox flexJ" v-if="it.goodstatus != 3"> 12 <view class="priceBox flexJ" v-if="it.goodstatus != 3">
13 <text>¥{{ it.total_price }}</text> 13 <text>¥{{ it.total_price }}</text>
14 <view class="reality flexA"> 14 <view class="reality flexA">
15 - <view class="shi">实付款:</view> 15 + <view class="shi">{{ textHandler(shop.order_status) }}</view>
16 <text>¥</text> 16 <text>¥</text>
17 <view class="price">{{ it.total_price }}</view> 17 <view class="price">{{ it.total_price }}</view>
18 </view> 18 </view>
19 </view> 19 </view>
20 <!-- 积分商品 --> 20 <!-- 积分商品 -->
21 <view class="pointsShop" v-else> 21 <view class="pointsShop" v-else>
22 - <text>需付款:</text> 22 + <text>{{ textHandler(shop.order_status) }}</text>
23 <image src="/static/shopCarIc/pointsIc.png" mode=""></image> 23 <image src="/static/shopCarIc/pointsIc.png" mode=""></image>
24 <view class="points">{{ it.coscore }}</view> 24 <view class="points">{{ it.coscore }}</view>
25 <view class="pointsPrice">¥{{ it.diff_price }}</view> 25 <view class="pointsPrice">¥{{ it.diff_price }}</view>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 </template> 29 </template>
30 30
31 <script setup> 31 <script setup>
32 -import { ref, reactive, onMounted } from 'vue' 32 +import { ref, reactive, onMounted, nextTick } from 'vue'
33 import { onShow, onLoad } from '@dcloudio/uni-app' 33 import { onShow, onLoad } from '@dcloudio/uni-app'
34 const props = defineProps({ 34 const props = defineProps({
35 shop: { 35 shop: {
@@ -37,7 +37,14 @@ const props = defineProps({ @@ -37,7 +37,14 @@ const props = defineProps({
37 default: [] 37 default: []
38 } 38 }
39 }) 39 })
40 -onMounted(() => {}) 40 +
  41 +const textHandler = orderStatus => ([1, 11].includes(orderStatus) ? '需付款:' : [2, 3, 4, 21].includes(orderStatus) ? '实付款:' : '')
  42 +
  43 +onMounted(() => {
  44 + nextTick(() => {
  45 + console.log(props.shop, '订单数据是什么')
  46 + })
  47 +})
41 </script> 48 </script>
42 49
43 <style lang="scss"> 50 <style lang="scss">
@@ -2,92 +2,88 @@ @@ -2,92 +2,88 @@
2 <!-- 底部按钮弹出成 --> 2 <!-- 底部按钮弹出成 -->
3 <u-popup :show="payPopShow" mode="bottom" :closeable="true" round="18" @close="close" @open="open"> 3 <u-popup :show="payPopShow" mode="bottom" :closeable="true" round="18" @close="close" @open="open">
4 <view class="popBox"> 4 <view class="popBox">
5 - <view class="title flexC">{{btnType == 0? '加入购物车' : '立即购买'}}</view> 5 + <view class="title flexC" v-if="shopType !== 3">{{ btnType == 0 ? '加入购物车' : '立即购买' }}</view>
  6 + <view class="title flexC" v-if="shopType === 3">立即兑换</view>
6 <!-- 价格 --> 7 <!-- 价格 -->
7 <view class="topBox flexA"> 8 <view class="topBox flexA">
8 <view class="shopPhoto"> 9 <view class="shopPhoto">
9 <image :src="shopDetail.spec[0].spec_image" mode=""></image> 10 <image :src="shopDetail.spec[0].spec_image" mode=""></image>
10 </view> 11 </view>
11 <view class="price"> 12 <view class="price">
12 - <view class="shopName ellipsis">{{shopDetail.name}}</view>  
13 - <view class="money">  
14 - ¥{{shopDetail.spec[0].goods_price}}  
15 - </view> 13 + <view class="shopName ellipsis">{{ shopDetail.name }}</view>
  14 + <view class="money" v-if="shopDetail.goodstatus !== 3">¥{{ shopDetail.spec[0].goods_price }}</view>
  15 + <view class="money" v-else>{{ shopDetail.spec[0].coscore }}积分</view>
16 </view> 16 </view>
17 </view> 17 </view>
18 <!-- 商品规格 --> 18 <!-- 商品规格 -->
19 - <view v-for="(item,index) in data.speList" :key="item.group_id" style="margin-bottom: 44rpx;"> 19 + <view v-for="(item, index) in data.speList" :key="item.group_id" style="margin-bottom: 44rpx">
20 <view class="specificationsTile"> 20 <view class="specificationsTile">
21 - {{item.group_name}} 21 + {{ item.group_name }}
22 </view> 22 </view>
23 <view class="colorBox"> 23 <view class="colorBox">
24 - <view class="item" v-for="(it,idx) in item.spec_items" :key="it.item_id"  
25 - :class="idx == data.indexList[index].curIndex?'checked':''" @click="checkSpec(index,it,idx)">  
26 - {{it.spec_value}} 24 + <view class="item" v-for="(it, idx) in item.spec_items" :key="it.item_id" :class="idx == data.indexList[index].curIndex ? 'checked' : ''" @click="checkSpec(index, it, idx)">
  25 + {{ it.spec_value }}
27 </view> 26 </view>
28 </view> 27 </view>
29 </view> 28 </view>
30 <!-- 数量加减 --> 29 <!-- 数量加减 -->
31 <view class="numBox flexJ"> 30 <view class="numBox flexJ">
32 - <view class="rightTitle flexA">  
33 - 数量  
34 - </view> 31 + <view class="rightTitle flexA">数量</view>
35 <view class="and flexA"> 32 <view class="and flexA">
36 <u-number-box v-model="value" @change="valChange"></u-number-box> 33 <u-number-box v-model="value" @change="valChange"></u-number-box>
37 </view> 34 </view>
38 </view> 35 </view>
39 <!-- 加入购物车按钮 --> 36 <!-- 加入购物车按钮 -->
40 - <view v-if="btnType==0" class="popBtn flexC" @click="popBtn">  
41 - 加入购物车  
42 - </view> 37 + <view v-if="btnType == 0" class="popBtn flexC" @click="popBtn">加入购物车</view>
43 <!-- 立即购买按钮 --> 38 <!-- 立即购买按钮 -->
44 <view v-else class="popBtn1 flexC" @click="popBtn"> 39 <view v-else class="popBtn1 flexC" @click="popBtn">
45 - {{ shopDetail.goodstatus == 3 ?'立即兑换' : '立即购买'}} 40 + {{ shopDetail.goodstatus == 3 ? '立即兑换' : '立即购买' }}
46 </view> 41 </view>
47 </view> 42 </view>
48 </u-popup> 43 </u-popup>
49 </template> 44 </template>
50 45
51 <script setup> 46 <script setup>
52 - import { ref, reactive,onMounted } from 'vue'  
53 - import { getAddCar } from '@/api/'  
54 - let props = defineProps({ 47 +import { ref, reactive, onMounted } from 'vue'
  48 +import { getAddCar } from '@/api/'
  49 +let props = defineProps({
55 btnType: { 50 btnType: {
56 type: Number, 51 type: Number,
57 default: 0 52 default: 0
58 }, 53 },
  54 + shopType: Number,
59 payPopShow: { 55 payPopShow: {
60 type: Boolean, 56 type: Boolean,
61 default: false 57 default: false
62 }, 58 },
63 - shopDetail:{ 59 + shopDetail: {
64 type: Object, 60 type: Object,
65 default: {} 61 default: {}
66 }, 62 },
67 - moreSpec:{ 63 + moreSpec: {
68 type: Object, 64 type: Object,
69 default: {} 65 default: {}
70 } 66 }
71 - })  
72 - let data = reactive({  
73 - value: 1,//商品数量  
74 - speList:[],//规格数组  
75 - indexList:[],//规格索引  
76 - specID:[],//选中的规格id  
77 - specIdList:[],//规格组合id数组  
78 - formList:{},//选择玩规格后的商品详情  
79 - goods_spec_id:'',//参数规格id  
80 - })  
81 - onMounted(()=> {  
82 - setTimeout(()=> {  
83 - console.log('多规格',props.moreSpec)  
84 - if(props.moreSpec != null) { 67 +})
  68 +let data = reactive({
  69 + value: 1, //商品数量
  70 + speList: [], //规格数组
  71 + indexList: [], //规格索引
  72 + specID: [], //选中的规格id
  73 + specIdList: [], //规格组合id数组
  74 + formList: {}, //选择玩规格后的商品详情
  75 + goods_spec_id: '' //参数规格id
  76 +})
  77 +onMounted(() => {
  78 + setTimeout(() => {
  79 + console.log('多规格', props.moreSpec)
  80 + if (props.moreSpec != null) {
85 let spec = props.moreSpec.spec_attr //规格 81 let spec = props.moreSpec.spec_attr //规格
86 let mateSpecId = props.moreSpec.spec_list //规格匹配id 82 let mateSpecId = props.moreSpec.spec_list //规格匹配id
87 data.speList = spec //渲染规格 83 data.speList = spec //渲染规格
88 data.specIdList = mateSpecId //组合id数组 84 data.specIdList = mateSpecId //组合id数组
89 - spec.forEach((item,index)=>{  
90 - data.indexList.push({curIndex : 0}) 85 + spec.forEach((item, index) => {
  86 + data.indexList.push({ curIndex: 0 })
91 data.specID.push(item.spec_items[0].item_id) //默认规格id 87 data.specID.push(item.spec_items[0].item_id) //默认规格id
92 }) 88 })
93 data.goods_spec_id = data.specID.join('_') //默认组合规格id 89 data.goods_spec_id = data.specID.join('_') //默认组合规格id
@@ -95,66 +91,66 @@ @@ -95,66 +91,66 @@
95 } else { 91 } else {
96 data.goods_spec_id = props.shopDetail.spec[0].goods_spec_id 92 data.goods_spec_id = props.shopDetail.spec[0].goods_spec_id
97 } 93 }
98 - },200)  
99 - })  
100 - // 关闭弹窗  
101 - let emit = defineEmits(['close'])  
102 - const close = () => { 94 + }, 200)
  95 +})
  96 +// 关闭弹窗
  97 +let emit = defineEmits(['close'])
  98 +const close = () => {
103 emit('close') 99 emit('close')
104 - }  
105 - const valChange = (e) => { 100 +}
  101 +const valChange = e => {
106 console.log('数量' + e.value) 102 console.log('数量' + e.value)
107 data.value = e.value 103 data.value = e.value
108 - }  
109 - // 弹窗按钮props.btnType ==0加入购物车 1立即购买  
110 - const popBtn = ()=> { 104 +}
  105 +// 弹窗按钮props.btnType ==0加入购物车 1立即购买
  106 +const popBtn = () => {
111 let shopType = props.shopDetail.goodstatus //商品类型 1=普通商品,2=特价商品,3=积分商品 107 let shopType = props.shopDetail.goodstatus //商品类型 1=普通商品,2=特价商品,3=积分商品
112 - let buyData = {id:props.shopDetail.id,num:data.value,specId:data.goods_spec_id} //购买数据参数  
113 - console.log('当前值为: ' , buyData)  
114 - props.btnType ==0 ? getAddCars() : uni.navigateTo({ url:`/pages/shopCar/confirmOrder?params=${JSON.stringify(buyData)}&shopType=${shopType}` })  
115 - }  
116 - //选择规格  
117 - const checkSpec = (index,it,idx)=> {  
118 - console.log(index,it,idx) 108 + let buyData = { id: props.shopDetail.id, num: data.value, specId: data.goods_spec_id } //购买数据参数
  109 + console.log('当前值为: ', buyData)
  110 + props.btnType == 0 ? getAddCars() : uni.navigateTo({ url: `/pages/shopCar/confirmOrder?params=${JSON.stringify(buyData)}&shopType=${shopType}` })
  111 +}
  112 +//选择规格
  113 +const checkSpec = (index, it, idx) => {
  114 + console.log(index, it, idx)
119 data.indexList[index].curIndex = idx //选中高亮 115 data.indexList[index].curIndex = idx //选中高亮
120 - if(data.speList.length==1) {  
121 - data.specID.splice(index,1,it.item_id) 116 + if (data.speList.length == 1) {
  117 + data.specID.splice(index, 1, it.item_id)
122 } else { 118 } else {
123 - data.specID.splice(index,data.specID.length>1?1:0,it.item_id)//规格组合的id 119 + data.specID.splice(index, data.specID.length > 1 ? 1 : 0, it.item_id) //规格组合的id
124 } 120 }
125 makeUpId() 121 makeUpId()
126 - }  
127 - // 组合id  
128 - const makeUpId = ()=> {  
129 - if(data.specID.length == data.speList.length) {  
130 - let str = data.specIdList.find(item=> item.spec_sku_id == data.specID.join('_')) 122 +}
  123 +// 组合id
  124 +const makeUpId = () => {
  125 + if (data.specID.length == data.speList.length) {
  126 + let str = data.specIdList.find(item => item.spec_sku_id == data.specID.join('_'))
131 data.formList = str.form //所选规格对应详情 127 data.formList = str.form //所选规格对应详情
132 data.goods_spec_id = str.goods_spec_id //商品规格详情id 128 data.goods_spec_id = str.goods_spec_id //商品规格详情id
133 - console.log('查找到的规格',str,data.specID.join('_')) 129 + console.log('查找到的规格', str, data.specID.join('_'))
134 } 130 }
135 - }  
136 - // 加入购物车  
137 - const getAddCars = async ()=>{ 131 +}
  132 +// 加入购物车
  133 +const getAddCars = async () => {
138 try { 134 try {
139 let params = { 135 let params = {
140 - goods_id:props.shopDetail.id, //integer 是 商品ID  
141 - num:data.value, //integer //是 数量  
142 - goods_spec_id:data.goods_spec_id //integer 是 规格ID 136 + goods_id: props.shopDetail.id, //integer 是 商品ID
  137 + num: data.value, //integer //是 数量
  138 + goods_spec_id: data.goods_spec_id //integer 是 规格ID
143 } 139 }
144 const res = await getAddCar(params) 140 const res = await getAddCar(params)
145 close() 141 close()
146 - uni.showToast({ title:'成功加入购物车~',icon:'none' }) 142 + uni.showToast({ title: '成功加入购物车~', icon: 'none' })
147 console.log('getAddCar', res) 143 console.log('getAddCar', res)
148 // 保存数据 144 // 保存数据
149 } catch (err) { 145 } catch (err) {
150 - uni.showToast({ title:err,icon:'none' }) 146 + uni.showToast({ title: err, icon: 'none' })
151 console.log('getAddCar', err) 147 console.log('getAddCar', err)
152 } 148 }
153 - } 149 +}
154 </script> 150 </script>
155 151
156 <style lang="scss"> 152 <style lang="scss">
157 - .popBox { 153 +.popBox {
158 padding: 32rpx 24rpx 0; 154 padding: 32rpx 24rpx 0;
159 155
160 .title { 156 .title {
@@ -259,13 +255,13 @@ @@ -259,13 +255,13 @@
259 } 255 }
260 256
261 .yue { 257 .yue {
262 - color: #F33F2E; 258 + color: #f33f2e;
263 font-size: 30rpx; 259 font-size: 30rpx;
264 font-weight: 700; 260 font-weight: 700;
265 261
266 text { 262 text {
267 margin-top: 5rpx; 263 margin-top: 5rpx;
268 - color: #F33F2E; 264 + color: #f33f2e;
269 font-size: 24rpx; 265 font-size: 24rpx;
270 } 266 }
271 } 267 }
@@ -297,5 +293,5 @@ @@ -297,5 +293,5 @@
297 .notHave { 293 .notHave {
298 background: #ffd5d1ff; 294 background: #ffd5d1ff;
299 } 295 }
300 - } 296 +}
301 </style> 297 </style>
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 <view class="shopPrice flexA" v-if="!pointShop"> 11 <view class="shopPrice flexA" v-if="!pointShop">
12 <view class="new">¥{{ item.goods_price || item.spprice }}</view> 12 <view class="new">¥{{ item.goods_price || item.spprice }}</view>
13 <view class="original" v-if="shopHeight == 322">¥{{ item.line_price }}</view> 13 <view class="original" v-if="shopHeight == 322">¥{{ item.line_price }}</view>
  14 + <view class="original" v-if="isClass">¥{{ item.spyprice }}</view>
14 </view> 15 </view>
15 <view class="points" v-else> 16 <view class="points" v-else>
16 <image src="/static/shopCarIc/pointsIc.png" mode=""></image> 17 <image src="/static/shopCarIc/pointsIc.png" mode=""></image>
@@ -41,7 +42,8 @@ const props = defineProps({ @@ -41,7 +42,8 @@ const props = defineProps({
41 list: { 42 list: {
42 type: Array, 43 type: Array,
43 default: [] 44 default: []
44 - } 45 + },
  46 + isClass: Boolean
45 }) 47 })
46 const wide = ref(props.shopWidth + 'rpx') 48 const wide = ref(props.shopWidth + 'rpx')
47 const heig = ref(props.shopHeight + 'rpx') 49 const heig = ref(props.shopHeight + 'rpx')
@@ -31,6 +31,12 @@ @@ -31,6 +31,12 @@
31 } 31 }
32 }, 32 },
33 { 33 {
  34 + "path": "pages/index/bargainPrice",
  35 + "style": {
  36 + "navigationStyle": "custom"
  37 + }
  38 + },
  39 + {
34 "path": "pages/class/class", 40 "path": "pages/class/class",
35 "style": { 41 "style": {
36 "navigationBarTitleText": "", 42 "navigationBarTitleText": "",
1 <template> 1 <template>
2 - <search @doSearchs="doSearchs" @input="input" :keyWord="keyWord" :disabled="false"></search> 2 + <search></search>
3 <view class="mainBox"> 3 <view class="mainBox">
4 - <shops :list="shopList" :shopWidth="344" :shopHeight="344" /> 4 + <shops :list="shopList" :shopWidth="344" :shopHeight="344" :isClass="true" />
5 </view> 5 </view>
6 <view class="null flexV" v-if="!shopList.length"> 6 <view class="null flexV" v-if="!shopList.length">
7 <image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image> 7 <image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image>
@@ -23,16 +23,6 @@ onLoad(async ({ pid }) => { @@ -23,16 +23,6 @@ onLoad(async ({ pid }) => {
23 shopList.value = res 23 shopList.value = res
24 console.log(res, '分类商品列表') 24 console.log(res, '分类商品列表')
25 }) 25 })
26 -  
27 -const keyWord = ref('')  
28 -  
29 -const doSearchs = () => {}  
30 -  
31 -const input = e => {  
32 - if (e.detail.value == '') {  
33 - emit('input', e.detail.value)  
34 - }  
35 -}  
36 </script> 26 </script>
37 27
38 <style lang="scss"> 28 <style lang="scss">
  1 +<template>
  2 + <view>
  3 + <u-navbar bgColor="#F6F8FA" title="特价专区" :placeholder="true" autoBack></u-navbar>
  4 + <view>
  5 + <search />
  6 + <view class="mainBox">
  7 + <shops :list="shopList" :shopWidth="344" :shopHeight="344" :pointShop="false" />
  8 + </view>
  9 + </view>
  10 + <view class="null flexV" v-if="!shopList.length">
  11 + <image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image>
  12 + <text>暂无商品信息</text>
  13 + </view>
  14 + </view>
  15 +</template>
  16 +
  17 +<script setup>
  18 +import { ref, reactive } from 'vue'
  19 +import { onShow, onLoad } from '@dcloudio/uni-app'
  20 +import search from '@/componets/searchBox.vue'
  21 +import shops from '@/componets/shops.vue'
  22 +import { getIndex } from '@/api/'
  23 +
  24 +onShow(() => {
  25 + getIndexs()
  26 +})
  27 +let shopList = ref([]) // 积分商品
  28 +const getIndexs = async () => {
  29 + try {
  30 + const res = await getIndex()
  31 + shopList.value = res.tjgoods //特价商品
  32 + // 保存数据
  33 + } catch (err) {
  34 + uni.showToast({ title: err, icon: 'none' })
  35 + console.log('getIndex', err)
  36 + }
  37 +}
  38 +</script>
  39 +
  40 +<style lang="scss">
  41 +page {
  42 + background: #f6f8fa;
  43 +}
  44 +.mainBox {
  45 + width: 100%;
  46 + padding: 16rpx 24rpx;
  47 + box-sizing: border-box;
  48 +}
  49 +
  50 +.null {
  51 + margin-top: 266rpx;
  52 +
  53 + text {
  54 + position: relative;
  55 + margin-top: -80rpx;
  56 + color: #00000066;
  57 + font-size: 26rpx;
  58 + }
  59 +
  60 + image {
  61 + width: 348rpx;
  62 + height: 348rpx;
  63 + }
  64 +}
  65 +</style>
@@ -32,9 +32,9 @@ @@ -32,9 +32,9 @@
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>JiangChengYuanTi</text> 35 + <text>Special price zone</text>
36 </view> 36 </view>
37 - <view class="more flexA"> 37 + <view class="more flexA" @click="toBargainPriceMoreHandler">
38 更多 38 更多
39 <image src="/static/indexIc/orangeRight.png" mode=""></image> 39 <image src="/static/indexIc/orangeRight.png" mode=""></image>
40 </view> 40 </view>
@@ -58,11 +58,18 @@ @@ -58,11 +58,18 @@
58 58
59 <script setup> 59 <script setup>
60 import { ref, reactive } from 'vue' 60 import { ref, reactive } from 'vue'
61 -import { onShow, onLoad } from '@dcloudio/uni-app' 61 +import { onShow, onLoad, onReachBottom } from '@dcloudio/uni-app'
62 import search from '@/componets/searchBox.vue' 62 import search from '@/componets/searchBox.vue'
63 import shops from '@/componets/shops.vue' 63 import shops from '@/componets/shops.vue'
64 import { getIndex } from '@/api/' 64 import { getIndex } from '@/api/'
  65 +
  66 +const lastPage = ref(1)
  67 +
  68 +const curPage = ref(1)
  69 +
65 onShow(() => { 70 onShow(() => {
  71 + curPage.value = 1
  72 + data.recommendList.splice(0)
66 getIndexs() 73 getIndexs()
67 }) 74 })
68 // 跳转充值中心 75 // 跳转充值中心
@@ -83,19 +90,30 @@ const jumpClass = item => { @@ -83,19 +90,30 @@ const jumpClass = item => {
83 } 90 }
84 const jumpClassHandler = () => uni.switchTab({ url: '/pages/class/class' }) 91 const jumpClassHandler = () => uni.switchTab({ url: '/pages/class/class' })
85 92
  93 +const toBargainPriceMoreHandler = () => uni.navigateTo({ url: '/pages/index/bargainPrice' })
  94 +
86 const getIndexs = async () => { 95 const getIndexs = async () => {
87 try { 96 try {
88 - const res = await getIndex() 97 + const res = await getIndex({ page: curPage.value })
89 data.classList = res.fenlei //分类 98 data.classList = res.fenlei //分类
90 data.specialList = res.tjgoods //特价商品 99 data.specialList = res.tjgoods //特价商品
91 - data.recommendList = res.goods //推荐商品 100 + data.recommendList = data.recommendList.concat(res.goods.data) //推荐商品
  101 + console.log(data.recommendList, '推荐商品')
92 console.log('getIndex', res) 102 console.log('getIndex', res)
  103 + lastPage.value = res.goods.last_page
93 // 保存数据 104 // 保存数据
94 } catch (err) { 105 } catch (err) {
95 uni.showToast({ title: err, icon: 'none' }) 106 uni.showToast({ title: err, icon: 'none' })
96 console.log('getIndex', err) 107 console.log('getIndex', err)
97 } 108 }
98 } 109 }
  110 +onReachBottom(() => {
  111 + curPage.value++
  112 +
  113 + if (curPage.value >= lastPage.value) return
  114 +
  115 + getIndex()
  116 +})
99 </script> 117 </script>
100 118
101 <style lang="scss"> 119 <style lang="scss">
@@ -10,10 +10,9 @@ @@ -10,10 +10,9 @@
10 </u-navbar> 10 </u-navbar>
11 <!-- 轮播图 --> 11 <!-- 轮播图 -->
12 <view class="swiperBox"> 12 <view class="swiperBox">
13 - <u-swiper height="375" :list="swiperList" @change="e => currentNum = e.current" :autoplay="false"  
14 - indicatorStyle="right: 20px">  
15 - <template #indicator >  
16 - <view class="indicator-num" v-if="shopType!=3"> 13 + <u-swiper height="375" :list="swiperList" @change="e => (currentNum = e.current)" :autoplay="false" indicatorStyle="right: 20px">
  14 + <template #indicator>
  15 + <view class="indicator-num" v-if="shopType != 3">
17 <text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text> 16 <text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
18 </view> 17 </view>
19 </template> 18 </template>
@@ -24,17 +23,17 @@ @@ -24,17 +23,17 @@
24 <shopInfo :info="detaileList"></shopInfo> 23 <shopInfo :info="detaileList"></shopInfo>
25 </view> 24 </view>
26 <view class="line"></view> 25 <view class="line"></view>
27 - <view class="mainBox" > 26 + <view class="mainBox">
28 <!-- 1=普通商品,2=特价商品,3=积分商品 --> 27 <!-- 1=普通商品,2=特价商品,3=积分商品 -->
29 - <view v-if="shopType==1" >  
30 - <view class="commentNmu flexJ" >  
31 - <text>评论({{commentList.length}})</text>  
32 - <view class="see flexA" v-if="commentList.length>0" @click="seeAll"> 28 + <view v-if="shopType == 1">
  29 + <view class="commentNmu flexJ">
  30 + <text>评论({{ commentList.length }})</text>
  31 + <view class="see flexA" v-if="commentList.length > 0" @click="seeAll">
33 查看全部 32 查看全部
34 <image src="/static/indexIc/orangeRight.png" mode=""></image> 33 <image src="/static/indexIc/orangeRight.png" mode=""></image>
35 </view> 34 </view>
36 </view> 35 </view>
37 - <view v-if="commentList.length>0"> 36 + <view v-if="commentList.length > 0">
38 <comment :commentList="commentList"></comment> 37 <comment :commentList="commentList"></comment>
39 </view> 38 </view>
40 <!-- 暂无评论 --> 39 <!-- 暂无评论 -->
@@ -43,101 +42,99 @@ @@ -43,101 +42,99 @@
43 暂无评论 42 暂无评论
44 </view> 43 </view>
45 </view> 44 </view>
46 - <view v-if="shopType!==3"> 45 + <view v-if="shopType !== 3">
47 <view class="line"></view> 46 <view class="line"></view>
48 <view class="titles">商品详情</view> 47 <view class="titles">商品详情</view>
49 <rich-text :nodes="detaileList.content"></rich-text> 48 <rich-text :nodes="detaileList.content"></rich-text>
50 </view> 49 </view>
51 </view> 50 </view>
52 - <view class="lineBox flexC" v-if="shopType==3"> 51 + <view class="lineBox flexC" v-if="shopType == 3">
53 <view class="lines"></view> 52 <view class="lines"></view>
54 <text>商品详情</text> 53 <text>商品详情</text>
55 <view class="lines"></view> 54 <view class="lines"></view>
56 </view> 55 </view>
57 - <view class="" style="height: 300rpx;"></view> 56 + <view class="" style="height: 300rpx"></view>
58 <!-- 底部按钮 --> 57 <!-- 底部按钮 -->
59 <view class="btnBox iosAuto flexJ"> 58 <view class="btnBox iosAuto flexJ">
60 <view class="left flexA"> 59 <view class="left flexA">
61 - <view class="leftIc flexV" v-for="(item,index) in icList" :key="item.id" @click="btns(index)"> 60 + <view class="leftIc flexV" v-for="(item, index) in icList" :key="item.id" @click="btns(index)">
62 <view class="images"> 61 <view class="images">
63 <image :src="item.icon" mode=""></image> 62 <image :src="item.icon" mode=""></image>
64 - <u-badge :absolute="true" v-if="index==2" :offset="[-6, -6]" color="#fff" bgColor="#F63D3A" max="99" :value="value"></u-badge> 63 + <u-badge :absolute="true" v-if="index == 2" :offset="[-6, -6]" color="#fff" bgColor="#F63D3A" max="99" :value="value"></u-badge>
65 </view> 64 </view>
66 - <text v-if="index!=1">{{item.name}}</text>  
67 - <button v-if="index==1" open-type="contact">{{item.name}}</button> 65 + <text v-if="index != 1">{{ item.name }}</text>
  66 + <button v-if="index == 1" open-type="contact">{{ item.name }}</button>
68 </view> 67 </view>
69 </view> 68 </view>
70 - <view class="flexA" v-if="shopType!=3"> 69 + <view class="flexA" v-if="shopType != 3">
71 <view class="add flexC" @click="toOrder(0)">加入购物车</view> 70 <view class="add flexC" @click="toOrder(0)">加入购物车</view>
72 <view class="buy flexC" @click="toOrder(1)">立即购买</view> 71 <view class="buy flexC" @click="toOrder(1)">立即购买</view>
73 </view> 72 </view>
74 <view v-else class="exchange flexC" @click="toOrder(3)">我要兑换</view> 73 <view v-else class="exchange flexC" @click="toOrder(3)">我要兑换</view>
75 </view> 74 </view>
76 - <popPay :moreSpec="moreSpec" :shopDetail="detaileList" @close="payPopShow = false" :btnType="btnType" :payPopShow="payPopShow"></popPay> 75 + <popPay :moreSpec="moreSpec" :shopDetail="detaileList" @close="payPopShow = false" :shopType="shopType" :btnType="btnType" :payPopShow="payPopShow"></popPay>
77 </view> 76 </view>
78 </template> 77 </template>
79 78
80 <script setup> 79 <script setup>
81 - import {ref,reactive} from 'vue'  
82 - import {onShow,onLoad,onHide} from '@dcloudio/uni-app'  
83 - import shopInfo from '@/componets/shopInfo.vue'  
84 - import comment from '@/componets/comment.vue'  
85 - import popPay from '@/componets/popPay.vue'  
86 - import { getShopDetaile } from '@/api/'  
87 - onLoad((e)=> {  
88 - console.log('商品id',e.id) 80 +import { ref, reactive } from 'vue'
  81 +import { onShow, onLoad, onHide } from '@dcloudio/uni-app'
  82 +import shopInfo from '@/componets/shopInfo.vue'
  83 +import comment from '@/componets/comment.vue'
  84 +import popPay from '@/componets/popPay.vue'
  85 +import { getShopDetaile } from '@/api/'
  86 +onLoad(e => {
  87 + console.log('商品id', e.id)
89 getShopDetailes(e.id) 88 getShopDetailes(e.id)
90 - })  
91 - onHide(()=>{ 89 +})
  90 +onHide(() => {
92 payPopShow.value = false 91 payPopShow.value = false
93 - })  
94 - const currentNum = ref(0)  
95 - const list6 = reactive([  
96 - 'https://cdn.uviewui.com/uview/swiper/swiper2.png',  
97 - 'https://cdn.uviewui.com/uview/swiper/swiper3.png',  
98 - 'https://cdn.uviewui.com/uview/swiper/swiper1.png',  
99 - ])  
100 - const icList = reactive([{id:1,name:'店铺',icon:'/static/indexIc/shopIc.png'},  
101 - {id:2,name:'客服',icon:'/static/indexIc/service.png'},  
102 - {id:3,name:'购物车',icon:'/static/tabbarsIc/shopCar.png'}])  
103 - const value = ref('1') // 购物车徽章数  
104 - //查看全部评论  
105 - const seeAll = ()=>{ 92 +})
  93 +const currentNum = ref(0)
  94 +const list6 = reactive(['https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper1.png'])
  95 +const icList = reactive([
  96 + { id: 1, name: '店铺', icon: '/static/indexIc/shopIc.png' },
  97 + { id: 2, name: '客服', icon: '/static/indexIc/service.png' },
  98 + { id: 3, name: '购物车', icon: '/static/tabbarsIc/shopCar.png' }
  99 +])
  100 +const value = ref('1') // 购物车徽章数
  101 +//查看全部评论
  102 +const seeAll = () => {
106 uni.navigateTo({ 103 uni.navigateTo({
107 - url:'/pages/index/allComment' 104 + url: '/pages/index/allComment'
108 }) 105 })
109 - }  
110 - let btnType = ref(0) //按钮状态 0加入购物车 1立即购买  
111 - let payPopShow = ref(false) //按钮状态 0加入购物车 1立即购买  
112 - // 立即购买  
113 - const toOrder = (type)=> { 106 +}
  107 +let btnType = ref(0) //按钮状态 0加入购物车 1立即购买
  108 +let payPopShow = ref(false) //按钮状态 0加入购物车 1立即购买
  109 +// 立即购买
  110 +const toOrder = type => {
114 // if( type==3 ) return uni.navigateTo({url:`/pages/shopCar/confirmOrder?shopType=${shopType.value}`}) 111 // if( type==3 ) return uni.navigateTo({url:`/pages/shopCar/confirmOrder?shopType=${shopType.value}`})
115 btnType.value = type 112 btnType.value = type
116 payPopShow.value = true 113 payPopShow.value = true
117 - }  
118 - // 底部按钮  
119 - const btns = (index)=>{ 114 +}
  115 +// 底部按钮
  116 +const btns = index => {
120 switch (index) { 117 switch (index) {
121 case 0: 118 case 0:
122 console.log('店铺') 119 console.log('店铺')
123 - uni.switchTab({ url:'/pages/index/index'})  
124 - break; 120 + uni.switchTab({ url: '/pages/index/index' })
  121 + break
125 case 2: 122 case 2:
126 console.log('购物车') 123 console.log('购物车')
127 - uni.switchTab({ url:'/pages/shopCar/shopCar'})  
128 - break; 124 + uni.switchTab({ url: '/pages/shopCar/shopCar' })
  125 + break
129 default: 126 default:
130 - break;  
131 - }  
132 - }  
133 - let detaileList = ref({}) //商品详情  
134 - let specList = ref({}) //默认规格第一项  
135 - let swiperList = ref([]) //轮播图  
136 - let commentList = ref([]) //评论  
137 - let moreSpec = ref({}) //多规格  
138 - let shopType = ref(1) //商品类型  
139 - // 获取详情  
140 - const getShopDetailes = async (id)=>{ 127 + break
  128 + }
  129 +}
  130 +let detaileList = ref({}) //商品详情
  131 +let specList = ref({}) //默认规格第一项
  132 +let swiperList = ref([]) //轮播图
  133 +let commentList = ref([]) //评论
  134 +let moreSpec = ref({}) //多规格
  135 +let shopType = ref(1) //商品类型
  136 +// 获取详情
  137 +const getShopDetailes = async id => {
141 try { 138 try {
142 const res = await getShopDetaile(id) 139 const res = await getShopDetaile(id)
143 detaileList.value = res.detail //详情 140 detaileList.value = res.detail //详情
@@ -150,20 +147,20 @@ @@ -150,20 +147,20 @@
150 console.log('getShopDetaile', res) 147 console.log('getShopDetaile', res)
151 // 保存数据 148 // 保存数据
152 } catch (err) { 149 } catch (err) {
153 - uni.showToast({ title:err,icon:'none' }) 150 + uni.showToast({ title: err, icon: 'none' })
154 console.log('', err) 151 console.log('', err)
155 } 152 }
156 - } 153 +}
157 </script> 154 </script>
158 155
159 <style lang="scss"> 156 <style lang="scss">
160 - .u-nav-slot { 157 +.u-nav-slot {
161 image { 158 image {
162 width: 48rpx; 159 width: 48rpx;
163 height: 48rpx; 160 height: 48rpx;
164 } 161 }
165 - }  
166 - .indicator-num { 162 +}
  163 +.indicator-num {
167 padding: 2px 0; 164 padding: 2px 0;
168 background-color: rgba(0, 0, 0, 0.35); 165 background-color: rgba(0, 0, 0, 0.35);
169 border-radius: 100px; 166 border-radius: 100px;
@@ -172,26 +169,26 @@ @@ -172,26 +169,26 @@
172 justify-content: center; 169 justify-content: center;
173 170
174 &__text { 171 &__text {
175 - color: #FFFFFF; 172 + color: #ffffff;
176 font-size: 12px; 173 font-size: 12px;
177 } 174 }
178 - } 175 +}
179 176
180 - .swiperBox { 177 +.swiperBox {
181 margin-bottom: 32rpx; 178 margin-bottom: 32rpx;
182 - }  
183 - .info { 179 +}
  180 +.info {
184 width: 702rpx; 181 width: 702rpx;
185 margin: 0 auto; 182 margin: 0 auto;
186 - }  
187 - .line { 183 +}
  184 +.line {
188 width: 100%; 185 width: 100%;
189 height: 6rpx; 186 height: 6rpx;
190 opacity: 1; 187 opacity: 1;
191 background: #f7f8faff; 188 background: #f7f8faff;
192 margin: 32rpx 0; 189 margin: 32rpx 0;
193 - }  
194 - .mainBox { 190 +}
  191 +.mainBox {
195 padding: 0 24rpx; 192 padding: 0 24rpx;
196 193
197 .commentNmu { 194 .commentNmu {
@@ -225,14 +222,14 @@ @@ -225,14 +222,14 @@
225 margin-bottom: 16rpx; 222 margin-bottom: 16rpx;
226 } 223 }
227 } 224 }
228 - }  
229 - .titles { 225 +}
  226 +.titles {
230 color: #1a1a1aff; 227 color: #1a1a1aff;
231 font-size: 28rpx; 228 font-size: 28rpx;
232 font-weight: 700; 229 font-weight: 700;
233 - } 230 +}
234 231
235 - .lineBox { 232 +.lineBox {
236 margin: 24rpx 0 30rpx; 233 margin: 24rpx 0 30rpx;
237 234
238 .lines { 235 .lines {
@@ -248,9 +245,9 @@ @@ -248,9 +245,9 @@
248 color: #969799ff; 245 color: #969799ff;
249 font-size: 24rpx; 246 font-size: 24rpx;
250 } 247 }
251 - } 248 +}
252 249
253 - .btnBox { 250 +.btnBox {
254 position: fixed; 251 position: fixed;
255 left: 0; 252 left: 0;
256 bottom: 0; 253 bottom: 0;
@@ -299,7 +296,7 @@ @@ -299,7 +296,7 @@
299 } 296 }
300 } 297 }
301 298
302 - .buy{ 299 + .buy {
303 margin-right: 32rpx; 300 margin-right: 32rpx;
304 width: 200rpx; 301 width: 200rpx;
305 height: 80rpx; 302 height: 80rpx;
@@ -330,5 +327,5 @@ @@ -330,5 +327,5 @@
330 font-weight: 700; 327 font-weight: 700;
331 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 328 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
332 } 329 }
333 - } 330 +}
334 </style> 331 </style>
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <view class="boxs"> 5 <view class="boxs">
6 <view class="title">上传图片</view> 6 <view class="title">上传图片</view>
7 <view class="photoBox"> 7 <view class="photoBox">
8 - <view class="itemPhoto" v-for="(item,index) in photoList" :key="index"> 8 + <view class="itemPhoto" v-for="(item, index) in photoList" :key="index">
9 <image class="photo" :src="item" mode=""></image> 9 <image class="photo" :src="item" mode=""></image>
10 <view class="delBox flexC" @click="delPhoto(index)"> 10 <view class="delBox flexC" @click="delPhoto(index)">
11 <image class="del" src="/static/mineIc/close.png" mode=""></image> 11 <image class="del" src="/static/mineIc/close.png" mode=""></image>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </view> 13 </view>
14 <view class="addPhoto flexV" @click="addPhoto"> 14 <view class="addPhoto flexV" @click="addPhoto">
15 <image src="/static/mineIc/addIC.png" mode=""></image> 15 <image src="/static/mineIc/addIC.png" mode=""></image>
16 - 还可添加{{5 - photoList.length}}张 16 + 还可添加{{ 5 - photoList.length }}张
17 </view> 17 </view>
18 </view> 18 </view>
19 <view class="desc"> 19 <view class="desc">
@@ -25,60 +25,61 @@ @@ -25,60 +25,61 @@
25 </view> 25 </view>
26 </view> 26 </view>
27 <view class="btnBox iosAuto"> 27 <view class="btnBox iosAuto">
28 - <view class="btn flexC" @click="submit"> 提交评论 </view> 28 + <view class="btn flexC" @click="submit">提交评论</view>
29 </view> 29 </view>
30 </view> 30 </view>
31 </template> 31 </template>
32 32
33 <script setup> 33 <script setup>
34 - import { ref,reactive,getCurrentInstance} from 'vue'  
35 - import {onShow,onLoad} from '@dcloudio/uni-app'  
36 - import { getComment } from '@/api/'  
37 - const count = ref(5) //最高可选星星数  
38 - const value = ref(0) //星星选中数  
39 - let photoList = reactive([]) //图片  
40 - let desc = ref('') //评论  
41 - const { proxy } = getCurrentInstance() //获取当前实例  
42 - // 提交评论  
43 - const submit = ()=> { 34 +import { ref, reactive, getCurrentInstance } from 'vue'
  35 +import { onShow, onLoad } from '@dcloudio/uni-app'
  36 +import { getComment } from '@/api/'
  37 +const count = ref(5) //最高可选星星数
  38 +const value = ref(0) //星星选中数
  39 +let photoList = reactive([]) //图片
  40 +let desc = ref('') //评论
  41 +const { proxy } = getCurrentInstance() //获取当前实例
  42 +// 提交评论
  43 +const submit = () => {
44 getComments() 44 getComments()
45 - }  
46 - // 上传图片  
47 - const addPhoto = ()=> proxy.$methods.upload('http://healthmall.shs.broing.cn/api/common/upload',(imgUrl) => {  
48 - console.log('返回图片',imgUrl) 45 +}
  46 +// 上传图片
  47 +const addPhoto = () =>
  48 + proxy.$methods.upload('http://health.shs.broing.cn/api/common/upload', imgUrl => {
  49 + console.log('返回图片', imgUrl)
49 photoList.push(imgUrl.avatar) 50 photoList.push(imgUrl.avatar)
50 }) 51 })
51 - // 删除图片  
52 - const delPhoto = (index)=> {  
53 - photoList.splice(index,1)  
54 - }  
55 - // 写评论  
56 - const getComments = async ()=> { 52 +// 删除图片
  53 +const delPhoto = index => {
  54 + photoList.splice(index, 1)
  55 +}
  56 +// 写评论
  57 +const getComments = async () => {
57 try { 58 try {
58 let params = { 59 let params = {
59 - goods_id:86, //integer 否 商品id  
60 - image:photoList.join(','), //string 是 图片  
61 - content:desc.value //integer 否 内容 60 + goods_id: 86, //integer 否 商品id
  61 + image: photoList.join(','), //string 是 图片
  62 + content: desc.value //integer 否 内容
62 } 63 }
63 const res = await getComment(params) 64 const res = await getComment(params)
64 - uni.showToast({ title:'感谢您的评论~',icon:'none' })  
65 - setTimeout(()=> { 65 + uni.showToast({ title: '感谢您的评论~', icon: 'none' })
  66 + setTimeout(() => {
66 uni.navigateBack() 67 uni.navigateBack()
67 - },1000) 68 + }, 1000)
68 console.log('getComment', res) 69 console.log('getComment', res)
69 // 保存数据 70 // 保存数据
70 } catch (err) { 71 } catch (err) {
71 - uni.showToast({ title:err,icon:'none' }) 72 + uni.showToast({ title: err, icon: 'none' })
72 console.log('getComment', err) 73 console.log('getComment', err)
73 } 74 }
74 - } 75 +}
75 </script> 76 </script>
76 77
77 <style lang="scss"> 78 <style lang="scss">
78 - page { 79 +page {
79 background: #f0f2f5ff; 80 background: #f0f2f5ff;
80 - }  
81 - .boxs { 81 +}
  82 +.boxs {
82 width: 702rpx; 83 width: 702rpx;
83 margin: 34rpx auto; 84 margin: 34rpx auto;
84 border-radius: 16rpx; 85 border-radius: 16rpx;
@@ -115,7 +116,7 @@ @@ -115,7 +116,7 @@
115 top: 0; 116 top: 0;
116 width: 24rpx; 117 width: 24rpx;
117 height: 24rpx; 118 height: 24rpx;
118 - background: #484B46; 119 + background: #484b46;
119 border-radius: 0 8rpx 0 8rpx; 120 border-radius: 0 8rpx 0 8rpx;
120 121
121 .del { 122 .del {
@@ -167,12 +168,12 @@ @@ -167,12 +168,12 @@
167 margin-right: 20rpx; 168 margin-right: 20rpx;
168 } 169 }
169 } 170 }
170 - } 171 +}
171 172
172 - .btnBox { 173 +.btnBox {
173 position: fixed; 174 position: fixed;
174 left: 0; 175 left: 0;
175 - bottom:0; 176 + bottom: 0;
176 width: 100%; 177 width: 100%;
177 178
178 .btn { 179 .btn {
@@ -185,5 +186,5 @@ @@ -185,5 +186,5 @@
185 font-weight: 700; 186 font-weight: 700;
186 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 187 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
187 } 188 }
188 - } 189 +}
189 </style> 190 </style>
@@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
21 <u-count-down :time="item.time * 1000" format="mm:ss"></u-count-down> 21 <u-count-down :time="item.time * 1000" format="mm:ss"></u-count-down>
22 </view> 22 </view>
23 <view class="orderNoBox flexJ" v-if="[3, 4, 21].includes(item.order_status)"> 23 <view class="orderNoBox flexJ" v-if="[3, 4, 21].includes(item.order_status)">
24 - <view class="orderNo">快递单号 {{ item.order_no }}</view>  
25 - <view @click.stop="copy(item.order_no)" class="copy">复制</view> 24 + <view class="orderNo">快递单号 {{ item.express_no }}</view>
  25 + <view @click.stop="copy(item.express_no)" class="copy">复制</view>
26 </view> 26 </view>
27 <!-- 订单商品 --> 27 <!-- 订单商品 -->
28 <orderShop :shop="item"></orderShop> 28 <orderShop :shop="item"></orderShop>
@@ -31,7 +31,9 @@ @@ -31,7 +31,9 @@
31 <!-- 待付款 --> 31 <!-- 待付款 -->
32 <view class="flexA" v-if="item.order_status == 1"> 32 <view class="flexA" v-if="item.order_status == 1">
33 <view @click.stop="operateOrder(item, 0)" class="cancel flexC">{{ item.goodstatus_text == '' ? '取消付款' : '取消兑换' }}</view> 33 <view @click.stop="operateOrder(item, 0)" class="cancel flexC">{{ item.goodstatus_text == '' ? '取消付款' : '取消兑换' }}</view>
34 - <view @click.stop="operateOrder(item, 1)" v-if="item.order_status == 1" class="orange flexC">{{ item.goodstatus_text == '' ? '立即支付' : '立即兑换' }}</view> 34 + <view @click.stop="operateOrder(item, 1)" v-if="item.order_status == 1" class="orange flexC">
  35 + {{ item.goodstatus_text == '' ? '立即支付' : '立即兑换' }}
  36 + </view>
35 </view> 37 </view>
36 <!-- 代发货 --> 38 <!-- 代发货 -->
37 <view @click.stop="operateOrder(item, 2)" v-if="item.order_status == 2" class="orange flexC">申请退款</view> 39 <view @click.stop="operateOrder(item, 2)" v-if="item.order_status == 2" class="orange flexC">申请退款</view>
@@ -44,7 +46,7 @@ @@ -44,7 +46,7 @@
44 <view @click.stop="operateOrder(item, 3)" class="orange flexC">确认收货</view> 46 <view @click.stop="operateOrder(item, 3)" class="orange flexC">确认收货</view>
45 </view> 47 </view>
46 <!-- 待评价 --> 48 <!-- 待评价 -->
47 - <view @click.stop="operateOrder(item, 4)" v-if="item.order_status == 4 && item.goodstatus_text != 3" class="orange flexC">评价</view> 49 + <view @click.stop="operateOrder(item, 4)" v-if="item.order_status == 4" class="orange flexC">评价</view>
48 <!-- 售后 --> 50 <!-- 售后 -->
49 <view @click.stop="operateOrder(item, 5)" v-if="item.order_status == 21" class="orange flexC">查看详情</view> 51 <view @click.stop="operateOrder(item, 5)" v-if="item.order_status == 21" class="orange flexC">查看详情</view>
50 </view> 52 </view>
@@ -79,26 +81,7 @@ onShow(() => { @@ -79,26 +81,7 @@ onShow(() => {
79 }) 81 })
80 let tabStatus = ref(0) //订单状态 82 let tabStatus = ref(0) //订单状态
81 let orderList = ref([]) //订单 83 let orderList = ref([]) //订单
82 -const list1 = reactive([  
83 - {  
84 - name: '全部'  
85 - },  
86 - {  
87 - name: '待付款'  
88 - },  
89 - {  
90 - name: '待发货'  
91 - },  
92 - {  
93 - name: '待收货'  
94 - },  
95 - {  
96 - name: '待评价'  
97 - },  
98 - {  
99 - name: '售后'  
100 - }  
101 -]) 84 +const list1 = reactive([{ name: '全部' }, { name: '待付款' }, { name: '待发货' }, { name: '待收货' }, { name: '待评价' }, { name: '售后' }])
102 // type == 0取消订单 1立即支付 2申请退款 3确认收货 4评价 5查看详情 85 // type == 0取消订单 1立即支付 2申请退款 3确认收货 4评价 5查看详情
103 const operateOrder = (item, type) => { 86 const operateOrder = (item, type) => {
104 orderId.value = item.id 87 orderId.value = item.id
1 <template> 1 <template>
2 <view> 2 <view>
3 - <u-navbar bgColor="transparent" :placeholder="true" @leftClick="leftClickHandler"> </u-navbar> 3 + <u-navbar bgColor="transparent" :placeholder="true" @leftClick="leftClickHandler"></u-navbar>
4 <view class="mainBox"> 4 <view class="mainBox">
5 <!-- 收货地址 --> 5 <!-- 收货地址 -->
6 <shopAddres :isOrder="true" :adress="orderList"></shopAddres> 6 <shopAddres :isOrder="true" :adress="orderList"></shopAddres>
@@ -8,28 +8,42 @@ @@ -8,28 +8,42 @@
8 <orderShops :shop="orderList"></orderShops> 8 <orderShops :shop="orderList"></orderShops>
9 <view class="line"></view> 9 <view class="line"></view>
10 <view class="mode flexJ"> 10 <view class="mode flexJ">
11 - <view class="left">提货方式</view> 11 + <view class="left">配送方式</view>
12 <view class="right">快递配送</view> 12 <view class="right">快递配送</view>
13 </view> 13 </view>
14 </view> 14 </view>
15 - <view class="moneyBox flexJ" style="margin-bottom: 20rpx;"> 15 + <view class="moneyBox flexJ" style="margin-bottom: 20rpx" v-if="orderList.goodstatus_text !== 3">
16 <view>实付款</view> 16 <view>实付款</view>
17 - <view class="money">¥{{orderList.total_price}}</view> 17 + <view class="money">¥{{ orderList.total_price }}</view>
18 </view> 18 </view>
19 - <view class="moneyBox flexJ" v-for="(item,index) in placeOrder" :key="item.id">  
20 - <view class="items" >  
21 - {{item.name}} <text>{{item.text}}</text> 19 + <template v-if="orderList.goodstatus_text === 3">
  20 + <view class="moneyBox flexJ" style="margin-bottom: 20rpx">
  21 + <view>运费</view>
  22 + <view class="money">¥{{ orderList.express_price }}</view>
22 </view> 23 </view>
23 - <view v-if="index ==0 " @click="copy" class="copy">复制</view> 24 + <view class="moneyBox flexJ" style="margin-bottom: 20rpx">
  25 + <view>实付</view>
  26 + <view class="money">
  27 + <text style="color: #000">{{ orderList.score }}积分</text>
  28 + +¥{{ orderList.express_price }}
  29 + </view>
  30 + </view>
  31 + </template>
  32 + <view class="moneyBox flexJ" v-for="(item, index) in placeOrder" :key="item.id">
  33 + <view class="items">
  34 + {{ item.name }}
  35 + <text>{{ item.text }}</text>
  36 + </view>
  37 + <view v-if="index == 0" @click="copy" class="copy">复制</view>
24 </view> 38 </view>
25 </view> 39 </view>
26 <!-- 按钮 // 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后--> 40 <!-- 按钮 // 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后-->
27 <view class="btnBox iosAuto"> 41 <view class="btnBox iosAuto">
28 - <view v-if="btnType==3" class="service flexC"> 42 + <view v-if="btnType == 3" class="service flexC">
29 <button open-type="contact">联系客服</button> 43 <button open-type="contact">联系客服</button>
30 </view> 44 </view>
31 - <view v-if="btnType<=2" class="gay flexC" @click="btns(0)">{{btnType==1?'取消付款' : btnType==2?'申请退款': '联系客服'}}</view>  
32 - <view v-if="btnType==1 || btnType==3" class="red flexC" @click="btns(1)">{{btnType==1?'立即支付' : '确认收货'}}</view> 45 + <view v-if="btnType <= 2" class="gay flexC" @click="btns(0)">{{ btnType == 1 ? '取消付款' : btnType == 2 ? '申请退款' : '联系客服' }}</view>
  46 + <view v-if="btnType == 1 || btnType == 3" class="red flexC" @click="btns(1)">{{ btnType == 1 ? '立即支付' : '确认收货' }}</view>
33 </view> 47 </view>
34 <!-- 选择支付方式 --> 48 <!-- 选择支付方式 -->
35 <payMode @canclePop="modeShow = false" :orderId="orderId" :isOrderPay="true" :totalPrice="orderList.total_price" :modeShow="modeShow"></payMode> 49 <payMode @canclePop="modeShow = false" :orderId="orderId" :isOrderPay="true" :totalPrice="orderList.total_price" :modeShow="modeShow"></payMode>
@@ -39,130 +53,132 @@ @@ -39,130 +53,132 @@
39 </template> 53 </template>
40 54
41 <script setup> 55 <script setup>
42 - import { ref,reactive, getCurrentInstance } from 'vue'  
43 - import {onShow,onLoad} from '@dcloudio/uni-app'  
44 - import shopAddres from '@/componets/address.vue'  
45 - import orderShops from '@/componets/orderShop.vue'  
46 - import tipPops from '@/componets/tipPop.vue'  
47 - import PayMode from '@/componets/checkPayMode.vue'  
48 - import { getOrderdetail,getCancleOrder,getRefund,getReceipt } from '@/api/'  
49 - onLoad((e)=>{ 56 +import { ref, reactive, getCurrentInstance } from 'vue'
  57 +import { onShow, onLoad } from '@dcloudio/uni-app'
  58 +import shopAddres from '@/componets/address.vue'
  59 +import orderShops from '@/componets/orderShop.vue'
  60 +import tipPops from '@/componets/tipPop.vue'
  61 +import PayMode from '@/componets/checkPayMode.vue'
  62 +import { getOrderdetail, getCancleOrder, getRefund, getReceipt } from '@/api/'
  63 +onLoad(e => {
50 console.log(e.id) 64 console.log(e.id)
51 orderId.value = e.id 65 orderId.value = e.id
52 getOrderdetails(e.id) 66 getOrderdetails(e.id)
53 - })  
54 - let tipShow = ref(false) //是否取消订单弹窗  
55 - let orderList = ref({}) //订单  
56 - let modeShow = ref(false) //选择支付方式  
57 - let orderId = ref('')//订单id  
58 - let btnType = ref(1) //按钮状态  
59 - let integral = ref(0) //积分  
60 - let tipType = ref(1) //1取消支付 2取消订单  
61 - let placeOrder = ref([{id:1,name:'订单编号',text:'1212'},  
62 - {id:2,name:'支付方式',text:'1212'},  
63 - {id:3,name:'下单时间',text:'1212'},  
64 - {id:4,name:'快递编号',text:'1212'}]) 67 +})
  68 +let tipShow = ref(false) //是否取消订单弹窗
  69 +let orderList = ref({}) //订单
  70 +let modeShow = ref(false) //选择支付方式
  71 +let orderId = ref('') //订单id
  72 +let btnType = ref(1) //按钮状态
  73 +let integral = ref(0) //积分
  74 +let tipType = ref(1) //1取消支付 2取消订单
  75 +let placeOrder = ref([
  76 + { id: 1, name: '订单编号', text: '1212' },
  77 + { id: 2, name: '支付方式', text: '1212' },
  78 + { id: 3, name: '下单时间', text: '1212' },
  79 + { id: 4, name: '快递编号', text: '1212' }
  80 +])
65 81
66 - const leftClickHandler = () => { 82 +const leftClickHandler = () => {
67 // const pages = getCurrentPages() 83 // const pages = getCurrentPages()
68 // const page = pages[pages.length - 2] 84 // const page = pages[pages.length - 2]
69 // page.onLoad({ status: 0 }) 85 // page.onLoad({ status: 0 })
70 uni.navigateBack({ delta: 1 }) 86 uni.navigateBack({ delta: 1 })
71 - } 87 +}
72 88
73 - // 复制订单号  
74 - const copy = ()=> { 89 +// 复制订单号
  90 +const copy = () => {
75 uni.setClipboardData({ 91 uni.setClipboardData({
76 - data: orderList.value.order_no, 92 + data: orderList.value.express_no,
77 success: () => { 93 success: () => {
78 - uni.showToast({ title: "复制成功",icon:'none' }) 94 + uni.showToast({ title: '复制成功', icon: 'none' })
79 } 95 }
80 }) 96 })
81 - }  
82 - // 立即支付 type==0灰色按钮 否者橙色按钮  
83 - // 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后 getCancleOrders()  
84 - const btns = (type)=> {  
85 - if(type==0) { 97 +}
  98 +// 立即支付 type==0灰色按钮 否者橙色按钮
  99 +// 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后 getCancleOrders()
  100 +const btns = type => {
  101 + if (type == 0) {
86 tipType.value = btnType.value == 1 ? 1 : 2 102 tipType.value = btnType.value == 1 ? 1 : 2
87 tipShow.value = true 103 tipShow.value = true
88 // btnType.value == 1 ? tipShow.value = true : getRefunds() 104 // btnType.value == 1 ? tipShow.value = true : getRefunds()
89 } else { 105 } else {
90 - btnType.value == 1 ? modeShow.value = true : getReceipts() 106 + btnType.value == 1 ? (modeShow.value = true) : getReceipts()
91 // btnType.value == 3 ? getReceipts() :'' 107 // btnType.value == 3 ? getReceipts() :''
92 } 108 }
93 - }  
94 - //提示弹窗按钮点击  
95 - const pointsBtns = (type)=> { 109 +}
  110 +//提示弹窗按钮点击
  111 +const pointsBtns = type => {
96 console.log(type) 112 console.log(type)
97 tipShow.value = false 113 tipShow.value = false
98 - if(type == 1) { 114 + if (type == 1) {
99 tipType.value == 1 ? getCancleOrders() : getRefunds() 115 tipType.value == 1 ? getCancleOrders() : getRefunds()
100 } 116 }
101 - }  
102 - const { proxy } = getCurrentInstance() //获取当前实例  
103 - // 订单详情  
104 - const getOrderdetails = async (id)=>{ 117 +}
  118 +const { proxy } = getCurrentInstance() //获取当前实例
  119 +// 订单详情
  120 +const getOrderdetails = async id => {
105 try { 121 try {
106 const res = await getOrderdetail(id) 122 const res = await getOrderdetail(id)
107 orderList.value = res 123 orderList.value = res
108 btnType.value = res.order_status 124 btnType.value = res.order_status
109 placeOrder.value[0].text = res.order_no 125 placeOrder.value[0].text = res.order_no
110 - placeOrder.value[1].text = res.zhifu == 1? '微信' : '余额' 126 + placeOrder.value[1].text = res.zhifu == 1 ? '微信' : '余额'
111 placeOrder.value[2].text = res.createtime 127 placeOrder.value[2].text = res.createtime
112 - placeOrder.value[3].text = res.pay_order_no 128 + placeOrder.value[3].text = res.express_no
113 console.log('getOrderdetail', res) 129 console.log('getOrderdetail', res)
114 // 保存数据 130 // 保存数据
115 } catch (err) { 131 } catch (err) {
116 - uni.showToast({ title:err,icon:'none' }) 132 + uni.showToast({ title: err, icon: 'none' })
117 console.log('getOrderdetail', err) 133 console.log('getOrderdetail', err)
118 } 134 }
119 - }  
120 - // 取消订单  
121 - const getCancleOrders = async ()=> { 135 +}
  136 +// 取消订单
  137 +const getCancleOrders = async () => {
122 try { 138 try {
123 const res = await getCancleOrder(orderId.value) 139 const res = await getCancleOrder(orderId.value)
124 proxy.$methods.showTN('订单已取消~') 140 proxy.$methods.showTN('订单已取消~')
125 console.log('getCancleOrder', res) 141 console.log('getCancleOrder', res)
126 // 保存数据 142 // 保存数据
127 } catch (err) { 143 } catch (err) {
128 - uni.showToast({ title:err,icon:'none' }) 144 + uni.showToast({ title: err, icon: 'none' })
129 console.log('getCancleOrder', err) 145 console.log('getCancleOrder', err)
130 } 146 }
131 - }  
132 - // 退款  
133 - const getRefunds = async ()=>{ 147 +}
  148 +// 退款
  149 +const getRefunds = async () => {
134 try { 150 try {
135 const res = await getRefund(orderId.value) 151 const res = await getRefund(orderId.value)
136 proxy.$methods.showTN('已申请,等待客服审核') 152 proxy.$methods.showTN('已申请,等待客服审核')
137 console.log('getRefund', res) 153 console.log('getRefund', res)
138 // 保存数据 154 // 保存数据
139 } catch (err) { 155 } catch (err) {
140 - uni.showToast({ title:err,icon:'none' }) 156 + uni.showToast({ title: err, icon: 'none' })
141 console.log('getRefund', err) 157 console.log('getRefund', err)
142 } 158 }
143 - }  
144 - // 确认收货  
145 - const getReceipts = async ()=>{ 159 +}
  160 +// 确认收货
  161 +const getReceipts = async () => {
146 try { 162 try {
147 const res = await getReceipt(orderId.value) 163 const res = await getReceipt(orderId.value)
148 proxy.$methods.showTN('已收货,期待下次下单~') 164 proxy.$methods.showTN('已收货,期待下次下单~')
149 console.log('getReceipt', res) 165 console.log('getReceipt', res)
150 // 保存数据 166 // 保存数据
151 } catch (err) { 167 } catch (err) {
152 - uni.showToast({ title:err,icon:'none' }) 168 + uni.showToast({ title: err, icon: 'none' })
153 console.log('getReceipt', err) 169 console.log('getReceipt', err)
154 } 170 }
155 - } 171 +}
156 </script> 172 </script>
157 173
158 <style lang="scss"> 174 <style lang="scss">
159 - page { 175 +page {
160 background: #f7f8faff; 176 background: #f7f8faff;
161 - } 177 +}
162 178
163 - .mainBox { 179 +.mainBox {
164 width: 100%; 180 width: 100%;
165 - padding:20rpx 24rpx; 181 + padding: 20rpx 24rpx;
166 box-sizing: border-box; 182 box-sizing: border-box;
167 183
168 .shopBox { 184 .shopBox {
@@ -197,7 +213,7 @@ @@ -197,7 +213,7 @@
197 width: 100%; 213 width: 100%;
198 padding: 32rpx 20rpx; 214 padding: 32rpx 20rpx;
199 box-sizing: border-box; 215 box-sizing: border-box;
200 - margin: 0 auto ; 216 + margin: 0 auto;
201 border-radius: 24rpx; 217 border-radius: 24rpx;
202 background: #ffffffff; 218 background: #ffffffff;
203 219
@@ -229,9 +245,9 @@ @@ -229,9 +245,9 @@
229 font-size: 26rpx; 245 font-size: 26rpx;
230 } 246 }
231 } 247 }
232 - } 248 +}
233 249
234 - .btnBox { 250 +.btnBox {
235 position: fixed; 251 position: fixed;
236 left: 0; 252 left: 0;
237 bottom: 0; 253 bottom: 0;
@@ -285,5 +301,5 @@ @@ -285,5 +301,5 @@
285 font-weight: 700; 301 font-weight: 700;
286 background: linear-gradient(-88deg, #fe6434ff 0%, #ff2f2fff 100%); 302 background: linear-gradient(-88deg, #fe6434ff 0%, #ff2f2fff 100%);
287 } 303 }
288 - } 304 +}
289 </style> 305 </style>
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <view class="tip">余额(元)</view> 10 <view class="tip">余额(元)</view>
11 <view class="balance flexA"> 11 <view class="balance flexA">
12 <text>¥</text> 12 <text>¥</text>
13 - <view class="balances">{{balance}}</view> 13 + <view class="balances">{{ balance }}</view>
14 </view> 14 </view>
15 </view> 15 </view>
16 <view class="photo flexA"> 16 <view class="photo flexA">
@@ -19,24 +19,23 @@ @@ -19,24 +19,23 @@
19 <open-data type="userAvatarUrl" class="avatar"></open-data> 19 <open-data type="userAvatarUrl" class="avatar"></open-data>
20 20
21 <open-data type="userNickName" class="nickname"></open-data> 21 <open-data type="userNickName" class="nickname"></open-data>
22 -  
23 </view> 22 </view>
24 </view> 23 </view>
25 </view> 24 </view>
26 </view> 25 </view>
27 <view class="packageBox"> 26 <view class="packageBox">
28 - <view class="title flexA">金额  
29 - <input type="number" v-model="money" placeholder-class="ples" placeholder="(自定义)"> 27 + <view class="title flexA">
  28 + 金额
  29 + <input type="number" v-model="money" placeholder-class="ples" placeholder="(自定义)" />
30 </view> 30 </view>
31 <view class="package"> 31 <view class="package">
32 - <view class="item flexV" @click="checkPackage(item,index)" :class="cur == index ? 'check' : '' "  
33 - v-for="(item,index) in packageList" :key="item.id">  
34 - <view class="recharge">冲{{item.money}}</view>  
35 - <view class="deliver">送{{item.discount}}</view> 32 + <view class="item flexV" @click="checkPackage(item, index)" :class="cur == index ? 'check' : ''" v-for="(item, index) in packageList" :key="item.id">
  33 + <view class="recharge">冲{{ item.money }}</view>
  34 + <view class="deliver">送{{ item.discount }}</view>
36 </view> 35 </view>
37 </view> 36 </view>
38 </view> 37 </view>
39 - <view class="line"> </view> 38 + <view class="line"></view>
40 <view class="desc"> 39 <view class="desc">
41 <view class="descTitle">使用说明</view> 40 <view class="descTitle">使用说明</view>
42 </view> 41 </view>
@@ -47,76 +46,76 @@ @@ -47,76 +46,76 @@
47 </template> 46 </template>
48 47
49 <script setup> 48 <script setup>
50 - import { ref, reactive, getCurrentInstance } from 'vue'  
51 - import { onShow, onLoad } from '@dcloudio/uni-app'  
52 - import { getPackage,getRecharge,getyue } from '@/api/'  
53 - onShow(()=> { 49 +import { ref, reactive, getCurrentInstance } from 'vue'
  50 +import { onShow, onLoad } from '@dcloudio/uni-app'
  51 +import { getPackage, getRecharge, getyue } from '@/api/'
  52 +onShow(() => {
54 getPackages() //充值套餐 53 getPackages() //充值套餐
55 getyues() //我的余额 54 getyues() //我的余额
56 - })  
57 - let packageList = ref([]) //套餐数组  
58 - let money = ref('') //自定义金额  
59 - let cur = ref(0) //当前选择套餐  
60 - let balance = ref(0) //余额  
61 - const checkPackage = (item, index) => { 55 +})
  56 +let packageList = ref([]) //套餐数组
  57 +let money = ref('') //自定义金额
  58 +let cur = ref(0) //当前选择套餐
  59 +let balance = ref(0) //余额
  60 +const checkPackage = (item, index) => {
62 cur.value = index 61 cur.value = index
63 - }  
64 - // 立即支付按钮  
65 - const rechargeBtn = ()=> { 62 +}
  63 +// 立即支付按钮
  64 +const rechargeBtn = () => {
66 let packageMoney = packageList.value[cur.value].money 65 let packageMoney = packageList.value[cur.value].money
67 - getRecharges( money.value== '' ? packageMoney : money.value)  
68 - }  
69 - const { proxy } = getCurrentInstance()  
70 - // 充值  
71 - const getRecharges = async (money)=>{ 66 + getRecharges(money.value == '' ? packageMoney : money.value)
  67 +}
  68 +const { proxy } = getCurrentInstance()
  69 +// 充值
  70 +const getRecharges = async money => {
72 try { 71 try {
73 const res = await getRecharge(money) 72 const res = await getRecharge(money)
74 proxy.$methods.pay(res) 73 proxy.$methods.pay(res)
75 console.log('getRecharge', res) 74 console.log('getRecharge', res)
76 // 保存数据 75 // 保存数据
77 } catch (err) { 76 } catch (err) {
78 - uni.showToast({ title:err,icon:'none' }) 77 + uni.showToast({ title: err, icon: 'none' })
79 console.log('getRecharge', err) 78 console.log('getRecharge', err)
80 } 79 }
81 - }  
82 - // 充值套餐  
83 - const getPackages = async ()=>{ 80 +}
  81 +// 充值套餐
  82 +const getPackages = async () => {
84 try { 83 try {
85 const res = await getPackage() 84 const res = await getPackage()
86 packageList.value = res 85 packageList.value = res
87 console.log('getPackage', res) 86 console.log('getPackage', res)
88 // 保存数据 87 // 保存数据
89 } catch (err) { 88 } catch (err) {
90 - uni.showToast({ title:err,icon:'none' }) 89 + uni.showToast({ title: err, icon: 'none' })
91 console.log('getPackage', err) 90 console.log('getPackage', err)
92 } 91 }
93 - }  
94 - // 我的余额  
95 - const getyues = async ()=> { 92 +}
  93 +// 我的余额
  94 +const getyues = async () => {
96 try { 95 try {
97 const res = await getyue() 96 const res = await getyue()
98 balance.value = res.money 97 balance.value = res.money
99 - uni.setStorageSync('balance',res.money) 98 + uni.setStorageSync('balance', res.money)
100 console.log('getyue', res) 99 console.log('getyue', res)
101 // 保存数据 100 // 保存数据
102 } catch (err) { 101 } catch (err) {
103 - uni.showToast({ title:err,icon:'none' }) 102 + uni.showToast({ title: err, icon: 'none' })
104 console.log('getyue', err) 103 console.log('getyue', err)
105 } 104 }
106 - } 105 +}
107 </script> 106 </script>
108 107
109 <style lang="scss"> 108 <style lang="scss">
110 - .u-navbar__content__title { 109 +.u-navbar__content__title {
111 color: #fff !important; 110 color: #fff !important;
112 font-size: 32rpx; 111 font-size: 32rpx;
113 font-weight: 700; 112 font-weight: 700;
114 - } 113 +}
115 114
116 - .blackBg { 115 +.blackBg {
117 width: 100%; 116 width: 100%;
118 height: 278rpx; 117 height: 278rpx;
119 - background: #1D1E24; 118 + background: #1d1e24;
120 padding: 32rpx 24rpx 0; 119 padding: 32rpx 24rpx 0;
121 box-sizing: border-box; 120 box-sizing: border-box;
122 121
@@ -140,7 +139,6 @@ @@ -140,7 +139,6 @@
140 box-sizing: border-box; 139 box-sizing: border-box;
141 140
142 .balanceBox { 141 .balanceBox {
143 -  
144 .tip { 142 .tip {
145 margin-top: 96rpx; 143 margin-top: 96rpx;
146 color: #000000ff; 144 color: #000000ff;
@@ -177,9 +175,9 @@ @@ -177,9 +175,9 @@
177 } 175 }
178 } 176 }
179 } 177 }
180 - } 178 +}
181 179
182 - .packageBox { 180 +.packageBox {
183 position: relative; 181 position: relative;
184 width: 100%; 182 width: 100%;
185 opacity: 1; 183 opacity: 1;
@@ -216,7 +214,6 @@ @@ -216,7 +214,6 @@
216 border-radius: 24rpx; 214 border-radius: 24rpx;
217 border: 2rpx solid #f9f9f9ff; 215 border: 2rpx solid #f9f9f9ff;
218 216
219 -  
220 .recharge { 217 .recharge {
221 color: #361e0dff; 218 color: #361e0dff;
222 font-size: 40rpx; 219 font-size: 40rpx;
@@ -238,15 +235,15 @@ @@ -238,15 +235,15 @@
238 background: #fdf8eeff !important; 235 background: #fdf8eeff !important;
239 } 236 }
240 } 237 }
241 - } 238 +}
242 239
243 - .line { 240 +.line {
244 width: 100%; 241 width: 100%;
245 height: 24rpx; 242 height: 24rpx;
246 - background: #F5F7FB;  
247 - } 243 + background: #f5f7fb;
  244 +}
248 245
249 - .desc { 246 +.desc {
250 width: 100%; 247 width: 100%;
251 padding: 24rpx 20rpx; 248 padding: 24rpx 20rpx;
252 box-sizing: border-box; 249 box-sizing: border-box;
@@ -258,9 +255,9 @@ @@ -258,9 +255,9 @@
258 font-weight: 700; 255 font-weight: 700;
259 margin-bottom: 24rpx; 256 margin-bottom: 24rpx;
260 } 257 }
261 - } 258 +}
262 259
263 - .btnBox { 260 +.btnBox {
264 position: fixed; 261 position: fixed;
265 left: 0; 262 left: 0;
266 bottom: 0; 263 bottom: 0;
@@ -277,5 +274,5 @@ @@ -277,5 +274,5 @@
277 font-weight: 700; 274 font-weight: 700;
278 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); 275 background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
279 } 276 }
280 - } 277 +}
281 </style> 278 </style>
@@ -2,18 +2,18 @@ @@ -2,18 +2,18 @@
2 <!-- 购物车 --> 2 <!-- 购物车 -->
3 <view class=""> 3 <view class="">
4 <u-navbar bgColor="#F6F8FA" :placeholder="true" title="购物车" :autoBack="true"></u-navbar> 4 <u-navbar bgColor="#F6F8FA" :placeholder="true" title="购物车" :autoBack="true"></u-navbar>
5 - <view class="minBox" v-if="data.shopList.length>0"> 5 + <view class="minBox" v-if="data.shopList.length > 0">
6 <!-- 商品管理 --> 6 <!-- 商品管理 -->
7 - <view class="topBox flexJ" > 7 + <view class="topBox flexJ">
8 <view class="amount flexA" @click="toMyAddress"> 8 <view class="amount flexA" @click="toMyAddress">
9 <image src="/static/shopCarIc/shopAddress.png" mode=""></image> 9 <image src="/static/shopCarIc/shopAddress.png" mode=""></image>
10 - <view class="adress ellipsis">{{data.adress}}</view> 10 + <view class="adress ellipsis">{{ data.adress }}</view>
11 </view> 11 </view>
12 - <view class="manage" @click="changingOver">{{data.btnStatus ? '管理' : '完成' }}</view> 12 + <view class="manage" @click="changingOver">{{ data.btnStatus ? '管理' : '完成' }}</view>
13 </view> 13 </view>
14 14
15 <!-- 商品 --> 15 <!-- 商品 -->
16 - <view class="shopBox flexA" v-for="(item,index) in data.shopList" :key="item.id"> 16 + <view class="shopBox flexA" v-for="(item, index) in data.shopList" :key="item.id">
17 <!-- 选择 --> 17 <!-- 选择 -->
18 <view class="checkIc" @click.stop="checkShop(index)"> 18 <view class="checkIc" @click.stop="checkShop(index)">
19 <image v-if="!item.checkType" src="/static/shopCarIc/checks.png" mode=""></image> 19 <image v-if="!item.checkType" src="/static/shopCarIc/checks.png" mode=""></image>
@@ -22,26 +22,27 @@ @@ -22,26 +22,27 @@
22 <!-- 商品图片 --> 22 <!-- 商品图片 -->
23 <view class="shopPhoto"> 23 <view class="shopPhoto">
24 <image :src="item.image" mode=""></image> 24 <image :src="item.image" mode=""></image>
25 - <image v-if="item.status==0" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image> 25 + <image v-if="item.status == 0" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image>
26 </view> 26 </view>
27 <!-- 商品详细 --> 27 <!-- 商品详细 -->
28 <view class="infoBox"> 28 <view class="infoBox">
29 <!-- 商品名称 --> 29 <!-- 商品名称 -->
30 - <view class="title ellipsis">{{item.name}}</view> 30 + <view class="title ellipsis">{{ item.name }}</view>
31 <!-- 商品数量加减 --> 31 <!-- 商品数量加减 -->
32 <view class="numBox flexJ"> 32 <view class="numBox flexJ">
33 <view class="rightTitle flexA"> 33 <view class="rightTitle flexA">
34 - <text>¥</text>{{item.goods_price}} 34 + <text>¥</text>
  35 + {{ item.goods_price }}
35 </view> 36 </view>
36 <view class="and flexA"> 37 <view class="and flexA">
37 - <image src="/static/shopCarIc/reduce.png" mode="" @click="numBtn(0,item)"></image>  
38 - <view class="num flexC">{{item.total_num}}</view>  
39 - <image src="/static/shopCarIc/add.png" mode="" @click="numBtn(1,item)"></image> 38 + <image src="/static/shopCarIc/reduce.png" mode="" @click="numBtn(0, item)"></image>
  39 + <view class="num flexC">{{ item.total_num }}</view>
  40 + <image src="/static/shopCarIc/add.png" mode="" @click="numBtn(1, item)"></image>
40 </view> 41 </view>
41 </view> 42 </view>
42 </view> 43 </view>
43 </view> 44 </view>
44 - <view class="" style="height: 120rpx;"></view> 45 + <view class="" style="height: 120rpx"></view>
45 </view> 46 </view>
46 <!-- 购物车为空 --> 47 <!-- 购物车为空 -->
47 <view class="nullBox flexV" v-else> 48 <view class="nullBox flexV" v-else>
@@ -60,13 +61,11 @@ @@ -60,13 +61,11 @@
60 <view class="amountBox flexA"> 61 <view class="amountBox flexA">
61 <view class="settleBox flexA" v-if="data.btnStatus"> 62 <view class="settleBox flexA" v-if="data.btnStatus">
62 <view class="settle">合计:</view> 63 <view class="settle">合计:</view>
63 - <view class="money flexA">  
64 - ¥{{allMoney}}  
65 - </view> 64 + <view class="money flexA">¥{{ +allMoney.toFixed(2) }}</view>
66 </view> 65 </view>
67 <!-- 结算和删除按钮 --> 66 <!-- 结算和删除按钮 -->
68 <view class="btns flexC" @click="settleBtn"> 67 <view class="btns flexC" @click="settleBtn">
69 - {{data.btnStatus?'结算':'删除'}} 68 + {{ data.btnStatus ? '结算' : '删除' }}
70 </view> 69 </view>
71 </view> 70 </view>
72 </view> 71 </view>
@@ -74,113 +73,113 @@ @@ -74,113 +73,113 @@
74 </template> 73 </template>
75 74
76 <script setup> 75 <script setup>
77 - import { ref,reactive,computed } from 'vue'  
78 - import {onShow,onLoad} from '@dcloudio/uni-app'  
79 - import { getCarList,getCarAdd,getCarReduce,getDelCar } from '@/api/'  
80 - onShow(()=>{ 76 +import { ref, reactive, computed } from 'vue'
  77 +import { onShow, onLoad } from '@dcloudio/uni-app'
  78 +import { getCarList, getCarAdd, getCarReduce, getDelCar } from '@/api/'
  79 +onShow(() => {
81 getCarLists() //购物车列表 80 getCarLists() //购物车列表
82 // 默认地址 81 // 默认地址
83 - uni.getStorageSync('defaultAdres') ? data.adress = uni.getStorageSync('defaultAdres').diqu + uni.getStorageSync('defaultAdres').address : ''  
84 - console.log('默认',data.adress)  
85 - })  
86 - // 商品数组  
87 - let data = reactive({  
88 - shopList:[],  
89 - btnStatus:true ,// 右上角按钮状态  
90 - adress:'请新建默认地址',  
91 - })  
92 - // 修改右上角按钮状态  
93 - const changingOver = ()=> { 82 + uni.getStorageSync('defaultAdres') ? (data.adress = uni.getStorageSync('defaultAdres').diqu + uni.getStorageSync('defaultAdres').address) : ''
  83 + console.log('默认', data.adress)
  84 +})
  85 +// 商品数组
  86 +let data = reactive({
  87 + shopList: [],
  88 + btnStatus: true, // 右上角按钮状态
  89 + adress: '请新建默认地址'
  90 +})
  91 +// 修改右上角按钮状态
  92 +const changingOver = () => {
94 console.log(data.btnStatus) 93 console.log(data.btnStatus)
95 data.btnStatus = !data.btnStatus 94 data.btnStatus = !data.btnStatus
96 - }  
97 - //新建收货地址  
98 - const toMyAddress = ()=> { 95 +}
  96 +//新建收货地址
  97 +const toMyAddress = () => {
99 uni.navigateTo({ 98 uni.navigateTo({
100 - url:'/pages/mine/myAddress' 99 + url: '/pages/mine/myAddress'
101 }) 100 })
102 - }  
103 - // 勾选商品  
104 - const checkShop = (index) => { 101 +}
  102 +// 勾选商品
  103 +const checkShop = index => {
105 // let str = data.shopList.some(item=>item.goodstatus == 3) 104 // let str = data.shopList.some(item=>item.goodstatus == 3)
106 // console.log(str) 105 // console.log(str)
107 data.shopList[index].checkType = !data.shopList[index].checkType 106 data.shopList[index].checkType = !data.shopList[index].checkType
108 - }  
109 - const settleBtn = ()=> {  
110 - if(data.btnStatus) { 107 +}
  108 +const settleBtn = () => {
  109 + if (data.btnStatus) {
111 // 结算的商品购物车id 110 // 结算的商品购物车id
112 - let arrId = data.shopList.filter(item=>item.checkType).map(it=>it.cart_id) 111 + let arrId = data.shopList.filter(item => item.checkType).map(it => it.cart_id)
113 uni.navigateTo({ 112 uni.navigateTo({
114 - url:`/pages/shopCar/confirmOrder?ids=${arrId.join(',')}` 113 + url: `/pages/shopCar/confirmOrder?ids=${arrId.join(',')}`
115 }) 114 })
116 } else { 115 } else {
117 - let arr = data.shopList.filter(item=>item.checkType).map(it=>it.cart_id) 116 + let arr = data.shopList.filter(item => item.checkType).map(it => it.cart_id)
118 getDelCars(arr.join(',')) //删除 117 getDelCars(arr.join(',')) //删除
119 } 118 }
120 - }  
121 - // 删除购物商品  
122 - const getDelCars = async (ids)=>{ 119 +}
  120 +// 删除购物商品
  121 +const getDelCars = async ids => {
123 try { 122 try {
124 const res = await getDelCar(ids) 123 const res = await getDelCar(ids)
125 getCarLists() 124 getCarLists()
126 - uni.showToast({ title:'成功移出购物车~',icon:'none' }) 125 + uni.showToast({ title: '成功移出购物车~', icon: 'none' })
127 console.log('getDelCar', res) 126 console.log('getDelCar', res)
128 // 保存数据 127 // 保存数据
129 } catch (err) { 128 } catch (err) {
130 - uni.showToast({ title:err,icon:'none' }) 129 + uni.showToast({ title: err, icon: 'none' })
131 console.log('getDelCar', err) 130 console.log('getDelCar', err)
132 } 131 }
133 - }  
134 - // 数量加减按钮  
135 - const numBtn = (type,item) => {  
136 - if(type == 0 ) {  
137 - if(item.total_num == 1) return uni.showToast({ title:'至少一件哦~',icon:'none' })  
138 - getCarReduces(item.cart_id,item.total_num - 1) 132 +}
  133 +// 数量加减按钮
  134 +const numBtn = (type, item) => {
  135 + if (type == 0) {
  136 + if (item.total_num == 1) return uni.showToast({ title: '至少一件哦~', icon: 'none' })
  137 + getCarReduces(item.cart_id, item.total_num - 1)
139 item.total_num = item.total_num - 1 138 item.total_num = item.total_num - 1
140 } else { 139 } else {
141 - getCarAdds(item.cart_id,item.total_num + 1) 140 + getCarAdds(item.cart_id, item.total_num + 1)
142 item.total_num = item.total_num + 1 141 item.total_num = item.total_num + 1
143 } 142 }
144 - }  
145 - // 数量加  
146 - const getCarAdds = async (id,num)=>{ 143 +}
  144 +// 数量加
  145 +const getCarAdds = async (id, num) => {
147 try { 146 try {
148 - const res = await getCarAdd(id,num) 147 + const res = await getCarAdd(id, num)
149 console.log('getCarAdd', res) 148 console.log('getCarAdd', res)
150 // 保存数据 149 // 保存数据
151 } catch (err) { 150 } catch (err) {
152 - uni.showToast({ title:err,icon:'none' }) 151 + uni.showToast({ title: err, icon: 'none' })
153 console.log('getCarAdd', err) 152 console.log('getCarAdd', err)
154 } 153 }
155 - }  
156 - // 数量减  
157 - const getCarReduces = async (id,num)=>{ 154 +}
  155 +// 数量减
  156 +const getCarReduces = async (id, num) => {
158 try { 157 try {
159 - const res = await getCarReduce(id,num) 158 + const res = await getCarReduce(id, num)
160 console.log('getCarReduce', res) 159 console.log('getCarReduce', res)
161 // 保存数据 160 // 保存数据
162 } catch (err) { 161 } catch (err) {
163 - uni.showToast({ title:err,icon:'none' }) 162 + uni.showToast({ title: err, icon: 'none' })
164 console.log('getCarReduce', err) 163 console.log('getCarReduce', err)
165 } 164 }
166 - }  
167 - // 全选  
168 - const checkAll = ()=> {  
169 - if(allCheck.value) {  
170 - data.shopList.forEach(item=>{ 165 +}
  166 +// 全选
  167 +const checkAll = () => {
  168 + if (allCheck.value) {
  169 + data.shopList.forEach(item => {
171 item.checkType = false 170 item.checkType = false
172 }) 171 })
173 } else { 172 } else {
174 - data.shopList.forEach(item=>{ 173 + data.shopList.forEach(item => {
175 item.checkType = true 174 item.checkType = true
176 }) 175 })
177 } 176 }
178 - }  
179 - // 购物车列表  
180 - const getCarLists = async ()=>{ 177 +}
  178 +// 购物车列表
  179 +const getCarLists = async () => {
181 try { 180 try {
182 const res = await getCarList() 181 const res = await getCarList()
183 - res.goods_list.forEach(item=>item.checkType = false) 182 + res.goods_list.forEach(item => (item.checkType = false))
184 data.shopList = res.goods_list 183 data.shopList = res.goods_list
185 console.log('是什么', data.shopList) 184 console.log('是什么', data.shopList)
186 console.log('getCarList', res) 185 console.log('getCarList', res)
@@ -188,27 +187,31 @@ @@ -188,27 +187,31 @@
188 } catch (err) { 187 } catch (err) {
189 console.log('getCarList', err) 188 console.log('getCarList', err)
190 } 189 }
191 - }  
192 - // 是否全选  
193 - const allCheck = computed(() => {  
194 - return data.shopList.every(item=> item.checkType === true)  
195 - })  
196 - //总价  
197 - const allMoney = computed(() => {  
198 - return data.shopList.filter(it=>it.checkType).reduce((acc,item)=>{ return acc + item.total_price*1 },0)  
199 - }) 190 +}
  191 +// 是否全选
  192 +const allCheck = computed(() => {
  193 + return data.shopList.every(item => item.checkType === true)
  194 +})
  195 +//总价
  196 +const allMoney = computed(() => {
  197 + return data.shopList
  198 + .filter(it => it.checkType)
  199 + .reduce((acc, item) => {
  200 + return acc + item.total_price * 1
  201 + }, 0)
  202 +})
200 </script> 203 </script>
201 204
202 <style lang="scss"> 205 <style lang="scss">
203 - .u-icon__icon { 206 +.u-icon__icon {
204 display: none !important; 207 display: none !important;
205 - } 208 +}
206 209
207 - page {  
208 - background: #F6F8FA;  
209 - } 210 +page {
  211 + background: #f6f8fa;
  212 +}
210 213
211 - .minBox { 214 +.minBox {
212 width: 100%; 215 width: 100%;
213 padding: 24rpx; 216 padding: 24rpx;
214 box-sizing: border-box; 217 box-sizing: border-box;
@@ -217,7 +220,6 @@ @@ -217,7 +220,6 @@
217 margin: 24rpx 0; 220 margin: 24rpx 0;
218 221
219 .amount { 222 .amount {
220 -  
221 image { 223 image {
222 margin-right: 8rpx; 224 margin-right: 8rpx;
223 width: 24rpx; 225 width: 24rpx;
@@ -303,7 +305,7 @@ @@ -303,7 +305,7 @@
303 305
304 .numBox { 306 .numBox {
305 .rightTitle { 307 .rightTitle {
306 - color: #F33F2E; 308 + color: #f33f2e;
307 font-size: 40rpx; 309 font-size: 40rpx;
308 font-weight: 700; 310 font-weight: 700;
309 311
@@ -333,9 +335,9 @@ @@ -333,9 +335,9 @@
333 } 335 }
334 } 336 }
335 } 337 }
336 - } 338 +}
337 339
338 - .payBox { 340 +.payBox {
339 position: fixed; 341 position: fixed;
340 bottom: 0; 342 bottom: 0;
341 width: 100%; 343 width: 100%;
@@ -383,9 +385,9 @@ @@ -383,9 +385,9 @@
383 font-weight: 700; 385 font-weight: 700;
384 } 386 }
385 } 387 }
386 - } 388 +}
387 389
388 - .nullBox { 390 +.nullBox {
389 margin-top: 266rpx; 391 margin-top: 266rpx;
390 392
391 image { 393 image {
@@ -394,7 +396,7 @@ @@ -394,7 +396,7 @@
394 margin-bottom: 24rpx; 396 margin-bottom: 24rpx;
395 } 397 }
396 398
397 - color: #C6C5C8; 399 + color: #c6c5c8;
398 font-size: 28rpx; 400 font-size: 28rpx;
399 - } 401 +}
400 </style> 402 </style>
@@ -27,7 +27,7 @@ var methods = { @@ -27,7 +27,7 @@ var methods = {
27 pay(res) { 27 pay(res) {
28 if (res.appId) { 28 if (res.appId) {
29 common_vendor.index.requestPayment({ 29 common_vendor.index.requestPayment({
30 - "provider": "wxpay", 30 + provider: "wxpay",
31 timeStamp: res.timeStamp, 31 timeStamp: res.timeStamp,
32 nonceStr: res.nonceStr, 32 nonceStr: res.nonceStr,
33 package: res.package, 33 package: res.package,
@@ -8,6 +8,7 @@ if (!Math) { @@ -8,6 +8,7 @@ if (!Math) {
8 "./pages/index/search.js"; 8 "./pages/index/search.js";
9 "./pages/index/shopDetaile.js"; 9 "./pages/index/shopDetaile.js";
10 "./pages/index/allComment.js"; 10 "./pages/index/allComment.js";
  11 + "./pages/index/bargainPrice.js";
11 "./pages/class/class.js"; 12 "./pages/class/class.js";
12 "./pages/class/classList.js"; 13 "./pages/class/classList.js";
13 "./pages/pointsMall/pointsMall.js"; 14 "./pages/pointsMall/pointsMall.js";
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 "pages/index/search", 4 "pages/index/search",
5 "pages/index/shopDetaile", 5 "pages/index/shopDetaile",
6 "pages/index/allComment", 6 "pages/index/allComment",
  7 + "pages/index/bargainPrice",
7 "pages/class/class", 8 "pages/class/class",
8 "pages/class/classList", 9 "pages/class/classList",
9 "pages/pointsMall/pointsMall", 10 "pages/pointsMall/pointsMall",
@@ -8774,6 +8774,7 @@ exports.getCurrentInstance = getCurrentInstance; @@ -8774,6 +8774,7 @@ exports.getCurrentInstance = getCurrentInstance;
8774 exports.index = index$1; 8774 exports.index = index$1;
8775 exports.isRef = isRef; 8775 exports.isRef = isRef;
8776 exports.n = n; 8776 exports.n = n;
  8777 +exports.nextTick = nextTick;
8777 exports.o = o; 8778 exports.o = o;
8778 exports.onHide = onHide; 8779 exports.onHide = onHide;
8779 exports.onLoad = onLoad; 8780 exports.onLoad = onLoad;
@@ -99,11 +99,6 @@ const _sfc_main = { @@ -99,11 +99,6 @@ const _sfc_main = {
99 const res = await api_index.getPay(params); 99 const res = await api_index.getPay(params);
100 proxy.$methods.pay(res); 100 proxy.$methods.pay(res);
101 canclePop(); 101 canclePop();
102 - console.log("getPay", res);  
103 - common_vendor.index.showToast({ title: "\u652F\u4ED8\u6210\u529F", icon: "none" });  
104 - setTimeout(() => {  
105 - common_vendor.index.navigateBack();  
106 - }, 1500);  
107 } catch (err) { 102 } catch (err) {
108 common_vendor.index.showToast({ title: err, icon: "none" }); 103 common_vendor.index.showToast({ title: err, icon: "none" });
109 console.log("getPay", err); 104 console.log("getPay", err);
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 .popBox .popModeBox .insufficient .go { 62 .popBox .popModeBox .insufficient .go {
63 margin-left: 8rpx; 63 margin-left: 8rpx;
64 font-size: 24rpx; 64 font-size: 24rpx;
65 - color: #FB3E3C; 65 + color: #fb3e3c;
66 line-height: 32rpx; 66 line-height: 32rpx;
67 } 67 }
68 .popBox .popModeBox .insufficient .go image { 68 .popBox .popModeBox .insufficient .go image {
@@ -8,7 +8,12 @@ const _sfc_main = { @@ -8,7 +8,12 @@ const _sfc_main = {
8 } 8 }
9 }, 9 },
10 setup(__props) { 10 setup(__props) {
  11 + const props = __props;
  12 + const textHandler = (orderStatus) => [1, 11].includes(orderStatus) ? "\u9700\u4ED8\u6B3E\uFF1A" : [2, 3, 4, 21].includes(orderStatus) ? "\u5B9E\u4ED8\u6B3E\uFF1A" : "";
11 common_vendor.onMounted(() => { 13 common_vendor.onMounted(() => {
  14 + common_vendor.nextTick(() => {
  15 + console.log(props.shop, "\u8BA2\u5355\u6570\u636E\u662F\u4EC0\u4E48");
  16 + });
12 }); 17 });
13 return (_ctx, _cache) => { 18 return (_ctx, _cache) => {
14 return { 19 return {
@@ -21,12 +26,14 @@ const _sfc_main = { @@ -21,12 +26,14 @@ const _sfc_main = {
21 e: it.goodstatus != 3 26 e: it.goodstatus != 3
22 }, it.goodstatus != 3 ? { 27 }, it.goodstatus != 3 ? {
23 f: common_vendor.t(it.total_price), 28 f: common_vendor.t(it.total_price),
24 - g: common_vendor.t(it.total_price) 29 + g: common_vendor.t(textHandler(__props.shop.order_status)),
  30 + h: common_vendor.t(it.total_price)
25 } : { 31 } : {
26 - h: common_vendor.t(it.coscore),  
27 - i: common_vendor.t(it.diff_price) 32 + i: common_vendor.t(textHandler(__props.shop.order_status)),
  33 + j: common_vendor.t(it.coscore),
  34 + k: common_vendor.t(it.diff_price)
28 }, { 35 }, {
29 - j: it.id 36 + l: it.id
30 }); 37 });
31 }) 38 })
32 }; 39 };
1 -<view wx:for="{{a}}" wx:for-item="it" wx:key="j" class="shop"><view class="shopPhoto"><image src="{{it.a}}" mode=""></image></view><view class="info"><view class="shopTitle ellipsis">{{it.b}}</view><view class="desc ellipsis">{{it.c}}</view><view class="num ellipsis">x{{it.d}}</view><view wx:if="{{it.e}}" class="priceBox flexJ"><text>¥{{it.f}}</text><view class="reality flexA"><view class="shi">实付款:</view><text>¥</text><view class="price">{{it.g}}</view></view></view><view wx:else class="pointsShop"><text>需付款:</text><image src="/static/shopCarIc/pointsIc.png" mode=""></image><view class="points">{{it.h}}</view><view class="pointsPrice">¥{{it.i}}</view></view></view></view>  
  1 +<view wx:for="{{a}}" wx:for-item="it" wx:key="l" class="shop"><view class="shopPhoto"><image src="{{it.a}}" mode=""></image></view><view class="info"><view class="shopTitle ellipsis">{{it.b}}</view><view class="desc ellipsis">{{it.c}}</view><view class="num ellipsis">x{{it.d}}</view><view wx:if="{{it.e}}" class="priceBox flexJ"><text>¥{{it.f}}</text><view class="reality flexA"><view class="shi">{{it.g}}</view><text>¥</text><view class="price">{{it.h}}</view></view></view><view wx:else class="pointsShop"><text>{{it.i}}</text><image src="/static/shopCarIc/pointsIc.png" mode=""></image><view class="points">{{it.j}}</view><view class="pointsPrice">¥{{it.k}}</view></view></view></view>
@@ -18,6 +18,7 @@ const _sfc_main = { @@ -18,6 +18,7 @@ const _sfc_main = {
18 type: Number, 18 type: Number,
19 default: 0 19 default: 0
20 }, 20 },
  21 + shopType: Number,
21 payPopShow: { 22 payPopShow: {
22 type: Boolean, 23 type: Boolean,
23 default: false 24 default: false
@@ -111,11 +112,21 @@ const _sfc_main = { @@ -111,11 +112,21 @@ const _sfc_main = {
111 }; 112 };
112 return (_ctx, _cache) => { 113 return (_ctx, _cache) => {
113 return common_vendor.e({ 114 return common_vendor.e({
114 - a: common_vendor.t(__props.btnType == 0 ? "\u52A0\u5165\u8D2D\u7269\u8F66" : "\u7ACB\u5373\u8D2D\u4E70"),  
115 - b: __props.shopDetail.spec[0].spec_image,  
116 - c: common_vendor.t(__props.shopDetail.name),  
117 - d: common_vendor.t(__props.shopDetail.spec[0].goods_price),  
118 - e: common_vendor.f(common_vendor.unref(data).speList, (item, index, i0) => { 115 + a: __props.shopType !== 3
  116 + }, __props.shopType !== 3 ? {
  117 + b: common_vendor.t(__props.btnType == 0 ? "\u52A0\u5165\u8D2D\u7269\u8F66" : "\u7ACB\u5373\u8D2D\u4E70")
  118 + } : {}, {
  119 + c: __props.shopType === 3
  120 + }, __props.shopType === 3 ? {} : {}, {
  121 + d: __props.shopDetail.spec[0].spec_image,
  122 + e: common_vendor.t(__props.shopDetail.name),
  123 + f: __props.shopDetail.goodstatus !== 3
  124 + }, __props.shopDetail.goodstatus !== 3 ? {
  125 + g: common_vendor.t(__props.shopDetail.spec[0].goods_price)
  126 + } : {
  127 + h: common_vendor.t(__props.shopDetail.spec[0].coscore)
  128 + }, {
  129 + i: common_vendor.f(common_vendor.unref(data).speList, (item, index, i0) => {
119 return { 130 return {
120 a: common_vendor.t(item.group_name), 131 a: common_vendor.t(item.group_name),
121 b: common_vendor.f(item.spec_items, (it, idx, i1) => { 132 b: common_vendor.f(item.spec_items, (it, idx, i1) => {
@@ -129,21 +140,21 @@ const _sfc_main = { @@ -129,21 +140,21 @@ const _sfc_main = {
129 c: item.group_id 140 c: item.group_id
130 }; 141 };
131 }), 142 }),
132 - f: common_vendor.o(valChange),  
133 - g: common_vendor.o(($event) => _ctx.value = $event),  
134 - h: common_vendor.p({ 143 + j: common_vendor.o(valChange),
  144 + k: common_vendor.o(($event) => _ctx.value = $event),
  145 + l: common_vendor.p({
135 modelValue: _ctx.value 146 modelValue: _ctx.value
136 }), 147 }),
137 - i: __props.btnType == 0 148 + m: __props.btnType == 0
138 }, __props.btnType == 0 ? { 149 }, __props.btnType == 0 ? {
139 - j: common_vendor.o(popBtn) 150 + n: common_vendor.o(popBtn)
140 } : { 151 } : {
141 - k: common_vendor.t(__props.shopDetail.goodstatus == 3 ? "\u7ACB\u5373\u5151\u6362" : "\u7ACB\u5373\u8D2D\u4E70"),  
142 - l: common_vendor.o(popBtn) 152 + o: common_vendor.t(__props.shopDetail.goodstatus == 3 ? "\u7ACB\u5373\u5151\u6362" : "\u7ACB\u5373\u8D2D\u4E70"),
  153 + p: common_vendor.o(popBtn)
143 }, { 154 }, {
144 - m: common_vendor.o(close),  
145 - n: common_vendor.o(_ctx.open),  
146 - o: common_vendor.p({ 155 + q: common_vendor.o(close),
  156 + r: common_vendor.o(_ctx.open),
  157 + s: common_vendor.p({
147 show: __props.payPopShow, 158 show: __props.payPopShow,
148 mode: "bottom", 159 mode: "bottom",
149 closeable: true, 160 closeable: true,
1 -<u-popup wx:if="{{o}}" u-s="{{['d']}}" bindclose="{{m}}" bindopen="{{n}}" u-i="4f7ddfed-0" bind:__l="__l" u-p="{{o}}"><view class="popBox"><view class="title flexC">{{a}}</view><view class="topBox flexA"><view class="shopPhoto"><image src="{{b}}" mode=""></image></view><view class="price"><view class="shopName ellipsis">{{c}}</view><view class="money"> ¥{{d}}</view></view></view><view wx:for="{{e}}" wx:for-item="item" wx:key="c" style="margin-bottom:44rpx"><view class="specificationsTile">{{item.a}}</view><view class="colorBox"><view wx:for="{{item.b}}" wx:for-item="it" wx:key="b" class="{{['item', it.c]}}" bindtap="{{it.d}}">{{it.a}}</view></view></view><view class="numBox flexJ"><view class="rightTitle flexA"> 数量 </view><view class="and flexA"><u-number-box wx:if="{{h}}" bindchange="{{f}}" u-i="4f7ddfed-1,4f7ddfed-0" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-number-box></view></view><view wx:if="{{i}}" class="popBtn flexC" bindtap="{{j}}"> 加入购物车 </view><view wx:else class="popBtn1 flexC" bindtap="{{l}}">{{k}}</view></view></u-popup>  
  1 +<u-popup wx:if="{{s}}" u-s="{{['d']}}" bindclose="{{q}}" bindopen="{{r}}" u-i="4f7ddfed-0" bind:__l="__l" u-p="{{s}}"><view class="popBox"><view wx:if="{{a}}" class="title flexC">{{b}}</view><view wx:if="{{c}}" class="title flexC">立即兑换</view><view class="topBox flexA"><view class="shopPhoto"><image src="{{d}}" mode=""></image></view><view class="price"><view class="shopName ellipsis">{{e}}</view><view wx:if="{{f}}" class="money">¥{{g}}</view><view wx:else class="money">{{h}}积分</view></view></view><view wx:for="{{i}}" wx:for-item="item" wx:key="c" style="margin-bottom:44rpx"><view class="specificationsTile">{{item.a}}</view><view class="colorBox"><view wx:for="{{item.b}}" wx:for-item="it" wx:key="b" class="{{['item', it.c]}}" bindtap="{{it.d}}">{{it.a}}</view></view></view><view class="numBox flexJ"><view class="rightTitle flexA">数量</view><view class="and flexA"><u-number-box wx:if="{{l}}" bindchange="{{j}}" u-i="4f7ddfed-1,4f7ddfed-0" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></u-number-box></view></view><view wx:if="{{m}}" class="popBtn flexC" bindtap="{{n}}">加入购物车</view><view wx:else class="popBtn1 flexC" bindtap="{{p}}">{{o}}</view></view></u-popup>
@@ -113,13 +113,13 @@ @@ -113,13 +113,13 @@
113 height: 32rpx; 113 height: 32rpx;
114 } 114 }
115 .popBox .payBox .yue { 115 .popBox .payBox .yue {
116 - color: #F33F2E; 116 + color: #f33f2e;
117 font-size: 30rpx; 117 font-size: 30rpx;
118 font-weight: 700; 118 font-weight: 700;
119 } 119 }
120 .popBox .payBox .yue text { 120 .popBox .payBox .yue text {
121 margin-top: 5rpx; 121 margin-top: 5rpx;
122 - color: #F33F2E; 122 + color: #f33f2e;
123 font-size: 24rpx; 123 font-size: 24rpx;
124 } 124 }
125 .popBox .popBtn { 125 .popBox .popBtn {
@@ -17,7 +17,8 @@ const _sfc_main = { @@ -17,7 +17,8 @@ const _sfc_main = {
17 list: { 17 list: {
18 type: Array, 18 type: Array,
19 default: [] 19 default: []
20 - } 20 + },
  21 + isClass: Boolean
21 }, 22 },
22 setup(__props) { 23 setup(__props) {
23 const props = __props; 24 const props = __props;
@@ -46,16 +47,20 @@ const _sfc_main = { @@ -46,16 +47,20 @@ const _sfc_main = {
46 e: __props.shopHeight == 322 47 e: __props.shopHeight == 322
47 }, __props.shopHeight == 322 ? { 48 }, __props.shopHeight == 322 ? {
48 f: common_vendor.t(item.line_price) 49 f: common_vendor.t(item.line_price)
  50 + } : {}, {
  51 + g: __props.isClass
  52 + }, __props.isClass ? {
  53 + h: common_vendor.t(item.spyprice)
49 } : {}) : { 54 } : {}) : {
50 - g: common_vendor.t(item.coscore) 55 + i: common_vendor.t(item.coscore)
51 }, __props.shopWidth == 344 ? { 56 }, __props.shopWidth == 344 ? {
52 - h: common_vendor.t(__props.pointShop ? "\u5DF2\u5151\u6362\uFF1A" : "\u5DF2\u552E\uFF1A"),  
53 - i: common_vendor.t(item.sales_actual) 57 + j: common_vendor.t(__props.pointShop ? "\u5DF2\u5151\u6362\uFF1A" : "\u5DF2\u552E\uFF1A"),
  58 + k: common_vendor.t(item.sales_actual)
54 } : {}, __props.shopHeight == 322 ? { 59 } : {}, __props.shopHeight == 322 ? {
55 - j: common_vendor.t(item.stock_num) 60 + l: common_vendor.t(item.stock_num)
56 } : {}, { 61 } : {}, {
57 - k: item.id,  
58 - l: common_vendor.o(($event) => toDetaile(item.id), item.id) 62 + m: item.id,
  63 + n: common_vendor.o(($event) => toDetaile(item.id), item.id)
59 }); 64 });
60 }), 65 }),
61 b: !__props.pointShop, 66 b: !__props.pointShop,
1 -<view class="flexW" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="k" class="shopBox" bindtap="{{item.l}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.g}}</view><view wx:if="{{c}}" class="sold">{{item.h}}{{item.i}}份</view><view wx:if="{{d}}" class="sold">库存:{{item.j}}件</view></view></view></view>  
  1 +<view class="flexW" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="m" class="shopBox" bindtap="{{item.n}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view><view wx:if="{{item.g}}" class="original">¥{{item.h}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.i}}</view><view wx:if="{{c}}" class="sold">{{item.j}}{{item.k}}份</view><view wx:if="{{d}}" class="sold">库存:{{item.l}}件</view></view></view></view>
@@ -15,28 +15,15 @@ const _sfc_main = { @@ -15,28 +15,15 @@ const _sfc_main = {
15 shopList.value = res; 15 shopList.value = res;
16 console.log(res, "\u5206\u7C7B\u5546\u54C1\u5217\u8868"); 16 console.log(res, "\u5206\u7C7B\u5546\u54C1\u5217\u8868");
17 }); 17 });
18 - const keyWord = common_vendor.ref("");  
19 - const doSearchs = () => {  
20 - };  
21 - const input = (e) => {  
22 - if (e.detail.value == "") {  
23 - emit("input", e.detail.value);  
24 - }  
25 - };  
26 return (_ctx, _cache) => { 18 return (_ctx, _cache) => {
27 return common_vendor.e({ 19 return common_vendor.e({
28 - a: common_vendor.o(doSearchs),  
29 - b: common_vendor.o(input),  
30 - c: common_vendor.p({  
31 - keyWord: keyWord.value,  
32 - disabled: false  
33 - }),  
34 - d: common_vendor.p({ 20 + a: common_vendor.p({
35 list: shopList.value, 21 list: shopList.value,
36 shopWidth: 344, 22 shopWidth: 344,
37 - shopHeight: 344 23 + shopHeight: 344,
  24 + isClass: true
38 }), 25 }),
39 - e: !shopList.value.length 26 + b: !shopList.value.length
40 }, !shopList.value.length ? {} : {}); 27 }, !shopList.value.length ? {} : {});
41 }; 28 };
42 } 29 }
1 -<search wx:if="{{c}}" binddoSearchs="{{a}}" bindinput="{{b}}" u-i="33f20787-0" bind:__l="__l" u-p="{{c}}"></search><view class="mainBox"><shops wx:if="{{d}}" u-i="33f20787-1" bind:__l="__l" u-p="{{d}}"/></view><view wx:if="{{e}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view>  
  1 +<search u-i="33f20787-0" bind:__l="__l"></search><view class="mainBox"><shops wx:if="{{a}}" u-i="33f20787-1" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{b}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view>
  1 +"use strict";
  2 +var common_vendor = require("../../common/vendor.js");
  3 +var api_index = require("../../api/index.js");
  4 +require("../../utils/request.js");
  5 +if (!Array) {
  6 + const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
  7 + _easycom_u_navbar2();
  8 +}
  9 +const _easycom_u_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
  10 +if (!Math) {
  11 + (_easycom_u_navbar + search + shops)();
  12 +}
  13 +const search = () => "../../componets/searchBox.js";
  14 +const shops = () => "../../componets/shops.js";
  15 +const _sfc_main = {
  16 + setup(__props) {
  17 + common_vendor.onShow(() => {
  18 + getIndexs();
  19 + });
  20 + let shopList = common_vendor.ref([]);
  21 + const getIndexs = async () => {
  22 + try {
  23 + const res = await api_index.getIndex();
  24 + shopList.value = res.tjgoods;
  25 + } catch (err) {
  26 + common_vendor.index.showToast({ title: err, icon: "none" });
  27 + console.log("getIndex", err);
  28 + }
  29 + };
  30 + return (_ctx, _cache) => {
  31 + return common_vendor.e({
  32 + a: common_vendor.p({
  33 + bgColor: "#F6F8FA",
  34 + title: "\u7279\u4EF7\u4E13\u533A",
  35 + placeholder: true,
  36 + autoBack: true
  37 + }),
  38 + b: common_vendor.p({
  39 + list: common_vendor.unref(shopList),
  40 + shopWidth: 344,
  41 + shopHeight: 344,
  42 + pointShop: false
  43 + }),
  44 + c: !common_vendor.unref(shopList).length
  45 + }, !common_vendor.unref(shopList).length ? {} : {});
  46 + };
  47 + }
  48 +};
  49 +var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/vue/\u5927\u5065\u5EB7\u5546\u57CE/healthMall/pages/index/bargainPrice.vue"]]);
  50 +wx.createPage(MiniProgramPage);
  1 +{
  2 + "navigationStyle": "custom",
  3 + "usingComponents": {
  4 + "u-navbar": "../../uni_modules/uview-plus/components/u-navbar/u-navbar",
  5 + "search": "../../componets/searchBox",
  6 + "shops": "../../componets/shops"
  7 + }
  8 +}
  1 +<view><u-navbar wx:if="{{a}}" u-i="b00c9e08-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view><search u-i="b00c9e08-1" bind:__l="__l"/><view class="mainBox"><shops wx:if="{{b}}" u-i="b00c9e08-2" bind:__l="__l" u-p="{{b}}"/></view></view><view wx:if="{{c}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view></view>
  1 +/**
  2 + * 这里是uni-app内置的常用样式变量
  3 + *
  4 + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  5 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  6 + *
  7 + */
  8 +/**
  9 + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  10 + *
  11 + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  12 + */
  13 +/* uni.scss */
  14 +/* 颜色变量 */
  15 +/* 行为相关颜色 */
  16 +/* 文字基本颜色 */
  17 +/* 背景颜色 */
  18 +/* 边框颜色 */
  19 +/* 尺寸变量 */
  20 +/* 文字尺寸 */
  21 +/* 图片尺寸 */
  22 +/* Border Radius */
  23 +/* 水平间距 */
  24 +/* 垂直间距 */
  25 +/* 透明度 */
  26 +/* 文章场景相关 */
  27 +page {
  28 + background: #f6f8fa;
  29 +}
  30 +.mainBox {
  31 + width: 100%;
  32 + padding: 16rpx 24rpx;
  33 + box-sizing: border-box;
  34 +}
  35 +.null {
  36 + margin-top: 266rpx;
  37 +}
  38 +.null text {
  39 + position: relative;
  40 + margin-top: -80rpx;
  41 + color: #00000066;
  42 + font-size: 26rpx;
  43 +}
  44 +.null image {
  45 + width: 348rpx;
  46 + height: 348rpx;
  47 +}
@@ -14,7 +14,11 @@ const search = () => "../../componets/searchBox.js"; @@ -14,7 +14,11 @@ const search = () => "../../componets/searchBox.js";
14 const shops = () => "../../componets/shops.js"; 14 const shops = () => "../../componets/shops.js";
15 const _sfc_main = { 15 const _sfc_main = {
16 setup(__props) { 16 setup(__props) {
  17 + const lastPage = common_vendor.ref(1);
  18 + const curPage = common_vendor.ref(1);
17 common_vendor.onShow(() => { 19 common_vendor.onShow(() => {
  20 + curPage.value = 1;
  21 + data.recommendList.splice(0);
18 getIndexs(); 22 getIndexs();
19 }); 23 });
20 const toRecharg = () => { 24 const toRecharg = () => {
@@ -32,18 +36,27 @@ const _sfc_main = { @@ -32,18 +36,27 @@ const _sfc_main = {
32 common_vendor.index.switchTab({ url: "/pages/class/class" }); 36 common_vendor.index.switchTab({ url: "/pages/class/class" });
33 }; 37 };
34 const jumpClassHandler = () => common_vendor.index.switchTab({ url: "/pages/class/class" }); 38 const jumpClassHandler = () => common_vendor.index.switchTab({ url: "/pages/class/class" });
  39 + const toBargainPriceMoreHandler = () => common_vendor.index.navigateTo({ url: "/pages/index/bargainPrice" });
35 const getIndexs = async () => { 40 const getIndexs = async () => {
36 try { 41 try {
37 - const res = await api_index.getIndex(); 42 + const res = await api_index.getIndex({ page: curPage.value });
38 data.classList = res.fenlei; 43 data.classList = res.fenlei;
39 data.specialList = res.tjgoods; 44 data.specialList = res.tjgoods;
40 - data.recommendList = res.goods; 45 + data.recommendList = data.recommendList.concat(res.goods.data);
  46 + console.log(data.recommendList, "\u63A8\u8350\u5546\u54C1");
41 console.log("getIndex", res); 47 console.log("getIndex", res);
  48 + lastPage.value = res.goods.last_page;
42 } catch (err) { 49 } catch (err) {
43 common_vendor.index.showToast({ title: err, icon: "none" }); 50 common_vendor.index.showToast({ title: err, icon: "none" });
44 console.log("getIndex", err); 51 console.log("getIndex", err);
45 } 52 }
46 }; 53 };
  54 + common_vendor.onReachBottom(() => {
  55 + curPage.value++;
  56 + if (curPage.value >= lastPage.value)
  57 + return;
  58 + api_index.getIndex();
  59 + });
47 return (_ctx, _cache) => { 60 return (_ctx, _cache) => {
48 return { 61 return {
49 a: common_vendor.p({ 62 a: common_vendor.p({
@@ -59,12 +72,13 @@ const _sfc_main = { @@ -59,12 +72,13 @@ const _sfc_main = {
59 }; 72 };
60 }), 73 }),
61 d: common_vendor.o(jumpClassHandler), 74 d: common_vendor.o(jumpClassHandler),
62 - e: common_vendor.p({ 75 + e: common_vendor.o(toBargainPriceMoreHandler),
  76 + f: common_vendor.p({
63 list: common_vendor.unref(data).specialList.slice(0, 2), 77 list: common_vendor.unref(data).specialList.slice(0, 2),
64 shopWidth: 322, 78 shopWidth: 322,
65 shopHeight: 322 79 shopHeight: 322
66 }), 80 }),
67 - f: common_vendor.p({ 81 + g: common_vendor.p({
68 list: common_vendor.unref(data).recommendList, 82 list: common_vendor.unref(data).recommendList,
69 shopWidth: 344, 83 shopWidth: 344,
70 shopHeight: 344 84 shopHeight: 344
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>JiangChengYuanTi</text></view><view class="more flexA"> 更多 <image src="/static/indexIc/orangeRight.png" mode=""></image></view></view><view class="shop"><shops wx:if="{{e}}" u-i="0a7f8b7d-2" bind:__l="__l" u-p="{{e}}"></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="{{f}}" u-i="0a7f8b7d-3" bind:__l="__l" u-p="{{f}}"></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>
@@ -27,11 +27,7 @@ const _sfc_main = { @@ -27,11 +27,7 @@ const _sfc_main = {
27 payPopShow.value = false; 27 payPopShow.value = false;
28 }); 28 });
29 const currentNum = common_vendor.ref(0); 29 const currentNum = common_vendor.ref(0);
30 - common_vendor.reactive([  
31 - "https://cdn.uviewui.com/uview/swiper/swiper2.png",  
32 - "https://cdn.uviewui.com/uview/swiper/swiper3.png",  
33 - "https://cdn.uviewui.com/uview/swiper/swiper1.png"  
34 - ]); 30 + common_vendor.reactive(["https://cdn.uviewui.com/uview/swiper/swiper2.png", "https://cdn.uviewui.com/uview/swiper/swiper3.png", "https://cdn.uviewui.com/uview/swiper/swiper1.png"]);
35 const icList = common_vendor.reactive([ 31 const icList = common_vendor.reactive([
36 { id: 1, name: "\u5E97\u94FA", icon: "/static/indexIc/shopIc.png" }, 32 { id: 1, name: "\u5E97\u94FA", icon: "/static/indexIc/shopIc.png" },
37 { id: 2, name: "\u5BA2\u670D", icon: "/static/indexIc/service.png" }, 33 { id: 2, name: "\u5BA2\u670D", icon: "/static/indexIc/service.png" },
@@ -161,6 +157,7 @@ const _sfc_main = { @@ -161,6 +157,7 @@ const _sfc_main = {
161 x: common_vendor.p({ 157 x: common_vendor.p({
162 moreSpec: common_vendor.unref(moreSpec), 158 moreSpec: common_vendor.unref(moreSpec),
163 shopDetail: common_vendor.unref(detaileList), 159 shopDetail: common_vendor.unref(detaileList),
  160 + shopType: common_vendor.unref(shopType),
164 btnType: common_vendor.unref(btnType), 161 btnType: common_vendor.unref(btnType),
165 payPopShow: common_vendor.unref(payPopShow) 162 payPopShow: common_vendor.unref(payPopShow)
166 }) 163 })
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 justify-content: center; 38 justify-content: center;
39 } 39 }
40 .indicator-num__text { 40 .indicator-num__text {
41 - color: #FFFFFF; 41 + color: #ffffff;
42 font-size: 12px; 42 font-size: 12px;
43 } 43 }
44 .swiperBox { 44 .swiperBox {
@@ -22,7 +22,7 @@ const _sfc_main = { @@ -22,7 +22,7 @@ const _sfc_main = {
22 const submit = () => { 22 const submit = () => {
23 getComments(); 23 getComments();
24 }; 24 };
25 - const addPhoto = () => proxy.$methods.upload("http://healthmall.shs.broing.cn/api/common/upload", (imgUrl) => { 25 + const addPhoto = () => proxy.$methods.upload("http://health.shs.broing.cn/api/common/upload", (imgUrl) => {
26 console.log("\u8FD4\u56DE\u56FE\u7247", imgUrl); 26 console.log("\u8FD4\u56DE\u56FE\u7247", imgUrl);
27 photoList.push(imgUrl.avatar); 27 photoList.push(imgUrl.avatar);
28 }); 28 });
1 -<view><u-navbar wx:if="{{a}}" u-i="6013ecfd-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="boxs"><view class="title">上传图片</view><view class="photoBox"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="itemPhoto"><image class="photo" src="{{item.a}}" mode=""></image><view class="delBox flexC" bindtap="{{item.b}}"><image class="del" src="/static/mineIc/close.png" mode=""></image></view></view><view class="addPhoto flexV" bindtap="{{d}}"><image src="/static/mineIc/addIC.png" mode=""></image> 还可添加{{c}}张 </view></view><view class="desc"><block wx:if="{{r0}}"><textarea placeholder-class="pls" placeholder="请输入" name="" id="" cols="30" rows="10" value="{{e}}" bindinput="{{f}}"></textarea></block></view><view class="startBox flexA"><text>综合评分</text><u-rate wx:if="{{h}}" u-i="6013ecfd-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-rate></view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{i}}"> 提交评论 </view></view></view>  
  1 +<view><u-navbar wx:if="{{a}}" u-i="6013ecfd-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="boxs"><view class="title">上传图片</view><view class="photoBox"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="itemPhoto"><image class="photo" src="{{item.a}}" mode=""></image><view class="delBox flexC" bindtap="{{item.b}}"><image class="del" src="/static/mineIc/close.png" mode=""></image></view></view><view class="addPhoto flexV" bindtap="{{d}}"><image src="/static/mineIc/addIC.png" mode=""></image> 还可添加{{c}}张 </view></view><view class="desc"><block wx:if="{{r0}}"><textarea placeholder-class="pls" placeholder="请输入" name="" id="" cols="30" rows="10" value="{{e}}" bindinput="{{f}}"></textarea></block></view><view class="startBox flexA"><text>综合评分</text><u-rate wx:if="{{h}}" u-i="6013ecfd-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-rate></view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{i}}">提交评论</view></view></view>
@@ -62,7 +62,7 @@ page { @@ -62,7 +62,7 @@ page {
62 top: 0; 62 top: 0;
63 width: 24rpx; 63 width: 24rpx;
64 height: 24rpx; 64 height: 24rpx;
65 - background: #484B46; 65 + background: #484b46;
66 border-radius: 0 8rpx 0 8rpx; 66 border-radius: 0 8rpx 0 8rpx;
67 } 67 }
68 .boxs .photoBox .itemPhoto .delBox .del { 68 .boxs .photoBox .itemPhoto .delBox .del {
@@ -28,26 +28,7 @@ const _sfc_main = { @@ -28,26 +28,7 @@ const _sfc_main = {
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([]);
31 - const list1 = common_vendor.reactive([  
32 - {  
33 - name: "\u5168\u90E8"  
34 - },  
35 - {  
36 - name: "\u5F85\u4ED8\u6B3E"  
37 - },  
38 - {  
39 - name: "\u5F85\u53D1\u8D27"  
40 - },  
41 - {  
42 - name: "\u5F85\u6536\u8D27"  
43 - },  
44 - {  
45 - name: "\u5F85\u8BC4\u4EF7"  
46 - },  
47 - {  
48 - name: "\u552E\u540E"  
49 - }  
50 - ]); 31 + const list1 = common_vendor.reactive([{ name: "\u5168\u90E8" }, { name: "\u5F85\u4ED8\u6B3E" }, { name: "\u5F85\u53D1\u8D27" }, { name: "\u5F85\u6536\u8D27" }, { name: "\u5F85\u8BC4\u4EF7" }, { name: "\u552E\u540E" }]);
51 const operateOrder = (item, type) => { 32 const operateOrder = (item, type) => {
52 orderId.value = item.id; 33 orderId.value = item.id;
53 if (type == 0 || type == 2) { 34 if (type == 0 || type == 2) {
@@ -181,8 +162,8 @@ const _sfc_main = { @@ -181,8 +162,8 @@ const _sfc_main = {
181 } : {}, { 162 } : {}, {
182 d: [3, 4, 21].includes(item.order_status) 163 d: [3, 4, 21].includes(item.order_status)
183 }, [3, 4, 21].includes(item.order_status) ? { 164 }, [3, 4, 21].includes(item.order_status) ? {
184 - e: common_vendor.t(item.order_no),  
185 - f: common_vendor.o(($event) => copy(item.order_no)) 165 + e: common_vendor.t(item.express_no),
  166 + f: common_vendor.o(($event) => copy(item.express_no))
186 } : {}, { 167 } : {}, {
187 g: "67be9ace-3-" + i0, 168 g: "67be9ace-3-" + i0,
188 h: common_vendor.p({ 169 h: common_vendor.p({
@@ -207,8 +188,8 @@ const _sfc_main = { @@ -207,8 +188,8 @@ const _sfc_main = {
207 }, item.order_status == 3 && item.goodstatus_text == "" ? {} : {}, { 188 }, item.order_status == 3 && item.goodstatus_text == "" ? {} : {}, {
208 s: common_vendor.o(($event) => operateOrder(item, 3)) 189 s: common_vendor.o(($event) => operateOrder(item, 3))
209 }) : {}, { 190 }) : {}, {
210 - t: item.order_status == 4 && item.goodstatus_text != 3  
211 - }, item.order_status == 4 && item.goodstatus_text != 3 ? { 191 + t: item.order_status == 4
  192 + }, item.order_status == 4 ? {
212 v: common_vendor.o(($event) => operateOrder(item, 4)) 193 v: common_vendor.o(($event) => operateOrder(item, 4))
213 } : {}, { 194 } : {}, {
214 w: item.order_status == 21 195 w: item.order_status == 21
@@ -39,7 +39,7 @@ const _sfc_main = { @@ -39,7 +39,7 @@ const _sfc_main = {
39 }; 39 };
40 const copy = () => { 40 const copy = () => {
41 common_vendor.index.setClipboardData({ 41 common_vendor.index.setClipboardData({
42 - data: orderList.value.order_no, 42 + data: orderList.value.express_no,
43 success: () => { 43 success: () => {
44 common_vendor.index.showToast({ title: "\u590D\u5236\u6210\u529F", icon: "none" }); 44 common_vendor.index.showToast({ title: "\u590D\u5236\u6210\u529F", icon: "none" });
45 } 45 }
@@ -69,7 +69,7 @@ const _sfc_main = { @@ -69,7 +69,7 @@ const _sfc_main = {
69 placeOrder.value[0].text = res.order_no; 69 placeOrder.value[0].text = res.order_no;
70 placeOrder.value[1].text = res.zhifu == 1 ? "\u5FAE\u4FE1" : "\u4F59\u989D"; 70 placeOrder.value[1].text = res.zhifu == 1 ? "\u5FAE\u4FE1" : "\u4F59\u989D";
71 placeOrder.value[2].text = res.createtime; 71 placeOrder.value[2].text = res.createtime;
72 - placeOrder.value[3].text = res.pay_order_no; 72 + placeOrder.value[3].text = res.express_no;
73 console.log("getOrderdetail", res); 73 console.log("getOrderdetail", res);
74 } catch (err) { 74 } catch (err) {
75 common_vendor.index.showToast({ title: err, icon: "none" }); 75 common_vendor.index.showToast({ title: err, icon: "none" });
@@ -120,8 +120,17 @@ const _sfc_main = { @@ -120,8 +120,17 @@ const _sfc_main = {
120 d: common_vendor.p({ 120 d: common_vendor.p({
121 shop: common_vendor.unref(orderList) 121 shop: common_vendor.unref(orderList)
122 }), 122 }),
123 - e: common_vendor.t(common_vendor.unref(orderList).total_price),  
124 - f: common_vendor.f(common_vendor.unref(placeOrder), (item, index, i0) => { 123 + e: common_vendor.unref(orderList).goodstatus_text !== 3
  124 + }, common_vendor.unref(orderList).goodstatus_text !== 3 ? {
  125 + f: common_vendor.t(common_vendor.unref(orderList).total_price)
  126 + } : {}, {
  127 + g: common_vendor.unref(orderList).goodstatus_text === 3
  128 + }, common_vendor.unref(orderList).goodstatus_text === 3 ? {
  129 + h: common_vendor.t(common_vendor.unref(orderList).express_price),
  130 + i: common_vendor.t(common_vendor.unref(orderList).score),
  131 + j: common_vendor.t(common_vendor.unref(orderList).express_price)
  132 + } : {}, {
  133 + k: common_vendor.f(common_vendor.unref(placeOrder), (item, index, i0) => {
125 return common_vendor.e({ 134 return common_vendor.e({
126 a: common_vendor.t(item.name), 135 a: common_vendor.t(item.name),
127 b: common_vendor.t(item.text), 136 b: common_vendor.t(item.text),
@@ -132,27 +141,27 @@ const _sfc_main = { @@ -132,27 +141,27 @@ const _sfc_main = {
132 e: item.id 141 e: item.id
133 }); 142 });
134 }), 143 }),
135 - g: common_vendor.unref(btnType) == 3 144 + l: common_vendor.unref(btnType) == 3
136 }, common_vendor.unref(btnType) == 3 ? {} : {}, { 145 }, common_vendor.unref(btnType) == 3 ? {} : {}, {
137 - h: common_vendor.unref(btnType) <= 2 146 + m: common_vendor.unref(btnType) <= 2
138 }, common_vendor.unref(btnType) <= 2 ? { 147 }, common_vendor.unref(btnType) <= 2 ? {
139 - i: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u53D6\u6D88\u4ED8\u6B3E" : common_vendor.unref(btnType) == 2 ? "\u7533\u8BF7\u9000\u6B3E" : "\u8054\u7CFB\u5BA2\u670D"),  
140 - j: common_vendor.o(($event) => btns(0)) 148 + n: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u53D6\u6D88\u4ED8\u6B3E" : common_vendor.unref(btnType) == 2 ? "\u7533\u8BF7\u9000\u6B3E" : "\u8054\u7CFB\u5BA2\u670D"),
  149 + o: common_vendor.o(($event) => btns(0))
141 } : {}, { 150 } : {}, {
142 - k: common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3 151 + p: common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3
143 }, common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3 ? { 152 }, common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3 ? {
144 - l: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u7ACB\u5373\u652F\u4ED8" : "\u786E\u8BA4\u6536\u8D27"),  
145 - m: common_vendor.o(($event) => btns(1)) 153 + q: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u7ACB\u5373\u652F\u4ED8" : "\u786E\u8BA4\u6536\u8D27"),
  154 + r: common_vendor.o(($event) => btns(1))
146 } : {}, { 155 } : {}, {
147 - n: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false),  
148 - o: common_vendor.p({ 156 + s: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false),
  157 + t: common_vendor.p({
149 orderId: common_vendor.unref(orderId), 158 orderId: common_vendor.unref(orderId),
150 isOrderPay: true, 159 isOrderPay: true,
151 totalPrice: common_vendor.unref(orderList).total_price, 160 totalPrice: common_vendor.unref(orderList).total_price,
152 modeShow: common_vendor.unref(modeShow) 161 modeShow: common_vendor.unref(modeShow)
153 }), 162 }),
154 - p: common_vendor.o(pointsBtns),  
155 - q: common_vendor.p({ 163 + v: common_vendor.o(pointsBtns),
  164 + w: common_vendor.p({
156 integral: common_vendor.unref(integral), 165 integral: common_vendor.unref(integral),
157 tipType: common_vendor.unref(tipType), 166 tipType: common_vendor.unref(tipType),
158 tipShow: common_vendor.unref(tipShow) 167 tipShow: common_vendor.unref(tipShow)
1 -<view><u-navbar wx:if="{{b}}" bindleftClick="{{a}}" u-i="a44fc2ea-0" bind:__l="__l" u-p="{{b}}"></u-navbar><view class="mainBox"><shop-addres wx:if="{{c}}" u-i="a44fc2ea-1" bind:__l="__l" u-p="{{c}}"></shop-addres><view class="shopBox"><order-shops wx:if="{{d}}" u-i="a44fc2ea-2" bind:__l="__l" u-p="{{d}}"></order-shops><view class="line"></view><view class="mode flexJ"><view class="left">提货方式</view><view class="right">快递配送</view></view></view><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付款</view><view class="money">¥{{e}}</view></view><view wx:for="{{f}}" wx:for-item="item" wx:key="e" class="moneyBox flexJ"><view class="items">{{item.a}} <text>{{item.b}}</text></view><view wx:if="{{item.c}}" bindtap="{{item.d}}" class="copy">复制</view></view></view><view class="btnBox iosAuto"><view wx:if="{{g}}" class="service flexC"><button open-type="contact">联系客服</button></view><view wx:if="{{h}}" class="gay flexC" bindtap="{{j}}">{{i}}</view><view wx:if="{{k}}" class="red flexC" bindtap="{{m}}">{{l}}</view></view><pay-mode wx:if="{{o}}" bindcanclePop="{{n}}" u-i="a44fc2ea-3" bind:__l="__l" u-p="{{o}}"></pay-mode><tip-pops wx:if="{{q}}" bindpointsBtns="{{p}}" u-i="a44fc2ea-4" bind:__l="__l" u-p="{{q}}"></tip-pops></view>  
  1 +<view><u-navbar wx:if="{{b}}" bindleftClick="{{a}}" u-i="a44fc2ea-0" bind:__l="__l" u-p="{{b}}"></u-navbar><view class="mainBox"><shop-addres wx:if="{{c}}" u-i="a44fc2ea-1" bind:__l="__l" u-p="{{c}}"></shop-addres><view class="shopBox"><order-shops wx:if="{{d}}" u-i="a44fc2ea-2" bind:__l="__l" u-p="{{d}}"></order-shops><view class="line"></view><view class="mode flexJ"><view class="left">配送方式</view><view class="right">快递配送</view></view></view><view wx:if="{{e}}" class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付款</view><view class="money">¥{{f}}</view></view><block wx:if="{{g}}"><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>运费</view><view class="money">¥{{h}}</view></view><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付</view><view class="money"><text style="color:#000">{{i}}积分</text> +¥{{j}}</view></view></block><view wx:for="{{k}}" wx:for-item="item" wx:key="e" class="moneyBox flexJ"><view class="items">{{item.a}} <text>{{item.b}}</text></view><view wx:if="{{item.c}}" bindtap="{{item.d}}" class="copy">复制</view></view></view><view class="btnBox iosAuto"><view wx:if="{{l}}" class="service flexC"><button open-type="contact">联系客服</button></view><view wx:if="{{m}}" class="gay flexC" bindtap="{{o}}">{{n}}</view><view wx:if="{{p}}" class="red flexC" bindtap="{{r}}">{{q}}</view></view><pay-mode wx:if="{{t}}" bindcanclePop="{{s}}" u-i="a44fc2ea-3" bind:__l="__l" u-p="{{t}}"></pay-mode><tip-pops wx:if="{{w}}" bindpointsBtns="{{v}}" u-i="a44fc2ea-4" bind:__l="__l" u-p="{{w}}"></tip-pops></view>
1 -<view><u-navbar wx:if="{{a}}" u-i="7023efea-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="blackBg"><view class="topBox"><image class="bg" src="/static/mineIc/vipBg.png" mode=""></image><view class="tipBox"><view class="balanceBox"><view class="tip">余额(元)</view><view class="balance flexA"><text>¥</text><view class="balances">{{b}}</view></view></view><view class="photo flexA"><open-data type="userAvatarUrl" class="avatar"></open-data><open-data type="userNickName" class="nickname"></open-data></view></view></view></view><view class="packageBox"><view class="title flexA">金额 <input type="number" placeholder-class="ples" placeholder="(自定义)" value="{{c}}" bindinput="{{d}}"></input></view><view class="package"><view wx:for="{{e}}" wx:for-item="item" wx:key="e" bindtap="{{item.c}}" class="{{['item', 'flexV', item.d]}}"><view class="recharge">冲{{item.a}}</view><view class="deliver">送{{item.b}}</view></view></view></view><view class="line"></view><view class="desc"><view class="descTitle">使用说明</view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{f}}">立即支付</view></view></view>  
  1 +<view><u-navbar wx:if="{{a}}" u-i="7023efea-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="blackBg"><view class="topBox"><image class="bg" src="/static/mineIc/vipBg.png" mode=""></image><view class="tipBox"><view class="balanceBox"><view class="tip">余额(元)</view><view class="balance flexA"><text>¥</text><view class="balances">{{b}}</view></view></view><view class="photo flexA"><open-data type="userAvatarUrl" class="avatar"></open-data><open-data type="userNickName" class="nickname"></open-data></view></view></view></view><view class="packageBox"><view class="title flexA"> 金额 <input type="number" placeholder-class="ples" placeholder="(自定义)" value="{{c}}" bindinput="{{d}}"/></view><view class="package"><view wx:for="{{e}}" wx:for-item="item" wx:key="e" bindtap="{{item.c}}" class="{{['item', 'flexV', item.d]}}"><view class="recharge">冲{{item.a}}</view><view class="deliver">送{{item.b}}</view></view></view></view><view class="line"></view><view class="desc"><view class="descTitle">使用说明</view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{f}}">立即支付</view></view></view>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 .blackBg { 32 .blackBg {
33 width: 100%; 33 width: 100%;
34 height: 278rpx; 34 height: 278rpx;
35 - background: #1D1E24; 35 + background: #1d1e24;
36 padding: 32rpx 24rpx 0; 36 padding: 32rpx 24rpx 0;
37 box-sizing: border-box; 37 box-sizing: border-box;
38 } 38 }
@@ -137,7 +137,7 @@ @@ -137,7 +137,7 @@
137 .line { 137 .line {
138 width: 100%; 138 width: 100%;
139 height: 24rpx; 139 height: 24rpx;
140 - background: #F5F7FB; 140 + background: #f5f7fb;
141 } 141 }
142 .desc { 142 .desc {
143 width: 100%; 143 width: 100%;
@@ -153,7 +153,7 @@ const _sfc_main = { @@ -153,7 +153,7 @@ const _sfc_main = {
153 j: common_vendor.o(checkAll), 153 j: common_vendor.o(checkAll),
154 k: common_vendor.unref(data).btnStatus 154 k: common_vendor.unref(data).btnStatus
155 }, common_vendor.unref(data).btnStatus ? { 155 }, common_vendor.unref(data).btnStatus ? {
156 - l: common_vendor.t(common_vendor.unref(allMoney)) 156 + l: common_vendor.t(+common_vendor.unref(allMoney).toFixed(2))
157 } : {}, { 157 } : {}, {
158 m: common_vendor.t(common_vendor.unref(data).btnStatus ? "\u7ED3\u7B97" : "\u5220\u9664"), 158 m: common_vendor.t(common_vendor.unref(data).btnStatus ? "\u7ED3\u7B97" : "\u5220\u9664"),
159 n: common_vendor.o(settleBtn) 159 n: common_vendor.o(settleBtn)
1 -<view class=""><u-navbar wx:if="{{a}}" u-i="73f0a715-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:if="{{b}}" class="minBox"><view class="topBox flexJ"><view class="amount flexA" bindtap="{{d}}"><image src="/static/shopCarIc/shopAddress.png" mode=""></image><view class="adress ellipsis">{{c}}</view></view><view class="manage" bindtap="{{f}}">{{e}}</view></view><view wx:for="{{g}}" wx:for-item="item" wx:key="j" class="shopBox flexA"><view class="checkIc" catchtap="{{item.b}}"><image wx:if="{{item.a}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image></view><view class="shopPhoto"><image src="{{item.c}}" mode=""></image><image wx:if="{{item.d}}" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image></view><view class="infoBox"><view class="title ellipsis">{{item.e}}</view><view class="numBox flexJ"><view class="rightTitle flexA"><text>¥</text>{{item.f}}</view><view class="and flexA"><image src="/static/shopCarIc/reduce.png" mode="" bindtap="{{item.g}}"></image><view class="num flexC">{{item.h}}</view><image src="/static/shopCarIc/add.png" mode="" bindtap="{{item.i}}"></image></view></view></view></view><view class="" style="height:120rpx"></view></view><view wx:else class="nullBox flexV"><image src="/static/shopCarIc/shopCarNull.png" mode=""></image> 购物车为空哦 </view><view wx:if="{{h}}" class="payBox flexJ"><view class="allIc flexA" bindtap="{{j}}"><image wx:if="{{i}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image><view class="">全选</view></view><view class="amountBox flexA"><view wx:if="{{k}}" class="settleBox flexA"><view class="settle">合计:</view><view class="money flexA"> ¥{{l}}</view></view><view class="btns flexC" bindtap="{{n}}">{{m}}</view></view></view></view>  
  1 +<view class=""><u-navbar wx:if="{{a}}" u-i="73f0a715-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:if="{{b}}" class="minBox"><view class="topBox flexJ"><view class="amount flexA" bindtap="{{d}}"><image src="/static/shopCarIc/shopAddress.png" mode=""></image><view class="adress ellipsis">{{c}}</view></view><view class="manage" bindtap="{{f}}">{{e}}</view></view><view wx:for="{{g}}" wx:for-item="item" wx:key="j" class="shopBox flexA"><view class="checkIc" catchtap="{{item.b}}"><image wx:if="{{item.a}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image></view><view class="shopPhoto"><image src="{{item.c}}" mode=""></image><image wx:if="{{item.d}}" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image></view><view class="infoBox"><view class="title ellipsis">{{item.e}}</view><view class="numBox flexJ"><view class="rightTitle flexA"><text>¥</text> {{item.f}}</view><view class="and flexA"><image src="/static/shopCarIc/reduce.png" mode="" bindtap="{{item.g}}"></image><view class="num flexC">{{item.h}}</view><image src="/static/shopCarIc/add.png" mode="" bindtap="{{item.i}}"></image></view></view></view></view><view class="" style="height:120rpx"></view></view><view wx:else class="nullBox flexV"><image src="/static/shopCarIc/shopCarNull.png" mode=""></image> 购物车为空哦 </view><view wx:if="{{h}}" class="payBox flexJ"><view class="allIc flexA" bindtap="{{j}}"><image wx:if="{{i}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image><view class="">全选</view></view><view class="amountBox flexA"><view wx:if="{{k}}" class="settleBox flexA"><view class="settle">合计:</view><view class="money flexA">¥{{l}}</view></view><view class="btns flexC" bindtap="{{n}}">{{m}}</view></view></view></view>
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 display: none !important; 28 display: none !important;
29 } 29 }
30 page { 30 page {
31 - background: #F6F8FA; 31 + background: #f6f8fa;
32 } 32 }
33 .minBox { 33 .minBox {
34 width: 100%; 34 width: 100%;
@@ -100,7 +100,7 @@ page { @@ -100,7 +100,7 @@ page {
100 font-size: 28rpx; 100 font-size: 28rpx;
101 } 101 }
102 .minBox .shopBox .infoBox .numBox .rightTitle { 102 .minBox .shopBox .infoBox .numBox .rightTitle {
103 - color: #F33F2E; 103 + color: #f33f2e;
104 font-size: 40rpx; 104 font-size: 40rpx;
105 font-weight: 700; 105 font-weight: 700;
106 } 106 }
@@ -166,7 +166,7 @@ page { @@ -166,7 +166,7 @@ page {
166 } 166 }
167 .nullBox { 167 .nullBox {
168 margin-top: 266rpx; 168 margin-top: 266rpx;
169 - color: #C6C5C8; 169 + color: #c6c5c8;
170 font-size: 28rpx; 170 font-size: 28rpx;
171 } 171 }
172 .nullBox image { 172 .nullBox image {