删除了没用的,增加地址定位,优化常规类商品详情和订单
This commit is contained in:
parent
0fd87acc48
commit
370cc4b6bc
|
@ -12,6 +12,12 @@ export const stateList = [
|
||||||
msg: '等待卖家发货',
|
msg: '等待卖家发货',
|
||||||
tips: '耐心等待工艺品发货~'
|
tips: '耐心等待工艺品发货~'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
state: '退款中',
|
||||||
|
img: '',
|
||||||
|
msg: '退款审核中',
|
||||||
|
tips: '请君耐心等待退款结果'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
state: '已退款',
|
state: '已退款',
|
||||||
img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FlPnvgqCp-yituikuan.png',
|
img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FlPnvgqCp-yituikuan.png',
|
||||||
|
|
17
pages.json
17
pages.json
|
@ -142,13 +142,6 @@
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path" : "pages/service/productDetail/productDetail",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path" : "pages/workshop/index/index",
|
"path" : "pages/workshop/index/index",
|
||||||
"style" :
|
"style" :
|
||||||
|
@ -195,7 +188,8 @@
|
||||||
"path" : "pages/store-home/main/testMain",
|
"path" : "pages/store-home/main/testMain",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : "",
|
||||||
|
"enablePullDownRefresh":true //开启下拉刷新
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -225,6 +219,13 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/mine/addressList/addressList",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins" : {
|
"plugins" : {
|
||||||
|
|
|
@ -14,11 +14,17 @@
|
||||||
<view class="flex-row items-center group_4">
|
<view class="flex-row items-center group_4">
|
||||||
<text class="font_2 text_5">所在地区</text>
|
<text class="font_2 text_5">所在地区</text>
|
||||||
<view class="flex-col justify-start flex-1 relative group_5 ml-13">
|
<view class="flex-col justify-start flex-1 relative group_5 ml-13">
|
||||||
<!-- <input class="text-wrapper_3" v-model="addressParam.region" placeholder="请输入地区" /> -->
|
<picker mode="region" @change="bindTimeChange" style="width: 400rpx;">
|
||||||
<view class="zujian"><addSelected></addSelected></view>
|
<input
|
||||||
|
border="bottom"
|
||||||
|
placeholder="请选择省市区"
|
||||||
|
type="text" v-model="addressParam.region"
|
||||||
|
:disabled="true"/>
|
||||||
|
</picker>
|
||||||
<image
|
<image
|
||||||
class="image pos"
|
class="image pos"
|
||||||
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FkYDyjpPh-dingwei.png"
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FkYDyjpPh-dingwei.png"
|
||||||
|
@click="chooseLocation()"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -49,7 +55,6 @@
|
||||||
import {ref , onMounted} from 'vue'
|
import {ref , onMounted} from 'vue'
|
||||||
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import addSelected from '../../../pages/order/component/addSelected.vue'
|
|
||||||
import emitter from '../../../utils/emitter';
|
import emitter from '../../../utils/emitter';
|
||||||
const addressParam = ref({
|
const addressParam = ref({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -118,16 +123,6 @@ const newAddress = async () =>{
|
||||||
console.log('res2==>',res.data);
|
console.log('res2==>',res.data);
|
||||||
sucRes(res.data.code)
|
sucRes(res.data.code)
|
||||||
}
|
}
|
||||||
// if(res.data.code === 1) {
|
|
||||||
// uni.navigateBack({ //返回上一页
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// uni.showToast({
|
|
||||||
// icon: 'error',
|
|
||||||
// title: "新增地址失败"
|
|
||||||
// })
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
const sucRes =(res)=>{ //请求成功执行的方法
|
const sucRes =(res)=>{ //请求成功执行的方法
|
||||||
if(res === 1) {
|
if(res === 1) {
|
||||||
|
@ -142,12 +137,22 @@ const sucRes =(res)=>{ //请求成功执行的方法
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//跳转回订单页面
|
const chooseLocation = () => { //定位获取地址
|
||||||
// const jump =()=> {
|
uni.chooseLocation({
|
||||||
// uni.navigateTo({
|
success: (res) => {
|
||||||
// url: '../../../pages/Shopping-cart/address/address'
|
// console.log('详细地址:' + res.address);
|
||||||
// })
|
// console.log('位置名称:' + res.name);
|
||||||
// }
|
addressParam.value.region = res.address
|
||||||
|
addressParam.value.detailAddress = res.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const bindTimeChange = (e) => { //picker省市区选择
|
||||||
|
// console.log('省--->',e.detail.value[0]);
|
||||||
|
// console.log('市--->',e.detail.value[1]);
|
||||||
|
// console.log('区--->',e.detail.value[2]);
|
||||||
|
addressParam.value.region = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -93,7 +93,7 @@ const jump_feiyi =()=>{ //跳转非遗工坊
|
||||||
}
|
}
|
||||||
const jump_store =()=>{
|
const jump_store =()=>{
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/store-home/main/main'
|
url: '/pages/store-home/main/testMain'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getFonts =()=>{
|
const getFonts =()=>{
|
||||||
|
|
191
pages/mine/addressList/addressList.vue
Normal file
191
pages/mine/addressList/addressList.vue
Normal file
|
@ -0,0 +1,191 @@
|
||||||
|
<template>
|
||||||
|
<view class="flex-col page">
|
||||||
|
<view class="flex-col list">
|
||||||
|
<view class="flex-col list-item mt-10" v-for="(item, index) in addressArr" :key="index">
|
||||||
|
<view class="flex-row justify-between items-center">
|
||||||
|
<view class="flex-row items-center">
|
||||||
|
<text class="font">{{ item.name }}</text>
|
||||||
|
<text class="font_2 text">{{ item.phone }}</text>
|
||||||
|
<view class="flex-col justify-start items-center shrink-0 text-wrapper" v-if="item.isDefault === 1">
|
||||||
|
<text class="text_2">默认</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-row">
|
||||||
|
<image
|
||||||
|
class="image"
|
||||||
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FzktCnafj-edit.png"
|
||||||
|
@click="editAddress(item)"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
class="image ml-12"
|
||||||
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FIkoUOFBt-delete.png"
|
||||||
|
@click="confirmPop(item.id)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-col items-start mt-13">
|
||||||
|
<text class="font_3">{{ item.region }} {{ item.detailAddress }}</text>
|
||||||
|
<!-- <text class="font_3">尔华德学院</text> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-col justify-start items-center section_2 mt-392" @click="jump_newAddress()">
|
||||||
|
<view class="flex-col justify-start items-center text-wrapper_2"><text class="font text_3">新增地址</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { baseUrl } from '../../../api/request';
|
||||||
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
|
const items = ref([null,null,null,null,null,null,null,null,null])
|
||||||
|
const addressArr = ref([]) //地址数组
|
||||||
|
// onMounted(()=>{
|
||||||
|
// getAddress()
|
||||||
|
// })
|
||||||
|
onShow(()=>{
|
||||||
|
getAddress()
|
||||||
|
})
|
||||||
|
const getAddress = async ()=> { //获取地址方法
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/address/list',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
cookie: wx.getStorageSync('cookie')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if( res.data.code === 1 ) {
|
||||||
|
addressArr.value = res.data.data
|
||||||
|
console.log('获取的地址信息--->',res.data.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//编辑地址方法
|
||||||
|
const editAddress =(value)=>{
|
||||||
|
console.log('地址信息',value);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Shopping-cart/newaddress_Info/newaddress_Info?editInfo=' + JSON.stringify(value)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const confirmPop = (id) => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否删除地址?',
|
||||||
|
success: (e) => {
|
||||||
|
if(e.confirm) {
|
||||||
|
deleteAddress(id)
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除地址方法
|
||||||
|
const deleteAddress = async ( id ) =>{
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/address/delete',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
'cookie': wx.getStorageSync('cookie')
|
||||||
|
},
|
||||||
|
data: { id: id }
|
||||||
|
})
|
||||||
|
// console.log(res.data);
|
||||||
|
if( res.data.code === 1 ) {
|
||||||
|
getAddress()
|
||||||
|
// console.log("删除地址成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const jump_newAddress =()=> {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/Shopping-cart/newaddress_Info/newaddress_Info'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.mt-13 {
|
||||||
|
margin-top: 24.38rpx;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
padding-top: 31.88rpx;
|
||||||
|
background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FQfLHXSAU-feiyigongfangbeijin.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.list {
|
||||||
|
margin-left: 28.13rpx;
|
||||||
|
margin-right: 26.27rpx;
|
||||||
|
}
|
||||||
|
.list-item {
|
||||||
|
padding: 31.88rpx 18.75rpx 36.11rpx 24.62rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 9.38rpx;
|
||||||
|
}
|
||||||
|
.list-item:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.font {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: FZSongKeBenXiuKaiS-R-GB;
|
||||||
|
line-height: 25.89rpx;
|
||||||
|
color: #323232;
|
||||||
|
}
|
||||||
|
.font_2 {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: FZSongKeBenXiuKaiS-R-GB;
|
||||||
|
line-height: 20.04rpx;
|
||||||
|
color: #323232;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
margin-left: 16.18rpx;
|
||||||
|
}
|
||||||
|
.text-wrapper {
|
||||||
|
margin-left: 28.57rpx;
|
||||||
|
padding: 5.1rpx 0 8.06rpx;
|
||||||
|
background-color: #fbdedf;
|
||||||
|
border-radius: 9.38rpx;
|
||||||
|
width: 69.38rpx;
|
||||||
|
height: 31.88rpx;
|
||||||
|
}
|
||||||
|
.text_2 {
|
||||||
|
color: #c35c5d;
|
||||||
|
font-size: 22.5rpx;
|
||||||
|
font-family: FZSongKeBenXiuKaiS-R-GB;
|
||||||
|
// line-height: 18.71rpx;
|
||||||
|
}
|
||||||
|
.image {
|
||||||
|
border-radius: 9.38rpx;
|
||||||
|
width: 39.38rpx;
|
||||||
|
height: 39.38rpx;
|
||||||
|
}
|
||||||
|
.font_3 {
|
||||||
|
font-size: 26.25rpx;
|
||||||
|
font-family: FZSongKeBenXiuKaiS-R-GB;
|
||||||
|
line-height: 31.88rpx;
|
||||||
|
color: #818181;
|
||||||
|
}
|
||||||
|
.section_2 {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 16.88rpx 0;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.text-wrapper_2 {
|
||||||
|
padding: 25.43rpx 0 24.51rpx;
|
||||||
|
background-color: #fbdedf;
|
||||||
|
border-radius: 46.88rpx;
|
||||||
|
width: 629.77rpx;
|
||||||
|
}
|
||||||
|
.text_3 {
|
||||||
|
color: #c35c5d;
|
||||||
|
line-height: 28.84rpx;
|
||||||
|
}
|
||||||
|
@import url(../../../common/css/global.css);
|
||||||
|
</style>
|
|
@ -39,7 +39,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col mt-37">
|
<view class="flex-col mt-37">
|
||||||
<view class="flex-col group_3">
|
<view class="flex-col group_3">
|
||||||
<view class="flex-row justify-between relative">
|
<view class="flex-row justify-between relative" @click="jump_addressList()">
|
||||||
<image class="image_3"
|
<image class="image_3"
|
||||||
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FSJZTOttL-address.png" />
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FSJZTOttL-address.png" />
|
||||||
<image class="self-start image_4 image_5"
|
<image class="self-start image_4 image_5"
|
||||||
|
@ -138,6 +138,11 @@ const getFonts = () => { //导入字体
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const jump_addressList = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/mine/addressList/addressList'
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
<view class="flex-col section_4 list-item_1 mt-14" v-for="(order, index) in Status.displayedOrders"
|
<view class="flex-col section_4 list-item_1 mt-14" v-for="(order, index) in Status.displayedOrders"
|
||||||
:key="order.id" @click="goToText(order)">
|
:key="order.id" @click="goToText(order)">
|
||||||
<view class="flex-col">
|
<view class="flex-col">
|
||||||
<!-- <text class="self-end font_3 text_5">交易关闭</text> -->
|
|
||||||
<view class="flex-row items-center self-stretch mt-2">
|
<view class="flex-row items-center self-stretch mt-2">
|
||||||
<text class="font_4">订单编号:</text>
|
<text class="font_4">订单编号:</text>
|
||||||
<text class="font_5 ml-5">{{order.orderNumber}}</text>
|
<text class="font_5 ml-5">{{order.orderNumber}}</text>
|
||||||
|
<text class="font_status text_5">{{ order.orderStatus }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col group">
|
<view class="flex-col group">
|
||||||
|
@ -101,12 +101,15 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-end group_7" v-if="order.orderStatus==='待收货'">
|
<view class="flex-row justify-end group_7" v-if="order.orderStatus==='待收货'">
|
||||||
<view class="flex-col justify-start items-center text-wrapper_2 ml-14" @click="viewLogistics()">
|
<view class="flex-col justify-start items-center text-wrapper_2 ml-14" @click="viewLogistics(order.id)">
|
||||||
<text class="font_3">查看物流</text>
|
<text class="font_3">查看物流</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex-col justify-start items-center text-wrapper ml-14" @click="confirm()">
|
||||||
|
<text class="font">确认收货</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-end group_7" v-if="order.orderStatus==='已退款'">
|
<view class="flex-row justify-end group_7" v-if="order.orderStatus==='已退款' || order.orderStatus === '交易关闭'">
|
||||||
<view class="flex-col justify-start items-center text-wrapper"><text
|
<view class="flex-col justify-start items-center text-wrapper" @click="deleteOrder()"><text
|
||||||
class="font text_18">删除订单</text></view>
|
class="font text_18">删除订单</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -284,14 +287,13 @@ const postCancelOrder = async(order)=>{ //向后端发送取消订单请求
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//查看物流方法
|
//查看物流方法
|
||||||
const viewLogistics = ()=>{
|
const viewLogistics = ( oid )=>{
|
||||||
console.log('这是查看物流方法');
|
// console.log('订单编号--->',oid);
|
||||||
// var plugin = requirePlugin('logisticsPlugin')
|
|
||||||
uni.request({
|
uni.request({
|
||||||
url: baseUrl + '/logistics/get/info',
|
url: baseUrl + '/logistics/get/info',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
id: 125125278
|
id: oid
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'cookie': wx.getStorageSync("cookie")
|
'cookie': wx.getStorageSync("cookie")
|
||||||
|
@ -305,6 +307,9 @@ const viewLogistics = ()=>{
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const deleteOrder = async () => { //删除订单方法
|
||||||
|
console.log('删除订单方法');
|
||||||
|
}
|
||||||
//获取字体
|
//获取字体
|
||||||
const getFonts =()=>{
|
const getFonts =()=>{
|
||||||
uni.loadFontFace({
|
uni.loadFontFace({
|
||||||
|
@ -318,6 +323,9 @@ const getFonts =()=>{
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const confirm =()=> { //确认收货方法
|
||||||
|
console.log('确认收货方法');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -453,6 +461,15 @@ const getFonts =()=>{
|
||||||
.list-item_1:first-child {
|
.list-item_1:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
.list-item_1:last-child {
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
.font_status {
|
||||||
|
// font-size: 26.25rpx;
|
||||||
|
font-family: FangZhengFonts;
|
||||||
|
line-height: 25.54rpx;
|
||||||
|
color: #ffaaa5;
|
||||||
|
}
|
||||||
.font_3 {
|
.font_3 {
|
||||||
font-size: 26.25rpx;
|
font-size: 26.25rpx;
|
||||||
font-family: FangZhengFonts;
|
font-family: FangZhengFonts;
|
||||||
|
@ -460,7 +477,7 @@ const getFonts =()=>{
|
||||||
color: #ffaaa5;
|
color: #ffaaa5;
|
||||||
}
|
}
|
||||||
.text_5 {
|
.text_5 {
|
||||||
margin-right: 8.08rpx;
|
margin: 0 8.08rpx 0 180rpx;
|
||||||
line-height: 24.62rpx;
|
line-height: 24.62rpx;
|
||||||
}
|
}
|
||||||
.font_4 {
|
.font_4 {
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
<uni-data-picker v-slot:default="{data, error, options}" :localdata="items" popup-title="选择省/市/区" @change="onchange" @nodeclick="onnodeclick">
|
|
||||||
<view class="picker" :style="pik">{{ tempSelected }}</view>
|
|
||||||
</uni-data-picker>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {ref, onMounted} from 'vue'
|
|
||||||
import data from './area.json'
|
|
||||||
import emitter from '../../../utils/emitter';
|
|
||||||
|
|
||||||
const items = ref(data)
|
|
||||||
const selected = ref('选择省/市/区')
|
|
||||||
const selectedItem = ref([])
|
|
||||||
const pik = ref({color: '#CFCFCF'})
|
|
||||||
|
|
||||||
const tempSelected = ref('选择省/市/区')
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
emitter.on('addRegion', (val) => {
|
|
||||||
selected.value = val
|
|
||||||
pik.value.color = "#000"
|
|
||||||
if(selected.value.length > 11) tempSelected.value = selected.value.slice(0, 11) + '...'
|
|
||||||
else tempSelected.value = selected.value
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
const onchange = (e) => {
|
|
||||||
selectedItem.value = e.detail.value
|
|
||||||
selected.value = ""
|
|
||||||
selectedItem.value.map((it, index) => {
|
|
||||||
selected.value += it.text
|
|
||||||
if(index != 2)
|
|
||||||
selected.value += "/"
|
|
||||||
})
|
|
||||||
if(selected.value.length > 11) tempSelected.value = selected.value.slice(0, 11) + '...'
|
|
||||||
else tempSelected.value = selected.value
|
|
||||||
pik.value.color = "#000"
|
|
||||||
emitter.emit('region', selected.value)
|
|
||||||
}
|
|
||||||
const close = () => {
|
|
||||||
emitter.emit('close')
|
|
||||||
}
|
|
||||||
const onnodeclick = (node) => {
|
|
||||||
console.log(node)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.picker{
|
|
||||||
font-size: 35rpx;
|
|
||||||
line-height: 100rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
import { onMounted , ref } from 'vue'
|
import { onMounted , ref } from 'vue'
|
||||||
import emitter from '../../../utils/emitter'
|
import emitter from '../../../utils/emitter'
|
||||||
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
import { testUrl , baseUrl , suiUrl } from '../../../api/request';
|
||||||
// import { userStore } from '../../../store/userStore';
|
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
const items = ref([null, null])
|
const items = ref([null, null])
|
||||||
const addressList = ref([])
|
const addressList = ref([])
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -61,7 +61,7 @@
|
||||||
<view class="flex-row justify-between items-center mt-6">
|
<view class="flex-row justify-between items-center mt-6">
|
||||||
<text class="font_6 text_20">订单编号:</text>
|
<text class="font_6 text_20">订单编号:</text>
|
||||||
<view class="flex-row items-center group_11">
|
<view class="flex-row items-center group_11">
|
||||||
<view class="flex-col justify-start items-center text-wrapper view">
|
<view class="flex-col justify-start items-center text-wrapper view" @click="copy(orderObject.orderNumber)">
|
||||||
<text class="font_7 text_22">复制</text>
|
<text class="font_7 text_22">复制</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="font_4 text_21">{{ orderObject.orderNumber }}</text>
|
<text class="font_4 text_21">{{ orderObject.orderNumber }}</text>
|
||||||
|
@ -81,9 +81,9 @@
|
||||||
<text class="font_6 text_27">物流单号:</text>
|
<text class="font_6 text_27">物流单号:</text>
|
||||||
<view class="flex-row items-center group_14">
|
<view class="flex-row items-center group_14">
|
||||||
<text class="font_4">{{ orderObject.trackingNumber }}</text>
|
<text class="font_4">{{ orderObject.trackingNumber }}</text>
|
||||||
<view class="flex-col justify-start items-center shrink-0 text-wrapper ml-5">
|
<!-- <view class="flex-col justify-start items-center shrink-0 text-wrapper ml-5">
|
||||||
<text class="font_7 text_22">复制</text>
|
<text class="font_7 text_22">复制</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-baseline mt-6"
|
<view class="flex-row justify-between items-baseline mt-6"
|
||||||
|
@ -103,9 +103,11 @@
|
||||||
<text class="text_31">{{ orderObject.totalAmount }}</text>
|
<text class="text_31">{{ orderObject.totalAmount }}</text>
|
||||||
<!-- <text class="text_33">00</text> -->
|
<!-- <text class="text_33">00</text> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <button open-type="contact" bindcontact="handleContact" v-if="bottomBtn === '联系客服'" session-from="sessionFrom">客服</button> -->
|
<view class="flex-col justify-start items-center text-wrapper_2" @click="stateSubmit(orderObject)" v-if="bottomBtn != '联系客服'">
|
||||||
<view class="flex-col justify-start items-center text-wrapper_2" @click="stateSubmit" v-if="bottomBtn != '联系客服'">
|
<text class="font_8 text_32" >{{ bottomBtn }}</text>
|
||||||
<text class="font_8 text_32" >{{ bottomBtn }}</text>
|
</view>
|
||||||
|
<view class="flex-col justify-start items-center text-wrapper_2" @click="confirm()" v-if="bottomBtn === '查看物流'">
|
||||||
|
<text class="font_8 text_32" >确认收货</text>
|
||||||
</view>
|
</view>
|
||||||
<button class="text-wrapper_3" v-if="bottomBtn === '联系客服'" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
|
<button class="text-wrapper_3" v-if="bottomBtn === '联系客服'" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
|
||||||
<text class="font_8 text_32">联系客服</text>
|
<text class="font_8 text_32">联系客服</text>
|
||||||
|
@ -142,7 +144,7 @@ const getOrderItem = async ()=>{ //获取当前订单详情
|
||||||
},
|
},
|
||||||
data: { id: oid.value }
|
data: { id: oid.value }
|
||||||
})
|
})
|
||||||
if(res.data.code === 1) { //12.20待完善优惠卷快照信息
|
if(res.data.code === 1) {
|
||||||
orderObject.value = res.data.data,
|
orderObject.value = res.data.data,
|
||||||
addressInfo.value = res.data.data.addressSnapshot,
|
addressInfo.value = res.data.data.addressSnapshot,
|
||||||
productList.value = res.data.data.orderItemList
|
productList.value = res.data.data.orderItemList
|
||||||
|
@ -163,15 +165,19 @@ const setBottomText =()=>{ //更改按钮的字体
|
||||||
default: bottomBtn.value = '删除订单'
|
default: bottomBtn.value = '删除订单'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const stateSubmit = () => { //按钮状态改变的方法
|
const stateSubmit = (obj) => { //按钮状态改变的方法
|
||||||
|
// console.log('商品obj--->',obj);
|
||||||
if(bottomBtn.value === '立即支付') { //重新支付
|
if(bottomBtn.value === '立即支付') { //重新支付
|
||||||
wxPay(oid.value)
|
wxPay(oid.value)
|
||||||
} else if(bottomBtn.value === '删除订单') {
|
} else if(bottomBtn.value === '删除订单') {
|
||||||
console.log('订单被删除');
|
console.log('订单被删除');
|
||||||
} else {
|
} else if(bottomBtn.value === '查看物流') {
|
||||||
console.log('查看物流');
|
viewLogistics(obj.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const confirm =()=> { //确认收货方法
|
||||||
|
console.log('确认收货方法');
|
||||||
|
}
|
||||||
const wxPay = async( oid )=> { //传入订单id
|
const wxPay = async( oid )=> { //传入订单id
|
||||||
try {
|
try {
|
||||||
const res = await uni.request({
|
const res = await uni.request({
|
||||||
|
@ -216,6 +222,39 @@ const buffer = async ()=>{ //缓冲函数
|
||||||
await getOrderItem();
|
await getOrderItem();
|
||||||
await setBottomText();
|
await setBottomText();
|
||||||
}
|
}
|
||||||
|
//查看物流方法
|
||||||
|
const viewLogistics = ( oid )=>{
|
||||||
|
// console.log('订单编号--->',oid);
|
||||||
|
uni.request({
|
||||||
|
url: baseUrl + '/logistics/get/info',
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
id: oid
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
'cookie': wx.getStorageSync("cookie")
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res.data.data)
|
||||||
|
waybillToken = res.data.data.waybill_token
|
||||||
|
plugin.openWaybillTracking({
|
||||||
|
waybillToken: waybillToken
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//复制到剪切板方法
|
||||||
|
const copy = ( orderNumber ) => {
|
||||||
|
console.log('订单编号为--->',orderNumber);
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: orderNumber,
|
||||||
|
success: () => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '成功复制到剪贴板'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -431,7 +470,7 @@ const buffer = async ()=>{ //缓冲函数
|
||||||
line-height: 24.71rpx;
|
line-height: 24.71rpx;
|
||||||
}
|
}
|
||||||
.text_24 {
|
.text_24 {
|
||||||
margin-right: 132.38rpx;
|
margin-right: 26.38rpx;
|
||||||
}
|
}
|
||||||
.group_1 {
|
.group_1 {
|
||||||
padding: 0 2.38rpx;
|
padding: 0 2.38rpx;
|
||||||
|
|
|
@ -1,385 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="flex-col page">
|
|
||||||
<view class="flex-col">
|
|
||||||
<view class="flex-row justify-between group">
|
|
||||||
<view class="flex-row items-end">
|
|
||||||
<view class="flex-col justify-start items-end image-wrapper">
|
|
||||||
<image
|
|
||||||
class="image"
|
|
||||||
src="https://ide.code.fun/api/image?token=673992edc471750012df23be&name=764c28fa933e84fab043d3accbf2bbec.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col group_2 ml-14">
|
|
||||||
<view class="self-start group_3">
|
|
||||||
<text class="text">¥</text>
|
|
||||||
<text class="text_2">99</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-row self-stretch group_4">
|
|
||||||
<text class="font">请选择</text>
|
|
||||||
<text class="font ml-9">场次</text>
|
|
||||||
</view>
|
|
||||||
<text class="self-start font text_1">数量:20</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image
|
|
||||||
class="self-start image_2"
|
|
||||||
src="https://ide.code.fun/api/image?token=673992edc471750012df23be&name=037e673ff4e043469617699bd3d80b2f.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start items-start text-wrapper">
|
|
||||||
<text class="font_2 text_3">参加日期:2024年11月</text>
|
|
||||||
</view>
|
|
||||||
<view class="divider"></view>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col group_5">
|
|
||||||
<view class="flex-col group_6">
|
|
||||||
<image
|
|
||||||
class="shrink-0 self-start image_3 image_4"
|
|
||||||
src="https://ide.code.fun/api/image?token=673992edc471750012df23be&name=958476853f8c341f67f1eb6053f9a005.png"
|
|
||||||
/>
|
|
||||||
<view class="flex-row self-center relative grid">
|
|
||||||
<view class="flex-col justify-start grid-item pos_1">
|
|
||||||
<view class="section"></view>
|
|
||||||
<text class="font_3 pos">11月12日</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start grid-item_2 pos_9">
|
|
||||||
<view class="section"></view>
|
|
||||||
<text class="font_3 pos_2">11月13日</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start items-center grid-item_3 pos_6">
|
|
||||||
<text class="font_3">11月14日</text>
|
|
||||||
<image
|
|
||||||
class="image_5 pos_3"
|
|
||||||
src="https://ide.code.fun/api/image?token=673992edc471750012df23be&name=c9d6fb2a044e18583ff8a4e56c720383.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start grid-item_2 pos_7">
|
|
||||||
<view class="section"></view>
|
|
||||||
<text class="font_3 text_4 pos_4">11月15日</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image
|
|
||||||
class="shrink-0 self-start image_3 image_6"
|
|
||||||
src="https://ide.code.fun/api/image?token=673992edc471750012df23be&name=5482bec71b24de224668a897bd56ce5c.png"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col mt-20">
|
|
||||||
<view class="flex-col justify-start items-start text-wrapper_2"><text class="font_2 text_5">场次</text></view>
|
|
||||||
<view class="flex-col group_7">
|
|
||||||
<view class="flex-row group_8">
|
|
||||||
<view class="flex-col justify-start items-center text-wrapper_3">
|
|
||||||
<text class="font_4 text_6">上午场(09:30-12:00)</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start items-center text-wrapper_4 ml-37">
|
|
||||||
<text class="font_4 text_7">下午场(13:00-16:00)</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start items-start group_9 mt-24">
|
|
||||||
<view class="flex-col items-start section_2">
|
|
||||||
<text class="font_2 text_9">购买须知:本次课程活动最少需要到</text>
|
|
||||||
<text class="font_2">达5人才能进行授课</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex-col justify-start items-center section_3">
|
|
||||||
<view class="flex-row section_4">
|
|
||||||
<text class="font_5 text_8">购</text>
|
|
||||||
<text class="font_5 ml-18">买</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.ml-9 {
|
|
||||||
margin-left: 16.88rpx;
|
|
||||||
}
|
|
||||||
.ml-37 {
|
|
||||||
margin-left: 69.38rpx;
|
|
||||||
}
|
|
||||||
.page {
|
|
||||||
padding-bottom: 26.25rpx;
|
|
||||||
background-color: #fffef8;
|
|
||||||
border-radius: 37.5rpx 37.5rpx 0rpx 0rpx;
|
|
||||||
width: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
overflow-x: hidden;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.group {
|
|
||||||
padding: 28.13rpx 30rpx 3.75rpx;
|
|
||||||
}
|
|
||||||
.image-wrapper {
|
|
||||||
padding-bottom: 166.88rpx;
|
|
||||||
border-radius: 5.63rpx;
|
|
||||||
background-image: url('https://ide.code.fun/api/image?token=673992edc471750012df23be&name=f41b64b57071affd8eecfaa15a455af2.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 195rpx;
|
|
||||||
height: 204.38rpx;
|
|
||||||
}
|
|
||||||
.image {
|
|
||||||
border-radius: 5.63rpx;
|
|
||||||
width: 37.5rpx;
|
|
||||||
height: 37.5rpx;
|
|
||||||
}
|
|
||||||
.group_2 {
|
|
||||||
margin-bottom: 5.31rpx;
|
|
||||||
}
|
|
||||||
.group_3 {
|
|
||||||
margin-left: 12.15rpx;
|
|
||||||
line-height: 31.03rpx;
|
|
||||||
}
|
|
||||||
.text {
|
|
||||||
color: #c35c5d;
|
|
||||||
font-size: 37.5rpx;
|
|
||||||
font-family: Times New Roman;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 27.68rpx;
|
|
||||||
}
|
|
||||||
.text_2 {
|
|
||||||
color: #c35c5d;
|
|
||||||
font-size: 45rpx;
|
|
||||||
font-family: Times New Roman;
|
|
||||||
font-weight: 700;
|
|
||||||
line-height: 31.03rpx;
|
|
||||||
}
|
|
||||||
.group_4 {
|
|
||||||
margin-top: 19.88rpx;
|
|
||||||
}
|
|
||||||
.font {
|
|
||||||
font-size: 26.25rpx;
|
|
||||||
font-family: STXingkai;
|
|
||||||
line-height: 31.88rpx;
|
|
||||||
color: #818181;
|
|
||||||
}
|
|
||||||
.text_1 {
|
|
||||||
margin-left: 2.1rpx;
|
|
||||||
}
|
|
||||||
.image_2 {
|
|
||||||
margin-right: 20.63rpx;
|
|
||||||
margin-top: 5.63rpx;
|
|
||||||
width: 37.5rpx;
|
|
||||||
height: 37.5rpx;
|
|
||||||
}
|
|
||||||
.text-wrapper {
|
|
||||||
padding: 33.6rpx 0 26.89rpx;
|
|
||||||
background-color: #fffef8;
|
|
||||||
border-radius: 28.13rpx;
|
|
||||||
}
|
|
||||||
.font_2 {
|
|
||||||
font-size: 37.5rpx;
|
|
||||||
font-family: 'YuHongLiang';
|
|
||||||
line-height: 45rpx;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
.text_3 {
|
|
||||||
margin-left: 26.46rpx;
|
|
||||||
line-height: 37.01rpx;
|
|
||||||
}
|
|
||||||
.divider {
|
|
||||||
margin: 9.38rpx 26.27rpx 0 20.63rpx;
|
|
||||||
background-color: #d9d9d9;
|
|
||||||
height: 1.88rpx;
|
|
||||||
}
|
|
||||||
.group_5 {
|
|
||||||
margin-top: 69.38rpx;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
.group_6 {
|
|
||||||
overflow-x: hidden;
|
|
||||||
height: 388.13rpx;
|
|
||||||
}
|
|
||||||
.image_3 {
|
|
||||||
width: 155.63rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
}
|
|
||||||
.image_4 {
|
|
||||||
margin-left: -13.13rpx;
|
|
||||||
}
|
|
||||||
.grid {
|
|
||||||
margin-top: -28.13rpx;
|
|
||||||
width: 605.63rpx;
|
|
||||||
height: 228.75rpx;
|
|
||||||
}
|
|
||||||
.grid-item {
|
|
||||||
background-color: #fbdedf;
|
|
||||||
border-radius: 18.75rpx;
|
|
||||||
background-image: url('https://ide.code.fun/api/image?token=673992edc471750012df23be&name=c9d6fb2a044e18583ff8a4e56c720383.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 253.13rpx;
|
|
||||||
}
|
|
||||||
.pos_1 {
|
|
||||||
position: absolute;
|
|
||||||
left: 3.75rpx;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.section {
|
|
||||||
background-image: url('https://ide.code.fun/api/image?token=673992edc471750012df23be&name=c9d6fb2a044e18583ff8a4e56c720383.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
height: 90rpx;
|
|
||||||
}
|
|
||||||
.font_3 {
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-family: 'YuHongLiang';
|
|
||||||
line-height: 22.29rpx;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
.pos {
|
|
||||||
position: absolute;
|
|
||||||
left: 57.99rpx;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
.grid-item_2 {
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 18.75rpx;
|
|
||||||
background-image: url('https://ide.code.fun/api/image?token=673992edc471750012df23be&name=c9d6fb2a044e18583ff8a4e56c720383.png');
|
|
||||||
background-size: 100% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 253.13rpx;
|
|
||||||
}
|
|
||||||
.pos_9 {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.pos_2 {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
.grid-item_3 {
|
|
||||||
padding: 40.78rpx 0 26.92rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 18.75rpx;
|
|
||||||
width: 253.13rpx;
|
|
||||||
}
|
|
||||||
.pos_6 {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 138.75rpx;
|
|
||||||
}
|
|
||||||
.image_5 {
|
|
||||||
width: 255rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
}
|
|
||||||
.pos_3 {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.pos_7 {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 138.75rpx;
|
|
||||||
}
|
|
||||||
.text_4 {
|
|
||||||
line-height: 22.65rpx;
|
|
||||||
}
|
|
||||||
.pos_4 {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
.image_6 {
|
|
||||||
margin-left: 603.77rpx;
|
|
||||||
margin-top: -52.5rpx;
|
|
||||||
}
|
|
||||||
.text-wrapper_2 {
|
|
||||||
padding: 29.33rpx 0 39.94rpx;
|
|
||||||
background-color: #fffef8;
|
|
||||||
border-radius: 28.13rpx;
|
|
||||||
}
|
|
||||||
.text_5 {
|
|
||||||
margin-left: 67.16rpx;
|
|
||||||
line-height: 28.24rpx;
|
|
||||||
}
|
|
||||||
.group_7 {
|
|
||||||
padding-left: 30rpx;
|
|
||||||
padding-right: 15rpx;
|
|
||||||
}
|
|
||||||
.group_8 {
|
|
||||||
padding: 46.88rpx 5.63rpx 43.13rpx;
|
|
||||||
border-top: solid 1.88rpx #d9d9d9;
|
|
||||||
}
|
|
||||||
.text-wrapper_3 {
|
|
||||||
padding: 17.66rpx 0 17.79rpx;
|
|
||||||
flex: 1 1 301.88rpx;
|
|
||||||
background-color: #f3f3f3;
|
|
||||||
border-radius: 5.63rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
}
|
|
||||||
.font_4 {
|
|
||||||
font-size: 26.25rpx;
|
|
||||||
font-family: STXingkai;
|
|
||||||
line-height: 24.54rpx;
|
|
||||||
}
|
|
||||||
.text_6 {
|
|
||||||
color: #323233;
|
|
||||||
}
|
|
||||||
.text-wrapper_4 {
|
|
||||||
margin-right: 20.63rpx;
|
|
||||||
padding: 17.66rpx 0 17.79rpx;
|
|
||||||
flex: 1 1 301.88rpx;
|
|
||||||
background-color: #fbdedf;
|
|
||||||
border-radius: 5.63rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
}
|
|
||||||
.text_7 {
|
|
||||||
color: #c35c5d;
|
|
||||||
}
|
|
||||||
.group_9 {
|
|
||||||
padding-top: 43.13rpx;
|
|
||||||
height: 234.38rpx;
|
|
||||||
border-top: solid 1.88rpx #d9d9d9;
|
|
||||||
}
|
|
||||||
.section_2 {
|
|
||||||
margin-left: 24.38rpx;
|
|
||||||
padding: 35.33rpx 0 68.63rpx 13.73rpx;
|
|
||||||
background-color: #fff2f2f5;
|
|
||||||
border-radius: 18.75rpx;
|
|
||||||
}
|
|
||||||
.text_9 {
|
|
||||||
margin-left: 3.64rpx;
|
|
||||||
}
|
|
||||||
.section_3 {
|
|
||||||
margin-left: 15rpx;
|
|
||||||
margin-top: 189.38rpx;
|
|
||||||
padding: 16.88rpx 0;
|
|
||||||
background-color: #fffef8;
|
|
||||||
}
|
|
||||||
.section_4 {
|
|
||||||
padding: 27.3rpx 0 23.79rpx;
|
|
||||||
background-color: #fbdedf;
|
|
||||||
border-radius: 46.88rpx;
|
|
||||||
width: 618.75rpx;
|
|
||||||
}
|
|
||||||
.font_5 {
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-family: Open Sans;
|
|
||||||
line-height: 27.54rpx;
|
|
||||||
color: #c35c5d;
|
|
||||||
}
|
|
||||||
.text_8 {
|
|
||||||
margin-left: 263.59rpx;
|
|
||||||
}
|
|
||||||
@import url(/common/css/global.css);
|
|
||||||
@font-face {
|
|
||||||
font-family: 'YuHongLiang';
|
|
||||||
src: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com/fonts/%E4%BA%8E%E6%B4%AA%E4%BA%AE%E7%A1%AC%E7%AC%94%E8%A1%8C%E6%A5%B7%E6%89%8B%E5%86%99%E5%AD%97%E4%BD%93.TTF') format('truetype');
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -7,22 +7,23 @@
|
||||||
/> -->
|
/> -->
|
||||||
<swiper class="swiper-box">
|
<swiper class="swiper-box">
|
||||||
<swiper-item v-for="(item,index) in imgArr" :key="index" >
|
<swiper-item v-for="(item,index) in imgArr" :key="index" >
|
||||||
<image mode="aspectFit" class="self-stretch image" :src="item" ></image>
|
<image mode="aspectFit" class="self-stretch image" :src="item" @tap="previewImage(index)"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="flex-col self-stretch section_2">
|
<view class="flex-col self-stretch section_2">
|
||||||
<view class="self-start group">
|
<view class="self-start group">
|
||||||
<text class="font text_2">¥</text>
|
<text class="font text_2">¥</text>
|
||||||
<text class="text">{{ goodObject.price }}</text>
|
<text class="text">{{ goodObject.price }}</text>
|
||||||
|
<text class="discountsText">限时优惠{{ coupon }}元</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-center self-stretch group_2">
|
<view class="flex-row justify-between items-center self-stretch group_2">
|
||||||
<text class="text_4">{{ goodObject.name }}</text>
|
<text class="text_4">{{ goodObject.name }}</text>
|
||||||
<view class="flex-row items-center group_3">
|
<view class="flex-row items-center group_3" v-if="goodObject.festivalName != null">
|
||||||
<image
|
<image
|
||||||
class="image_2"
|
class="image_2"
|
||||||
src="https://ide.code.fun/api/image?token=675941ee797f850011f20adf&name=189b2a683cb0df7c43650ce019ff639d.png"
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FGOsbijZE-denglong.png"
|
||||||
/>
|
/>
|
||||||
<text class="font text_3 ml-5">中秋节限定</text>
|
<text class="font text_3 ml-5">{{ goodObject.festivalName }}限定</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="self-stretch divider view"></view>
|
<view class="self-stretch divider view"></view>
|
||||||
|
@ -56,13 +57,13 @@
|
||||||
:src="goodObject.detailImg"
|
:src="goodObject.detailImg"
|
||||||
/>
|
/>
|
||||||
<view class="flex-row items-center self-stretch section_4">
|
<view class="flex-row items-center self-stretch section_4">
|
||||||
<view class="flex-col items-center">
|
<button class="flex-col items-center" style="background-color: #ffffff;" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
|
||||||
<image
|
<image
|
||||||
class="image_4"
|
class="image_4"
|
||||||
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FbTRAhIQz-kefu.png"
|
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FbTRAhIQz-kefu.png"
|
||||||
/>
|
/>
|
||||||
<text class="text_19 mt-3">客服</text>
|
<text class="text_19 mt-3">客服</text>
|
||||||
</view>
|
</button>
|
||||||
<view class="flex-row flex-1 ml-34">
|
<view class="flex-row flex-1 ml-34">
|
||||||
<view class="flex-col justify-start items-center text-wrapper_4" @click="loadPop">
|
<view class="flex-col justify-start items-center text-wrapper_4" @click="loadPop">
|
||||||
<text class="font_4 text_17">加入购物车</text>
|
<text class="font_4 text_17">加入购物车</text>
|
||||||
|
@ -91,14 +92,14 @@ const goodObject = ref({}) //商品对象
|
||||||
const idInfo = ref(0) //发送到下一页的商品id
|
const idInfo = ref(0) //发送到下一页的商品id
|
||||||
const userInfo = ref({}) //用户信息
|
const userInfo = ref({}) //用户信息
|
||||||
const labelList = ref([]) //标签
|
const labelList = ref([]) //标签
|
||||||
const imgArr = ref([])
|
const imgArr = ref([]) //商品图片数组
|
||||||
|
const coupon = ref(0) //当前商品可用的优惠卷
|
||||||
//转换上一页面传来的商品
|
//转换上一页面传来的商品
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getProduct(JSON.parse(options.gid)) //页面加载的时候获取商品信息
|
getProduct(JSON.parse(options.gid)) //页面加载的时候获取商品信息
|
||||||
})
|
})
|
||||||
onShow(()=>{
|
onShow(()=>{
|
||||||
userInfo.value = wx.getStorageSync('userInfo') //获取用户信息
|
userInfo.value = wx.getStorageSync('userInfo') //获取用户信息
|
||||||
console.log('商品对象--->',goodObject.value)
|
|
||||||
})
|
})
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
emitter.on('close',()=>{ //将关闭弹窗方法传入组件
|
emitter.on('close',()=>{ //将关闭弹窗方法传入组件
|
||||||
|
@ -115,7 +116,7 @@ const getProduct = async (gid) =>{ //根据商品获取商品信息
|
||||||
cookie: wx.getStorageSync('cookie')
|
cookie: wx.getStorageSync('cookie')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log('请求请求--->',res.data);
|
console.log('请求请求--->',res.data);
|
||||||
if(res.data.code === 1) {
|
if(res.data.code === 1) {
|
||||||
goodObject.value = res.data.data
|
goodObject.value = res.data.data
|
||||||
imgArr.value = res.data.data.goodImg.split(';') //将后端传来的图片字符串转为图片数组
|
imgArr.value = res.data.data.goodImg.split(';') //将后端传来的图片字符串转为图片数组
|
||||||
|
@ -154,9 +155,20 @@ const getFonts =()=>{
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//点击查看图片详情方法
|
||||||
|
const previewImage = (index) => {
|
||||||
|
console.log(index);
|
||||||
|
uni.previewImage({
|
||||||
|
current: index,
|
||||||
|
urls: imgArr.value
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
button::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
.ml-5 {
|
.ml-5 {
|
||||||
margin-left: 9.38rpx;
|
margin-left: 9.38rpx;
|
||||||
}
|
}
|
||||||
|
@ -389,5 +401,12 @@ const getFonts =()=>{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(150vw * 9 / 16);
|
height: calc(150vw * 9 / 16);
|
||||||
}
|
}
|
||||||
|
.discountsText {
|
||||||
|
color: #ff0000;
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-family: 'FangZhengFonts';
|
||||||
|
line-height: 30.06rpx;
|
||||||
|
margin-left: 20rpx
|
||||||
|
}
|
||||||
@import url(../../../common/css/global.css);
|
@import url(../../../common/css/global.css);
|
||||||
</style>
|
</style>
|
|
@ -61,6 +61,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,onMounted, toRaw } from 'vue';
|
import { ref,onMounted, toRaw } from 'vue';
|
||||||
import { baseUrl, testUrl , suiUrl} from '@/api/request';
|
import { baseUrl, testUrl , suiUrl} from '@/api/request';
|
||||||
|
import { onLoad,onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
const currentColor = ref(0);
|
const currentColor = ref(0);
|
||||||
const sort =ref([{}]) //商品类别对象数组
|
const sort =ref([{}]) //商品类别对象数组
|
||||||
const headerList = ref([{}]) //类别标题和介绍
|
const headerList = ref([{}]) //类别标题和介绍
|
||||||
|
@ -72,9 +73,18 @@ const product_type = ref({
|
||||||
const items_1 = [null,null,null]
|
const items_1 = [null,null,null]
|
||||||
onMounted( async () => {
|
onMounted( async () => {
|
||||||
console.log('cookie--->',cookie);
|
console.log('cookie--->',cookie);
|
||||||
await Getsort() //获取商品类别
|
})
|
||||||
await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
onLoad( async (options)=>{
|
||||||
getFonts() //获取字体
|
await Getsort()
|
||||||
|
await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||||
|
await getFonts() //获取字体
|
||||||
|
})
|
||||||
|
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||||
|
await Getsort()
|
||||||
|
await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.stopPullDownRefresh() //停止下拉刷新
|
||||||
|
},1000)
|
||||||
})
|
})
|
||||||
//获取商品分类
|
//获取商品分类
|
||||||
const Getsort = async ()=>{
|
const Getsort = async ()=>{
|
||||||
|
|
|
@ -392,7 +392,7 @@ const add =()=> { //传入当前课程最大人数
|
||||||
}
|
}
|
||||||
//到这里结束
|
//到这里结束
|
||||||
.section_3 {
|
.section_3 {
|
||||||
background-image: url('https://ide.code.fun/api/image?token=677b3b47797f850011f57419&name=5f9759dd4fc5b6049913f513ad7248f2.png');
|
background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FkDkwyiFc-border.png');
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 26rpx;
|
border-radius: 26rpx;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user