合并代码

This commit is contained in:
sx 2025-01-11 03:51:29 +08:00
parent 4da270f860
commit 8b9514d161
21 changed files with 1060 additions and 507 deletions

View File

@ -88,6 +88,29 @@ export const news = {
}) })
}, },
/**
* 创建群聊
* @param {Object} param
*/
addChatGroup(param) {
return util.request({
url: `/user/chat/group/addChatGroup`,
data: param.data,
method: 'POST',
})
},
/**
* 获取群聊列表
* @param {Object} param
*/
myGroups(param) {
return util.request({
url: `/user/chat/group/myGroups`,
method: 'GET',
})
},
/** /**
* 商品列表 * 商品列表
* @param {Object} param * @param {Object} param

View File

@ -59,7 +59,7 @@ const shop = {
}, },
/** /**
* 获取商家申请信息 * 退还押金接口
* @param {Object} param * @param {Object} param
*/ */
outDepositsPay(param) { outDepositsPay(param) {
@ -69,13 +69,24 @@ const shop = {
}) })
}, },
/**
* 商家发布商品
* @param {Object} param
*/
releaseProduct(param) {
return util.request({
url: `/shopify/`,
method: 'POST',
})
},
/** /**
* 商品列表 * 商品列表
* @param {Object} param * @param {Object} param
*/ */
getProduct(param) { getProduct(param) {
return util.request({ return util.request({
url: `/appProductionApi/getProductionList`, url: `/shopify/appProductionApi/getProductionList`,
method: 'GET', method: 'GET',
data: param.data data: param.data
}) })
@ -87,7 +98,7 @@ const shop = {
*/ */
getCategory(param) { getCategory(param) {
return util.request({ return util.request({
url: `/appProductionApi/getProductCategory`, url: `/shopify/appProductionApi/getProductCategory`,
method: 'GET', method: 'GET',
query: param.query, query: param.query,
}) })
@ -99,11 +110,61 @@ const shop = {
*/ */
productDetail(param) { productDetail(param) {
return util.request({ return util.request({
url: `/appProductionApi/getProductionDetail`, url: `/shopify/appProductionApi/getProductionDetail`,
method: 'GET', method: 'GET',
query: param.query, query: param.query,
}) })
}, },
/**
* 添加商品浏览记录
* @param {Object} param
*/
addBrowsing(param) {
return util.request({
url: `/shopify/system/addBrowsing`,
method: 'PUT',
data: param.data,
})
},
/**
* 获取收货地址
* @param {Object} param
*/
getAddressList(param) {
return util.request({
url: `/shopify/appAddress/getList`,
method: 'GET',
query: param.query,
})
},
/**
* 保存地址
* @param {Object} param
*/
saveOrUpdate(param) {
return util.request({
url: `/shopify/appAddress/saveOrUpdate`,
method: 'POST',
data: param.data,
})
},
/**
* 删除收货地址
* @param {Object} param
*/
removeAddressById(param) {
return util.request({
url: `/shopify/appAddress/deleteById`,
method: 'DELETE',
query: param.query,
})
},
} }
export default shop export default shop

View File

@ -10,16 +10,27 @@
import { import {
useStore useStore
} from 'vuex' } from 'vuex'
//
import util from '@/common/js/util.js' import util from '@/common/js/util.js'
// api
import api from '@/api/index.js'
// //
import CryptoJS from 'crypto-js'; import CryptoJS from 'crypto-js';
//
const props = defineProps({
//
check: {
type: Boolean,
default: false
}
})
// //
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
// //
const emit = defineEmits(['defineEmits']) const emits = defineEmits(['confirm'])
// //
const store = useStore() const store = useStore()
// //
@ -43,7 +54,12 @@
// //
function close() { function close() {
proxy.$refs.pwdRef.open() proxy.$refs.pwdRef.close()
setTimeout(() => {
//
pwd.value = ''
}, 500)
} }
// //
@ -52,8 +68,31 @@
util.alert('二级密码不正确') util.alert('二级密码不正确')
return return
} }
// md5 //
emit('confirm', CryptoJS.MD5(pwd.value).toString()) let password = CryptoJS.MD5(pwd.value).toString()
//
if (!props.check) {
//
emits('confirm', password)
close()
return
}
//
api.mine.checkSecondLevelCipher({
data: {
secondLevelCipher: password,
}
}).then(rs => {
if (rs.code == 200) {
emits('confirm', password)
close()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
} }
// //

View File

@ -1,3 +1,59 @@
<script setup>
//
import util from '@/common/js/util.js'
//
import {
ref,
reactive,
computed,
watch,
onMounted,
onUnmounted
} from 'vue'
const props = defineProps({
shopEdit: {
type: Boolean,
default: true
},
address: {
type: Object,
default: () => ({})
}
})
onMounted(() => {
//
addListener()
})
onUnmounted(() => {
//
removeListener()
})
//
function addListener() {
//
uni.$on('selectAddress', (event) => {
emit('update:value', event.target.value);
})
}
//
function removeListener() {
//
uni.$off('selectAddress')
}
//
function link(url) {
uni.navigateTo({
url
})
}
</script>
<template> <template>
<view class="address df aic jcc"> <view class="address df aic jcc">
<!-- 图标 --> <!-- 图标 -->
@ -18,36 +74,12 @@
</view> </view>
<!-- 选择地址 --> <!-- 选择地址 -->
<view v-if="shopEdit" class="btn ti warmHollow plr20 ml20" <view v-if="shopEdit" class="btn ti warmHollow plr20 ml20" @click="link('/pages/mine/delivery-address/index')">
@click="util.checkLink('/pages/mine/delivery-address/index')">
<text class="cFF9B27">选择地址</text> <text class="cFF9B27">选择地址</text>
</view> </view>
</view> </view>
</template> </template>
<script setup>
//
import util from '@/common/js/util.js'
const props = defineProps({
shopEdit: {
type: Boolean,
default: true
},
address: {
type: Object,
default: () => ({})
}
})
const goto = (url) => {
uni.navigateTo({
url
})
}
</script>
<style lang="scss" scoped>
.address {
.edit-address { <style lang="scss" scoped>
overflow: visible; //
}
}
</style> </style>

View File

@ -23,13 +23,13 @@
// //
const props = defineProps({ const props = defineProps({
province: { province: {
type: [String,Number], type: [String, Number],
}, },
city: { city: {
type: [String,Number], type: [String, Number],
}, },
area: { area: {
type: [String,Number], type: [String, Number],
}, },
}) })
// //
@ -60,17 +60,17 @@
// //
function initRegionIndex() { function initRegionIndex() {
console.log('props', props)
if (props.province) { if (props.province) {
const provinceIndex = region.findIndex(item => item.id == props.province); const provinceIndex = region.findIndex(item => item.regionName == props.province);
regionIndex[0] = provinceIndex; regionIndex[0] = provinceIndex;
if (props.city) { if (props.city) {
const cityIndex = region[provinceIndex].children.findIndex(item => item.id == props.city); const cityIndex = region[provinceIndex].children.findIndex(item => item.regionName == props.city);
regionIndex[1] = cityIndex; regionIndex[1] = cityIndex;
if (props.area) { if (props.area) {
const areaIndex = region[provinceIndex].children[cityIndex].children.findIndex(item => item.id == const areaIndex = region[provinceIndex].children[cityIndex].children.findIndex(item => item
.regionName ==
props.area); props.area);
regionIndex[2] = areaIndex; regionIndex[2] = areaIndex;
} }
@ -159,14 +159,16 @@
</script> </script>
<template> <template>
<template v-if="province"> <text @click="$refs.selection.open()">
<text>{{province.regionName}}</text> <template v-if="province">
<text>{{city.regionName}}</text> <text v-if="province.regionName">{{province.regionName}}</text>
<text>{{area.regionName}}</text> <text v-if="city && city.regionName">{{city.regionName}}</text>
</template> <text v-if="area && area.regionName">{{area.regionName}}</text>
<template v-else> </template>
<text class="placeholderStyle">请选择产品所在地</text> <template v-else>
</template> <text class="placeholderStyle">请选择产品所在地</text>
</template>
</text>
<uni-popup ref="selection" type="bottom"> <uni-popup ref="selection" type="bottom">
<view class="selectionAlt popBot bfff"> <view class="selectionAlt popBot bfff">
<view class="header rows plr30"> <view class="header rows plr30">

View File

@ -38,14 +38,6 @@
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
}, },
{
"path": "pages/merchant/business-operator/index",
"style": {
"navigationBarTitleText": "商家管理",
"onReachBottomDistance": 100,
"navigationStyle": "custom"
}
},
{ {
"path": "pages/merchant/order/index", "path": "pages/merchant/order/index",
"style": { "style": {
@ -718,6 +710,21 @@
"navigationBarTitleText": "群聊列表", "navigationBarTitleText": "群聊列表",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
},
{
"path" : "pages/shop/commodity/history",
"style" :
{
"navigationBarTitleText" : "商品修改历史"
}
},
{
"path" : "pages/shop/store/order",
"style" :
{
"navigationBarTitleText" : "商家订单",
"navigationStyle": "custom"
}
} }
], ],

View File

@ -1,252 +1,387 @@
<template>
<view class="app">
<!-- 头部 -->
<!-- <JyCommonHead title="收获地址" :isRight="false"></JyCommonHead> -->
<view class="page-wrapper oh">
<view v-for="addressItem in addressData" :key="addressItem.id" class="address-item mb20 ptb20 plr20 bfff"
@click="emit('choose', addressItem)" :class="{'active': addressItem.isDefault}">
<view class="top-area">
<text class="name">{{ addressItem.name }}</text>
<text class="phone">{{ addressItem.phone }}</text>
</view>
<view class="address-text">{{ addressItem.address }}</view>
<view class="bottom-area mt20">
<label>
<checkbox @click.stop="emit('setDefault', addressItem)" color="#f60" disabled
style="transform:scale(0.8)" :class="[addressItem.isDefault && 'isDefault']"
:checked="addressItem.isDefault" />
<text @click.stop="emit('setDefault', addressItem)" class="set-def-text">设为默认</text>
</label>
<view class="operation-btns">
<uni-tag class="mlr10" @click.stop="emit('edit', addressItem)" :inverted="true" text="复制"
type="warning" size="small"></uni-tag>
<uni-tag class="mlr1" @click.stop="copyText(addressItem)" :inverted="true" text="修改"
type="warning" size="small"></uni-tag>
</view>
</view>
<uni-icons class="delete" type="closeempty" color="#999" @click.stop="emit('delete', addressItem)" />
</view>
</view>
<view class="footer plr30 shadow bfff">
<view class="btn lg primary" @click="openPopup">添加地址</view>
</view>
</view>
<JyPopup ref="addressPopup" title="添加收货地址" type="center">
<view class="p25">
<uni-forms :modelValue="formData">
<uni-forms-item label="收货人" name="recipientName">
<input type="text" v-model="formData.recipientName" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="手机号" name="phoneNumber">
<input type="text" v-model="formData.phoneNumber" placeholder="请输入手机号" />
</uni-forms-item>
<uni-forms-item label="邮编" name="postalCode">
<input type="text" v-model="formData.postalCode" placeholder="请输入邮编" />
</uni-forms-item>
<uni-forms-item label="地区" name="areas">
<input @click="onhideShow" type="text" v-model="formData.areas" placeholder="请输入地区" />
</uni-forms-item>
<uni-forms-item label="详细地址" name="addressDetail">
<uni-easyinput type="textarea" autoHeight v-model="formData.addressDetail"
placeholder="如街道,门牌号,小区,乡镇,村等"></uni-easyinput>
</uni-forms-item>
</uni-forms>
<pickRegions :province="add.province" :city="add.city" :area="add.area" :show="show"
@changeClick="changeClick" @sureSelectArea="onsetCity" @hideShow="onhideShow"></pickRegions>
<button class="add-address-btn" @click="saveApi">保存</button>
</view>
</JyPopup>
</template>
<script setup> <script setup>
//
import { import {
ref, ref,
getCurrentInstance, getCurrentInstance,
reactive reactive,
computed,
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
onPullDownRefresh,
onReachBottom
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import JyPopup from '@/components/public/jy-popup' //
import JyCommonHead from '@/components/public/jy-common-head' import {
import pickRegions from './components/jy-pick-regions' useStore
import JyBottomBtn from '@/components/public/jy-bottom-button' } from 'vuex'
//
import api from '@/api/index.js'
//
import regionSelection from '@/components/public/regionSelection/regionSelection.vue'
//
import util from '@/common/js/util.js'
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
const show = ref(false) const store = useStore()
// //
const onhideShow = () => { const list = reactive({
show.value = true data: [],
} pageNum: 1,
const changeClick = (value, value2, value3, value4) => { pageSize: 10,
console.log('地址选择器 = ' + value + value2 + value3 + value4); total: 0,
}
//
const onsetCity = (e) => {
console.log('====================================');
console.log(e);
console.log('====================================');
show.value = false
}
const formData = reactive({
recipientName: undefined,
phoneNumber: undefined,
district: undefined,
postalCode: undefined,
city: undefined,
province: undefined,
addressDetail: undefined,
}) })
const setDefault = () => { //
console.log('setDefault') const formData = reactive({
id: '',
//id
uid: '',
//
name: '',
//
mobile: '',
//
isDefault: true,
//
province: '',
//
city: '',
//
country: '',
//
detail: '',
})
//
const select = ref('')
//
const userinfo = computed(() => store.state.userinfo)
onLoad((option) => {
//
if (option.select) select.value = option.select
//
getList()
})
onPullDownRefresh(() => {
//
refreshList()
})
onReachBottom(() => {
//
getMoreList()
})
//
function refreshList() {
list.pageNum = 1
getList()
} }
const add = () => { //
uni.navigateTo({ function getMoreList() {
url: '/pages/mine/address-add' if (list.data.length >= list.total) return
list.pageNum++
getList()
}
//
function getList() {
//
api.shop.getAddressList({
query: {
pageNum: list.pageNum,
pageSize: list.pageSize,
},
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = 0
list.data.push(...rs.rows)
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
uni.stopPullDownRefresh()
}) })
} }
const validateForm = () => { /**
if (!formData.recipientName) { * 选择地址
uni.showToast({ * @param {Object} item
title: '请输入收货人', */
icon: 'none' function handleChoose(item) {
}); if (select.value == 1) {
return false; uni.$emit('selectAddress', item)
} uni.navigateBack()
if (!formData.phoneNumber || !/^1[3-9]\d{9}$/.test(formData.phoneNumber)) { return
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
return false;
}
// ...
return true;
}
//
function saveApi() {
if (validateForm()) {
//
console.log('保存地址:', formData);
} }
} }
const addressData = ref([{ //
name: '上官婉儿', function handleSubmit() {
phone: '13800138000', //
address: '北京市海淀区中关村软件园', const data = {
isDefault: false, ...formData
isCompany: true, }
id: Math.random().toString(36).substring(2, 9), console.log('data', data)
},
{
name: '司空震',
phone: '13800138000',
address: '江西省吉安市吉水县东山中央首府11栋',
isDefault: true,
isHome: true,
id: Math.random().toString(36).substring(2, 9),
},
{
name: '苏烈',
phone: '13800138000',
address: '广东省深圳市南山区粤海街道109号6楼601',
isDefault: false,
id: Math.random().toString(36).substring(2, 9),
},
])
function copyText(item) { //
uni.setClipboardData({ if (!data.name) {
data: item.address, util.alert('收货人姓名不能为空')
success: () => { return
uni.showToast({ }
title: '复制成功', if (!data.mobile) {
icon: 'success' util.alert('收货人电话不能为空')
}); return
}, }
fail: () => { if (!data.province) {
uni.showToast({ util.alert('请选择省')
title: '复制失败', return
icon: 'none' }
}); if (!data.detail) {
util.alert('详细地址不能为空')
return
}
// id
data.uid = userinfo.value.id
//
api.shop.saveOrUpdate({
data,
}).then(rs => {
if (rs.code == 200) {
//
proxy.$refs.add.close()
//
refreshList()
return
} }
}); util.alert({
content: rs.msg,
showCancel: false,
})
})
} }
function openPopup() { /**
this.$refs.addressPopup.open() * 复制收货地址
* @param {Object} item
*/
function copyText(item) {
util.copyText(`${item.name} ${item.mobile} ${item.province}${item.city}${item.country} ${item.detail}`)
} }
function init() { //
this.getData({ function handleAddChange(ev) {
api: 'address', if (ev.show) return
fn: 'list'
}, {}); formData.id = ''
console.log('===================================='); //id
console.log(this.listProperty); formData.uid = ''
console.log('===================================='); //
formData.name = ''
//
formData.mobile = ''
//
formData.isDefault = false
//
formData.province = ''
//
formData.city = ''
//
formData.country = ''
//
formData.detail = ''
} }
function onReachBottomHandler() { /**
this.listProperty.params.pageNum++; * 设为默认
this.init(); * @param {Object} item 点击的列表项
*/
function handleDefault(item) {
//
api.shop.saveOrUpdate({
data: {
id: item.id,
isDefault: true,
},
}).then(rs => {
if (rs.code == 200) {
//
refreshList()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
} }
function onPullDownRefreshHandler() { /**
this.listProperty.params.pageNum = 1 * 更新收货地址信息
this.getData({ * @param {Object} item 点击的列表项
api: 'address', */
fn: 'list' function handleUpdate(item) {
}, {}, true); console.log(item)
//
formData.id = item.id
//id
formData.uid = item.uid
//
formData.name = item.name
//
formData.mobile = item.mobile
//
formData.province = item.province
//
formData.city = item.city
//
formData.country = item.country
//
formData.detail = item.detail
//
proxy.$refs.add.open()
}
/**
* 选择省市区
* @param {Object} ev 选择地区
*/
function handleRegion(ev) {
formData.province = ev.province.regionName
formData.city = ev.city.regionName
formData.country = ev.area.regionName
}
/**
* 删除收货地址
* @param {Object} item 点击的列表项
* @param {Object} index 点击的列表下标
*/
function handleRemove(item, index) {
util.alert({
title: '确认删除?',
content: '删除后不可恢复,确定删除该收货地址吗?',
success: (res) => {
if (!res.confirm) return
api.shop.removeAddressById({
query: {
id: item.id
}
}).then(rs => {
if (rs.code == 200) {
list.data.splice(index, 1)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
})
} }
</script> </script>
<template>
<view class="app">
<view class="listBox oh c333">
<view v-for="(item,index) in list.data" :key="item.id" class="item pr mb20 ptb20 plr20 bfff"
@click="handleChoose(item)" :class="{'active': item.isDefault}">
<view class="top-area f30 mtb10">
<text class="name">{{ item.name }}</text>
<text class="phone">{{ item.mobile }}</text>
</view>
<view class="address-text f30 mtb10">
<text>{{item.province}}</text>
<text>{{item.city}}</text>
<text>{{item.country}}</text>
<text>{{item.detail}}</text>
</view>
<view class="rows mt20 c999 f28">
<label class="rows" @click.stop="handleDefault(item)">
<uni-icons type="circle" color="#999" size="40rpx" v-if="!item.isDefault" />
<uni-icons type="checkbox-filled" color="#F8BA4D" size="40rpx" v-else />
<text class="ml10">设为默认</text>
</label>
<view class="btns df aic">
<view class="btn ti warmHollow plr10" @click.stop="copyText(item)">复制</view>
<view class="btn ti warmHollow plr10" @click.stop="handleUpdate(item)">修改</view>
</view>
</view>
<view class="pa t0 r0 pt30 pr30" @click.stop="handleRemove(item,index)">
<uni-icons type="closeempty" color="#999" />
</view>
</view>
</view>
<view class="fill" style="height: 210rpx;"></view>
<view class="footer plr30 shadow bfff">
<view class="btn lg primary" @click="$refs.add.open()">添加地址</view>
</view>
</view>
<!-- 新增收货地址 -->
<uni-popup ref="add" type="center" @change="handleAddChange">
<view class="addAddressAlt popMid bfff">
<view class="header rows ptb30 plr30">
<view class="c333 f30">收货地址</view>
<uni-icons type="closeempty" @click="$refs.add.close()" />
</view>
<view class="plr25">
<uni-forms :modelValue="formData" label-position="top">
<uni-forms-item label="收货人" name="name">
<input type="text" v-model="formData.name" placeholder="请输入收货人姓名"
placeholder-class="placeholderStyle" />
</uni-forms-item>
<uni-forms-item label="手机号" name="mobile">
<input type="text" v-model="formData.mobile" placeholder="请输入手机号"
placeholder-class="placeholderStyle" />
</uni-forms-item>
<uni-forms-item label="地区" name="areas">
<regionSelection :province="formData.province" :city="formData.city" :area="formData.country"
@change="handleRegion">
</regionSelection>
</uni-forms-item>
<uni-forms-item label="详细地址" name="addressDetail">
<uni-easyinput type="textarea" autoHeight v-model="formData.detail"
placeholder="如街道,门牌号,小区,乡镇,村等"></uni-easyinput>
</uni-forms-item>
</uni-forms>
</view>
<view class="btn primary mtb30 mlr30" @click="handleSubmit">保存</view>
</view>
</uni-popup>
</template>
<style lang="scss" scoped> <style lang="scss" scoped>
$text-color1: #333333; $text-color1: #333333;
$text-color2: #666; $text-color2: #666;
::v-deep .uni-checkbox-input-disabled {
border-radius: 50% !important;
background-color: #ffffff !important;
}
::v-deep .isDefault {
.uni-checkbox-input {
background-color: #F8BA4D !important;
border-color: #F8BA4D !important;
}
path {
fill: #fff;
}
}
.page-wrapper { .page-wrapper {
// padding: 20rpx;
overflow-y: scroll; overflow-y: scroll;
height: calc(100vh - 200rpx - 110rpx); height: calc(100vh - 200rpx - 110rpx);
.address-item { .address-item {
position: relative; position: relative;
.delete {
position: absolute;
top: 15rpx;
right: 15rpx;
width: 26rpx;
height: 26rpx;
}
.top-area { .top-area {
font-size: 28rpx; font-size: 28rpx;
margin: 10rpx 0; margin: 10rpx 0;
@ -273,75 +408,6 @@
text-overflow: ellipsis; text-overflow: ellipsis;
/* 使用省略号替代溢出部分 */ /* 使用省略号替代溢出部分 */
} }
.bottom-area {
display: flex;
padding-right: 0rpx;
justify-content: space-between;
justify-items: center;
.set-def-text {
font-size: 14px;
color: $text-color2;
}
}
} }
.add-address-btn {
position: fixed;
z-index: 99;
bottom: 120rpx;
width: calc(100% - 30rpx);
margin: auto;
height: 80rpx;
border-radius: 15rpx;
background-color: #f60;
color: #fff;
font-size: 22px;
text-align: center;
line-height: 80rpx;
letter-spacing: 4rpx;
}
}
.jy-pay-popup {
width: 100%;
height: 800rpx;
border-radius: 30rpx;
.title {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 20rpx 0;
//
color: #3D3D3D;
font-size: 32rpx;
border-bottom: 1px solid #E5E5E5;
}
.close-btn {
position: absolute;
top: 0;
right: 0;
height: 52rpx;
line-height: 52rpx;
width: 52rpx;
background: #D8D8D8;
font-size: 30rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
transform: translate(50%, -50%);
}
}
.add-address-btn {
background: linear-gradient(270deg, #FF9B27 20%, #FDC123 103%);
font-size: 32rpx;
color: #FFFFFF;
width: 100%;
} }
</style> </style>

View File

@ -147,6 +147,7 @@
}).then(rs => { }).then(rs => {
if (rs.code == 200) { if (rs.code == 200) {
util.alert('已发送好友申请,请等待对方同意') util.alert('已发送好友申请,请等待对方同意')
proxy.$refs.friendRef.close()
return return
} }
util.alert({ util.alert({

View File

@ -16,6 +16,8 @@
// //
import TencentCloudChat from '@tencentcloud/chat'; import TencentCloudChat from '@tencentcloud/chat';
// //
import api from '@/api/index.js'
//
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
@ -33,7 +35,7 @@
onLoad(() => { onLoad(() => {
// //
getGroupList() // getGroupList()
// //
addListener() addListener()
}) })
@ -46,35 +48,31 @@
// //
function addListener() { function addListener() {
let onFriendListUpdated = function(event) { let onFriendListUpdated = function(event) {
console.log('onFriendListUpdated')
getGroupList() getGroupList()
} }
uni.$chat.on(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, onFriendListUpdated); uni.$chat.on(TencentCloudChat.EVENT.GROUP_LIST_UPDATED, onFriendListUpdated);
} }
// //
function removeListener() { function removeListener() {
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED); uni.$chat.off(TencentCloudChat.EVENT.GROUP_LIST_UPDATED);
} }
// //
function getGroupList() { function getGroupList() {
// sdk api.news.myGroups().then(rs => {
let isReady = uni.$chat.isReady(); if (rs.code == 200) {
if (!isReady) {
setTimeout(function() {
getGroupList()
}, 200);
return
}
uni.$chat.getGroupList().then(rs => {
if (rs.code == 0) {
list.length = 0 list.length = 0
list.push(...rs.data.groupList) list.push(...rs.data)
console.log('group list', list) console.log('group list', list)
return
} }
util.alert({
content: rs.msg,
showCancel: false
})
}) })
} }

View File

@ -24,9 +24,13 @@
const store = useStore() const store = useStore()
// id // id
const ids = reactive([]) const ids = ref([])
// //
const name = ref('') const form = reactive({
name: '',
groupFaceUrl: '',
type: 'Public',
})
// //
const list = reactive([]) const list = reactive([])
// //
@ -62,49 +66,79 @@
* @param {Object} item 当前用户信息 * @param {Object} item 当前用户信息
*/ */
function handleUser(item) { function handleUser(item) {
const findIndex = ids.value.findIndex(node => node == item.userId) const find_index = ids.value.findIndex(node => node == item.userId)
if (findIndex >= 0) ids.value.splice(findIndex, 1) console.log(find_index)
if (find_index >= 0) ids.value.splice(find_index, 1)
else ids.value.push(item.userId) else ids.value.push(item.userId)
} }
// //
function handleCreateGroup() { function handleCreateGroup() {
if (!name.value) { const data = {
...form
}
if (!data.name) {
util.alert('群聊名称不能为空') util.alert('群聊名称不能为空')
return return
} }
if (!data.groupFaceUrl) {
util.alert('群聊头像不能为空')
return
}
if (ids.length < 2) { if (ids.length < 2) {
util.alert('请至少选择两名用户') util.alert('请至少选择两名用户')
return return
} }
// //
const memberList = [{ data.groupUsers = [
userID: userinfo.value.userId, {
userId: userinfo.value.id
}, },
...ids.map(item => { ...ids.value.map(item => {
return { return {
userID: item userId: item
} }
}) })
] ]
// //
uni.$chat.createGroup({ api.news.addChatGroup({
type: TencentCloudChat.TYPES.GRP_WORK, data: data
name: name.value,
memberList,
}).then(rs => { }).then(rs => {
console.log('createGroup success', rs) if (rs.code == 200) {
util.alert('创建成功') util.alert('创建成功')
}).catch(rs => { return
console.log('createGroup catch', rs);
//
setTimeout(() => {
form.name = ''
form.groupFaceUrl = ''
uni.navigateBack()
}, 2000)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function uploadImg() {
util.upload_image({
type: 1,
success: (res) => {
form.groupFaceUrl = res.value
}
}) })
} }
</script> </script>
<template> <template>
<view class="app"> <view class="app">
<uni-search-bar placeholder="请输入群聊名称" v-model="name" style="background: #fff;" /> <!-- <uni-search-bar placeholder="请输入群聊名称" v-model="name" style="background: #fff;" /> -->
<view class="jy-chat-box mt30"> <view class="jy-chat-box mt30">
<view class="firendBox pr"> <view class="firendBox pr">
@ -114,7 +148,7 @@
<image class="wh80 avatar cir" :src="item.avatar" mode="aspectFill" /> <image class="wh80 avatar cir" :src="item.avatar" mode="aspectFill" />
<view class="name thd f1 ml20 c333 f32">{{item.remark || item.userNickname}}</view> <view class="name thd f1 ml20 c333 f32">{{item.remark || item.userNickname}}</view>
<uni-icons type="circle-filled" size="40rpx" color="#20D200" <uni-icons type="circle-filled" size="40rpx" color="#20D200"
v-if="ids.includes(item.userID)" /> v-if="ids.includes(item.userId)" />
<uni-icons type="circle" size="40rpx" color="#ccc" v-else /> <uni-icons type="circle" size="40rpx" color="#ccc" v-else />
</view> </view>
</view> </view>
@ -127,9 +161,39 @@
<view class="fill" style="height: 120rpx;"></view> <view class="fill" style="height: 120rpx;"></view>
<view class="footer plr30 bfff shadow"> <view class="footer plr30 bfff shadow">
<view class="btn lg colourful" @click="handleCreateGroup">新建群聊</view> <view class="btn lg colourful" @click="$refs.groupAlt.open() ">下一步</view>
</view> </view>
</view> </view>
<!-- 群聊表单信息 -->
<uni-popup ref="groupAlt" type="bottom">
<view class="groupAlt popBot ptb30 plr30 bfff">
<view class="header rows">
<view class="">新建群聊</view>
<uni-icons type="closeempty" size="40rpx" color="#333" />
</view>
<!-- -->
<view class="main">
<view class="txtplus inputBox mtb30 ptb20 plr20 br10">
<input type="text" v-model="form.name" placeholder="群聊名称" />
</view>
<view class="imgList">
<view class="imgs wh200" v-if="form.groupFaceUrl" @click="uploadImg">
<image class="wh200 br20" :src="form.groupFaceUrl" mode="aspectFill" />
</view>
<view class="imgs wh200 fmid bf8f8f8 br20" v-else @click="uploadImg">
<uni-icons type="plusempty" color="#999" size="50rpx" />
</view>
</view>
</view>
<view class="btn">
<view class="btn lg colourful" @click="handleCreateGroup">新建群聊</view>
</view>
</view>
</uni-popup>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -28,6 +28,8 @@
default: () => ({}) default: () => ({})
}, },
}) })
//
const address = reactive({})
// //
const spec = reactive([{ const spec = reactive([{
@ -129,7 +131,7 @@
<uni-popup type="bottom" ref="popup"> <uni-popup type="bottom" ref="popup">
<view class="buy popBot plr20 bfff"> <view class="buy popBot plr20 bfff">
<view class="address mtb40"> <view class="address mtb40">
<JyCommodityAddress></JyCommodityAddress> <JyCommodityAddress :address="address"></JyCommodityAddress>
</view> </view>
<!-- 商品图 价格 明细 数量 --> <!-- 商品图 价格 明细 数量 -->

View File

@ -0,0 +1,20 @@
<script setup>
//
import {
ref,
reactive,
watch,
computed
} from 'vue'
</script>
<template>
<view class="app">
<view class=""></view>
</view>
</template>
<style>
</style>

View File

@ -27,13 +27,11 @@
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
const store = useStore()
// //
const detail = reactive({}) const detail = reactive({})
// id // id
const id = ref('') const id = ref('')
const {
userinfo
} = useStore().state
// //
const bannerIndex = ref(0) const bannerIndex = ref(0)
// //
@ -42,11 +40,17 @@
if (detail.sliderImage) result = detail.sliderImage.split(',') if (detail.sliderImage) result = detail.sliderImage.split(',')
return result return result
}) })
//
const userinfo = computed(() => {
return store.state.userinfo
})
onLoad(option => { onLoad(option => {
if (option.productId) id.value = option.productId if (option.productId) id.value = option.productId
// //
getDetail() getDetail()
//
addBrowsing()
}) })
onReady(() => { onReady(() => {
@ -58,6 +62,26 @@
else proxy.$refs.apexRef.headerActive = false else proxy.$refs.apexRef.headerActive = false
}) })
//
function addBrowsing() {
//
util.isLogin(() => {
try {
//
api.shop.addBrowsing({
data: {
userId: userinfo.value.id,
goodsId: id.value
},
}).then(rs => {
if (rs.code != 200) console.log('addbrows err', rs.msg)
})
} catch (ev) {
console.log('addBrowsing', ev)
}
})
}
// //
function getDetail() { function getDetail() {
api.shop.productDetail({ api.shop.productDetail({
@ -86,6 +110,11 @@
url, url,
}) })
} }
//
function handleCollectStore() {
//
}
</script> </script>
<template> <template>
@ -120,7 +149,7 @@
</view> </view>
<!-- 优惠券 --> <!-- 优惠券 -->
<view class="coupon df fdr fww f26 mtb20 cFF9B27"> <view class="coupon df fdr fww f26 mtb20 cFF9B27" v-if="0">
<view class="item"> <view class="item">
<text>限时直降0.5</text> <text>限时直降0.5</text>
</view> </view>
@ -142,12 +171,6 @@
<!-- 福利政策 --> <!-- 福利政策 -->
<view class="gift df fdr fww c999 f24 mtb20"> <view class="gift df fdr fww c999 f24 mtb20">
<view class="item">
<text>全场包邮</text>
</view>
<view class="item">
<text>48h内发货</text>
</view>
<view class="item"> <view class="item">
<text>假一赔十</text> <text>假一赔十</text>
</view> </view>
@ -155,6 +178,12 @@
<text>7天无理由退货</text> <text>7天无理由退货</text>
</view> </view>
<view class="item"> <view class="item">
<text>全场包邮</text>
</view>
<view class="item">
<text>48h内发货</text>
</view>
<view class="item" v-if="0">
<text>支持先用后付</text> <text>支持先用后付</text>
</view> </view>
</view> </view>
@ -216,14 +245,14 @@
<view class="info f1 mlr20"> <view class="info f1 mlr20">
<!-- 店铺名称 --> <!-- 店铺名称 -->
<view class="name thd"> <view class="name thd">
<text class="f34 c333">家纺专营店</text> <text class="f34 c333">{{detail.merName}}</text>
</view> </view>
<view class="line df dfr aic mt10"> <view class="line df dfr aic mt10">
<!-- 评分 --> <!-- 评分 -->
<view class="item f24 c666 df aic "> <!-- <view class="item f24 c666 df aic ">
<uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" readonly /> <uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" readonly />
<text>4.5</text> <text>4.5</text>
</view> </view> -->
<!-- 关注数量 --> <!-- 关注数量 -->
<view class="item follow c666 f24"> <view class="item follow c666 f24">
<text>123关注</text> <text>123关注</text>
@ -233,7 +262,7 @@
</view> </view>
<!-- 关注按钮 --> <!-- 关注按钮 -->
<view @click="followButton" class="btn sm warm plr30"> <view @click="handleCollectStore" class="btn sm warm plr30">
<uni-icons class="mr10" color="#fff" type="plusempty" size="13" v-if="1" /> <uni-icons class="mr10" color="#fff" type="plusempty" size="13" v-if="1" />
<text class="cfff" v-else></text> <text class="cfff" v-else></text>
<text class="cfff">关注</text> <text class="cfff">关注</text>
@ -247,8 +276,7 @@
</view> </view>
<!-- 商品详情 --> <!-- 商品详情 -->
<view class="content mt30"> <view class="content mt30">
<rich-text <rich-text :nodes="detail.intro" />
nodes="<p><img src='https://img30.360buyimg.com/popWareDetail/jfs/t1/124291/22/31317/138753/6449f30dF90683c84/4fee5d1a337f7b90.jpg.avif' width='100%' /></p>" />
</view> </view>
</view> </view>

View File

@ -17,6 +17,7 @@
const paytype = ref('1') const paytype = ref('1')
// //
//
const paytypeList = [{ const paytypeList = [{
name: '微信支付', name: '微信支付',
value: '1', value: '1',

View File

@ -27,6 +27,8 @@
import util from '@/common/js/util.js' import util from '@/common/js/util.js'
// //
import regionSelection from '@/components/public/regionSelection/regionSelection.vue'; import regionSelection from '@/components/public/regionSelection/regionSelection.vue';
//
import payPwd from '@/components/mine/payPwd.vue'
// //
const store = useStore() const store = useStore()
const { const {
@ -49,6 +51,8 @@
const dictList = reactive([]) const dictList = reactive([])
// //
const dictIndex = ref('') const dictIndex = ref('')
//
const pwdCb = ref('')
// //
const userinfo = computed(() => { const userinfo = computed(() => {
return store.state.userinfo return store.state.userinfo
@ -60,7 +64,8 @@
}) })
onReady(() => { onReady(() => {
// proxy.$refs.regionSelectionRef.open() //
callPwd('depositsPay')
}) })
// //
@ -173,24 +178,8 @@
}) })
} }
//
function depositsCancel() {
api.shop.depositsCancel().then(rs => {
if (rs.code == 200) {
//
mode.code = 0
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
// //
function getarticle() { function getarticle() {
api.getArticle({ api.getArticle({
query: { query: {
agreementId: 4, agreementId: 4,
@ -221,9 +210,7 @@
form[key] = rs.value form[key] = rs.value
break break
case 2: case 2:
console.log('form[key]', form[key])
form[key].push(rs.value) form[key].push(rs.value)
console.log('form[key]', form[key])
break break
} }
}, },
@ -249,9 +236,9 @@
*/ */
function handleRegion(ev) { function handleRegion(ev) {
console.log('handleRegion', ev) console.log('handleRegion', ev)
form.province = ev.province.id form.province = ev.province.regionName
form.city = ev.city.id form.city = ev.city.regionName
form.district = ev.area.id form.district = ev.area.regionName
} }
/** /**
@ -336,24 +323,52 @@
} }
// 退 // 退
function outDepositsPay() { function outDepositsPayAlt() {
util.alert({ util.alert({
content: '确认缴纳押金并放弃商家身份?', content: '确认缴纳押金并放弃商家身份?',
}).then(rs => { }).then(rs => {
if (rs.confirm) return if (!rs.confirm) return
api.shop.outDepositsPay().then(rs => { //
if (rs.code == 200) { callPwd('outDepositsPay')
// })
handleModeCode(0) }
return
} // 退
util.alert({ function outDepositsPay() {
showCancel: false, // 退
content: rs.msg, api.shop.outDepositsPay().then(rs => {
}) if (rs.code == 200) {
//
handleModeCode(0)
return
}
util.alert({
showCancel: false,
content: rs.msg,
}) })
}) })
} }
/**
* 调用二级密码
* @param {Object} key 后续方法key
*/
function callPwd(key) {
pwdCb.value = {
//
'depositsPay': depositsPay,
// 退
'outDepositsPay': outDepositsPay,
} [key]
//
proxy.$refs.payPwdRef.open()
}
//
function handlePayPwd() {
//
pwdCb.value()
}
</script> </script>
<template> <template>
@ -374,11 +389,11 @@
<view class="footer plr30 bfff shadow"> <view class="footer plr30 bfff shadow">
<!-- 未缴纳押金 --> <!-- 未缴纳押金 -->
<template v-if="mode.code == 0"> <template v-if="mode.code == 0">
<view class="btn black" @click="depositsPay">缴纳押金</view> <view class="btn black" @click="$refs.payPwdRef.open()">缴纳押金</view>
</template> </template>
<template v-else> <template v-else>
<view class="rows"> <view class="rows">
<view class="btn cancel plr30" @click="outDepositsPay">退回押金</view> <view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">申请入驻</view> <view class="btn colourful f1" @click="handleModeCode('form')">申请入驻</view>
</view> </view>
</template> </template>
@ -400,7 +415,7 @@
<view class="fill" style="height: 160rpx;"></view> <view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow"> <view class="footer rows plr30 bfff shadow">
<view class="btn cancel f1" @click="outDepositsPay">取消申请并退回押金</view> <view class="btn cancel f1" @click="outDepositsPayAlt">取消申请并退回押金</view>
</view> </view>
</view> </view>
</template> </template>
@ -423,7 +438,7 @@
<view class="fill" style="height: 160rpx;"></view> <view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow"> <view class="footer rows plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPay">退回押金</view> <view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">修改信息</view> <view class="btn colourful f1" @click="handleModeCode('form')">修改信息</view>
</view> </view>
</view> </view>
@ -440,7 +455,7 @@
<view class="fill" style="height: 160rpx;"></view> <view class="fill" style="height: 160rpx;"></view>
<view class="footer plr30 bfff shadow"> <view class="footer plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPay">退回押金并放弃商家身份</view> <view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金并放弃商家身份</view>
</view> </view>
</view> </view>
</template> </template>
@ -550,12 +565,14 @@
<view class="footer plr30 bfff shadow"> <view class="footer plr30 bfff shadow">
<view class="rows"> <view class="rows">
<view class="btn cancel plr30" @click="outDepositsPay">退回押金</view> <view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleSubmit">申请入驻</view> <view class="btn colourful f1" @click="handleSubmit">申请入驻</view>
</view> </view>
</view> </view>
</template> </template>
<!-- 二级密码 -->
<payPwd ref="payPwdRef" :check="true" @confirm="handlePayPwd" />
</template> </template>
<style lang="scss"> <style lang="scss">

View File

@ -1,65 +1,17 @@
<template>
<view class="jy-store-detail">
<JyStoreHead></JyStoreHead>
<!-- <JyStore cardMod="store"></JyStore> -->
<!-- 店铺卡片 -->
<view class="jy-shop-card df aic jcsb p25 mt40 bfff">
<view class="jy-shop-card-header">
<!-- 店铺头像 -->
<image class="jy-shop-card-header-img" src="" mode="aspectFill"></image>
<!-- 店铺信息 名称 评分 关注数量 -->
<view class="jy-shop-card-header-info">
<!-- 店铺名称 -->
<view class="jy-shop-card-header-info-name">
<text>店铺名称</text>
</view>
<view class="df aic">
<!-- 评分 -->
<view class="f24 c666 df aic ">
<uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" disabled
:showScore="true"></uni-rate>
<text>4.5</text>
</view>
<!-- 垂直分割线 -->
<view class="jy-shop-card-header-info-line"></view>
<!-- 关注数量 -->
<view class="c666 f24">
<text>123关注</text>
</view>
</view>
</view>
</view>
<view v-if="cardMod == 'store'" class="jy-shop-card-header-follow-g">
<view class="btn" @click="followButton">
<uni-icons class="mr10" color="#FF9B27" type="plusempty" size="13" />
<text>关注</text>
</view>
<view class="btn df aic">
<image class="kefu" :src="customerService" /><text>客服</text>
</view>
</view>
</view>
<view class="bfff content">
<!-- 筛选 -->
<!-- <JyScreen @status="statusScreening" :filteredList="filteredList"></JyScreen> -->
<!-- 内容 -->
<JyContent :conditions="conditions"></JyContent>
<!-- 筛选详情弹窗 -->
</view>
</view>
</template>
<script setup> <script setup>
//
import { import {
ref ref
} from 'vue' } from 'vue'
import JyStoreHead from './components/jy-store-head' import {
// import JyContent from '@/components/public/jy-shop-content' onLoad,
// import JyScreen from '../search/components/jy-screen' onPageScroll
// import JyStore from '../commodity/components/jy-store' } from '@dcloudio/uni-app';
const conditions = ref({})
//
import apex from '@/components/header/apex.vue'
//
import productList from '@/components/shop/productList/productList'
const filteredList = ref([{ const filteredList = ref([{
label: '默认', label: '默认',
@ -82,20 +34,83 @@
isUpDown: true, isUpDown: true,
slot: null slot: null
}]) }])
const statusScreening = (val) => { //
conditions.value = val const apexBgColor = ref('#ffffff00')
conditions.value.currentId = val.label
val.fun && fun[val.fun]()
}
</script>
<style lang="scss" scoped>
.jy-store-detail {
height: auto;
background: linear-gradient(50deg, #DBFCE9 -7%, #FFFBF3 50%, #FEEEDB 82%, #FEE3CD 102%);
.content { onPageScroll((ev) => {
border-top-left-radius: 40rpx; apexBgColor.value = ev.scrollTop > 44 ? '#fff' : '#ffffff00'
border-top-right-radius: 40rpx; })
} </script>
<template>
<view class="app">
<!-- 个人中心 我的卡片 -->
<apex :bgColor="apexBgColor" mode="flex">
<template #content>
<view class="search df jcr">
<view class="">
<image class="wh50" src="/static/share2.png" mode="aspectFit" />
</view>
</view>
</template>
</apex>
<!-- -->
<view class="shopHeaderBg"></view>
<!-- 店铺卡片 -->
<view class="store pr rows ptb25 plr25 mt40">
<!-- 店铺头像 -->
<image class="wh120 fs0 br10" src="/static/logo.png" mode="aspectFill" />
<!-- 店铺信息 名称 评分 关注数量 -->
<view class="info f1 ml20">
<!-- 店铺名称 -->
<view class="c333 f28">
<text>店铺名称</text>
</view>
<view class="df aic mt10">
<!-- 评分 -->
<view class="f24 c666 df aic" v-if="0">
<uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" readonly
:showScore="true"></uni-rate>
<text>4.5</text>
</view>
<!-- 关注数量 -->
<view class="c666 f24">
<text>123关注</text>
</view>
</view>
</view>
<!-- 按钮区 -->
<view class="btns w150">
<view>
<view class="btn ti warmHollow fmid" @click="followButton">
<uni-icons class="mr10" color="#FF9B27" type="plusempty" size="13" />
<text>关注</text>
</view>
</view>
<view class="mt10">
<view class="btn ti warmHollow fmid">
<image class="kefu wh30" src="/static/customer-service1.png" mode="aspectFit" />
<text>客服</text>
</view>
</view>
</view>
</view>
<!-- 商品列表 -->
<view class="product oh ptb30 plr30">
<productList ref="product" />
</view>
</view>
</template>
<style lang="scss" scoped>
//
.store {
// margin-top: -50rpx;
} }
</style> </style>

View File

@ -0,0 +1,173 @@
<script setup>
//
import {
ref,
reactive
} from 'vue'
import {
onLoad,
onPageScroll
} from '@dcloudio/uni-app';
//
import apex from '@/components/header/apex.vue'
//
import JyShopNavigation from '@/components/public/jy-shop-navigation'
//
// import JyOrderCard from '@/components/public/jy-order-card'
import orderItem from '@/components/shop/order/item.vue';
//
import util from '@/common/js/util';
// tabs
const tabs = reactive([{
id: '',
name: '全部'
},
{
id: 2,
name: '待付款'
},
{
id: 3,
name: '待发货'
},
{
id: 4,
name: '待收货'
},
{
id: 6,
name: '售后/退款'
}
])
//
const list = reactive({
data: [{
status: 1,
status_text: '待付款',
}, {
status: 2,
status_text: '待发货',
}, {
status: 3,
status_text: '待收货',
}, {
status: 6,
status_text: '售后中',
}],
})
//
const params = reactive({
currentTab: 0,
search: ''
})
//
const apexBgColor = ref('#ffffff00')
onLoad((options) => {
// this.params.currentTab = options.currentTab / 1
})
onPageScroll((ev) => {
apexBgColor.value = ev.scrollTop > 44 ? '#fff' : '#ffffff00'
})
/**
* 点击订单列表项
* @param {Object} ev 订单列表项
*/
function handleItem(ev) {
uni.navigateTo({
url: util.setUrl('/pages/shop/order/detail')
})
}
</script>
<template>
<apex :bgColor="apexBgColor" mode="flex">
<template #content>
<view class="search rows f1 mr30 plr20 bf8f8f8 br10">
<uni-icons type="search" color="#999" />
<input class="input ml20" type="text" placeholder="搜索内容" />
</view>
</template>
</apex>
<view class="app">
<view class="shopHeaderBg bgColor"></view>
<view class="f1 pr">
<JyShopNavigation :current="params.currentTab" :list="tabs" @tabItemClick="itemClick" marright="25px"
activeWeight='600' activeColor="#333333" activeBarColor="initial" />
</view>
<view class="product mlr20 pr">
<!-- 订单列表 -->
<view class="order">
<template v-for="(item,index) in list.data" :key="index">
<view class="mtb30">
<orderItem :item="item" mode="mine" @item="handleItem">
<template #menu="scope">
<!-- 收货地址 -->
<view class="menu rows ptb20" v-if="[2,3,4,5,6].includes(scope.item.status)">
<view class="key fs0 c333">收货地址</view>
<view class="value f1 ml20">
<view class="c333 f28">收货地址</view>
<view class="mt10 c666 f24">
<text>姓名</text>
<text>1397897890</text>
</view>
</view>
</view>
<!-- 退款原因 -->
<view class="menu rows ptb20" v-if="[6].includes(scope.item.status)">
<view class="key fs0 c333">退款原因</view>
<view class="value f1 ml20">
<view class="c333 f28">不想要了</view>
<view class="imgList mt10 c666 f24">
<template v-for="(item,index) in 3" :key="index">
<image class="imgs wh80 br10" src="/static/logo.png" mode="aspectFill" />
</template>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="menu ptb20 df jcr" v-if="[1,2,6].includes(scope.item.status)">
<template v-if="scope.item.status == 1">
<view class="btn bar warmHollow plr30">修改价格</view>
</template>
<template v-if="scope.item.status == 2">
<view class="btn bar warmHollow plr30">发货</view>
</template>
<template v-if="scope.item.status == 6">
<view class="btn bar closeHollow plr30">拒绝退款</view>
<view class="btn bar closeHollow plr30">同意退款</view>
<view class="btn bar warmHollow plr30">联系用户</view>
</template>
</view>
</template>
</orderItem>
</view>
</template>
</view>
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
</view>
</view>
</template>
<style scoped lang="scss">
//
.search {
height: 30px;
}
//
.bgColor {
height: 300rpx;
}
.menu {
border-top: 2rpx solid #eee;
}
</style>

View File

@ -59,7 +59,7 @@ updateVideo 触发视频修改
collectsVideo 收藏夹视频端 collectsVideo 收藏夹视频端
commentVideo 视频评论 commentVideo 视频评论
deleteVideo 删除视频 deleteVideo 删除视频
selectAddress 选择地址
缓存 缓存
--- ---
@ -69,6 +69,7 @@ alarmAlt 闹铃
gitlab gitlab
--- ---
前端地址 前端地址
@ -376,8 +377,11 @@ call_type 通话类型 2为视频1是音频
"likeStatus": "1" // 1 公开赞 2私有赞 0 没有赞 "likeStatus": "1" // 1 公开赞 2私有赞 0 没有赞
type type
0 非好友 0 非好友
1 好友 1 好友
生成订单到平台客服 平台客服去跟进订单

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 441 B

View File

@ -10,32 +10,32 @@ export default defineConfig({
port: 5173, port: 5173,
proxy: { proxy: {
"/system": { "/system": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },
"/shopify": { "/shopify": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },
"/user": { "/user": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },
"/coreplay": { "/coreplay": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },
"/file": { "/file": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },
"/video": { "/video": {
// target: "http://192.168.0.104:8080", // target: "http://192.168.0.189:8080",
target: "http://192.168.0.107:8080", target: "http://192.168.0.107:8080",
changeOrigin: true, changeOrigin: true,
}, },