master
王文杰 7 months ago
parent 18149f19fa
commit 9f6e75012c

@ -1,3 +1,11 @@
<!--
* @Author: 王文杰
* @Date: 2024-03-15 21:26:32
* @LastEditors: 王文杰
* @LastEditTime: 2024-03-17 11:07:54
* @FilePath: /app-nx-personal/src/pages/index/components/NeighborhoodSite.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts"> <script setup lang="ts">
defineProps<{ defineProps<{
list: [] list: []
@ -21,7 +29,7 @@ const handleToto = (id) => {
<view class="loction">{{ item.address }}</view> <view class="loction">{{ item.address }}</view>
</view> </view>
<view class="right"> <view class="right">
<view class="num">{{ item.distance }}</view> <view class="num">{{ item.distance }}</view>
</view> </view>
</view> </view>
<view class="md-tag" v-if="item.categoryStr" <view class="md-tag" v-if="item.categoryStr"

@ -171,10 +171,10 @@ const getMemberProfileData = async () => {
<uni-icons type="phone" color="#3775F6" size="20"></uni-icons> <uni-icons type="phone" color="#3775F6" size="20"></uni-icons>
<view class="label"> 联系我们 </view> <view class="label"> 联系我们 </view>
</button> </button>
<!-- <navigator class="loation item arrow" url="/pagesMember/address/address" hover-class="none"> <navigator class="loation item arrow" url="/pagesMember/address/address" hover-class="none">
<uni-icons type="location" color="#3775F6" size="20"></uni-icons> <uni-icons type="location" color="#3775F6" size="20"></uni-icons>
<view class="label"> 地址 </view> <view class="label"> 地址 </view>
</navigator> --> </navigator>
<navigator <navigator
class="settings item arrow" class="settings item arrow"
url="/pagesMember/settings/settings" url="/pagesMember/settings/settings"

@ -86,12 +86,12 @@ const handleCancleOrder = () => {
<view class="module info"> <view class="module info">
<view class="title">取件信息</view> <view class="title">取件信息</view>
<view class="item"> <view class="item">
<view class="label">取件时间</view> <view class="label">取件时间</view>
<view class="val">{{ order.appointmentTime }}</view> <view class="val">{{ order.appointmentTime }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">取件地址</view> <view class="label">取件地址</view>
<view class="val">{{ order.recycleAddress }}</view> <view class="val">{{ order.addressInfo?.receiveStreet }} {{ order.addressInfo?.receiveHouseNumber }} </view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">下单时间</view> <view class="label">下单时间</view>
@ -202,7 +202,7 @@ page {
.label { .label {
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
width: 120rpx; width: 160rpx;
} }
.val { .val {
font-size: 28rpx; font-size: 28rpx;

@ -22,7 +22,7 @@ const handleToto = () => {
<view class="loction">{{ siteVal.address }}</view> <view class="loction">{{ siteVal.address }}</view>
</view> </view>
<view class="right"> <view class="right">
<view class="num">{{ siteVal.distance }}</view> <view class="num">{{ siteVal.distance }}</view>
</view> </view>
</view> </view>
<view class="md-tag" v-if="siteVal.categoryStr" <view class="md-tag" v-if="siteVal.categoryStr"

@ -40,6 +40,8 @@ const bannerList = [
type: '1', type: '1',
}, },
] ]
//
const location = uni.getStorageSync('location')
const siteInfo = ref({}) const siteInfo = ref({})
const rateValue = ref(5) const rateValue = ref(5)
@ -51,6 +53,7 @@ const getDataList = async (stationId) => {
// //
const queryParams = { const queryParams = {
stationId, stationId,
...location,
} }
const res = await getSiteDetailAPI(queryParams) const res = await getSiteDetailAPI(queryParams)
const obj = res.data const obj = res.data
@ -58,17 +61,17 @@ const getDataList = async (stationId) => {
const arr = obj.stationImg && JSON.parse(obj.stationImg) const arr = obj.stationImg && JSON.parse(obj.stationImg)
const imgUrl = fileDomain + arr[0].url const imgUrl = fileDomain + arr[0].url
obj.imgUrl = imgUrl obj.imgUrl = imgUrl
const categoryArr = obj.stationProducts?.map((q) => q.name) || [] // const categoryArr = obj.stationProducts?.map((q) => q.name) || []
obj.categoryStr = categoryArr.join('.') // obj.categoryStr = categoryArr.join('.')
if (obj.orderDetails) { if (obj.stationProducts) {
obj.orderDetails.forEach((q) => { obj.stationProducts.forEach((q) => {
const arr = JSON.parse(q.product.photo) const arr = JSON.parse(q.photo)
const imgUrl = fileDomain + arr[0].url const imgUrl = fileDomain + arr[0].url
q.imgUrl = imgUrl q.imgUrl = imgUrl
}) })
} else { } else {
obj.orderDetails = [] obj.stationProducts = []
} }
siteInfo.value = obj siteInfo.value = obj
// //
@ -87,7 +90,7 @@ onLoad((options) => {
<view class="info"> <view class="info">
<view class="hd"> <view class="hd">
<view class="name">{{ siteInfo?.stationName }}</view> <view class="name">{{ siteInfo?.stationName }}</view>
<view class="num">{{ siteInfo.distance || 0.0 }}</view> <view class="num">{{ siteInfo.distance || 0.0 }}</view>
</view> </view>
<view class="md"> <view class="md">
<view class="label">营业时间</view> <view class="label">营业时间</view>
@ -99,10 +102,11 @@ onLoad((options) => {
</view> </view>
</view> </view>
<view class="module-menu"> <view class="module-menu">
<view class="order-details" v-if="siteInfo.orderDetails"> <view class="module-title">回收品类</view>
<view class="detail-item" v-for="item2 in siteInfo.orderDetails" :key="item2.id"> <view class="order-details" v-if="siteInfo.stationProducts">
<view class="detail-item" v-for="item2 in siteInfo.stationProducts" :key="item2.id">
<image class="img-url" :src="item2.imgUrl"></image> <image class="img-url" :src="item2.imgUrl"></image>
<view class="product-name">{{ item2.product?.name }}</view> <view class="product-name">{{ item2.name }}</view>
</view> </view>
</view> </view>
<!-- <view <!-- <view
@ -118,9 +122,9 @@ onLoad((options) => {
<view class="item arrow flex-row"> <view class="item arrow flex-row">
<view class="service-title">服务</view> <view class="service-title">服务</view>
<view class="tag-list"> <view class="tag-list">
<view class="tag">上门服务</view> <view class="tag">再生资源回收</view>
<view class="tag">家电维修</view> <!-- <view class="tag">家电维修</view>
<view class="tag">品控质检</view> <view class="tag">品控质检</view> -->
</view> </view>
</view> </view>
<view class="item flex-column rate"> <view class="item flex-column rate">
@ -190,7 +194,7 @@ onLoad((options) => {
} }
.module-menu { .module-menu {
display: flex; display: flex;
padding: 36rpx 0rpx; padding: 36rpx 20rpx;
box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12); box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12);
.item { .item {
flex: 1; flex: 1;
@ -202,6 +206,23 @@ onLoad((options) => {
background: #fff7e8; background: #fff7e8;
} }
} }
.order-details {
margin-left: 20rpx;
margin-top: 20rpx;
.detail-item {
margin: 20rpx 0;
display: flex;
align-items: center;
.img-url {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}
.product-name {
//
}
}
}
} }
.detail-list { .detail-list {
padding: 0 20rpx; padding: 0 20rpx;

@ -4,8 +4,11 @@ import {
postMemberAddressAPI, postMemberAddressAPI,
postMemberAddressUpdateAPI, postMemberAddressUpdateAPI,
} from '@/services/address' } from '@/services/address'
import { onLoad } from '@dcloudio/uni-app' import { onLoad, onReady } from '@dcloudio/uni-app'
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useMemberStore } from '@/stores'
const memberStore = useMemberStore()
// //
const form = ref({ const form = ref({
@ -37,8 +40,13 @@ const getMemberAddressByIdData = async () => {
// //
uni.setNavigationBarTitle({ title: isEdit.value ? '修改地址' : '新建地址' }) uni.setNavigationBarTitle({ title: isEdit.value ? '修改地址' : '新建地址' })
} else {
const receiveMobilePhone = memberStore.profile?.phone || ''
form.value.receiveMobilePhone = receiveMobilePhone
} }
} }
onReady(() => {
})
// //
onLoad(() => { onLoad(() => {
getMemberAddressByIdData() getMemberAddressByIdData()
@ -287,5 +295,4 @@ page {
font-size: 30rpx; font-size: 30rpx;
background-color: #3775F6; background-color: #3775F6;
} }
</style>import type { debug } from 'console'; </style>

@ -31,11 +31,11 @@ const onLogout = () => {
<template> <template>
<view class="viewport"> <view class="viewport">
<!-- 列表1 --> <!-- 列表1 -->
<view class="list" v-if="isLogin"> <!-- <view class="list" v-if="isLogin">
<navigator url="/pagesMember/address/address" hover-class="none" class="item arrow"> <navigator url="/pagesMember/address/address" hover-class="none" class="item arrow">
我的地址 我的地址
</navigator> </navigator>
</view> </view> -->
<view class="list"> <view class="list">
<button hover-class="none" class="item arrow" open-type="openSetting">授权管理</button> <button hover-class="none" class="item arrow" open-type="openSetting">授权管理</button>
<button hover-class="none" class="item arrow" open-type="feedback">问题反馈</button> <button hover-class="none" class="item arrow" open-type="feedback">问题反馈</button>

@ -1,8 +1,8 @@
/* /*
* @Author: * @Author:
* @Date: 2024-01-04 12:54:56 * @Date: 2024-01-04 12:54:56
* @LastEditors: * @LastEditors:
* @LastEditTime: 2024-03-15 18:09:02 * @LastEditTime: 2024-03-17 11:18:03
* @FilePath: /app-nx-personal/src/services/constants.ts * @FilePath: /app-nx-personal/src/services/constants.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@ -97,7 +97,8 @@ export const weightMenuList = [
}, },
] ]
// 文件路径 // 文件路径
export const fileDomain = 'https://nxhs.cjyx.cc' // export const fileDomain = 'https://nxhs.cjyx.cc'
export const fileDomain = 'http://222.71.165.188:8808'
export const storage_userInfo = { export const storage_userInfo = {
userType: { userType: {

@ -11,8 +11,8 @@
* 4. token * 4. token
*/ */
import { useMemberStore } from '@/stores' import { useMemberStore } from '@/stores'
// const baseURL = 'http://192.168.0.166:8808/api' const baseURL = 'http://222.71.165.188:8808/api'
const baseURL = 'https://nxhs.cjyx.cc/api' // const baseURL = 'https://nxhs.cjyx.cc/api'
// 添加拦截器 // 添加拦截器
const httpInterceptor = { const httpInterceptor = {
// 拦截前触发 // 拦截前触发

Loading…
Cancel
Save