Compare commits

...

27 Commits
xf ... master

Author SHA1 Message Date
sx d21dd4c3c8 提交代码 2025-04-27 21:40:25 +08:00
sx c91f0f45b5 合并代码 2025-04-27 09:10:38 +08:00
sx f868a2eada 工作代码提交 2025-04-26 09:05:40 +08:00
sx a6da6b7394 工作代码提交 2025-04-25 11:06:41 +08:00
sx ad8fafcec0 工作代码提交 2025-04-24 13:35:07 +08:00
sx 4ebbbd8b29 工作代码提交 2025-04-23 08:54:23 +08:00
sx 81d7c5c5f3 合并代码 2025-04-21 08:43:43 +08:00
sx 0df65703a3 工作代码提交 2025-04-18 08:51:50 +08:00
sx 4ddbbf14b5 工作代码提交 2025-04-17 09:08:12 +08:00
sx a10e8353e9 工作代码提交 2025-04-16 09:24:09 +08:00
sx 17b259fd3a 工作代码提交 2025-04-14 09:01:03 +08:00
sx ef19e7cb72 工作代码提交 2025-04-12 09:00:09 +08:00
sx b7529dd64d 工作代码提交 2025-04-08 21:54:02 +08:00
sx 05627a62d7 工作代码提交 2025-04-07 19:27:14 +08:00
sx c4318615e3 工作代码提交 2025-04-07 08:48:14 +08:00
sx 79742a0a1e 2025.03.29 ~ 2025.03.30 工作代码提交 2025-03-31 09:45:26 +08:00
sx 2503d40ca1 2025.03.28 工作代码提交 2025-03-29 09:14:37 +08:00
sx c9066d65ac 2025.03.27 工作代码提交 2025-03-28 08:51:18 +08:00
sx ea74ec8239 2025.03.26 工作代码提交 2025-03-27 08:52:10 +08:00
sx 9347f79c60 2025.03.25 工作代码提交 2025-03-25 17:31:06 +08:00
sx d90987d56e 2025.03.24 工作代码提交 2025-03-25 08:47:12 +08:00
sx fb6497f198 2025.03.22 ~ 2025.03.23 工作代码提交 2025-03-24 08:48:41 +08:00
sx c5707aab24 2025.03.21 工作代码提交 2025-03-22 08:52:53 +08:00
sx 2c31837f88 2025.03.20 工作代码提交 2025-03-21 08:33:35 +08:00
sx 95cc9a50bd 2025.03.19 工作代码提交 2025-03-20 08:50:15 +08:00
sx f8b958405c 2025.03.18 工作代码提交 2025-03-18 19:59:19 +08:00
sx ac93c4706f 合并代码 2025-03-18 11:11:12 +08:00
84 changed files with 4824 additions and 2431 deletions

View File

@ -9,6 +9,8 @@
import api from '@/api/index.js'
// vuex
import store from '@/store/index.js'
//
import TencentCloudChat from '@tencentcloud/chat';
// #ifdef APP
//
import {
@ -40,6 +42,9 @@
// #ifdef APP
unregisterRequestPermissionTipsListener(null)
// #endif
//
removeListenerUnreadCount()
})
/**
@ -58,7 +63,6 @@
onConfirm: (e) => {
console.log(e)
},
// onComplete
onComplete: (e) => {
//
if (brand.toLowerCase() == "huawei") {
@ -103,9 +107,29 @@
util.loginTencent(userinfo)
}
})
//
addListenerUnreadCount()
}
}
//
function addListenerUnreadCount() {
let onTotalUnreadMessageCountUpdated = function(event) {
//
store.commit('setUnreadCount', event.data)
};
uni.$chat.on(TencentCloudChat.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED, onTotalUnreadMessageCountUpdated);
}
//
function removeListenerUnreadCount() {
let onTotalUnreadMessageCountUpdated = (event) => {};
//
uni.$chat.off(TencentCloudChat.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED, onTotalUnreadMessageCountUpdated);
}
//
function getConfig() {
api.getConfig().then(rs => {

View File

@ -75,8 +75,9 @@ export const durian = {
load: true,
})
},
/**
* 榴莲果配置
* 榴莲果互转配置
* @param {Object} param
*/
durianFruitConfig() {
@ -85,17 +86,31 @@ export const durian = {
method: 'GET',
})
},
/**
* 获取榴莲果兑换量比例
* 获取榴莲果兑换播量比例
* @param {Object} param
*/
getDurainViews(param) {
getShowPlayConfig(param) {
return util.request({
url: `/coreplay/durianFruitTransactionType/5`,
method: 'GET',
data: param.data,
})
},
/**
* 获取榴莲果兑换完播量比例
* @param {Object} param
*/
getFullPlayConfig(param) {
return util.request({
url: `/coreplay/durianFruitTransactionType/7`,
method: 'GET',
data: param.data,
})
},
/**
* 获取榴莲果交易列表
* @param {Object} param

View File

@ -100,7 +100,7 @@ const api = {
},
/**
* 获取未读消息数量
* 获取app版本信息
* @param {Object} param
*/
getAppVersion() {

View File

@ -213,7 +213,6 @@ const mine = {
* @param {Object} param
*/
alipayPay(param) {
console.log('alipayPay',param)
return util.request({
url: '/user/alipay/recharge',
query: param.query,
@ -248,6 +247,18 @@ const mine = {
})
},
/**
* 获取商家明细
* @param {Object} param
*/
getMerchantDetail(param) {
return util.request({
url: '/user/profitSharingRecord/merchantDetail',
query: param.query,
method: 'GET',
})
},
/**
* 获取im用户资料
* @param {Object} param

View File

@ -11,6 +11,7 @@ const shop = {
return util.request({
url: `/shopify/appDeposits/settleStatus`,
method: 'GET',
load: true,
})
},
@ -134,6 +135,18 @@ const shop = {
})
},
/**
* 发布商品分类列表
* @param {Object} param
*/
getSaveProCate(param) {
return util.request({
url: `/shopify/category/getListBySaveProduct`,
method: 'GET',
query: param.query,
})
},
/**
* 根据商品主键获取商品详情
* @param {Object} param
@ -303,6 +316,7 @@ const shop = {
return util.request({
url: `/shopify/appProductionApi/getProductionListByUserId`,
data: param.data,
query: param.query,
method: 'GET',
load: true,
})
@ -483,7 +497,7 @@ const shop = {
return util.request({
url: `/shopify/appProductionApi/getProductionList`,
method: 'GET',
query: param,
query: param.query,
})
},
@ -495,7 +509,111 @@ const shop = {
return util.request({
url: `/shopify/appOrder/getOrderList`,
method: 'GET',
query: param,
query: param.query,
})
},
/**
* 商家发货
* @param {Object} param
*/
setShopDeliver(param) {
return util.request({
url: `/shopify/orderInvoice/add`,
method: 'POST',
data: param.data,
load: true,
})
},
/**
* 商家快捷改价
* @param {Object} param
*/
setShopOrderPrice(param) {
return util.request({
url: `/shopify/appOrder/merUpdatePrice`,
method: 'PUT',
query: param.query,
load: true,
})
},
/**
* 商家拒绝售后
* @param {Object} param
*/
setShopOrderUnrefund(param) {
return util.request({
url: `/shopify/refundOrder/dealRefundOrderNo`,
method: 'POST',
data: param.data,
load: true,
})
},
/**
* 商家同意售后
* @param {Object} param
*/
setShopOrderRefund(param) {
return util.request({
url: `/shopify/refundOrder/dealRefundOrderYes`,
method: 'POST',
data: param.data,
load: true,
})
},
/**
* 退货退款买家发货
* @param {Object} param
*/
setShopOrderRefundGoods(param) {
return util.request({
url: `/shopify/refundOrder/dealRefundOrderReturnGoods`,
method: 'POST',
data: param.data,
load: true,
})
},
/**
* 商家确认收货
* @param {Object} param
*/
setShopRefundOrder(param) {
return util.request({
url: `/shopify/refundOrder`,
method: 'GET',
path: param.path,
load: true,
})
},
/**
* 查看退款详情
* @param {Object} param
*/
getRefundOrder(param) {
return util.request({
url: `/shopify/refundOrder/getInfo`,
method: 'GET',
query: param.query,
load: true,
})
},
/**
* 获取退货地址
* @param {Object} param
*/
getReturnAddress(param) {
return util.request({
url: `/shopify/appRefundOrder/getReturnAddress`,
method: 'GET',
query: param.query,
load: true,
})
},
}

View File

@ -52,6 +52,18 @@ const video = {
})
},
/**
* 不喜欢视频
* @param {Object} param
*/
disLike(param) {
return util.request({
url: `/video/videoDislike/disLike`,
data: param.data,
method: 'POST',
})
},
/**
* 观看视频记录接口
* @param {Object} param
@ -474,8 +486,9 @@ const video = {
*/
videoShare(param) {
return util.request({
url: `/home/videoShare`,
url: `/user/chat/single/sendVideo`,
query: param.query,
data: param.data,
method: 'POST',
})
},
@ -568,7 +581,7 @@ const video = {
url: `/video/statistics/getStatisticsData/unlockStatistics`,
load: true,
data: param.data,
method: 'GET',
method: 'POST',
})
},
@ -599,6 +612,48 @@ const video = {
method: 'POST',
})
},
/**
* 推流历史
* @param {Object} param
*/
getVideoPushList(param) {
return util.request({
url: `/video/videoPushRecord/listById`,
load: true,
query: param.query,
data: param.data,
method: 'GET',
})
},
/**
* 推流详情
* @param {Object} param
*/
getVideoPushDetail(param) {
return util.request({
url: `/video/statistics/getparticulars`,
load: true,
query: param.query,
data: param.data,
method: 'GET',
})
},
/**
* 获取推流的用户
* @param {Object} param
*/
getVideoPushUsers(param) {
return util.request({
url: `/video/getWatchStream`,
query: param.query,
data: param.data,
method: 'GET',
load: true,
})
},
}
export default video

View File

@ -6,7 +6,9 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
host: 'http://91f.xyz:8080',
// host: 'http://91f.xyz:8080',
host: 'https://3dea4c80.r9.cpolar.top',
// host: 'http://192.168.31.61:8080',
// #endif
// 是否vivo显示
showVivo: true,

View File

@ -128,6 +128,41 @@ const order = {
})
})
},
/**
* 获取退货地址
* @param {Object} event 事件对象
*/
getReturnAddress: (event) => {
return new Promise((resolve, reject) => {
api.shop.getReturnAddress({
query: {
orderId: event.orderId,
},
}).then(res => {
if (res.code == 200) {
resolve(res.data)
return
}
util.alert({
content: res.msg,
showCancel: false,
})
})
})
},
/*
* 查看售后详情
* @param {Object} item
*/
handleAfterSalesDetail: (event) => {
uni.navigateTo({
url: util.setUrl('/pages/shop/order/afterSales', {
orderId: event.id,
}),
})
},
}
export default order

View File

@ -1220,11 +1220,31 @@ const util = {
userSig: imSig,
}).then(rs => {
util.updateMyProfile(userinfo)
// 获取未读消息条数
util.getUnread(userinfo)
console.log('im login success', rs)
})
})
},
// 获取未读消息条数
getUnread(userinfo) {
if (userinfo.isRealName) {
// 验证sdk是否准备完毕
let isReady = uni.$chat.isReady();
if (!isReady) {
setTimeout(function() {
util.getUnread(userinfo)
}, 800);
return
}
// 未读条数
let unreadCount = uni.$chat.getTotalUnreadMessageCount();
// 设置未读消息条数
store.commit('setUnreadCount', unreadCount)
}
},
// 更新im个人资料
updateMyProfile(userinfo) {
// 验证sdk是否准备完毕
@ -1635,7 +1655,7 @@ const util = {
api.getAppVersion().then(rs => {
if (rs.code == 200) {
const result = rs.data
// console.log('getAppVersion result', result)
console.log('getAppVersion result', result)
// 同步修改云端数据
uni.$store.commit('setState', {
key: 'versionCloud',

View File

@ -112,14 +112,6 @@
url: '/pages/release/video',
})
}
// 1
// if(userinfo.value.isShop == 1) {
// result.push({
// name: '',
// img: '/static/footerMenu1.png',
// url: '/pages/release/commodity',
// })
// }
//
// result.push({
// name: '',
@ -134,13 +126,8 @@
// })
return result
})
//
const noReadNum = ref(0)
const getReadNum = () => {
getNoReadNum()
}
const noReadNum = computed(() => uni.$store.state.unreadCount)
//
onMounted(() => {
@ -152,8 +139,6 @@
uni.getSystemInfo().then(rs => {
safeHeight.value = rs.safeArea + 'px'
})
//
getNoReadNum()
//
// proxy.$refs.alert.open()
@ -189,7 +174,6 @@
else uni.navigateTo({
url: `/${item.pagePath}`,
})
getNoReadNum()
return
}
//
@ -217,29 +201,6 @@
//
proxy.$refs.alert.close()
}
//
function getNoReadNum() {
if (userinfo.value.isRealName) {
// sdk
let isReady = uni.$chat.isReady();
if (!isReady) {
setTimeout(function() {
getNoReadNum();
}, 800);
return
}
// #ifdef APP
const unreadCount = uni.$chat.getTotalUnreadMessageCount();
noReadNum.value = +unreadCount > 99 ? '99+' : unreadCount;
// #endif
}
}
defineExpose({
getReadNum
})
</script>
<template>

View File

@ -60,11 +60,9 @@
})
}
//
function handleCancel() {
//
if (versionCloud.value.isforce == 1) plus.runtime.quit()
else close()
//
function handleQuit() {
plus.runtime.quit()
}
defineExpose({
@ -97,8 +95,12 @@
<text class="tac cfff f28" @click="handleConfirm">更新</text>
</view>
<view class="btn cancel bar f1">
<text class="tac c333 f28" @click="handleCancel">取消</text>
<view class="btn cancel bar f1" v-if="versionCloud.isForce == 1">
<text class="tac c333 f28" @click="handleQuit">退出程序</text>
</view>
<view class="btn cancel bar f1" v-else>
<text class="tac c333 f28" @click="close">取消</text>
</view>
</view>
</view>

View File

@ -29,7 +29,7 @@
//
data: [],
//
pageSize: 10,
pageSize: 20,
//
pageNum: 1,
//
@ -190,6 +190,7 @@
//
defineExpose({
listProperty,
getList,
getMoreList,
refrshList,

View File

@ -1,6 +1,6 @@
<script setup>
/**
* 有效读秒唱片
* 活跃读秒唱片
*/
import {

View File

@ -182,35 +182,47 @@
break;
case 2:
console.log('公开赞')
if (props.item.likeType == 0) {
emit('like', {
likeType: 0,
index: props.index,
isLike: targetLike
util.isLogin().then(rs => {
if (props.item.likeType == 0) {
emit('like', {
likeType: 0,
index: props.index,
isLike: targetLike
})
} else {
emit('like', {
likeType: 0,
index: props.index,
isLike: 0
})
}
}).catch(() => {
uni.navigateTo({
url: '/pages/login/loginPhone'
})
} else {
emit('like', {
likeType: 0,
index: props.index,
isLike: 0
})
}
})
break;
case 3:
console.log('隐私赞')
if (props.item.likeType == 1) {
emit('like', {
likeType: 1,
index: props.index,
isLike: targetLike
util.isLogin().then(rs => {
if (props.item.likeType == 1) {
emit('like', {
likeType: 1,
index: props.index,
isLike: targetLike
})
} else {
emit('like', {
likeType: 1,
index: props.index,
isLike: 0
})
}
}).catch(() => {
uni.navigateTo({
url: '/pages/login/loginPhone'
})
} else {
emit('like', {
likeType: 1,
index: props.index,
isLike: 0
})
}
})
break;
}
}, 200)
@ -619,12 +631,15 @@
</view>
</view>
<!-- 分享 -->
<!-- 更多 -->
<view class="item" @click="handleShareFirend">
<view class="col">
<image class="wh50" src="@/static/indexShare.png" mode="aspectFit" />
<view class="wh50 fmid tac">
<uni-icons type="more-filled" color="#d8d8d8" size="64rpx" />
<!-- <image class="wh50" src="@/static/indexShare.png" mode="aspectFit" /> -->
</view>
<view class="txt mt10">
<text class="text">分享</text>
<text class="text">更多</text>
</view>
</view>
</view>

View File

@ -24,11 +24,15 @@
//
const videoItem = reactive({})
//
const userinfo = computed(() => {
let result = uni.$store.state.userinfo
return result
})
const userinfo = computed(() => uni.$store.state.userinfo)
const props = defineProps({
// 0 1
isMine: {
type: [String, Number],
default: 0,
},
})
onMounted(() => {
util.isLogin(() => {
//
@ -96,11 +100,17 @@
//
api.video.videoShare({
query: {
// id
toUserId: item.userID,
},
data: {
// id
videoId: videoItem.videoId,
// id
sharedUserIds: item.userID,
}
videoId: videoItem.id,
//
videoTitle: videoItem.title,
//
videoImages: videoItem.coverUrl,
},
}).then(rs => {
if (rs.code == 200) {
util.alert('分享成功')
@ -115,6 +125,29 @@
})
}
//
function handleDislike() {
api.video.disLike({
data: {
// id
videoId: videoItem.id,
//
userId: userinfo.value.id || '',
//
isDislike: 0,
}
}).then(rs => {
if (rs.code == 200) {
util.alert(rs.msg)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
defineExpose({
open,
@ -125,7 +158,7 @@
<template>
<!-- 分享给朋友 -->
<uni-popup ref="firend" type="bottom">
<view class="shareBox popBot df fdc plr20 bfff">
<view class="shareBox popBot df fdc plr20 pb20 bfff">
<view class="header rows fdr">
<view class="title mt40">
<text class="f40">分享给朋友</text>
@ -136,7 +169,7 @@
</view>
</view>
<view class="firendBox f1 df fdc mb30">
<view class="firendBox f1 df fdc">
<scroll-view scroll-y="true" class="scroll f1" :show-scrollbar="false">
<view class="list df fdr" v-if="userList[0]">
<view class="item aic" v-for="(item,index) in userList" :key="index" @click="handleShare(item)">
@ -152,6 +185,13 @@
</view>
</scroll-view>
</view>
<view class="menu df fdr mt20" v-if="userinfo.id">
<view class="item mlr30" @click="handleDislike">
<image class="icon wh100 cir" src="/static/dislike.png" mode="aspectFit" />
<text class="text mt10 tac f24">不喜欢</text>
</view>
</view>
</view>
</uni-popup>
</template>
@ -159,14 +199,12 @@
<style lang="scss" scoped>
//
.shareBox {
height: 600rpx;
//
.firendBox {
height: 100%;
.scroll {
height: 500rpx;
height: 450rpx;
//
.list {
@ -180,5 +218,15 @@
}
}
}
//
.menu {
.item {
.text {
//
}
}
}
}
</style>

View File

@ -1,6 +1,6 @@
<script setup>
/**
* 优先任务 有效读秒
* 优先任务 活跃读秒
*/
import {
ref,
@ -30,7 +30,7 @@
const option = {
//
0: config.value.TASK_READING_SECOND,
//
//
1: config.value.EFFECTIVE_SECONDS,
}
result = (Number(result) % Number(option[task.value.taskType])) / 3
@ -46,7 +46,7 @@
<template>
<view class="task pr mtb30 ptb20 plr40 f28 bFFFBF3 br20">
<view class="title c333 f36" v-if="task.taskType === 0">任务读秒</view>
<view class="title c333 f36" v-else>有效读秒</view>
<view class="title c333 f36" v-else>活跃读秒</view>
<!-- <view>{{task.viewingDuration}}</view> -->
<view class="progressBox oh bar mt60">

View File

@ -7,10 +7,11 @@
import {
ref,
reactive,
onMounted
onMounted,
defineModel,
} from 'vue'
import video from '../../api/video';
import util from '../../common/js/util';
//
import util from '@/common/js/util';
//
const props = defineProps({
@ -23,16 +24,21 @@
type: String,
default: 'list',
},
// 0
// 0 1
limit: {
type: Number,
default: 0.
default: 0,
},
// 0 1
isMine: {
type: [String, Number],
default: 0,
}
},
// 0 1
statistic: {
type: [String, Number],
default: 0,
},
})
//
const emit = defineEmits(['item'])
@ -70,6 +76,7 @@
url: util.setUrl('/pages/index/videoDetail', {
videoId: item.id,
isMine: props.isMine,
statistic: props.statistic,
})
})
// videoUrl.value = item.format_videoUrl
@ -78,15 +85,21 @@
}
//
else if (props.mode == 'menu') {
videoUrl.value = item.format_videoUrl
// videoUrl.value = item.format_videoUrl
}
//
else if (props.mode == 'checkbox') {
console.log('handleVideo', item, ids.value)
const findIndex = ids.value.findIndex(node => node == item.id)
if (findIndex >= 0) ids.value.splice(findIndex, 1)
else {
//
if (props.limit == 1) {
ids.value[0] = item.id
return
}
//
if (props.limit != 0 && props.limit <= ids.value.length) return
else if (props.limit != 0 && props.limit <= ids.value.length) return
ids.value.push(item.id)
}
}
@ -126,7 +139,7 @@
</view>
<view class="amount pa l0 r0 b0 df ptb10 plr10" v-if="item.play">
<image class="wh24" src="/static/amount.png" mode="aspectFit" />
<image class="wh24" src="/static/pause.png" mode="aspectFit" />
<view class="txt f1 ml10 cfff f20">{{item.play}}</view>
</view>
</view>

View File

@ -63,10 +63,6 @@
return config[props.unitKey] || {}
})
onMounted(() => {
console.log('onMounted', keyboard, proxy.$refs)
})
//
function open() {
//

View File

@ -0,0 +1,103 @@
<script setup>
//
//
import api from '@/api/index.js'
//
import util from '@/common/js/util.js'
import {
ref,
reactive,
onMounted,
} from 'vue'
//
import videoMenu from '@/components/index/videoMenu.vue';
//
const list = reactive({
data: [],
pageNum: 1,
pageSize: 18,
total: 0,
})
onMounted(() => {
getList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.total <= list.data.length) return
list.pageNum++
getList()
}
//
function getList() {
api.video.getVideoPushList({
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.map(node => {
return {
pushId: node.id,
...node.video,
}
}))
console.log('list', list)
//
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
//
uni.stopPullDownRefresh()
})
}
/**
* 点击了视频
* @param {Object} event
*/
function handleVideo(event) {
uni.navigateTo({
url: util.setUrl('/pages/index/dataCenter/pushDetail', {
pushId: event.pushId,
})
})
}
//
defineExpose({
getList,
getMoreList,
refreshList,
})
</script>
<template>
<view class="appbw">
<view class="listBox">
<videoMenu :list="list.data" mode="menu" @item="handleVideo" />
</view>
</view>
</template>
<style>
</style>

View File

@ -1,356 +1,221 @@
<script setup>
/**
* 通讯录
*/
import {
useStore,
} from 'vuex'
import {
ref,
computed,
reactive,
onMounted,
onUnmounted,
inject,
getCurrentInstance,
} from 'vue'
//
import util from '@/common/js/util.js'
//
import TencentCloudChat from '@tencentcloud/chat';
// api
import api from '@/api/index.js'
import pinyin from 'js-pinyin'
import {
forEach
} from 'lodash';
const {
proxy
} = getCurrentInstance();
const store = useStore()
const userinfo = computed(() => {
let result = store.state.userinfo
return result
})
const msgType = {}
//
const userList = reactive({
data: [],
pageNum: 1,
pageSize: 10,
total: 0,
})
//
let user = reactive({})
//
const listKey = ref('')
//
const letterList = [{
key: 'other',
name: '#',
},
{
key: 'a',
name: 'A',
},
{
key: 'b',
name: 'B',
},
{
key: 'c',
name: 'C',
},
{
key: 'd',
name: 'D',
},
{
key: 'e',
name: 'E',
},
{
key: 'f',
name: 'F',
},
{
key: 'g',
name: 'G',
},
{
key: 'h',
name: 'H',
},
{
key: 'i',
name: 'I',
},
{
key: 'j',
name: 'J',
},
{
key: 'k',
name: 'K',
},
{
key: 'l',
name: 'L',
},
{
key: 'm',
name: 'M',
},
{
key: 'n',
name: 'N',
},
{
key: 'o',
name: 'O',
},
{
key: 'p',
name: 'P',
},
{
key: 'q',
name: 'Q',
},
{
key: 'r',
name: 'R',
},
{
key: 's',
name: 'S',
},
{
key: 't',
name: 'T',
},
{
key: 'u',
name: 'U',
},
{
key: 'v',
name: 'V',
},
{
key: 'w',
name: 'W',
},
{
key: 'x',
name: 'X',
},
{
key: 'y',
name: 'Y',
},
{
key: 'z',
name: 'Z',
},
]
//
const touchmove = ref(false)
// dom
const letterDom = reactive({
itemHeight: 0,
minHeight: 0,
maxHeight: 0,
height: 0,
})
//
const rightOption = [{
text: '删除',
style: {
backgroundColor: '#F85050'
},
fn: (user) => delFriend(user),
},
// {
// text: '',
// style: {
// backgroundColor: '#10C100'
// },
// fn: (user) => setFriendNote(user),
// },
]
onMounted(() => {
//
getFriendList()
//
getLetterProperty()
//
addlistener()
// proxy.$refs.note.open()
})
onUnmounted(() => {
removelistener()
})
const viewData = ref([])
//
function addlistener() {
let onFriendListUpdated = (event) => {
console.log('onFriendListUpdated', event.data);
getFriendList()
}
// #ifdef APP
uni.$chat.on(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, onFriendListUpdated);
// #endif
}
//
function removelistener() {
// #ifdef APP
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, () => { });
// #endif
}
//
function getFriendList() {
//
api.news.getFriendList().then(rs => {
if (rs.code == 200) {
const result = rs.data
userList.data.length = 0
userList.data = handleUserList(result)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
/**
* 通讯录
*/
import {
useStore,
} from 'vuex'
import {
ref,
computed,
reactive,
onMounted,
onUnmounted,
inject,
getCurrentInstance,
} from 'vue'
//
import util from '@/common/js/util.js'
//
import TencentCloudChat from '@tencentcloud/chat';
// api
import api from '@/api/index.js'
import pinyin from 'js-pinyin'
import {
forEach
} from 'lodash';
const {
proxy
} = getCurrentInstance();
const store = useStore()
const userinfo = computed(() => {
let result = store.state.userinfo
return result
})
}
const msgType = {}
//
const userList = reactive({
data: [],
pageNum: 1,
pageSize: 10,
total: 0,
})
//
let user = reactive({})
//
const listKey = ref('')
//
const letterList = [{
key: 'other',
name: '#',
},
{
key: 'a',
name: 'A',
},
{
key: 'b',
name: 'B',
},
{
key: 'c',
name: 'C',
},
{
key: 'd',
name: 'D',
},
{
key: 'e',
name: 'E',
},
{
key: 'f',
name: 'F',
},
{
key: 'g',
name: 'G',
},
{
key: 'h',
name: 'H',
},
{
key: 'i',
name: 'I',
},
{
key: 'j',
name: 'J',
},
{
key: 'k',
name: 'K',
},
{
key: 'l',
name: 'L',
},
{
key: 'm',
name: 'M',
},
{
key: 'n',
name: 'N',
},
{
key: 'o',
name: 'O',
},
{
key: 'p',
name: 'P',
},
{
key: 'q',
name: 'Q',
},
{
key: 'r',
name: 'R',
},
{
key: 's',
name: 'S',
},
{
key: 't',
name: 'T',
},
{
key: 'u',
name: 'U',
},
{
key: 'v',
name: 'V',
},
{
key: 'w',
name: 'W',
},
{
key: 'x',
name: 'X',
},
{
key: 'y',
name: 'Y',
},
{
key: 'z',
name: 'Z',
},
]
//
const touchmove = ref(false)
// dom
const letterDom = reactive({
itemHeight: 0,
minHeight: 0,
maxHeight: 0,
height: 0,
})
//
const rightOption = [{
text: '删除',
style: {
backgroundColor: '#F85050'
},
fn: (user) => delFriend(user),
},
// {
// text: '',
// style: {
// backgroundColor: '#10C100'
// },
// fn: (user) => setFriendNote(user),
// },
]
/**
* 用户列表排序
* @param {Object} userList
*/
function handleUserList(userList) {
//
const userArr = []
//
for (let i = 0; i < userList.length; i++) {
const user = userList[i]
//
let char = pinyin.getCamelChars(user.remark || user.userNickname);
//
const letter = char.charAt(0)
//
let find_index = userArr.findIndex(item => {
return item.key === letter
})
onMounted(() => {
//
getFriendList()
//
getLetterProperty()
//
addlistener()
})
//
if (find_index == -1) {
userArr.push({
letter: letter,
key: letter,
child: [user]
})
} else {
userArr[find_index].child.push(user)
onUnmounted(() => {
removelistener()
})
//
function addlistener() {
let onFriendListUpdated = (event) => {
console.log('onFriendListUpdated', event.data);
getFriendList()
}
uni.$chat.on(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, onFriendListUpdated);
}
//
// userArr.sort((a, b) => {
// const surnameA = a.key;
// const surnameB = b.key;
// return surnameA.localeCompare(surnameB);
// });
return userArr;
}
//
function removelistener() {
uni.$chat.off(TencentCloudChat.EVENT.FRIEND_LIST_UPDATED, () => {});
}
//
function getLetterProperty() {
const query = uni.createSelectorQuery().in(proxy);
query.select(".letterBox").boundingClientRect((data) => {
letterDom.minHeight = data.top
letterDom.height = data.height
letterDom.maxHeight = data.bottom
letterDom.itemHeight = data.height / letterList.length
}).exec();
}
//
function handleTouchStart(ev) {
touchmove.value = true
}
//
function handleTouchMove(ev) {
if (!touchmove.value) return
//
let result = ev.touches[0].pageY
result = Math.max(result, letterDom.minHeight)
result = Math.min(result, letterDom.maxHeight)
//
let index = Math.floor(result - letterDom.minHeight) / letterDom.itemHeight
index = parseInt(index)
//
listKey.value = letterList[index].key
}
//
function handleTouchEnd(ev) {
touchmove.value = false
}
/**
* 点击字母
* @param {Object} item 点击的当前项
*/
function handleLetter(item) {
listKey.value = item.key
}
/**
* 右滑菜单
* @param {Object} ev 默认事件
* @param {Object} user 用户信息
*/
function handleSwipeAction(ev, user) {
ev.content.fn(user)
proxy.$refs.swipeAction.closeAll()
}
/**
* 删除好友
* @param {Object} user 需要删除的好友信息
*/
function delFriend(user) {
new Promise((resolve, reject) => {
util.alert({
content: `确认删除好友${user.remark || user.userNickname}`
}).then(res => {
if (!res.confirm) return
return resolve()
})
}).then(rs => {
api.news.deleteFriend({
query: {
toUserIds: user.userId,
},
}).then(rs => {
if (rs.code === 200) {
//
getFriendList()
//
function getFriendList() {
//
api.news.getFriendList().then(rs => {
if (rs.code == 200) {
const result = rs.data
userList.data.length = 0
userList.data = handleUserList(result)
return
}
util.alert({
@ -358,65 +223,192 @@ function delFriend(user) {
showCancel: false,
})
})
})
}
}
/**
* 设置好友备注
* @param {Object} ev 需要操作的好友信息
*/
function setFriendNote(ev) {
//
Object.assign(user, ev)
//
setTimeout(() => {
proxy.$refs.note.open()
}, 50)
}
/**
* 用户列表排序
* @param {Object} userList
*/
function handleUserList(userList) {
//
const userArr = []
//
for (let i = 0; i < userList.length; i++) {
const user = userList[i]
//
let char = pinyin.getCamelChars(user.remark || user.userNickname);
//
const letter = char.charAt(0)
//
let find_index = userArr.findIndex(item => {
return item.key === letter
})
//
function handleSaveNote() {
api.news.setNotes({
query: {
name: user.note || '',
friendId: user.userId,
}
}).then(rs => {
if (rs.code === 200) {
proxy.$refs.note.close()
//
refreshFriendList()
return
//
if (find_index == -1) {
userArr.push({
letter: letter,
key: letter,
child: [user]
})
} else {
userArr[find_index].child.push(user)
}
}
util.alert({
content: rs.msg,
showCancel: false,
//
// userArr.sort((a, b) => {
// const surnameA = a.key;
// const surnameB = b.key;
// return surnameA.localeCompare(surnameB);
// });
return userArr;
}
//
function getLetterProperty() {
const query = uni.createSelectorQuery().in(proxy);
query.select(".letterBox").boundingClientRect((data) => {
letterDom.minHeight = data.top
letterDom.height = data.height
letterDom.maxHeight = data.bottom
letterDom.itemHeight = data.height / letterList.length
}).exec();
}
//
function handleTouchStart(ev) {
touchmove.value = true
}
//
function handleTouchMove(ev) {
if (!touchmove.value) return
//
let result = ev.touches[0].pageY
result = Math.max(result, letterDom.minHeight)
result = Math.min(result, letterDom.maxHeight)
//
let index = Math.floor(result - letterDom.minHeight) / letterDom.itemHeight
index = parseInt(index)
//
listKey.value = letterList[index].key
}
//
function handleTouchEnd(ev) {
touchmove.value = false
}
/**
* 点击字母
* @param {Object} item 点击的当前项
*/
function handleLetter(item) {
listKey.value = item.key
}
/**
* 右滑菜单
* @param {Object} ev 默认事件
* @param {Object} user 用户信息
*/
function handleSwipeAction(ev, user) {
ev.content.fn(user)
proxy.$refs.swipeAction.closeAll()
}
/**
* 删除好友
* @param {Object} user 需要删除的好友信息
*/
function delFriend(user) {
new Promise((resolve, reject) => {
util.alert({
content: `确认删除好友${user.remark || user.userNickname}`
}).then(res => {
if (!res.confirm) return
return resolve()
})
}).then(rs => {
api.news.deleteFriend({
query: {
toUserIds: user.userId,
},
}).then(rs => {
if (rs.code === 200) {
//
getFriendList()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
})
})
}
}
/**
* 点击用户
* @param {Object} user 当前用户信息
*/
function handleUser(user) {
util.toChat({
name: user.remark || user.userNickname,
msgId: user.userId,
type: 'C2C',
})
}
/**
* 设置好友备注
* @param {Object} ev 需要操作的好友信息
*/
function setFriendNote(ev) {
//
Object.assign(user, ev)
//
setTimeout(() => {
proxy.$refs.note.open()
}, 50)
}
/**
* 跳转
* @param {Object} url
*/
function link(url) {
uni.navigateTo({
url,
})
}
//
function handleSaveNote() {
api.news.setNotes({
query: {
name: user.note || '',
friendId: user.userId,
}
}).then(rs => {
if (rs.code === 200) {
proxy.$refs.note.close()
//
refreshFriendList()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
/**
* 点击用户
* @param {Object} user 当前用户信息
*/
function handleUser(user) {
util.toChat({
name: user.remark || user.userNickname,
msgId: user.userId,
type: 'C2C',
})
}
/**
* 跳转
* @param {Object} url
*/
function link(url) {
uni.navigateTo({
url,
})
}
</script>
<template>
@ -444,7 +436,8 @@ function link(url) {
:key="secIndex" @click="handleSwipeAction($event, user)">
<view class="item rows ptb20" @click="handleUser(user)">
<image class="wh80 avatar cir" :src="user.avatar" mode="aspectFill" />
<view class="name thd f1 ml20 c333 f32">{{ user.remark || user.userNickname }}</view>
<view class="name thd f1 ml20 c333 f32">{{ user.remark || user.userNickname }}
</view>
</view>
</uni-swipe-action-item>
</view>
@ -481,47 +474,47 @@ function link(url) {
</template>
<style lang="scss" scoped>
//
.firendBox {
height: 100%;
.scroll {
//
.firendBox {
height: 100%;
}
//
.li {
.letter {
background-color: #eee;
.scroll {
height: 100%;
}
//
.li {
.letter {
background-color: #eee;
}
}
//
.child {
.item+.item {
border-top: 2rpx solid #eee;
}
}
}
//
.child {
.item+.item {
border-top: 2rpx solid #eee;
//
.letterBox {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
}
//
.noteAlt {
box-shadow: 0 0 20rpx #0003;
.content {
.input {
padding: 20rpx 20rpx;
background-color: #eaeaea;
border-radius: 20rpx;
}
}
}
}
//
.letterBox {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
}
//
.noteAlt {
box-shadow: 0 0 20rpx #0003;
.content {
.input {
padding: 20rpx 20rpx;
background-color: #eaeaea;
border-radius: 20rpx;
}
}
}
</style>

View File

@ -23,6 +23,9 @@
//
import parseRichText from '@/components/public/parse/parse.vue'
const {
proxy
} = getCurrentInstance()
//
const props = defineProps({
id: {
@ -34,10 +37,8 @@
default: {}
},
})
const {
proxy
} = getCurrentInstance()
//
const giftPack = computed(() => props.detail.categoryCode?.startsWith('GIFT_PACK'))
// swiper
const bannerHeight = ref('800rpx')
//
@ -218,7 +219,7 @@
</view>
<!-- 已售 -->
<view class="sold">
<view class="sold" v-if="!giftPack">
<text class="c999 f26">已售 {{detail.sales}}</text>
</view>
</view>
@ -241,13 +242,13 @@
<text class="c333 f34">{{detail.name}}</text>
</view>
<view class="history mtb20 df fdr jcsb aic">
<view class="history mtb20 df fdr jcsb aic" v-if="!giftPack">
<text class="c666 f28">商品修改历史</text>
<uni-icons type="right" color="#999" size="30rpx" />
</view>
<!-- 福利政策 -->
<view class="gift df fdr fww mtb20">
<view class="gift df fdr fww mtb20" v-if="!giftPack">
<view class="item">
<text class="text">假一赔十</text>
</view>
@ -264,10 +265,14 @@
<text class="text">支持先用后付</text>
</view>
</view>
<view class="gift mtb20" v-else>
<text class="text">{{detail.intro}}</text>
</view>
</view>
<!-- 最近购买 -->
<view class="recently mtb20" v-if="recentOrderList[0]">
<view class="recently mtb20" v-if="recentOrderList[0] && !giftPack">
<swiper class="swiper" style="height: 220rpx;" :autoplay="true" vertical="true">
<swiper-item v-for="(item, index) in recentOrderList" :key="index">
<view class="list plr10 bfff">
@ -319,7 +324,7 @@
</view>
<!-- 店铺 -->
<view class="store df fdr aic jcsb mtb20 ptb20 plr25 bfff">
<view class="store df fdr aic jcsb mtb20 ptb20 plr25 bfff" v-if="!giftPack">
<view class="header df fdr jcsb aic">
<!-- 店铺头像 -->
<image class="wh140 br20" :src="detail.merAvatar" mode="aspectFill" />
@ -361,6 +366,10 @@
<view class="content mt30">
<!-- <rich-text :nodes="infoRichText" v-if="infoRichText" /> -->
<parseRichText :imageProp="{'mode': 'widthFix',}" :content="infoRichText" v-if="infoRichText" />
<template v-if="giftPack">
<text class="f28 mt10 cFF4242">礼包商品不支持售后</text>
</template>
</view>
</view>
</template>

View File

@ -30,6 +30,8 @@
default: () => ({})
},
})
//
const giftPack = computed(() => props.detail.categoryCode?.startsWith('GIFT_PACK'))
//
const emit = defineEmits(['update', 'buy'])
//
@ -114,7 +116,7 @@
<!-- 底部 -->
<view class="footerMneu df fdr jcsb aic">
<view class="menu df fdr jcsb aic">
<view class="option df fdc aic">
<view class="option df fdc aic" v-if="!giftPack">
<image class="wh30" src="/static/store.png" mode="aspectFit" />
<text class="text mt10" @click="link(`/pages/shop/store/index?storeId=${detail.merId}`)">店铺</text>
</view>

View File

@ -38,10 +38,8 @@
</view>
<!-- 购买用户 -->
<view class="store df aic thd f1" v-else-if="mode == 'shop'">
<image class="wh50 cir"
src="https://img13.360buyimg.com/n1/jfs/t1/117234/35/34799/82687/6449f2b4Fd6e2eef9/a754c5e178c9e9be.jpg.avif"
mode="aspectFill" />
<view class="name ml10 c333">用户小A</view>
<image class="wh50 cir" :src="item.cusImg" mode="aspectFill" />
<view class="name ml10 c333">{{item.cusName}}</view>
</view>
<!-- 订单状态 -->

View File

@ -117,7 +117,7 @@
<text class="txt f36">{{item.price}}</text>
</view>
<!-- 销量 -->
<view class="sales fs0 thd wsn ml10 c999 f26">销量{{item.sales}}</view>
<view class="sales fs0 thd wsn ml10 c999 f26" v-if="item.categoryCode !== 'GIFT_PACK'">销量{{item.sales}}</view>
<view class="f1"></view>
</view>
</view>

View File

@ -2,8 +2,8 @@
"name" : "九亿",
"appid" : "__UNI__08B31BC",
"description" : "",
"versionName" : "1.0.16",
"versionCode" : 1016,
"versionName" : "1.0.23",
"versionCode" : 1023,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -172,7 +172,12 @@
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "为了使用服务,需要获取您当前的位置"
}
}
},
"mp-alipay" : {
"usingComponents" : true

View File

@ -1,6 +1,5 @@
{
"pages": [
{
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "视频",
@ -31,10 +30,10 @@
"path": "pages/shop/shop",
"style": {
"navigationBarTitleText": "商城",
// "leftWindow": true,
"onReachBottomDistance": 100,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#fff"
"navigationBarBackgroundColor": "#fff",
"navigationStyle": "custom"
}
},
{
@ -59,7 +58,8 @@
"navigationBarTitleText": "订单",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff",
"onReachBottomDistance": 100
"onReachBottomDistance": 100,
"enablePullDownRefresh": true
}
},
{
@ -297,7 +297,7 @@
{
"path": "pages/shop/settle",
"style": {
"navigationBarTitleText": "商家入驻",
"navigationBarTitleText": "平台入驻",
"navigationBarBackgroundColor": "#fff"
}
},
@ -472,14 +472,16 @@
"path": "pages/index/dataCenter/pushHistory",
"style": {
"navigationBarTitleText": "历史推流",
"navigationBarBackgroundColor": "#fff"
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/dataCenter/pushDetailUser",
"style": {
"navigationBarTitleText": "推流的用户",
"navigationBarBackgroundColor": "#fff"
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
}
},
{
@ -680,7 +682,8 @@
"path": "pages/shop/store/order",
"style": {
"navigationBarTitleText": "商家订单",
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
},
{
@ -705,31 +708,27 @@
}
},
{
"path" : "pages/login/lostAccount",
"style" :
{
"navigationBarTitleText" : "账号挂失"
"path": "pages/login/lostAccount",
"style": {
"navigationBarTitleText": "账号挂失"
}
},
{
"path" : "pages/login/freezeAccount",
"style" :
{
"navigationBarTitleText" : "账号冻结"
"path": "pages/login/freezeAccount",
"style": {
"navigationBarTitleText": "账号冻结"
}
},
{
"path" : "pages/login/unfreezeAccount",
"style" :
{
"navigationBarTitleText" : "账号解冻"
"path": "pages/login/unfreezeAccount",
"style": {
"navigationBarTitleText": "账号解冻"
}
},
{
"path" : "pages/mine/setting/privacySetting",
"style" :
{
"navigationBarTitleText" : "隐私设置"
"path": "pages/mine/setting/privacySetting",
"style": {
"navigationBarTitleText": "隐私设置"
}
},
{
@ -751,102 +750,118 @@
}
},
{
"path" : "pages/index/seedLog",
"style" :
{
"navigationBarTitleText" : "流量点明细"
"path": "pages/index/seedLog",
"style": {
"navigationBarTitleText": "流量点明细"
}
},
{
"path" : "pages/mine/setting/about",
"style" :
{
"navigationBarTitleText" : "关于九亿"
"path": "pages/mine/setting/about",
"style": {
"navigationBarTitleText": "关于九亿"
}
},
{
"path" : "pages/news/detail/group",
"style" :
{
"navigationBarTitleText" : "群聊详情"
"path": "pages/news/detail/group",
"style": {
"navigationBarTitleText": "群聊详情"
}
},
{
"path" : "pages/news/group/invite",
"style" :
{
"navigationBarTitleText" : "邀请加群"
"path": "pages/news/group/invite",
"style": {
"navigationBarTitleText": "邀请加群"
}
},
{
"path" : "pages/news/group/remove",
"style" :
{
"navigationBarTitleText" : "移除群成员"
"path": "pages/news/group/remove",
"style": {
"navigationBarTitleText": "移除群成员"
}
},
{
"path" : "pages/news/detail/user",
"path": "pages/news/detail/user",
"style": {
"navigationBarTitleText": "聊天信息"
}
},
{
"path": "pages/shop/gift",
"style": {
"navigationBarTitleText": "礼包专区",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/shop/store/settled",
"style": {
"navigationBarTitleText": "商家入驻"
}
},
{
"path": "pages/shop/offline/settled",
"style": {
"navigationBarTitleText": "店家入驻"
}
},
{
"path" : "pages/shop/offline/hotel",
"style" :
{
"navigationBarTitleText" : "聊天信息"
"navigationBarTitleText" : "酒店民宿"
}
}
],
"subPackages": [
{
"root": "TUIKit",
"pages": [
{
"path": "components/TUIConversation/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIChat/index",
"style": {
"navigationBarTitleText": "消息"
}
},
// chat :
{
"path": "components/TUIChat/video-play",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIChat/web-view",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIContact/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIGroup/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUISearch/index",
"style": {
"navigationBarTitleText": "聊天记录"
}
"subPackages": [{
"root": "TUIKit",
"pages": [{
"path": "components/TUIConversation/index",
"style": {
"navigationBarTitleText": "消息"
}
]
}
],
"tabBar": {
"list": [
},
{
"path": "components/TUIChat/index",
"style": {
"navigationBarTitleText": "消息"
}
},
// chat :
{
"path": "components/TUIChat/video-play",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIChat/web-view",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIContact/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUIGroup/index",
"style": {
"navigationBarTitleText": "消息"
}
},
{
"path": "components/TUISearch/index",
"style": {
"navigationBarTitleText": "聊天记录"
}
}
]
}],
"tabBar": {
"list": [{
"text": "视频",
"pagePath": "pages/index/index"
},
@ -879,14 +894,13 @@
},
"condition": {
"current": 0,
"list": [
{
"list": [{
"name": "test",
"path": "pages/mine/mine"
"path": "pages/index/wallet/wallet"
},
{
"name": "test",
"path": "pages/mine/setting/about"
"path": "pages/shop/shop"
}
]
},

View File

@ -126,7 +126,11 @@
//
function handleUnlock() {
api.video.unlockStatistics({}).then(res => {
api.video.unlockStatistics({
data: {
videoId: videoId.value,
}
}).then(res => {
if (res.code === 200) {
//
getFlow()
@ -154,7 +158,8 @@
<view class="app">
<apex title="数据中心">
<template #right>
<view class="rows c999 f24" @click="link(util.setUrl('/pages/index/dataCenter/like',{videoId: videoId}))">
<view class="rows c999 f24"
@click="link(util.setUrl('/pages/index/dataCenter/like',{videoId: videoId}))">
<view class="ver mr10">
<image class="wh26" src="/static/indexLike1.png" mode="aspectFit" />
<view>公开赞</view>
@ -193,7 +198,7 @@
<view class="lock rows ptb5 plr20 bar cfff f28" :class="{'active': !isLock}">
<image class="lockImg wh30" src="/static/dataLock.png" mode="aspectFit" />
<image class="unlockImg wh30" src="/static/dataUnlock.png" mode="aspectFit" />
<view class="ml5" v-if="!isLock" @click="$refs.payPwdRef.open()">去解锁</view>
<view class="ml5" v-else>已解锁</view>
</view>

View File

@ -166,7 +166,7 @@
</view>
<view class="info f1 ml20">
<view class="nickname thd f30 c111">{{item.formatName}} {{typeCurrent.name}}了你</view>
<view class="time mt10 c999 f28">2024.12.08 20:00</view>
<view class="time mt10 c999 f28">{{item.likeTime}}</view>
</view>
</view>
</view>

View File

@ -5,10 +5,21 @@
ref,
computed,
} from 'vue';
import {
onLoad,
onReady,
onHide,
onUnload,
onPullDownRefresh,
onReachBottom,
} from '@dcloudio/uni-app'
//
import apex from '@/components/header/apex.vue'
//
import util from '@/common/js/util';
// id
const videoId = ref('')
//
const typeList = reactive([{
img: '/static/indexLike1.png',
@ -29,6 +40,18 @@
return result
})
onLoad((option) => {
if (option.videoId) videoId.value = option.videoId
})
onPullDownRefresh(() => {
//
})
onReachBottom(() => {
//
})
/**
* 点击下标
* @param {Object} index

View File

@ -37,67 +37,54 @@
} = getCurrentInstance()
const store = useStore()
//
const durainView = ref(0)
//
const durainChangeShowPlay = ref(0)
//
const durainChangeFullPlay = ref(0)
//
const durainChangeFullPlayLimit = ref(0)
//
const userinfo = computed(() => store.state.userinfo)
//
//
const list = reactive({
data: [],
pageSize: 10,
pageNum: 1,
total: 0,
})
//
const form = reactive({
userId: userinfo.value.userId,
videoId: [],
reason: '',
context: '',
pic: [],
})
//
const apply = reactive({
author: '',
mobile: '',
mail: '',
address: '',
})
//
const collectVideoList = reactive([])
// id
const collectVideoIds = computed(() => {
let result = collectVideoList.map(node => node.videoId)
//
const myVideo = ref({})
//
const collecVideo = ref({})
//
const playNum = ref('')
// 5 7
const transactionType = ref('')
//
const selectVideo = computed(() => myVideo.value || collecVideo.value || {})
//
const price = computed(() => {
let result = parseFloat(playNum.value)
if (transactionType.value == 5) result = result
if (transactionType.value == 7) result = result + durainChangeFullPlayLimit.value
return result
})
// id
const myVideoIds = reactive([])
//
const viewCount = ref('')
//
const viewTotal = computed(() => {
let count = Number(viewCount.value) || 0
return count * myVideoIds.length
//
const showPlayCount = computed(() => {
return (playNum.value || 0) * durainChangeShowPlay.value
})
//
const myVideos = computed(() => {
let result = myVideoIds.map(item => {
return list.data.find(node => node.id == item) || {}
})
return result
})
// id
const videoIds = computed(() => [...myVideoIds, ...collectVideoIds.value])
//
const purse = computed(() => store.state.purse)
onLoad(() => {
//
//
getList()
//
addListener()
//
getDurainViews()
//
getShowPlayConfig()
//
getFullPlayConfig()
//
util.getPurse()
})
@ -110,12 +97,8 @@
function addListener() {
//
uni.$on('selectPushCollectVideo', (item) => {
//
let findIndex = collectVideoList.findIndex(node => {
return node.videoId == item.videoId
})
if (findIndex < 0) collectVideoList.push(item)
else collectVideoList.splice(findIndex, 1)
myVideo.value = {}
collecVideo.value = item
})
}
@ -124,12 +107,29 @@
uni.$off('selectPushCollectVideo')
}
//
function getDurainViews() {
api.durian.getDurainViews({}).then(rs => {
//
function getShowPlayConfig() {
api.durian.getShowPlayConfig({}).then(rs => {
if (rs.code == 200) {
//
durainView.value = rs.data.proportion
//
durainChangeShowPlay.value = rs.data.proportion
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function getFullPlayConfig() {
api.durian.getFullPlayConfig({}).then(rs => {
if (rs.code == 200) {
//
durainChangeFullPlay.value = rs.data.proportion
//
durainChangeFullPlayLimit.value = rs.data.minConsumption
return
}
util.alert({
@ -175,91 +175,80 @@
})
}
//
function handleShowView() {
if (videoIds.value.length < 1) {
util.alert({
content: "请选择投流视频",
showCancel: false,
})
/**
* 选择我的视频
* @param {Object} item 选择的视频对象
*/
function handleMyWork(item) {
myVideo.value = item
collecVideo.value = {}
proxy.$refs.select.close()
}
//
function handleShowViewRef() {
if (!selectVideo.value.id) {
util.alert("请选择需要投流的视频")
return
}
//
proxy.$refs.views.open()
proxy.$refs.viewsRef.open()
}
//
function handleShowApplyRef() {
if (!myVideo.value.id) {
util.alert("请选择自己的作品")
return
}
proxy.$refs.applyRef.open()
}
//
function pushVideo() {
if (purse.value.fruit <= videoIds.value.length * 10) {
function handlePushShow() {
if (purse.value.fruit <= playNum.value * durainChangeShowPlay.value) {
util.alert({
content: "榴莲果不足",
showCancel: false,
})
return
}
proxy.$refs.views.close()
//
transactionType.value = 5
proxy.$refs.viewsRef.close()
proxy.$refs.payPwdRef.open()
}
//
function applyVideo() {
if (videoIds.value.length < 1) {
util.alert({
content: "请选择投流视频",
showCancel: false,
})
return
}
if (userinfo.value.fruit <= videoIds.value.length * 10) {
function handlePushFull() {
if (purse.value.fruit <= playNum.value * durainChangeFullPlay.value + durainChangeFullPlayLimit.value) {
util.alert({
content: "榴莲果不足",
showCancel: false,
})
return
}
api.video.applyVideo({
data: {
videoIds: videoIds.value.join(","),
author: apply.author,
mobile: apply.mobile,
address: apply.address,
mail: apply.mail
}
}).then(rs => {
if (rs.code === 200) {
proxy.$refs.applyRef.close()
util.alert('申请成功,请等待后台审核')
util.getUserinfo()
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
//
transactionType.value = 7
proxy.$refs.applyRef.close()
proxy.$refs.payPwdRef.open()
}
/**
* 确认取消投流
* @param {Object} item
* @param {Object} index
* 取消选择的收藏的别人的视频
*/
function handleCancel(item, index) {
function handleCancel() {
util.alert({
content: `确认取消投流${item.title}`,
content: `确认取消投流${selectVideo.title}`,
}).then(rs => {
if (!rs.confirm) return
collectVideoList.splice(index, 1)
selectVideo.value = {}
})
}
//
function pushCollect() {
link(util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
ids: collectVideoIds.value.join(','),
ids: selectVideo.value.id,
}))
}
@ -270,28 +259,31 @@
})
}
//
function handlePwdConfirm(ev) {
/**
* 二级密码确认
* @param {Object} event 二级密码
*/
function handlePwdConfirm(event) {
//
api.durian.consume({
data: {
//
userId: userinfo.value.id,
//
transactionType: 5,
transactionType: transactionType.value,
//
fruitAmount: viewTotal.value,
fruitAmount: price.value,
//
totalAmount: viewTotal.value,
totalAmount: price.value,
//
secondPassword: ev,
secondPassword: event,
// id
videoIds: videoIds.value.join(','),
videoIds: [selectVideo.value.id],
}
}).then(rs => {
if (rs.code === 200) {
util.alert('申请成功,请等待后台审核')
util.getPurse()
uni.navigateBack()
return
}
@ -311,27 +303,25 @@
</template>
</apex>
<!-- -->
<view class="first oh mtb40 mlr20 plr20 bfff br10">
<view class="first oh mtb30 mlr20 plr20 bfff br10" @click="$refs.select.open()">
<view class="rows mtb30 c333 f36">
<view class="col">
<view class="df aic">
<view class="">我想投流的视频</view>
<uni-icons type="bottom" />
</view>
<view class="hint mt10 f28">点击选择视频已选择{{myVideos.length}}</view>
</view>
<view class="line uploadBox">
<view class="key" @click="$refs.select.open()">选择视频</view>
<view class="line uploadBox f28">
<view class="key">选择自己的作品</view>
</view>
</view>
<view class="listBox mtb30" v-if="myVideos[0]">
<view class="listBox mtb30" v-if="myVideo.id">
<scroll-view scroll-x="true" class="scroll">
<view class="list df">
<view class="item oh pr fs0 mr20 br20" v-for="(item,index) in myVideos" :key="index">
<image class="poster br20" :src="item.coverUrl" mode="aspectFill" />
<view class="item oh pr fs0 mr20 br20">
<image class="poster br20" :src="myVideo.coverUrl" mode="aspectFill" />
<!-- <view class="window pfull"></view> -->
</view>
</view>
@ -342,24 +332,7 @@
<!-- <view class="notice f28 c666">种了很多榴莲果树 大家都来买</view> -->
</view>
<!-- 我想要 -->
<view class="second oh mtb20 ml20 plr20 c333 f36 br10 bfff">
<view class="title mtb20">我想要</view>
<view class="list mtb20">
<view class="item fmid br10">
<view class="" @click="handleShowView">展示播放量</view>
</view>
<view class="item fmid fdc br10">
<view>完播播放量</view>
<view class="mtb10 c666 f20">需申请平台审核</view>
<view class="button btn black" @click="$refs.applyRef.open()">申请</view>
</view>
</view>
</view>
<view class="second oh mtb20 mlr20 ptb25 plr30 c333 f36 br10 bfff" @click="pushCollect">
<view class="second oh mtb30 mlr20 ptb25 plr30 c333 f36 br10 bfff" @click="pushCollect">
<view class="fmid">
<view>我想投流Ta的视频</view>
<uni-icons type="right" color="#666" size="28rpx" />
@ -367,45 +340,76 @@
</view>
<!-- 限制只能分享别人的视频限制一个 -->
<view class="collectList" v-if="collectVideoList[0]">
<view class="item df mtb30" v-for="(item,index) in collectVideoList" :key="item.id">
<view class="poster pr fs0 mr20 br20">
<image class="image br20" :src="item.format_imageUrl" mode="aspectFill" />
<view class="window pfull"></view>
<view class="collectList" v-if="collecVideo.id">
<view class="item df mtb30">
<view class="poster oh pr fs0 mr20 br10">
<image class="image br10" :src="collecVideo.coverUrl" mode="aspectFill" />
<!-- <view class="window pfull br10"></view> -->
</view>
<view class="f1 df jcsb fdc">
<view class="f1">
<view class="f38 b">{{item.title}}</view>
<view class="mt20 c666 f28">{{item.userName}}</view>
<view class="f38 b">{{collecVideo.title}}</view>
<view class="mtb20 c666 f28">{{collecVideo.userNickname}}</view>
<!-- 如果是商家发布的带链接的视频 增加显示 商家出让佣金 -->
<view class="cFF9B27 f24" v-if="collecVideo.productId">商家出让佣金 {{collecVideo.commission}}
</view>
</view>
<view class="">
<view class="btn bar black w200" @click="handleCancel(item,index)">取消</view>
<view class="btn bar black w200" @click.stop="handleCancel()">取消</view>
</view>
</view>
</view>
</view>
</view>
<!-- 我想要 -->
<view class="second oh mtb20 mlr20 plr20 c333 f36 br10 bfff">
<view class="title mtb20">我想要</view>
<view class="list mtb20">
<view class="item fmid fdc br10" @click="handleShowViewRef">
<view class="">展示播放量</view>
<!-- <view class="mtb10 c666 f20">无需平台审核</view> -->
<view class="button btn black mt10">投流</view>
</view>
<view class="item fmid fdc br10" @click="handleShowApplyRef">
<view>完播播放量</view>
<!-- <view class="mtb10 c666 f20">需申请平台审核</view> -->
<view class="button btn black mt10">申请</view>
</view>
</view>
<!-- 规则 -->
<view class="rule mtb20 c666 f24">
<view class="c333">投流说明</view>
<view>1. 只能选择一个视频用来投流推广</view>
<view>2. 展示播放量可以选择自己发布的视频和收藏的视频</view>
<view>3. 完播播放量只能选择自己的视频需要先向平台发起申请</view>
</view>
</view>
<view class="fill" style="height: 210rpx;"></view>
<!-- 填充 -->
<view class="footerBar footer bfff shadow">
<view class="hint ptb10 plr30 c333">消耗{{videoIds.length}}*1 榴莲果可提升 {{videoIds.length}}*{{durainView}}+ 展示量
<view class="hint ptb10 plr30 c333">
<view>消耗 1 榴莲果可提升 {{durainChangeShowPlay}}+ 展示播放量</view>
<view>消耗 1 榴莲果可提升 {{durainChangeFullPlay}}+ 完播播放量</view>
</view>
<view class="content rows pt30 plr30">
<view class="f1 c333 f48">当前拥有{{userinfo.fruit}}榴莲果</view>
<!-- <view class="btn colourful f1">一键投放</view> -->
</view>
</view>
</view>
<!-- 二级支付 -->
<payPwd ref="payPwdRef" @confirm="handlePwdConfirm" />
<payPwd ref="payPwdRef" :price="price" unitKey="durian" @confirm="handlePwdConfirm" />
<!-- 展播量 -->
<uni-popup ref="views" type="center">
<!-- 展播量申请 -->
<uni-popup ref="viewsRef" type="center">
<view class="viewAlt popMid plr30 bfff">
<view class="title mt50 mb30 tac">
<view>展示播放量</view>
@ -413,56 +417,39 @@
<view class="form f28">
<view class="row mtb20">
<view class="key">耗榴莲果投流视频/</view>
<view class="key">耗榴莲果投流视频</view>
<view class="value inputBox f1 mt10 plr20">
<input v-model="viewCount" type="number" placeholder="单个视频消耗榴莲果数量" />
<input v-model="playNum" type="number" placeholder="请输入榴莲果数量" />
</view>
</view>
</view>
<view class="c999 f26">总消耗{{viewTotal}}个榴莲果{{videoIds.length}}个视频投流</view>
<view class="notice mt30 f20">预计获得 {{showPlayCount}}+ 展示播放量</view>
<view class="btn lg black mt10 mb40" @click="pushVideo">推流</view>
<view class="btn lg black mt10 mb40" @click="handlePushShow">推流</view>
</view>
</uni-popup>
<!-- 申请表单 -->
<!-- 完播量申请 -->
<uni-popup ref="applyRef" type="center">
<view class="applyAlt popMid plr60 c333 f36 bfff">
<view class="title mt50 mb30 tac">
<view>完播播放量</view>
<view class="">消耗10颗榴莲果</view>
<view class="">消耗{{durainChangeFullPlayLimit}}榴莲果</view>
</view>
<view class="form f28">
<view class="row rows mtb20">
<view class="key">视频作者</view>
<view class="value inputBox f1 plr20">
<input v-model="apply.author" type="text" placeholder="请输入视频作者" />
</view>
</view>
<view class="row rows mtb20">
<view class="key">手机号</view>
<view class="value inputBox f1 plr20">
<input v-model="apply.mobile" type="text" placeholder="请输入手机号" />
</view>
</view>
<view class="row rows mtb20">
<view class="key">邮箱号</view>
<view class="value inputBox f1 plr20">
<input v-model="apply.mail" type="text" placeholder="请输入邮箱号" />
</view>
</view>
<view class="row rows mtb20">
<view class="key">地址</view>
<view class="value inputBox f1 plr20">
<input v-model="apply.address" type="text" placeholder="请输入地址" />
<view class="row mtb20">
<view class="key">消耗榴莲果</view>
<view class="value inputBox f1 mt20 plr20">
<input v-model="playNum" type="number" placeholder="请输入榴莲果数量" />
</view>
</view>
</view>
<view class="notice mt30 f20">不论是否申请成功榴莲果直接销毁</view>
<view class="btn lg black mt10 mb40" @click="applyVideo">提交申请</view>
<view class="notice mt30 f20">申请成功则消耗全部榴莲果申请不成功则返回申请榴莲果</view>
<view class="btn lg black mt10 mb40" @click="handlePushFull">提交申请</view>
</view>
</uni-popup>
@ -483,7 +470,7 @@
<!-- 视频菜单 -->
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreList">
<videoMenu :list="list.data" v-model:ids="myVideoIds" mode="checkbox" />
<videoMenu :list="list.data" mode="menu" @item="handleMyWork" />
</scroll-view>
</view>
</uni-popup>

View File

@ -1,22 +1,22 @@
<script setup>
//
import {
reactive
ref,
reactive,
} from 'vue';
import {
onLoad,
} from '@dcloudio/uni-app'
//
import util from '@/common/js/util';
// api
import api from '@/api/index'
//
import apex from '@/components/header/apex.vue'
//
const chartData = reactive({
categories: ["1", "2", "3", "4", "5", "6", '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17',
'18', '19', '20'
],
series: [{
name: "浏览推流",
data: [15, 14, 50, 37, 17, 38]
}, ]
})
//
const chartData = ref(null)
//
const opts = reactive({
color: ["#C2ECFF", "#FFD2D2", "#C2FFCC", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
padding: [0, 35, 0, 0],
@ -55,6 +55,37 @@
},
}
})
// id
const pushId = ref('')
//
const pushDetail = reactive({})
onLoad((option) => {
// id
if (option.pushId) pushId.value = option.pushId
//
getDetail()
})
//
function getDetail() {
api.video.getVideoPushDetail({
query: {
Id: pushId.value,
}
}).then(rs => {
if (rs.code == 200) {
Object.assign(pushDetail, rs.data)
// console.log('chartStatistics',)
chartData.value = pushDetail.chartStatistics
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
/**
* 跳转
@ -75,20 +106,20 @@
<view class="title c333 f36 b">统计中心</view>
</view>
<!-- 查看时间 -->
<view class="line mt20 c999 f26">统计时间2024.12.08 18:00</view>
<view class="line mt20 c999 f26">统计时间{{pushDetail.statisticalTime}}</view>
</view>
<!-- 视频详情 -->
<view class="video df mtb20 ptb20 plr30 bfff">
<image class="poster br10" src="/static/openPage.png" mode=""></image>
<image class="poster br10" :src="pushDetail.coverUrl" mode="aspectFill"></image>
<view class="info df fdc jcsb f1 ml30">
<view class="title t2hd f34 c111">我上传了一个视频这里是视频标题</view>
<view class="desc t2hd f28 c666">视频简介</view>
<view class="time f26 c999">2024年11月20日</view>
<view class="title t2hd f34 c111">{{pushDetail.title}}</view>
<view class="desc t2hd f28 c666">{{pushDetail.description}}</view>
<view class="time f26 c999">{{pushDetail.createTime}}</view>
</view>
</view>
<view class="container">
<view class="container" v-if="chartData">
<view class="rows">
<view class="title">流量统计</view>
</view>
@ -105,24 +136,26 @@
<view class="main">
<view class="item tac">
<view class="key">推流消耗榴莲果</view>
<view class="value">10</view>
<view class="value">{{pushDetail.consumeFruit}}</view>
</view>
<!-- 点击订单 显示推广产生的订单列表 -->
<view class="item tac">
<view class="key">产生订单数量</view>
<view class="value">10</view>
<view class="value">{{pushDetail.numberOfOrders}}</view>
</view>
<!-- 增加明细列表 商品详情 订单号 显示分享收益详情 获取了多少积分/余额 -->
<view class="item tac">
<view class="key">商家推广返利</view>
<view class="value">10</view>
<view class="value">{{pushDetail.rebatePrice}}</view>
</view>
</view>
</view>
</view>
<view class="container">
<view class="main rows" @click="link('/pages/index/dataCenter/pushDetailUser')">
<view class="main rows" @click="link(util.setUrl('/pages/index/dataCenter/pushDetailUser',{
pushId: pushId,
}))">
<view class="key">推流的用户</view>
<uni-icons type="right" />
</view>

View File

@ -1,17 +1,112 @@
<script setup>
//
import {
ref,
reactive,
} from 'vue';
import {
onLoad,
onReachBottom,
onPullDownRefresh,
} from '@dcloudio/uni-app'
//
import util from '@/common/js/util';
// api
import api from '@/api/index'
//
const list = reactive({
pageSize: 20,
pageNum: 1,
data: [],
total: 0,
})
// id
const pushId = ref('')
onLoad((option) => {
// id
if (option.pushId) pushId.value = option.pushId
//
getList()
})
onReachBottom(() => {
//
getMoreList()
})
onPullDownRefresh(() => {
//
refreshList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.data.length >= list.total) return
list.pageNum++
getList()
}
//
function getList() {
api.video.getVideoPushUsers({
query: {
pageSize: list.pageSize,
pageNum: list.pageNum,
videoStreamId: pushId.value,
}
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = 0
list.data.push(...rs.rows.map(item => {
item.formatUserNickname = formatUsername(item.userName)
return item
}))
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
//
uni.stopPullDownRefresh()
})
}
/**
* 处理用户名
* @param {Object} username 用户名
*/
function formatUsername(username) {
if (username.length <= 1) {
return username;
}
//
const firstChar = username.charAt(0);
//
const maskedPart = '*'.repeat(username.length - 1);
return firstChar + maskedPart;
}
</script>
<template>
<view class="appbw">
<view class="listBox ptb30 plr30">
<view class="list rows ptb30 plr10" v-for="(item,index) in 10" :key="index">
<view class="list rows ptb30 plr10" v-for="(item,index) in list.data" :key="index">
<view class="avatar">
<image class="wh100" src="/static/qq.png" mode="aspectFill" />
<image class="wh100 cir" :src="item.avatatUrl" mode="aspectFill" />
</view>
<view class="f1 ml20">
<view class="name t2hd c333 f32">** 查看了你推广的内容</view>
<view class="time mt10 c999 f28">2024.12.08 18:00</view>
<view class="name t2hd c333 f32">{{item.formatUserNickname}} 查看了你推广的内容</view>
<view class="time mt10 c999 f28">{{item.createTime}}</view>
</view>
</view>
</view>

View File

@ -1,7 +1,94 @@
<script setup>
//
//
import api from '@/api/index.js'
//
import util from '@/common/js/util.js'
import {
ref,
reactive,
} from 'vue'
import {
onLoad,
onPullDownRefresh,
onReachBottom,
} from '@dcloudio/uni-app'
//
import videoMenu from '@/components/index/videoMenu.vue';
//
const list = reactive({
data: [],
pageNum: 1,
pageSize: 18,
total: 0,
})
onLoad(() => {
//
getList()
})
onPullDownRefresh(() => {
//
refreshList()
})
onReachBottom(() => {
//
getMoreList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.total <= list.data.length) return
list.pageNum++
getList()
}
//
function getList() {
api.video.getVideoPushList({
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.map(node => {
return {
pushId: node.id,
...node.video,
}
}))
console.log('list', list)
//
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
//
uni.stopPullDownRefresh()
})
}
//
function handleVideo() {
//
}
</script>
<template>

View File

@ -66,18 +66,14 @@
//
function getList() {
//
api.video.getCollectVideoList({
api.video.getFavoriteVideo({
query: {
collectId: collects.value.id,
folderId: collects.value.id,
}
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = []
list.data.push(...rs.rows.map(item => {
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
item.format_imageUrl = util.format_url(item.imageUrl, 'img')
return item
}))
list.data.push(...rs.rows)
list.total = rs.total
proxy.$refs.select.open()
@ -90,9 +86,13 @@
})
}
//
/**
* 选择视频
* @param {Object} item 视频列表项
*/
function handleVideo(item) {
uni.$emit('selectPushCollectVideo', item)
uni.navigateBack()
}
</script>
@ -100,7 +100,7 @@
<view class="appbw">
<view>
<!-- -->
<collectList :pageSize="20" ref="collectListRef" @handleItem="handleCollects" />
<collectList ref="collectListRef" @handleItem="handleCollects" />
</view>
<!-- 选择 -->
@ -120,7 +120,7 @@
<!-- 视频菜单 -->
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreList">
<videoMenu :list="list.data" v-model:ids="selectIds" mode="checkbox" @item="handleVideo" />
<videoMenu :list="list.data" v-model:ids="selectIds" mode="menu" @item="handleVideo" :limit="1" />
</scroll-view>
</view>
</uni-popup>

View File

@ -228,7 +228,7 @@
})
}
//
//
function getConfig() {
api.durian.durianFruitConfig().then(rs => {
if (rs.code == 200) {
@ -251,7 +251,7 @@
<view class="appbw plr30" v-else>
<!-- 有效读秒 -->
<!-- 活跃读秒 -->
<view class="task mtb30">
<task />
</view>

View File

@ -39,7 +39,7 @@
import shareFirendAlt from '@/components/index/shareFirend.vue'
// 左侧菜单弹窗
import leftMenuAlt from "@/components/index/leftMenu.vue"
// 有效读秒唱片
// 活跃读秒唱片
import disc from '@/components/index/disc.vue'
// 长按更多菜单
import moreMenu from '@/components/index/moreMenu.vue'
@ -58,7 +58,7 @@
const dom = uni.requireNativePlugin('dom')
// 钟表提示弹窗
const oclockWindow = ref(false)
// 有效读秒
// 活跃读秒
const readSecond = reactive({
// 定时器
timer: null,
@ -115,7 +115,7 @@
})
// 唱片顶部位置
const discOffsetTop = ref(0)
// 有效读秒顶部位置
// 活跃读秒顶部位置
const complete2Top = ref(0)
// 结束特效配置
const completeConfig = {
@ -126,7 +126,7 @@
time: 1.5,
},
}
// 结束特效键 complete1优先任务特效 complete2有效读秒特效
// 结束特效键 complete1优先任务特效 complete2活跃读秒特效
const completeKey = ref('')
// 底部菜单高度
const footerMenuHeight = ref(0)
@ -230,13 +230,13 @@
})
onHide(() => {
// 上一个视频的id
const videoId = tabCurrent.value.listData()[current[tabIndex.value]].id
// 当前视频
const videoItem = tabCurrent.value.listData()[current[tabIndex.value]]
// 暂停视频
if (videoId) {
if (videoItem && videoItem.id) {
// 视频组件
const VideoRef = proxy.$refs[`videoRef${videoId}`][0]
const VideoRef = proxy.$refs[`videoRef${videoItem.id}`][0]
VideoRef.pause()
// videoRefList[current[tabIndex.value]].pause()
}
@ -355,12 +355,14 @@
const data = {
// 视频id
videoId: element.item.id,
// 有效读秒时间统计
// 活跃读秒时间统计
viewingDuration: Math.floor(element.item.readSecond),
// 视频秒数
videoDescription: Math.floor(element.videoTime.currentTime),
//
// 任务
task: 0,
// 推流记录id
videostreamId: element.item.videoStreamId || '',
}
console.log('browseLog data', data)
//
@ -370,22 +372,22 @@
if (rs.code == 200) {
// 计数
const result = rs.data
// 现在的有效读秒
// 现在的活跃读秒
const taskValue = task.value
console.log('browseLog result', rs, taskValue)
// 如果不是第一次统计
if (taskValue.viewingDuration != 0) {
// 如果原来任务是优先任务 当前任务是有效读秒
// 如果原来任务是优先任务 当前任务是活跃读秒
if (taskValue.taskType == 0 && result.taskType == 1) {
// 优先任务完成 播放烟花动画
console.log('优先任务完成 播放烟花动画')
handleCompleteMode('complete1')
}
// 如果原来任务任务是有效读秒 并且新返回的数据小于当前的任务进度
// 如果原来任务任务是活跃读秒 并且新返回的数据小于当前的任务进度
else if (result.taskType == 1 && (result.viewingDuration < taskValue
.viewingDuration)) {
console.log('有效读秒完成 播放任务完成动画')
console.log('活跃读秒完成 播放任务完成动画')
handleCompleteMode('complete2')
}
}
@ -417,7 +419,7 @@
}, completeConfig[mode].time * 1000)
}
// 有效读秒增加
// 活跃读秒增加
function readSecondAdd() {
clearInterval(readSecond.timer)
// 当前视频对象
@ -425,19 +427,19 @@
// 开启计时器
readSecond.timer = setInterval(() => {
// 当前视频有效读秒 小于等于 最大有效读秒限制(视频最大时长-2s,设置的有效读秒上限)
// 当前视频活跃读秒 小于等于 最大活跃读秒限制(视频最大时长-2s,设置的活跃读秒上限)
if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, config.value
.EFFECTIVE_VIDEO_TIME)) {
// 增加这条视频的有效读秒
// 增加这条视频的活跃读秒
item.readSecond++
} else {
// 暂停有效读秒的统计
// 暂停活跃读秒的统计
readSecondPause()
}
}, 1000)
}
// 暂停有效读秒的统计
// 暂停活跃读秒的统计
function readSecondPause() {
// 暂停唱片
proxy.$refs.discRef && proxy.$refs.discRef.pause()
@ -463,7 +465,7 @@
const lastVideoRef = proxy.$refs[`videoRef${videoId}`][0]
// 如果视频切换
if (current[tab_index] != currentLast[tab_index]) {
// 停止当前有效读秒统计
// 停止当前活跃读秒统计
readSecondPause()
// 浏览记录
browseLog(lastVideoRef)
@ -528,13 +530,13 @@
const lastVideoRef = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
// 暂停当前播放的视频
lastVideoRef.pause()
// 停止当前有效读秒统计
// 停止当前活跃读秒统计
readSecondPause()
// 浏览记录
browseLog(lastVideoRef)
// 清空累计继续计时
readSecond.total += readSecond.count
// 开始记录有效读秒
// 开始记录活跃读秒
readSecondAdd()
}
tabIndex.value = index
@ -557,8 +559,10 @@
*/
function handleShowCommentAlt(item) {
proxy.$refs.commentRef.open(item)
// 当前视频
const videoItem = tabCurrent.value.listData()[current[tabIndex.value]]
// 暂停当前视频
currentVideoRef.value.pause()
proxy.$refs[`videoRef${videoItem.id}`][0].pause()
}
/**
@ -588,7 +592,7 @@
// 视频播放
function handleVideoOnPlay() {
if (proxy.$refs.discRef) proxy.$refs.discRef.play()
// 开始计时有效读秒
// 开始计时活跃读秒
readSecondAdd()
}
@ -724,6 +728,8 @@
* 立即下单
*/
function handlePay(event) {
// 当前视频对象
const videoItem = tabCurrent.value.listData()[current[tabIndex.value]]
// 产生待付款订单
api.shop.addOrder({
data: [{
@ -738,7 +744,7 @@
// 0-普通订单1-视频号订单
orderType: 1,
// 分享人id
// shareId: userinfo.id,
shareId: videoItem.referrersId || '',
}],
}).then(rs => {
if (rs.code === 200) {
@ -793,12 +799,12 @@
<image class="complete1" src="/static/complete1.gif" mode="aspectFit" />
</template>
<!-- 有效读秒结算 -->
<!-- 活跃读秒结算 -->
<view class="complete2" :style="{top: complete2Top + 'px'}" v-if="completeKey == 'complete2'">
<image class="image" src="/static/complete2.gif" mode="aspectFit" />
</view>
<!-- 有效读秒唱片 -->
<!-- 活跃读秒唱片 -->
<template v-if="util.config.showVivo">
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
<disc ref="discRef" />
@ -833,7 +839,7 @@
</view>
<!-- 底部导航 -->
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
<footerMenu page="index" subject="dark" />
</view>
<!-- app版本更新弹窗 -->
@ -878,7 +884,7 @@
transform: translateY(100rpx);
}
// 有效读秒完成
// 活跃读秒完成
.complete2 {
position: fixed;
justify-content: flex-end;

View File

@ -57,7 +57,7 @@
total.value = result.total
//
dataList.value = result.dataList.map(item => {
item.formatHash = item.scrollHash.replace(/(\d{4})\d*(\d{4})/, "$1****$2")
item.formatHash = item.scrollHash.replace(/([\d|\D]{4})[\d|\D]*([\d|\D]{4})/, "$1****$2")
// item.style = {
// '1': 'scroll1',
// '2': 'scroll2',
@ -151,7 +151,7 @@
</view>
<view class="mt20 df aic f28">
<view>卷轴哈希: {{item.formatHash}}</view>
<view class="wh30 ml15" @click="handleCopy(item)">
<view class="wh30 ml15" @click.stop="handleCopy(item)">
<image src="/static/copy2.png" mode="aspectFit" class="wh24" />
</view>
</view>

View File

@ -63,7 +63,7 @@
}).then(rs => {
if (rs.code == 200) {
const result = rs.data
result.formatHash = result.scrollHash.replace(/(\d{4})\d*(\d{4})/, "$1****$2")
result.formatHash = result.scrollHash.replace(/([\d|\D]{4})[\d|\D]*([\d|\D]{4})/, "$1****$2")
detail.value = result
return
}

View File

@ -47,7 +47,7 @@
//
function refreshList() {
scrollLog.homePageSize = 1
scrollLog.s = 1
getList()
}

View File

@ -109,7 +109,7 @@
<view class="f1">
<view>账户昵称</view>
</view>
<view class="">{{team.referrerReferrerUser.userNickname}}</view>
<view class="nickname">{{team.referrerReferrerUser.userNickname}}</view>
</view>
</view>
</view>
@ -135,7 +135,7 @@
<view class="f1">
<view>账户昵称</view>
</view>
<view class="">{{team.referrerUser.userNickname}}</view>
<view class="nickname">{{team.referrerUser.userNickname}}</view>
</view>
</view>
</view>
@ -158,8 +158,12 @@
<view class="li mtb30" v-for="(item,index) in team.sonUser" :key="item.id">
<view class="menber df aic">
<view class="count mr20 plr10 cfff br10" v-if="item.isShop == 1"></view>
<view class="count mr20 plr10 cfff br10" v-if="item.activePopulation >= 10000"></view>
<view class="count mr20 plr10 cfff br10" v-else-if="item.activePopulation >= 1000"></view>
<view class="count mr20 plr10 cfff br10" v-else-if="item.activePopulation >= 100"></view>
<view class="c333 f32">
<text class="name" :class="{'auth': item.isRealName}">{{item.userNickname}}</text>
<text class="nickname"
:class="{'active': !item.isActive,'auth': !item.isRealName}">{{item.userNickname}}</text>
<text class="ml20" v-if="item.sonList.length != 0">{{item.sonList.length}}</text>
</view>
<template v-if="item.sonList[0]">
@ -183,8 +187,14 @@
<view class="line"></view>
<view class="ml10 df aic c999 f28">
<view class="count mr20 plr10 cfff br10" v-if="secItem.isShop == 1"></view>
<text class="name"
:class="{'auth': secItem.isRealName}">{{secItem.userNickname}}</text>
<view class="count mr20 plr10 cfff br10" v-if="secItem.activePopulation >= 10000">
</view>
<view class="count mr20 plr10 cfff br10"
v-else-if="secItem.activePopulation >= 1000"></view>
<view class="count mr20 plr10 cfff br10" v-else-if="secItem.activePopulation >= 100">
</view>
<text class="nickname"
:class="{'auth': !secItem.isRealName,'active': !secItem.isActive}">{{secItem.userNickname}}</text>
<view class="label ml20" v-if="secItem.count != 0">{{secItem.count}}</view>
</view>
</view>
@ -214,6 +224,19 @@
}
}
//
.nickname {
color: #333;
&.active {
color: #FF8400;
}
&.auth {
color: #FF0000;
}
}
//
.arrow {
&.active {
@ -237,15 +260,6 @@
background-image: linear-gradient(114deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
}
//
.name {
color: #FF8400;
&.auth {
color: #333;
}
}
//
.list {
padding-left: .5em;

View File

@ -42,7 +42,7 @@
//
const isMine = ref(false)
//
const statistic = ref('0')
const statistic = ref(0)
//
const userinfo = computed(() => uni.$store.state.userinfo)
@ -299,7 +299,7 @@
<!-- 评论弹窗 -->
<commentAlt ref="commentRef" />
<!-- 收藏弹窗 -->
<collectAlt ref="collectRef" />
<collectAlt ref="collectRef" :isMine="isMine" />
<!-- 分享到好友弹窗 -->
<shareFirendAlt ref="shareFirendRef" />
<!-- 产品详情弹窗 -->

View File

@ -3,7 +3,8 @@
import {
reactive,
ref
ref,
getCurrentInstance,
} from 'vue';
import {
onLoad,
@ -14,7 +15,12 @@
import util from '@/common/js/util';
//
import api from '@/api/index.js';
//
import secondPwd from '@/components/mine/payPwd.vue'
const {
proxy
} = getCurrentInstance()
//
const form = reactive({
withdrawAmount: '',
@ -123,7 +129,7 @@
}
//
function handleSubmit() {
function handleShowPwd() {
if (!form.withdrawAmount) {
util.alert('提现金额不能为空')
return
@ -132,8 +138,8 @@
util.alert(`提现金额不能小于${config.minWithdrawalAmount}`)
return
}
//
typeList[typeIndex.value].confirm()
proxy.$refs.secondPwdRef.open()
}
//
@ -147,6 +153,9 @@
if (rs.code == 200) {
//
getToWalletCallback()
//
uni.navigateBack()
return
}
util.alert({
@ -186,6 +195,12 @@
//
util.getPurse()
}
//
function handleSubmit() {
//
typeList[typeIndex.value].confirm()
}
</script>
<template>
@ -263,12 +278,16 @@
</view>
<view class="line">
<view class="btn pro black" @click="handleSubmit">提现</view>
<view class="btn pro black" @click="handleShowPwd">提现</view>
</view>
</view>
<!-- -->
<view class="fill"></view>
<!-- 二级密码 -->
<secondPwd ref="secondPwdRef" :check="true" @confirm="handleSubmit" :unitKey="'balance'"
:price="form.withdrawAmount" />
</view>
</template>

View File

@ -27,7 +27,7 @@
name: '支付宝',
provider: 'alipay',
apiRequest: (event) => {
return api.mine.alipayPay(event)
return handleAlipayPay(event)
}
},
{
@ -35,7 +35,7 @@
name: '微信支付',
provider: 'wxpay',
apiRequest: (event) => {
return api.mine.wechatPay(event)
return handleWeChat(event)
}
},
])
@ -70,51 +70,84 @@
//
function handlePayment() {
const data = {
...form
}
if (!data.totalAmount) {
if (!form.totalAmount) {
util.alert('金额不正确')
return
}
//
payment.value.apiRequest({
payment.value.apiRequest()
}
//
function handleAlipayPay() {
api.mine.alipayPay({
query: {
...data,
...form,
},
}).then(rs => {
console.log('payment rs', rs)
if (rs.code == 200) {
uni.requestPayment({
provider: payment.value.provider,
// orderInfo: rs.data,
package: `prepay_id=${rs.data.prepayId}`,
success: rs => {
console.log('requestPayment', rs)
util.getPurse()
uni.navigateBack()
},
fail: err => {
console.log('fail err', err)
}
})
return
}
util.alert({
content: rs.msg,
showCancel: false,
//
callPayment({
response: rs,
paymentParams: {
orderInfo: rs.msg,
},
})
})
}
//
function handleWeChat() {
api.mine.wechatPay({
query: {
...form,
},
}).then(rs => {
console.log('wechatPay', rs)
//
callPayment({
response: rs,
paymentParams: {
orderInfo: rs.data,
},
})
})
}
/**
* 唤起支付
* @param {Object} params
*/
function callPayment(params = {}) {
if (params.response.code == 200) {
console.log('requestPayment', {
provider: payment.value.provider,
...params.paymentParams,
})
uni.requestPayment({
provider: payment.value.provider,
...params.paymentParams,
success: rs => {
util.getPurse()
uni.navigateBack()
},
fail: err => {
console.log('fail err', err)
}
})
return
}
util.alert({
content: params.response.msg,
showCancel: false,
})
}
</script>
<template>
<view class="appbw">
<!-- -->
<view class="form mtb30 mlr30">
<view class="line ptb20">
<view class="key f36">充值金额</view>
<view class="value mt10">
@ -137,7 +170,6 @@
</picker>
</view>
</view>
</view>
<view class="footer plr30 shadow bfff">

View File

@ -59,8 +59,29 @@
}])
//
const getTypeListIndex = ref(0)
//
const releasedLst = ref([])
//
const merchantTab = reactive([{
status: 0,
name: '待结算',
}, {
status: 1,
name: '待入账',
}, {
status: 2,
name: '已入账',
}, {
status: 3,
name: '已取消',
}])
//
const merchantTabIndex = ref(0)
//
const merchantList = reactive({
data: [],
pageNum: 1,
pageSize: 30,
total: 0,
})
//
const userinfo = computed(() => store.state.userinfo || {})
//
@ -71,6 +92,8 @@
getReleased()
//
getGetList()
//
getMerchantList()
//
util.getPurse()
})
@ -116,6 +139,45 @@
})
}
//
function refreshMoreMerchantList() {
merchantList.pageNum = 1
//
getMerchantList()
}
//
function getMoreMerchantList() {
if (merchantList.total <= merchantList.data.length) return
merchantList.pageNum++
//
getMerchantList()
}
//
function getMerchantList() {
api.mine.getMerchantDetail({
query: {
pageSize: merchantList.pageSize,
pageNum: merchantList.pageNum,
status: merchantTab[merchantTabIndex.value].status,
},
}).then(rs => {
if (rs.code == 200) {
if (merchantList.pageNum === 1) merchantList.data.length = 0
//
merchantList.data.push(...rs.rows)
//
merchantList.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function getReleased() {
api.mine.releasedList({}).then(rs => {
@ -142,6 +204,18 @@
refreshMoreGetList()
}
/**
* 商家收益类型下标
* @param {Object} index
*/
function handleMerchantListIndex(index) {
if (merchantTabIndex.value === index) return
merchantTabIndex.value = index
merchantList.data.length = 0
//
refreshMoreMerchantList()
}
/**
* 跳转
* @param {Object} url 路径
@ -190,9 +264,10 @@
<uni-icons type="right" color="" />
</view>
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1"
@click="$refs.merchant.open()">
<text>商家明细</text>
<uni-icons type="right" c1olor="" />
<uni-icons type="right" color="" />
</view>
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
@ -258,6 +333,39 @@
</view>
</view>
</uni-popup>
<!-- 商家收益 -->
<uni-popup ref="merchant" type="center">
<view class="merchantAlt alertContainer oh popMid bfff br20">
<view class="header rows ptb20 plr20 c333 f34 b">
<view class="title">商家收益</view>
<uni-icons type="closeempty" @click="$refs.merchant.close()" />
</view>
<view class="tab">
<view class="item fmid fdc ptb10" :class="{'active':index === merchantTabIndex}"
v-for="(item,index) in merchantTab" :key="index" @click="handleMerchantListIndex(index)">
<view>{{item.name}}</view>
</view>
</view>
<view class="main mtb20 plr30">
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreMerchantList">
<view class="list c333 f30">
<view class="item mtb30 f32" v-for="(item,index) in merchantList.data" :key="index">
<view class="rows">
<view class="f1 f32">{{item.typeName}}</view>
<view class="f28">{{item.amount}}积分</view>
</view>
<view class="time mt10 c999 f28 ">{{item.createTime}}</view>
</view>
</view>
<view class="nomore" v-if="!merchantList.data[0]">暂无内容~</view>
<view class="nomore" v-else-if="merchantList.data.length === merchantList.total">暂无更多~</view>
</scroll-view>
</view>
</view>
</uni-popup>
</view>
</template>

View File

@ -45,6 +45,8 @@
import like from '@/components/mine/like.vue';
//
import history from '@/components/mine/history.vue';
//
import pushHistory from '@/components/mine/pushHistory.vue';
//
const headerShow = ref(false)
@ -72,6 +74,7 @@
},
{
name: '投流历史',
ref: 'pushHistoryRef',
load: false,
}
])
@ -276,7 +279,8 @@
<view class="f24">账号{{userinfo.account}}</view>
</navigator>
<view class="tac" v-if="userinfo.isShop == 1" @click="link(util.setUrl('/pages/shop/store/index',{storeId:userinfo.merId}))">
<view class="tac" v-if="userinfo.isShop == 1"
@click="link(util.setUrl('/pages/shop/store/index',{storeId:userinfo.merId}))">
<uni-icons type="shop" color="" size="60rpx" />
<view class="f24">我的产品</view>
</view>
@ -358,6 +362,10 @@
<view class="history" v-show="tabIndex === 3" v-if="tabList[3].load">
<history ref="historyRef" />
</view>
<view class="">
<pushHistory ref="pushHistoryRef" v-show="tabIndex === 4" v-if="tabList[4].load" />
</view>
</view>
</view>

View File

@ -217,10 +217,10 @@
<image src="/static/mien-dianpuguanli.png" mode="aspectFit" class="wh50" />
<text class="txt mt10 wsn">商品管理</text>
</view>
<!-- <view class="item ver" @click="link('pages/merchant/order/index')">
<view class="item ver" @click="link('/pages/shop/store/order')">
<image src="/static/mine-dingdanguanli.png" mode="aspectFit" class="wh50" />
<text class="txt mt10 wsn">订单管理</text>
</view> -->
</view>
<!-- <view class="item ver">
<image src="/static/mine-kehuxiaoxi.png" mode="aspectFit" class="wh50" />
<text class="txt mt10 wsn">客户消息</text>

View File

@ -51,15 +51,23 @@
//
function startLive() {
//
if (!form.idCard) {
util.alert('身份证号不能为空')
const data = {
...form
}
//
if (!data.name) {
util.alert('真实姓名不能为空')
return
}
if (!data.idCard) {
util.alert('用户身份证号不能为空')
return
}
api.mine.isCertification({
query: {
userIdCard: form.idCard
userIdCard: data.idCard,
}
}).then(rs => {
if (rs.code === 200) {
@ -72,6 +80,9 @@
console.log('startLive', result)
if (result.errorCode == 0) {
faceImage.value = result.liveImage
//
handleSubmit()
//
} else if (result.errorCode == 1 && result.errorMessage == '活体检测未通过') {
util.alert({
title: '系统提示',
@ -123,11 +134,7 @@
}).then(rs => {
console.log('certification', rs)
if (rs.code == 200) {
util.alert('认证成功')
util.getUserinfo()
setTimeout(() => {
uni.navigateBack()
}, 500)
return
}
util.alert({

View File

@ -120,7 +120,7 @@
addListener()
//
getHistory({
callback: scrollToBottom
callback: scrollToBottom()
})
// #ifdef APP
uni.onKeyboardHeightChange((rs) => {
@ -133,9 +133,9 @@
})
onReady(() => {
uni.createSelectorQuery().in(proxy).select('#tool').boundingClientRect((rect) => {
toolHeight.value = rect.height
}).exec();
uni.createSelectorQuery().in(proxy).select('#tool').boundingClientRect((rect) => {
toolHeight.value = rect.height
}).exec();
//
videoContext.value = uni.createVideoContext('video')
})
@ -351,10 +351,7 @@
//
list.isCompleted = result.isCompleted
//
list.messageList = result.messageList.map(item => {
console.log('msg item', item)
return item
})
list.messageList = result.messageList
nextTick(() => {
param.callback && param.callback()
@ -375,12 +372,13 @@
//
function scrollToBottom() {
uni.createSelectorQuery().in(proxy).select('#scroll-content').boundingClientRect((res) => {
top.value = res.height
top.value = res.bottom
console.log('scrollToBottom', res)
uni.pageScrollTo({
scrollTop: top.value,
duration: 0
})
// uni.pageScrollTo({
// scrollTop: top.value,
// duration: 0
// })
// console.log('top.value', top.value)
}).exec();
}
@ -468,18 +466,18 @@
</script>
<template>
<apex :title="pageTitle">
<template #right>
<view>
<uni-icons type="more-filled" size="40rpx" @click="handleMore" />
</view>
</template>
</apex>
<view class="chatPage">
<apex :title="pageTitle">
<template #right>
<view>
<uni-icons type="more-filled" size="40rpx" @click="handleMore" />
</view>
</template>
</apex>
<view class="app">
<scroll-view class="scroll-view" scroll-y :scroll-with-animation="true" :scroll-top="top"
@scroll="onContentScroll" @scrolltoupper="getMoreHistroy">
<view id="scroll-content" style="padding: 30rpx 30rpx">
<view id="scroll-content" style="padding: 30rpx">
<view v-for="(item, index) in list.messageList" :key="index">
<!-- 系统消息 -->
<template v-if="item.from == 'administrator'"></template>
@ -555,45 +553,47 @@
</view>
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }">
</view>
<view class="ghost" :style="{ height: toolHeight + 'px' }"></view>
</view>
</scroll-view>
</view>
<view class="tool bfff" id="tool">
<view class="tool-group">
<!-- 摁住说话 -->
<!-- 语音 -->
<image src="/static/news-voice.png" mode="widthFix" class="thumb" @click="handleTool('voice')"></image>
<template v-if="toolStatus == 'voice'">
<JyVoice @send="voiceSend" :msg="msg" />
</template>
<!-- 输入框 -->
<template v-if="toolStatus != 'voice'">
<uni-easyinput @focus="onFocus" type="text" v-model.trim="content" :clearable="false" class="input"
:adjust-position="false" @keyboardheightchange="keyboardheightchange" placeholder="请输入你的问题"
confirmType="发送" :focus="inputFocus" />
</template>
<view class="ghost" :style="{ height: toolHeight + 'px' }"></view>
<view class="tool bfff" id="tool">
<view class="tool-group">
<!-- 摁住说话 -->
<!-- 语音 -->
<image src="/static/news-voice.png" mode="widthFix" class="thumb" @click="handleTool('voice')"></image>
<template v-if="toolStatus == 'voice'">
<JyVoice @send="voiceSend" :msg="msg" />
</template>
<!-- 输入框 -->
<template v-if="toolStatus != 'voice'">
<uni-easyinput @focus="onFocus" type="text" v-model.trim="content" :clearable="false" class="input"
:adjust-position="false" @keyboardheightchange="keyboardheightchange" placeholder="请输入你的问题"
confirmType="发送" :focus="inputFocus" />
</template>
<!-- 表情 -->
<image src="/static/news-emoji.png" mode="widthFix" class="thumb" @click="handleTool('emoji')"></image>
<!-- 加号 -->
<template v-if="!content">
<image src="/static/news-plus.png" mode="widthFix" class="thumb" @click="handleTool('plus')" />
</template>
<!-- 文本发送按钮 -->
<template v-else>
<view class="send" @click="handleSend">发送</view>
</template>
</view>
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }">
</view>
<!-- 表情 -->
<image src="/static/news-emoji.png" mode="widthFix" class="thumb" @click="handleTool('emoji')"></image>
<!-- 加号 -->
<template v-if="!content">
<image src="/static/news-plus.png" mode="widthFix" class="thumb" @click="handleTool('plus')" />
<template v-if="toolStatus == 'emoji'">
<emoji @setEmoj="emojiTap"></emoji>
</template>
<!-- 文本发送按钮 -->
<template v-else>
<view class="send" @click="handleSend">发送</view>
<!-- 加号 -->
<template v-if="toolStatus == 'plus'">
<JyPlus @send="handlePlusSend" :msg="msg"></JyPlus>
</template>
</view>
<view v-if="showGhost" :style="{ height: `${ghostBox.height}px`, transition: `${ghostBox.duration}s` }"></view>
<!-- 表情 -->
<template v-if="toolStatus == 'emoji'">
<emoji @setEmoj="emojiTap"></emoji>
</template>
<!-- 加号 -->
<template v-if="toolStatus == 'plus'">
<JyPlus @send="handlePlusSend" :msg="msg"></JyPlus>
</template>
</view>
<!-- 视频 -->
@ -639,6 +639,15 @@
<style lang="scss" scoped>
@import './index.scss';
//
.chatPage {
display: flex;
flex-direction: column;
overflow: hidden;
height: 100vh;
background-color: #f8f8f8;
}
//
#video {
position: fixed;

View File

@ -82,13 +82,23 @@
urls,
})
}
//
function toVideoDetail() {
console.log('videoId', formatData.value)
uni.navigateTo({
url: util.setUrl('/pages/index/videoDetail', {
videoId: formatData.value.videoId,
})
})
}
</script>
<template>
<view class="content pr">
<!-- 图片 -->
<template v-if="item.type === TencentCloudChat.TYPES.MSG_IMAGE">
<image class="br10" :src="item.payload.imageInfoArray[0].imageUrl" mode="widthFix"
<image class="viewImage br10" :src="item.payload.imageInfoArray[0].imageUrl" mode="widthFix"
@click="util.view_imgs([item.payload.imageInfoArray[0].imageUrl],0)" />
</template>
<!-- 文字 -->
@ -167,6 +177,21 @@
</view>
</view>
</template>
<!-- 视频分享消息 -->
<template v-else-if="formatData.businessType == 'videoShare'">
<view class="videoShare pr" @click="toVideoDetail">
<!-- 视频封面 -->
<image class="poster" :src="formatData.videoImages" mode="aspectFill" />
<!-- 暂停的图标 -->
<image class="pause pmid" src="/static/pause.png" mode="aspectFit" />
<!-- 作者信息 -->
<view class="auth rows pa l0 r0 b0 ptb10 plr10">
<image class="avatar" :src="formatData.from_url" />
<view class="name thd f1 ml10 cfff f22">{{formatData.from_name}}</view>
</view>
</view>
</template>
</template>
</template>
@ -198,17 +223,48 @@
</template>
<style scoped lang="scss">
//
.content {
box-sizing: border-box;
min-height: 80rpx;
max-width: 60vw;
font-size: 28rpx;
image {
//
.viewImage {
width: 200rpx;
}
}
//
.videoShare {
over-flow: hidden;
//
.poster {
width: 216rpx;
height: 384rpx;
border-radius: 10rpx;
}
//
.pause {
width: 40rpx;
height: 40rpx;
}
//
.auth {
background-image: linear-gradient(to top, rgba(0, 0, 0, .2) 0, rgba(0, 0, 0, .3) 20%, rgba(0, 0, 0, .3) 60%, rgba(0, 0, 0, .00) 100%);
border-radius: 0 0 10rpx 10rpx;
.avatar {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
}
//
.redPacket {
width: 360rpx;

View File

@ -1,5 +1,6 @@
.scroll-view {
overflow: hidden;
box-sizing: border-box;
flex: 1;
height: 100%;

View File

@ -58,12 +58,13 @@
//
function getList(option) {
let param = {
pageSize: listPrototype.pageSize,
pageNum: listPrototype.pageNum,
merId: option.merId
}
api.shop.getShopProductList(param).then(rs => {
api.shop.getShopProductList({
query: {
pageSize: listPrototype.pageSize,
pageNum: listPrototype.pageNum,
merId: option.merId
},
}).then(rs => {
if (rs.code == 200) {
if (listPrototype.pageNum == 1) listPrototype.data.length = []
listPrototype.data.push(...rs.rows)

View File

@ -62,14 +62,9 @@
// im
const imLoad = ref(false)
//
const userinfo = computed(() => {
return store.state.userinfo
})
const userinfo = computed(() => store.state.userinfo)
//
const menuCurrent = computed(() => {
return menuList[menuIndex.value]
})
const footerMneuRef = ref()
const menuCurrent = computed(() => menuList[menuIndex.value])
onLoad(() => {
//
@ -77,11 +72,6 @@
//
addListener()
//
uni.$on('updateNum', (val) => {
getNoRead()
})
})
onUnload(() => {
@ -89,12 +79,6 @@
removeListener()
})
function getNoRead() {
setTimeout(() => {
footerMneuRef.value.getReadNum();
}, 200)
}
//
function addListener() {
uni.$chat.on(TencentCloudChat.EVENT.SDK_READY, imLoading);
@ -179,11 +163,17 @@
<!-- 未登录 -->
<template v-if="!userinfo.id">
<noLogin class="f1" />
<!-- 底部导航 -->
<footerMenu page="news" />
</template>
<!-- 未实名 -->
<template class="page" v-else-if="!userinfo.isRealName">
<noAuth class="f1" />
<!-- 底部导航 -->
<footerMenu page="news" />
</template>
<template class="page" v-else>
@ -244,7 +234,7 @@
</swiper>
<!-- 底部导航 -->
<footerMenu ref="footerMneuRef" page="news" />
<footerMenu page="news" />
</template>
</view>
</template>

View File

@ -4,7 +4,8 @@
ref,
reactive,
getCurrentInstance,
nextTick
nextTick,
computed,
} from 'vue'
//
import {
@ -31,6 +32,10 @@
const category = reactive([])
//
const categoryIndex = ref('')
//
const cateCurrent = computed(() => category[categoryIndex.value] || {
categoryCode: ''
})
onLoad((option) => {
if (option.id) {
@ -101,9 +106,9 @@
//
function getCategory() {
return new Promise((resolve, reject) => {
api.shop.getCategory({
api.shop.getSaveProCate({
query: {
categoryCode: '0'
// categoryCode: '0'
},
}).then(rs => {
if (rs.code === 200) {
@ -181,7 +186,9 @@
let index = ev.detail.value
if (index === categoryIndex.value) return
categoryIndex.value = index
form.categoryId = category[categoryIndex.value].id
//
const cateItem = category[categoryIndex.value]
form.categoryId = cateItem.id
}
//
@ -207,9 +214,13 @@
util.alert('商品价格不能为空')
return
}
if (!data.cost) {
util.alert('商品成本价不能为空')
return
//
if (!cateCurrent.value.categoryCode.startsWith('GIFT_PACK')) {
if (!data.cost) {
util.alert('商品成本价不能为空')
return
}
}
//
@ -233,6 +244,8 @@
data.sliderImage = data.sliderImage.join(',')
//
if (data.infoRichText) data.infoRichText = btoa(unescape(encodeURIComponent(data.infoRichText)))
//
if (cateCurrent.value.categoryCode.startsWith('GIFT_PACK')) data.categoryCode = 'GIFT_PACK'
//
api.shop.saveProduct({
@ -286,7 +299,7 @@
<view class="rows">
<view class="title w150">类目</view>
<view class="col f1">
<text v-if="category[categoryIndex]">{{category[categoryIndex].name}}</text>
<text v-if="category[categoryIndex]">{{cateCurrent.name}}</text>
<text v-else class="placeholderStyle">点击选择</text>
</view>
<uni-icons type="right" />
@ -343,6 +356,7 @@
placeholder-class="placeholderStyle" />
</view>
</view>
<view class="line rows ptb20">
<view class="title w150">商品成本价</view>
<view class="col f1">
@ -350,13 +364,16 @@
placeholder-class="placeholderStyle" />
</view>
</view>
<view class="line rows ptb20">
<view class="title w150">出让佣金</view>
<view class="col f1">
<input type="text" v-model="form.commission" placeholder="输入价格"
placeholder-class="placeholderStyle" />
<template v-if="!cateCurrent.categoryCode.startsWith('GIFT_PACK')">
<view class="line rows ptb20">
<view class="title w150">出让佣金</view>
<view class="col f1">
<input type="text" v-model="form.commission" placeholder="输入价格"
placeholder-class="placeholderStyle" />
</view>
</view>
</view>
</template>
</view>
<view class="main area" v-if="0">

View File

@ -423,7 +423,8 @@
//
function getProductList() {
api.shop.getProductionListByUserId({
data: {
query: {
code: 'GIFT_PACK',
pageNum: product.pageNum,
pageSize: product.pageSize,
}

View File

@ -2,6 +2,7 @@
import {
ref,
defineProps,
computed,
} from 'vue'
//
import statusBar from '@/components/header/statusBar'
@ -12,6 +13,8 @@
default: {}
}
})
//
const giftPack = computed(() => props.detail.categoryCode?.startsWith('GIFT_PACK'))
//
const headerActive = ref(false)
const share_more = ref(null)
@ -109,7 +112,7 @@
</view>
<view class="main f1 tac">
<text>销量: {{detail.sales}}</text>
<text v-if="!giftPack">销量: {{detail.sales}}</text>
</view>
<view class="side df fdr jcr">

View File

@ -67,7 +67,6 @@
}
})
//
onUnload(() => {
removeListener()
})

View File

@ -145,8 +145,8 @@
}).then(res => {
if (res.code == 200) {
//
uni.$off('updateOrderList')
uni.$off('updateOrderDetail')
uni.$emit('updateOrderList')
uni.$emit('updateOrderDetail')
uni.navigateBack()
return
} else if (res.code === 501) {

View File

@ -1,65 +0,0 @@
<template>
<view class="box">
<view class="box_next" v-if="loading">
<image :src="loadingGif" mode="widthFix" class="box_next_img"></image>
<text class="box_next_text">加载中...</text>
</view>
<view v-else>
<text class="box_else_text">{{ hasMore ? '上拉加载更多' : '触碰到底线了' }}</text>
</view>
</view>
</template>
<script>
export default {
props: {
loadingGif: {
type: String,
default: ''
},
loading: Boolean,
hasMore: Boolean
},
methods: {
}
}
</script>
<style scoped>
.box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
padding: 30rpx;
height: 100rpx;
}
.box_next {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
}
.box_next_img {
width: 35rpx;
}
.box_next_text {
font-size: 26rpx;
color: #666666;
margin-left: 10rpx;
}
.box_else_text {
font-size: 26rpx;
color: #666666;
}
</style>

View File

@ -1,101 +0,0 @@
<template>
<view class="container">
<view class="input-search">
<image class="wh30 mr20" @click="skipSearch" :src="search"></image>
<input @click="skipSearch" v-model="searchValue" class="input" type="text" :placeholder="placeholder"
@change="search_change">
<uni-icons @click="emit('camera')" class="icon" type="camera" size="30"></uni-icons>
</view>
<view @click="search_change(searchValue)" class="search wsn">搜索</view>
</view>
</template>
<script setup>
import { ref, defineEmits } from 'vue'
import search from '@/static/search.png'
const props = defineProps({
disabled: {
type: Boolean,
default: true
},
placeholder: {
type: String,
default: '请输入搜索内容'
}
})
const searchValue = ref('')
const emit = defineEmits(["search", "camera"])
//
const updateSearch = (val) => {
searchValue.value = val
search_change(val)
}
const search_change = (val) => {
//
console.log(val)
//
emit('search', val)
}
const skipSearch = () => {
if (!props.disabled) {
return
}
//
uni.navigateTo({
url: '/pages/shop/search/index'
})
}
defineExpose({
updateSearch
})
</script>
<style lang="scss" scoped>
.container {
display: flex;
justify-content: space-between;
align-items: center;
top: 10px;
padding: 10rpx 20rpx;
background-color: $uni-bg-color;
//
border-radius: 30rpx;
.input-search {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
padding-right: 10rpx;
.icon {
padding-right: 10rpx;
}
.overlay {
width: calc(100% - 280rpx);
position: absolute;
height: 60rpx;
opacity: 0;
z-index: 2;
}
.input {
width: 100%;
}
}
.search {
border-radius: 30rpx;
opacity: 1;
width: fit-content;
padding: 14rpx 20rpx;
font-size: 24rpx;
line-height: 24rpx;
color: #333333;
/* 外部/按钮 */
background: linear-gradient(180deg, #FDDC85 -3%, #FFCE4F 100%);
}
}
</style>

View File

@ -0,0 +1,146 @@
<script setup>
/**
* 线下店铺
*/
import {
ref,
reactive,
getCurrentInstance,
defineExpose,
} from 'vue'
//
import util from '@/common/js/util.js'
//
import api from '@/api/index.js'
//
import productList from '@/components/shop/productList/productList'
const {
proxy
} = getCurrentInstance()
//
function init() {
//
}
defineExpose({
init,
})
</script>
<template>
<view class="header oh pt20 plr30 pb30 br20">
<view class="location df aic">
<uni-icons class="b" type="location" size="40rpx" />
<view class="name thd">希岸酒店</view>
<uni-icons type="right" />
<view class="f1"></view>
</view>
<view class="rows mt20">
<view class="searchBox rows f1 bfff bar">
<input class="f1 mlr20" type="text" placeholder="请输入" />
<view class="btn bar sm button plr20">搜索</view>
</view>
<uni-icons type="scan" size="60rpx" class="ml20" />
</view>
</view>
<!-- 频道 -->
<view class="channel bfff">
<view class="item fmid fdc ptb30">
<image class="image wh80 br10" src="/static/logo.png" mode="aspectFill" />
<view class="name mt10 c333 f28">休闲娱乐</view>
</view>
<view class="item fmid fdc ptb30">
<image class="image wh80 br10" src="/static/logo.png" mode="aspectFill" />
<view class="name mt10 c333 f28">美食/堂食</view>
</view>
<view class="item fmid fdc ptb30">
<image class="image wh80 br10" src="/static/logo.png" mode="aspectFill" />
<view class="name mt10 c333 f28">酒店 | 民宿</view>
</view>
</view>
<!-- 精品推荐 -->
<view class="recommend">
<view class="title ptb15 plr30 c333 f44 bfff">精品推荐</view>
<view class="list mt30 mb80 plr30">
<view class="item bfff" v-for="(item,index) in 10" :key="index">
<view class="icon">
<image class="image" src="/static/logo.png" mode="aspectFill" />
</view>
<view class="info ptb10 plr10">
<view class="name f32">项目名称</view>
<view class="price df aife">
<view class="now cFF4242">
<text class="f24"></text>
<text class="f30 b">100.00</text>
</view>
<view class="old c999 f24 mlr10">
<text class=""></text>
<text class="">200</text>
</view>
<view class="discount plr10 cFF4242 f24 br4">5.0</view>
</view>
</view>
</view>
</view>
</view>
</template>
<style lang="scss">
//
.header {
background-color: rgb(255, 155, 25);
.searchBox {
padding: 5rpx;
.button {
background-color: rgb(255, 155, 25);
}
}
}
//
.channel {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
//
.recommend {
//
.list {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 15rpx;
.item {
border-radius: 20rpx;
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
//
.image {
width: 100%;
height: 300rpx;
border-radius: 20rpx 20rpx 0 0;
}
//
.old {
text-decoration: line-through;
}
//
.discount {
background-color: rgb(255, 241, 240);
}
}
}
}
</style>

View File

@ -0,0 +1,248 @@
<script setup>
/**
* 商城首页
*/
import {
ref,
reactive,
getCurrentInstance,
defineExpose,
} from 'vue'
//
import util from '@/common/js/util.js'
//
import api from '@/api/index.js'
//
import productList from '@/components/shop/productList/productList'
const {
proxy
} = getCurrentInstance()
//
const cateList = reactive([{
id: '',
name: '推荐',
}])
//
const cateIndex = ref(0)
//
const giftCateList = reactive([])
//
const keyword = ref('')
//
function init() {
//
getCategory()
//
getGiftCate()
//
proxy.$refs.product.getList()
}
//
function getCategory() {
api.shop.getCategory({
query: {
// categoryCode: null,
},
}).then(rs => {
if (rs.code === 200) {
cateList.length = 1
cateList.push(...rs.data)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function getGiftCate() {
api.shop.getCategory({
query: {
categoryCode: 'GIFT_PACK',
},
}).then(rs => {
if (rs.code === 200) {
giftCateList.length = 0
giftCateList.push(...rs.data)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
/**
* 切换分类下标
* @param {Object} index
*/
function handleCateIndex(index) {
if (cateIndex.value === index) return
cateIndex.value = index
//
proxy.$refs.product.listPrototype.categoryId = cateList[index].id
//
proxy.$refs.product.refreshList()
}
//
function handleSearch() {
//
proxy.$refs.product.listPrototype.searchValue = keyword.value
//
proxy.$refs.product.refreshList()
}
/**
* 更新
* @param {Object} item
*/
function handleGiftCate(item) {
uni.navigateTo({
url: '/pages/shop/gift'
})
}
defineExpose({
init,
})
</script>
<template>
<!-- 轮播图 -->
<!-- <swiper class="banner oh" autoplay="true">
<swiper-item v-for="(item, index) in 3" :key="index">
<view class="item">
<image class="poster"
src="https://img12.360buyimg.com/babel/jfs/t20271206/247554/11/28097/64155/675290e6F829316f2/0722626e5b28b005.jpg.avif"
mode="aspectFill" />
</view>
</swiper-item>
</swiper> -->
<view class="gift mt30 bfff">
<view class="item fdc fmid" :class="{'big': item.categoryCode == 'GIFT_PACK'}"
v-for="(item,index) in giftCateList" :key="index" @click="handleGiftCate(item)">
<view class="icon">
<image class="image" :src="item.image" mode="widthFix" />
</view>
<view class="mt10 c333 f28">{{item.name}}</view>
</view>
</view>
<view class="oh bfff">
<!-- 功能区 -->
<view class="fn rows mtb30 mlr30">
<!-- <uni-icons type="scan" class="mr20" size="48rpx" color="#FF7F37" /> -->
<view class="searchBox rows f1 ptb10 plr20 bar">
<input type="text" v-model="keyword" class="f1" placeholder="请输入关键字" @blur="handleSearch" />
<uni-icons type="search" size="30rpx" color="#999" />
</view>
</view>
<!-- 滚动条 -->
<view class="cate">
<scroll-view scroll-x="true" class="scroll f30">
<view class="item" v-for="(item,index) in cateList" :key="index"
:class="{'active': index === cateIndex}" @click="handleCateIndex(index)">
<view class="name ptb20 plr40">{{item.name}}</view>
<view class="line"></view>
</view>
</scroll-view>
</view>
</view>
<!-- 商品卡片组 加载更多 -->
<view class="product oh ptb30 plr30">
<productList ref="product" />
</view>
</template>
<style lang="scss">
//
.banner {
height: 180rpx;
.item {
height: 100%;
}
.poster {
width: 100%;
height: 100%;
}
}
//
.gift {
display: flex;
.image {
width: 100%;
height: 100%;
}
.item.big {
width: 400rpx;
.icon {
width: 240rpx;
}
}
.item {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: flex-end;
width: 100%;
height: 200rpx;
}
}
//
.fn {
.searchBox {
background-color: #f3f3f3;
}
}
//
.cate {
.scroll {
white-space: nowrap;
.item {
display: inline-block;
color: #999;
transition: .3s;
.line {
width: 0;
margin: 0 auto;
border-bottom: 3rpx solid #FF7F37;
opacity: 0;
transition: .3s;
}
&.active {
color: #FF7F37;
font-weight: bold;
.line {
width: 100%;
opacity: 1;
}
}
}
}
}
</style>

201
jiuyi2/pages/shop/gift.vue Normal file
View File

@ -0,0 +1,201 @@
<script setup>
//
import {
ref,
reactive,
getCurrentInstance,
} from 'vue'
import {
onReachBottom,
onPullDownRefresh,
onShow,
onLoad,
onReady,
} from '@dcloudio/uni-app';
//
import util from '@/common/js/util.js'
//
import api from '@/api/index.js'
//
import productList from '@/components/shop/productList/productList'
const {
proxy
} = getCurrentInstance()
// tab
const tab = reactive([{
name: '礼包专区',
},
{
name: '超值礼包',
},
{
name: '大礼包',
},
{
name: '小礼包',
},
])
//
const tabIndex = ref(0)
onReady(() => {
//
getGiftCate().then(rs => {
//
proxy.$refs.product.listPrototype.categoryId = tab[tabIndex.value].id
proxy.$refs.product.getList()
})
})
onReachBottom(() => {
//
proxy.$refs.product.getMoreList()
})
onPullDownRefresh(() => {
//
proxy.$refs.product.refreshList()
})
//
function getGiftCate() {
return new Promise(resolve => {
api.shop.getCategory({
query: {
categoryCode: 'GIFT_PACK',
},
}).then(rs => {
if (rs.code === 200) {
tab.length = 0
tab.push(...rs.data)
resolve(tab)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
})
}
// tab
function handleTab(index) {
if (tabIndex.value === index) return
tabIndex.value = index
//
proxy.$refs.product.listPrototype.categoryId = tab[tabIndex.value].id
//
proxy.$refs.product.refreshList()
}
</script>
<template>
<view class="app">
<!-- 公告 -->
<!-- <swiper class="notice c333 f28" vertical="true">
<swiper-item class="item bsb rows plr20" v-for="(item, index) in 2" :key="index">
<image class="icon" src="/static/notice.png" mode="aspectFit" />
<view class="f1 mlr20">九亿商城上线啦~</view>
</swiper-item>
</swiper> -->
<view class="gift mt30 bfff">
<view class="item fdc fmid" :class="{'big': item.categoryCode == 'GIFT_PACK'}"
v-for="(item,index) in tab" :key="index">
<view class="icon">
<image class="image" :src="item.image" mode="widthFix" />
</view>
<view class="mt10 c333 f28">{{item.name}}</view>
</view>
</view>
<!-- 礼包专区 -->
<view class="tab pt20 bfff">
<view class="item ver ptb30" v-for="(item,index) in tab" :key="index" @click="handleTab(index)"
:class="{'active': index === tabIndex}">
<view class="">
<image class="icon" :src="item.icon" mode="aspectFill" />
</view>
<view class="line"></view>
</view>
</view>
<!-- 商品卡片组 加载更多 -->
<view class="product oh ptb30 plr30">
<productList ref="product" />
</view>
</view>
</template>
<style lang="scss" scoped>
//
.notice {
height: 80rpx;
background-color: #e8e8e8;
.icon {
width: 84rpx;
height: 36rpx;
}
}
//
.tab {
display: grid;
grid-template-columns: repeat(4, 1fr);
//
.item {
.icon {
width: 160rpx;
height: 60rpx;
}
.line {
width: 40rpx;
height: 6rpx;
background-color: #DD4B5B;
opacity: 0;
transition: .3s;
}
&.active {
.line {
opacity: 1;
}
}
}
}
//
.gift {
display: flex;
.image {
width: 100%;
height: 100%;
}
.item.big {
width: 400rpx;
.icon {
width: 240rpx;
}
}
.item {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: flex-end;
width: 100%;
height: 200rpx;
}
}
</style>

View File

@ -0,0 +1,13 @@
<script setup>
// 宿
</script>
<template>
<view class="app">
<!-- -->
</view>
</template>
<style>
</style>

View File

@ -0,0 +1,613 @@
<script setup>
//
/**
* 先从首页线下店铺分类选择其中之一身份带过来
* 添加一个选择位置的内容
*/
import {
ref,
reactive,
computed,
getCurrentInstance,
} from 'vue';
import {
onLoad,
onReady,
} from '@dcloudio/uni-app';
// vuex
import {
useStore
} from 'vuex'
//
import api from '@/api/index.js';
//
import util from '@/common/js/util.js'
//
import regionSelection from '@/components/public/regionSelection/regionSelection.vue';
//
import payPwd from '@/components/mine/payPwd.vue'
//
const store = useStore()
const {
proxy
} = getCurrentInstance();
//
const form = reactive({
rectangleLogo: '',
qualificationPicture: [],
idCardFront: '',
idCardBack: '',
})
// code 01234 form
const mode = reactive({
code: 0,
})
//
const content = ref({})
//
const dictList = reactive([])
//
const dictIndex = ref('')
//
const pwdCb = ref('')
//
const userinfo = computed(() => store.state.userinfo)
//
const config = computed(() => store.state.config)
onLoad(() => {
//
getShopStatus()
})
onReady(() => {
//
// callPwd('depositsPay')
})
//
function getForm() {
Promise.all([getDetail(), getDict()]).then(rs => {
//
const detail = rs[0]
//
const dict = rs[1]
if (!detail) return
form.id = detail.id
form.rectangleLogo = detail.rectangleLogo
form.qualificationPicture = detail.qualificationPicture.split(',')
form.idCardFront = detail.idCardFront
form.idCardBack = detail.idCardBack
form.name = detail.name
form.phone = detail.phone
form.addressDetail = detail.addressDetail
form.categoryId = detail.categoryId
form.province = detail.province
form.city = detail.city
form.district = detail.district
//
dictIndex.value = dict.findIndex(item => item.id == detail.categoryId)
})
}
//
function getDetail() {
return new Promise((resolve, reject) => {
api.shop.getStoreDetail().then(rs => {
if (rs.code == 200) {
resolve(rs.data)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
// code
function handleModeCode(code) {
//
mode.code = code
switch (code) {
case 0:
//
getarticle()
break;
case 1:
//
getarticle()
break;
case 'form':
//
getForm()
break;
}
}
//
function getDict() {
return new Promise((resolve, reject) => {
api.shop.categoryAll({}).then(rs => {
if (rs.code == 200) {
resolve(rs.data)
dictList.length = 0
dictList.push(...rs.data)
resolve()
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
//
function getShopStatus() {
api.shop.getShopStatus().then(rs => {
if (rs.code == 200) {
Object.assign(mode, rs.data)
handleModeCode(mode.code)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function depositsPay() {
api.shop.depositsPay().then(rs => {
if (rs.code == 200) {
//
mode.code = 1
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function getarticle() {
api.getArticle({
query: {
agreementId: 4,
},
}).then(rs => {
if (rs.code == 200) {
content.value = rs.data
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
/**
* 上传图片
* @param {String} key 键值
* @param {String} type 类型 1 2
*/
function uploadImg(key, type) {
util.upload_image({
value: form[key],
success: rs => {
switch (type) {
case 1:
form[key] = rs.value
break
case 2:
form[key].push(rs.value)
break
}
},
})
}
/**
* 移除文件
* @param {Number} index 下标
* @param {String} key
*/
function removeMedia(index, key) {
util.alert({
content: '确认删除?',
}).then(rs => {
if (rs.confirm) form[key].splice(index, 1)
})
}
/**
* 选择省市区
* @param {Object} ev
*/
function handleRegion(ev) {
console.log('handleRegion', ev)
form.province = ev.province.regionName
form.city = ev.city.regionName
form.district = ev.area.regionName
}
/**
* 切换产品分类
* @param {Object} ev 默认事件
*/
function handleDict(ev) {
if (!ev || typeof ev.detail.value === 'undefined') {
console.error('Invalid event object or missing value');
return
}
const index = ev.detail.value;
if (index === dictIndex.value) return;
if (index >= 0 && index < dictList.length) {
dictIndex.value = index;
form.categoryId = dictList[index].id;
} else {
console.error('Invalid index:', index);
}
}
//
function handleSubmit() {
const data = {
...form
}
console.log('data', data)
//
if (!data.rectangleLogo) {
util.alert('店铺头像不能为空')
return
}
if (!data.name) {
util.alert('店铺名称不能为空')
return
}
if (!data.phone) {
util.alert('联系方式不能为空')
return
}
if (!data.province) {
util.alert('产品所在地不能为空')
return
}
if (!data.categoryId) {
util.alert('产品类别不能为空')
return
}
if (!data.qualificationPicture[0]) {
util.alert('营业执照不能为空')
return
}
if (!data.idCardFront) {
util.alert('身份证正面不能为空')
return
}
if (!data.idCardBack) {
util.alert('身份证反面不能为空')
return
}
//
data.qualificationPicture = data.qualificationPicture.join(',')
api.shop.application({
data: data,
}).then(rs => {
if (rs.code === 200) {
util.alert({
content: '资料已申请,请等待后台审核',
showCancel: false,
}).then(rs => {
uni.navigateBack()
})
} else {
util.alert({
content: rs.msg,
showCancel: false,
})
}
})
}
// 退
function outDepositsPayAlt() {
util.alert({
content: '确认缴纳押金并放弃店铺身份?',
}).then(rs => {
if (!rs.confirm) return
//
callPwd('outDepositsPay')
})
}
// 退
function outDepositsPay() {
// 退
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) {
util.isAuth({
success: () => {
pwdCb.value = {
//
'depositsPay': depositsPay,
// 退
'outDepositsPay': outDepositsPay,
} [key]
console.log('pwdCb', pwdCb.value)
//
proxy.$refs.payPwdRef.open()
}
})
}
//
function handlePayPwd() {
//
pwdCb.value()
}
</script>
<template>
<!-- 须知 -->
<template v-if="[0,1].includes(mode.code)">
<view class="app">
<view class="notice oh mtb30 mlr30 plr30 ptb20 bfff br20">
<view class="title tac f34 c333 b">店铺入驻须知</view>
<view class="content mtb50">
<rich-text :nodes="content.content"></rich-text>
</view>
</view>
<view class="tac c666 f28">继续即代表同意店铺入驻须知</view>
<view class="fill" style="height: 160rpx;" />
<view class="footer plr30 bfff shadow">
<!-- 未缴纳押金 -->
<template v-if="mode.code == 0">
<view class="btn black" @click="callPwd('depositsPay')">缴纳押金</view>
</template>
<template v-else>
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">申请入驻</view>
</view>
</template>
</view>
</view>
</template>
<!-- 待审核 -->
<template v-else-if="mode.code == 2">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">申请中</view>
<view class="value f30">
<text class="c333">提交成功请等待后台审核</text>
</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel f1" @click="outDepositsPayAlt">取消申请并退回押金</view>
</view>
</view>
</template>
<!-- 审核驳回 -->
<template v-else-if="mode.code == 4">
<view class="app">
<view class="result ver">
<uni-icons type="clear" color="#ff0000" size="160rpx" />
<view class="title mtb30 f34">审核驳回</view>
<view class="value f30">
<text class="c666">驳回原因</text>
<text class="c333">{{mode.msg}}</text>
</view>
<view class="reject mtb30 c666 f28">
<view>驳回结果异议 可在个人中心-设置里面联系我们</view>
</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">修改信息</view>
</view>
</view>
</template>
<!-- 申请成功 -->
<template v-else-if="mode.code == 3">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">恭喜您您已成为店铺</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金并放弃店铺身份</view>
</view>
</view>
</template>
<!-- 表单申请 -->
<template v-else-if="mode.code == 'form'">
<view class="appbw plr30">
<!-- 头像 -->
<view class="avatarBox ver mt50">
<view class="avatar oh pr wh220 br20" @click="uploadImg('rectangleLogo',1)">
<image class="img br20" :src="form.rectangleLogo" mode="aspectFill" v-if="form.rectangleLogo" />
<view class="pfull fmid" v-else>
<uni-icons type="plusempty" color="#999" size="80rpx" />
</view>
</view>
<view class="name mt20 c666 f24">店铺头像</view>
</view>
<!-- 表单 -->
<view class="form mt60 c333 f32">
<view class="title f36">我的资料</view>
<view class="item rows ptb20">
<view class="key c666">店铺名称</view>
<view class="value f1 ml20 tar">
<input v-model="form.name" type="text" placeholder="请输入店铺名称" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">联系方式</view>
<view class="value f1 ml20 tar">
<input v-model="form.phone" type="number" placeholder="请输入联系方式" />
</view>
</view>
<view class="item rows ptb20" @click="$refs.regionSelectionRef.open()">
<view class="key c666">产品所在地</view>
<view class="value f1 ml20 tar">
<!-- 省市区选择 -->
<regionSelection ref="regionSelectionRef" :province="form.province" :city="form.city"
:area="form.district" @change="handleRegion" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">详细所在地</view>
<view class="value f1 ml20 tar">
<input v-model="form.addressDetail" type="text" placeholder="请选择产品所在地" />
</view>
</view>
<view class="item ptb20">
<picker :range="dictList" range-key="name" :vlaue="dictIndex" @change="handleDict">
<view class="rows">
<view class="key c666">产品类别</view>
<view class="value f1 ml20 tar">
<text class="placeholderStyle" v-if="dictIndex === ''">请选择产品类别</text>
<text v-else>{{dictList[dictIndex].name}}</text>
</view>
</view>
</picker>
</view>
<view class="item ptb20">
<view class="key c666">营业执照</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-for="(item, index) in form.qualificationPicture" :key="index">
<image class="img br10" :src="item" mode="aspectFill" />
<view class="close" @click="removeMedia(index,'qualificationPicture')">
<uni-icons type="clear" size="50rpx" color="#f00" />
</view>
</view>
<view class="upload imgs fmid wh200 br10" @click="uploadImg('qualificationPicture',2)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证正面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardFront" @click="uploadImg('idCardFront',1)">
<image class="img br10" :src="form.idCardFront" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardFront',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证反面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardBack" @click="uploadImg('idCardBack',1)">
<image class="img br10" :src="form.idCardBack" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardBack',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
</view>
<view class="fill" style="height: 150rpx;"></view>
</view>
<view class="footer plr30 bfff shadow">
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleSubmit">申请入驻</view>
</view>
</view>
</template>
<!-- 二级密码 -->
<payPwd ref="payPwdRef" :check="true" :price="config.DEPOSIT_ALLOCATION" @confirm="handlePayPwd" />
</template>
<style lang="scss">
.img {
width: 100%;
height: 100%;
}
//
.avatar {
background-color: #F6F8FE;
}
//
.upload {
background-color: #f4f4ff;
}
//
.result {
margin-top: 30rpx;
padding: 50rpx 0;
background-color: #fff;
}
//
.menu {
.line {
padding: 20rpx 10rpx;
&+.line {
border-top: 2rpx solid #eee;
}
}
}
</style>

View File

@ -1,20 +1,72 @@
<script setup>
//
import {
reactive
} from 'vue';
ref,
reactive,
computed,
getCurrentInstance,
} from 'vue'
import {
onLoad,
onReady,
onPageScroll,
} from '@dcloudio/uni-app';
//
import util from '@/common/js/util';
//
import api from '@/api/index.js'
// id
const orderId = ref('')
//
const detail = reactive({})
//
const flow = reactive([{
const flow = computed(() => {
let result = []
if (detail.id) result.push({
time: detail.dealTime,
name: '同意退款',
},
{
}, {
time: detail.dealTime,
name: '平台处理中',
},
{
}, {
time: detail.refundTime,
name: '到账成功',
}
])
})
return result
})
onLoad((option) => {
if (option.orderId) orderId.value = option.orderId
//
getDetail()
})
//
function getDetail() {
api.shop.getRefundOrder({
query: {
orderId: orderId.value,
}
}).then(rs => {
if (rs.code == 200) {
const result = rs.data
result.payment = util.config.payType[result.refundType]
Object.assign(detail, result)
return
}
util.alert({
content: rs.msg,
showCancel: false
})
})
}
//
function handleCopy() {
util.copyText(detail.orderNo)
}
</script>
<template>
@ -26,7 +78,7 @@
<view class="result mtb30">
<view class="refundPrice ">
<text class="f48"></text>
<text class="value">2</text>
<text class="value">{{detail.refundPrice}}</text>
</view>
<view class="c37B111">已退回至九亿钱包</view>
</view>
@ -45,26 +97,26 @@
</view>
<view class="main mt20 tac c999 f26">
<view class="name">{{item.name}}</view>
<view class="time mt10">10-10 15:27</view>
<view class="time mt10">{{item.time}}</view>
</view>
</view>
</view>
</view>
<!-- 退款金额 -->
<view class="container info c999 f28">
<view class="container info c999 f28" v-if="detail.id">
<view class="title mtb20 c333 f32">钱款去向</view>
<view class="line rows mtb20">
<view class="key">九亿账号</view>
<view class="">12345665</view>
<view class="">{{detail.refundAccount}}</view>
</view>
<view class="line rows mtb20">
<view class="key">支付方式</view>
<view class="">余额</view>
<view class="">{{detail.payment.name}}</view>
</view>
<view class="line rows mtb20">
<view class="key">退款账户</view>
<view class="">12345665</view>
<view class="">{{detail.refundAccount}}</view>
</view>
</view>
@ -72,54 +124,50 @@
<view class="header line rows ptb20 f28">
<!-- 店铺 -->
<view class="store df aic thd f1">
<image class="wh50 br10"
src="https://img13.360buyimg.com/n1/jfs/t1/117234/35/34799/82687/6449f2b4Fd6e2eef9/a754c5e178c9e9be.jpg.avif"
mode="aspectFill" />
<view class="name ml10 c333">家纺专营店</view>
<image class="wh50 br10" :src="detail.merchantAvatar" mode="aspectFill" />
<view class="name ml10 c333">{{detail.merchantName}}</view>
</view>
</view>
<!-- 商品信息 -->
<view class="product line df ptb20">
<view class="product line df ptb20" v-if="detail.productInf">
<view class="poster wh160">
<image class="wh160 br10"
src="https://img13.360buyimg.com/n1/jfs/t1/117234/35/34799/82687/6449f2b4Fd6e2eef9/a754c5e178c9e9be.jpg.avif"
mode="aspectFill" />
<image class="wh160 br10" :src="detail.productInfo.sliderImage.split(',')[0]" mode="aspectFill" />
</view>
<!-- 产品名称 购买的规格 -->
<view class="info mlr20 f1">
<view class="name c333 f28">靠枕 纯棉靠枕 车载居家 纯棉100% 卡通靠枕 人体工学</view>
<view class="spec mt10 c999 f26">款式普通款 小熊</view>
<view class="name c333 f28">{{detail.productInfo.name}}</view>
<view class="spec mt10 c999 f26">款式{{detail.style}}</view>
</view>
<!-- 单价 数量 -->
<view class="tar">
<view class="price c666">
<text class="f20"></text>
<text class="f26">89</text>
<text class="f26">{{detail.productInfo.price}}</text>
</view>
<view class="number f24 c999">x 1</view>
<view class="number f24 c999">x {{detail.totalNum}}</view>
</view>
</view>
<!-- 订单信息 -->
<view class="order mt30 f26 c999">
<view class="line mtb20 rows">
<text>订单编号251547812138</text>
<view class="btn ti closeHollow plr20">复制</view>
<text>订单编号{{detail.orderNo}}</text>
<view class="btn ti closeHollow plr20" @click="handleCopy">复制</view>
</view>
<view class="line mtb20">
<text>申请金额2</text>
<text>申请金额{{detail.refundPrice}}</text>
</view>
<view class="line mtb20">
<text>退款原因其他原因</text>
<text>退款原因{{detail.refundReasonWap}}</text>
</view>
<view class="line mtb20">
<!-- <view class="line mtb20">
<text>收货状态已收货</text>
</view>
</view> -->
<view class="line mtb20">
<text>申请时间2024-12-15 17:00</text>
<text>申请时间{{detail.createTime}}</text>
</view>
</view>
</view>
@ -128,7 +176,7 @@
<view class="fill" style="height: 150rpx;"></view>
<!-- -->
<view class="footer df jcr plr30 bfff shadow">
<view class="footer df jcr plr30 bfff shadow" v-if="0">
<view class="btn sm bar closeHollow plr20">联系商家</view>
</view>
</view>

View File

@ -42,6 +42,8 @@
const showOrderDetail = ref(false)
//
const logistics = computed(() => detail.logistics.info ? detail.logistics.info[0] : {})
// 退
const returnAddress = reactive({})
onLoad((option) => {
if (option.orderId) orderId.value = option.orderId
@ -80,6 +82,7 @@
let result = res.data
result.status = Number(result.status)
result.refundStatus = Number(result.refundStatus)
result.payment = util.config.payType[result.payType]
Object.assign(detail, {}, result)
return
}
@ -115,11 +118,18 @@
order.orderReceived({
orderId: detail.id,
}).then(res => {
//
refreshList()
uni.$emit('updateOrderList')
//
getDetail()
})
}
// 退
function handleExpress(item) {
Object.assign(orderDetail, {}, item)
proxy.$refs.expressRef.open()
}
/**
* 填写退货物流信息
* @param {Object} param
@ -127,15 +137,42 @@
function handleExpressConfirm(param) {
let data = {
...param,
id: detail.id,
id: orderDetail.refundOrder.id,
}
console.log('orderupdateRefund', data)
order.orderupdateRefund(data).then(res => {
//
refreshList()
api.shop.setShopOrderRefundGoods({
data,
}).then(res => {
if (res.code == 200) {
uni.$emit('updateOrderList')
//
getDetail()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 查看收货地址
* @param {Object} item
*/
function handleReturnAddress(item) {
order.getReturnAddress({
orderId: item.id,
}).then(res => {
Object.assign(returnAddress, res)
proxy.$refs.addressRef.open()
})
}
//
function handleAddressCopy() {
util.copyText(`${returnAddress.realName} ${returnAddress.userPhone} ${returnAddress.userAddress}`)
}
</script>
<template>
@ -189,7 +226,7 @@
<template v-if="showOrderDetail">
<view class="line mtb20">
<text>支付方式微信支付</text>
<text>支付方式{{detail.payment.name}}</text>
</view>
<view class="line mtb20">
@ -206,11 +243,11 @@
</view>
<view class="line mtb20">
<text>发货时间2024-12-10 18:00</text>
<text>发货时间{{detail.invoice.createTime}}</text>
</view>
<view class="line mtb20">
<text>收货时间2024-12-15 17:00</text>
<view class="line mtb20" v-if="detail.receivingTime">
<text>收货时间{{detail.receivingTime}}</text>
</view>
</template>
@ -228,60 +265,95 @@
</view>
<!-- 商品列表 -->
<view class="productList mtb30 mlr20">
<!-- <view class="productList mtb30 mlr20">
<productList choicenessTitle="true" />
</view>
</view> -->
<view class="fill"></view>
<view class="footer df jcr plr30 bfff shadow" v-if="[0,1,4,5,6].includes(detail.status)">
<!-- 售后 -->
<template v-if="[0,2,5,6].includes(detail.afterSaleStatus)">
</template>
<!-- 待买家发货 -->
<view class="footer df jcr plr30 bfff shadow" v-else-if="detail.afterSaleStatus == 4">
<!-- 查看退货地址 -->
<view class="btn bar closeHollow plr30" @click.stop="handleReturnAddress(detail)">
查看退货地址</view>
<!-- 售后中 -->
<template v-if="detail.refundStatus == 1">
<template v-if="detail.refundStatus == 4">
<view class="btn bar warmHollow plr30" @click.stop="$refs.expressRef.open()">
填写退货物流信息</view>
</template>
<view class="btn bar warmHollow plr30" @click.stop="handleExpress(detail)">
填写退货物流信息</view>
</view>
<!-- 售后 -->
<view class="footer df jcr plr30 bfff shadow" v-else-if="detail.afterSaleStatus == 3">
<!-- 售后中 -->
<view class="btn bar closeHollow plr30" @click.stop="handleAfterSalesDetail(detail)">
查看售后详情</view>
</view>
<!-- 非售后 -->
<view class="footer df jcr plr30 bfff shadow" v-else-if="[0,1,4,5,6].includes(detail.status)">
<!-- 待支付 -->
<template v-if="detail.status == 0">
<view class="btn bar closeHollow plr30" @click="handleCancel">取消订单</view>
<view class="btn bar warmHollow plr30" @click="order.orderPay(detail)">继续付款</view>
</template>
<!-- 非售后 -->
<template v-else-if="detail.refundStatus == 0">
<!-- 待支付 -->
<template v-if="detail.status == 0">
<view class="btn bar closeHollow plr30" @click="handleCancel">取消订单</view>
<view class="btn bar warmHollow plr30" @click="order.orderPay(detail)">继续付款</view>
</template>
<!-- 待发货 -->
<template v-else-if="detail.status == 1">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel">取消订单</view>
</template>
<!-- 待收货 -->
<template v-else-if="detail.status == 4">
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)">申请退款</view>
<view class="btn bar closeHollow plr30" v-if="detail.afterSaleStatus === 1">
申请平台介入</view>
<view class="btn bar closeHollow plr30" @click.stop="order.logistics(detail)">查看物流
</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived">确认收货
</view>
</template>
<!-- 已收货 -->
<template v-else-if="detail.status == 5">
<view class="btn bar closeHollow plr30" v-if="detail.afterSaleStatus === 1">
申请平台介入</view>
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)">申请退款</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(detail)">评价</view>
</template>
<!-- 已完成 -->
<template v-else-if="detail.status == 6">
<view class="btn bar closeHollow plr30">取消售后</view>
<!-- <view class="btn bar closeHollow plr30">钱款去向</view> -->
<view class="btn bar warmHollow plr30" v-if="detail.afterSaleStatus === 1">
申请平台介入</view>
</template>
<!-- 待发货 -->
<template v-else-if="detail.status == 1">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel">取消订单</view>
</template>
<!-- 待收货 -->
<template v-else-if="detail.status == 4">
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)">申请退款</view>
<view class="btn bar closeHollow plr30" v-if="detail.afterSaleStatus === 1">
申请平台介入</view>
<view class="btn bar closeHollow plr30" @click.stop="order.logistics(detail)">查看物流
</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived">确认收货
</view>
</template>
<!-- 已收货 -->
<template v-else-if="detail.status == 5">
<view class="btn bar closeHollow plr30"
v-if="detail.afterSaleStatus === 1 && detail.isGiftPack != 1 && 0">申请平台介入</view>
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)"
v-if="detail.isGiftPack != 1">申请退款</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(detail)">评价</view>
</template>
<!-- 已完成 -->
<template v-else-if="detail.status == 6">
<!-- <view class="btn bar closeHollow plr30">取消售后</view> -->
<!-- <view class="btn bar closeHollow plr30">钱款去向</view> -->
<!-- <view class="btn bar warmHollow plr30" v-if="detail.afterSaleStatus === 1">
申请平台介入</view> -->
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(detail)">评价</view>
</template>
</view>
</view>
<!-- 物流弹窗 -->
<expressVue ref="expressRef" @confirm="handleExpressConfirm" />
<!-- 同意退款 -->
<uni-popup ref="addressRef" type="center">
<view class="addressAlt popMid bfff">
<view class="header rows ptb20 plr20">
<view>商家退货地址信息</view>
<uni-icons type="closeempty" @click="$refs.addressRef.close()" />
</view>
<view class="form oh plr30 c333 f30">
<view class="line mtb20">
<view class="value mt10">{{returnAddress.realName}}</view>
</view>
<view class="line mtb20">
<view class="value mt10">{{returnAddress.userPhone}}</view>
</view>
<view class="line mtb20">
<view class="value mt10">{{returnAddress.userAddress}}</view>
</view>
</view>
<view class="btn warm mtb30 mlr30" @click="handleAddressCopy">复制</view>
</view>
</uni-popup>
</template>
<style lang="scss">

View File

@ -76,6 +76,8 @@
const apexBgColor = ref('#ffffff00')
//
const orderDetail = reactive({})
// 退
const returnAddress = reactive({})
onLoad((option) => {
if (option.tabIndex) tabIndex.value = Number(option.tabIndex)
@ -146,26 +148,28 @@
//
item.status = Number(item.status)
item.refundStatus = Number(item.refundStatus)
item.status_text = {
'0': '待支付',
'1': '待发货',
'4': '待收货',
'5': '已收货',
'6': '已完成',
'7': '售后退款',
'8': '售后完成',
'9': '已取消',
} [item.status]
//
if (item.refundStatus != 0) {
item.status_text = {
'0': '待审核',
'1': '商家拒绝',
'2': '退款中',
'3': '已退款',
'4': '用户退货',
'5': '商家待收货',
'6': '已撤销',
if (item.afterSaleStatus >= 0) {
item.status_text += {
'0': '商家审核',
'1': '商家拒绝',
'2': '退款中',
'3': '已退款',
'4': ',待买家退货',
'5': '商家待收货',
'6': '已撤销',
} [item.afterSaleStatus]
} else {
item.status_text = {
'0': '待支付',
'1': '待发货',
'4': '待收货',
'5': '已收货',
'6': '已完成',
'9': '已取消',
} [item.status]
}
return item
}))
@ -176,6 +180,8 @@
content: res.msg,
showCancel: false
})
}).finally(rs => {
uni.stopPullDownRefresh()
})
}
@ -240,15 +246,41 @@
function handleExpressConfirm(param) {
let data = {
...param,
id: orderDetail.id,
id: orderDetail.refundOrder.id,
}
console.log('orderupdateRefund', data)
order.orderupdateRefund(data).then(res => {
//
refreshList()
api.shop.setShopOrderRefundGoods({
data,
}).then(res => {
if (res.code == 200) {
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 查看收货地址
* @param {Object} item
*/
function handleReturnAddress(item) {
order.getReturnAddress({
orderId: item.id,
}).then(res => {
Object.assign(returnAddress, res)
proxy.$refs.addressRef.open()
})
}
//
function handleAddressCopy() {
util.copyText(`${returnAddress.realName} ${returnAddress.userPhone} ${returnAddress.userAddress}`)
}
</script>
<template>
@ -278,58 +310,70 @@
<orderItem :item="item" mode="mine" @item="handleItem">
<!-- 操作按钮 -->
<template #menu="scope">
<view class="menu ptb20 df jcr" v-if="[0,1,4,5,6].includes(scope.item.status)">
<!-- 售后 -->
<template v-if="[0,2,5,6].includes(scope.item.afterSaleStatus)">
</template>
<!-- 待买家发货 -->
<view class="menu ptb20 df jcr" v-else-if="scope.item.afterSaleStatus == 4">
<!-- 查看退货地址 -->
<view class="btn bar closeHollow plr30" @click.stop="handleReturnAddress(scope.item)">
查看退货地址</view>
<!-- 售后中 -->
<template v-if="scope.item.refundStatus == 1">
<template v-if="scope.item.refundStatus == 4">
<view class="btn bar warmHollow plr30" @click.stop="handleExpress(scope.item)">
填写退货物流信息</view>
</template>
<view class="btn bar warmHollow plr30" @click.stop="handleExpress(scope.item)">
填写退货物流信息</view>
</view>
<!-- 售后 -->
<view class="menu ptb20 df jcr" v-else-if="scope.item.afterSaleStatus == 3">
<!-- 售后中 -->
<view class="btn bar closeHollow plr30"
@click.stop="order.handleAfterSalesDetail(scope.item)">
查看售后详情</view>
</view>
<!-- 非售后 -->
<view class="menu ptb20 df jcr" v-else-if="[0,1,4,5,6].includes(scope.item.status)">
<!-- 待支付 -->
<template v-if="scope.item.status == 0">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">继续付款
</view>
</template>
<!-- 非售后 -->
<template v-else-if="scope.item.refundStatus == 0">
<!-- 待支付 -->
<template v-if="scope.item.status == 0">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderPay(item)">继续付款
</view>
</template>
<!-- 待发货 -->
<template v-else-if="scope.item.status == 1">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view>
<!-- <view class="btn bar warmHollow plr30">催发货</view> -->
</template>
<!-- 待收货 -->
<template v-else-if="scope.item.status == 4">
<view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(scope.item)">申请退款</view>
<view class="btn bar closeHollow plr30" v-if="scope.item.afterSaleStatus === 1">
申请平台介入</view>
<view class="btn bar closeHollow plr30"
@click.stop="order.logistics(scope.item)">查看物流
</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived(scope.item)">
确认收货
</view>
</template>
<!-- 已收货 -->
<template v-else-if="scope.item.status == 5">
<view class="btn bar closeHollow plr30" v-if="scope.item.afterSaleStatus === 1">
申请平台介入</view>
<view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(scope.item)">申请退款</view>
<view class="btn bar warmHollow plr30"
@click.stop="order.orderComment(scope.item)">评价</view>
</template>
<!-- 已完成 -->
<template v-else-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" v-if="scope.item.afterSaleStatus === 1">
申请平台介入</view>
</template>
<!-- 待发货 -->
<template v-else-if="scope.item.status == 1">
<view class="btn bar closeHollow plr30" @click.stop="handleCancel(scope.item)">
取消订单</view>
<!-- <view class="btn bar warmHollow plr30">催发货</view> -->
</template>
<!-- 待收货 -->
<template v-else-if="scope.item.status == 4">
<view class="btn bar closeHollow plr30" v-if="scope.item.isGiftPack != 1"
@click.stop="order.orderAfterSales(scope.item)">申请退款</view>
<!-- <view class="btn bar closeHollow plr30" v-if="scope.item.afterSaleStatus === 1">
申请平台介入</view> -->
<view class="btn bar closeHollow plr30" @click.stop="order.logistics(scope.item)">
查看物流</view>
<view class="btn bar warmHollow plr30" @click.stop="handleReceived(scope.item)">
确认收货
</view>
</template>
<!-- 已收货 -->
<template v-else-if="scope.item.status == 5">
<view class="btn bar closeHollow plr30"
v-if="scope.item.afterSaleStatus === 1 && scope.item.isGiftPack != 1 && 0">
申请平台介入</view>
<view class="btn bar closeHollow plr30"
@click.stop="order.orderAfterSales(scope.item)"
v-if="scope.item.isGiftPack != 1">申请退款</view>
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(scope.item)">
评价</view>
</template>
<!-- 已完成 -->
<template v-else-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" v-if="scope.item.afterSaleStatus === 1">申请平台介入</view> -->
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(scope.item)">
评价</view>
</template>
</view>
</template>
@ -339,8 +383,35 @@
</view>
</view>
<!-- 填充 -->
<view class="fill" style="height: 30rpx;"></view>
<!-- 物流弹窗 -->
<expressVue ref="expressRef" @confirm="handleExpressConfirm" />
<!-- 同意退款 -->
<uni-popup ref="addressRef" type="center">
<view class="addressAlt popMid bfff">
<view class="header rows ptb20 plr20">
<view>商家退货地址信息</view>
<uni-icons type="closeempty" @click="$refs.addressRef.close()" />
</view>
<view class="form oh plr30 c333 f30">
<view class="line mtb20">
<view class="value mt10">{{returnAddress.realName}}</view>
</view>
<view class="line mtb20">
<view class="value mt10">{{returnAddress.userPhone}}</view>
</view>
<view class="line mtb20">
<view class="value mt10">{{returnAddress.userAddress}}</view>
</view>
</view>
<view class="btn warm mtb30 mlr30" @click="handleAddressCopy">复制</view>
</view>
</uni-popup>
</template>
<style scoped lang="scss">

View File

@ -42,8 +42,9 @@
})
//
const formatFlow = computed(() => {
let result = [...logistics.value.logisticsTraceDetailList]
if (!showMore.value) result.length = Math.min(logistics.value.logisticsTraceDetailList.length, 2)
const list = logistics.value.logisticsTraceDetailList || []
let result = [...list]
if (!showMore.value) result.length = Math.min(list.length, 2)
return result
})
@ -133,9 +134,9 @@
</view>
<!-- 推荐产品列表 -->
<view class="productList mtb30 mlr30">
<!-- <view class="productList mtb30 mlr30">
<productList choicenessTitle="true" />
</view>
</view> -->
</view>
</template>

View File

@ -49,14 +49,13 @@
let result = []
//
if ([1,4].includes(detail.status)) {
if ([4].includes(detail.status)) {
result.push({
type: 1,
name: '我要退款(无需退货)',
text: '未收到货,或与商家协商之后申请',
})
}
//
if ([5, 6].includes(detail.status)) {
result.push({
@ -210,8 +209,8 @@
}).then(res => {
if (res.code == 200) {
//
uni.$off('updateOrderList')
uni.$off('updateOrderDetail')
uni.$emit('updateOrderList')
uni.$emit('updateOrderDetail')
uni.navigateBack()
return
}

View File

@ -1,12 +1,5 @@
<script setup>
/**
* 商家入驻
* 进入页面获取最新的数据 如果发生变化 同步用户信息
* 1 待申请 显示入驻须知 是否缴纳押金
* 2 已申请/待审核 已缴纳押金并且提交表单
* 3 审核驳回 可选择取消押金 修改表单内容继续提交审核
* 4 审核成功 已成为商家 可选择取消商家身份 拿回押金 修改店铺信息重新提交审核
*/
//
import {
ref,
reactive,
@ -25,559 +18,75 @@
import api from '@/api/index.js';
//
import util from '@/common/js/util.js'
//
import regionSelection from '@/components/public/regionSelection/regionSelection.vue';
//
import payPwd from '@/components/mine/payPwd.vue'
//
const store = useStore()
const {
proxy
} = getCurrentInstance();
//
const form = reactive({
rectangleLogo: '',
qualificationPicture: [],
idCardFront: '',
idCardBack: '',
})
// code 01234 form
const mode = reactive({
code: 0,
})
//
const content = ref({})
//
const dictList = reactive([])
//
const dictIndex = ref('')
//
const pwdCb = ref('')
} = getCurrentInstance()
//
const identityList = reactive([{
icon: '/static/store1.png',
name: '商家入驻',
url: '/pages/shop/store/settled',
},
{
icon: '/static/store2.png',
name: '线下店铺入驻',
url: '/pages/shop/offline/settled',
}
])
//
const identityIndex = ref(0)
//
const userinfo = computed(() => store.state.userinfo)
//
const config = computed(() => store.state.config)
onLoad(() => {
//
getShopStatus()
//
})
onReady(() => {
//
// callPwd('depositsPay')
})
//
function getForm() {
Promise.all([getDetail(), getDict()]).then(rs => {
//
const detail = rs[0]
//
const dict = rs[1]
if (!detail) return
form.id = detail.id
form.rectangleLogo = detail.rectangleLogo
form.qualificationPicture = detail.qualificationPicture.split(',')
form.idCardFront = detail.idCardFront
form.idCardBack = detail.idCardBack
form.name = detail.name
form.phone = detail.phone
form.addressDetail = detail.addressDetail
form.categoryId = detail.categoryId
form.province = detail.province
form.city = detail.city
form.district = detail.district
//
dictIndex.value = dict.findIndex(item => item.id == detail.categoryId)
})
}
//
function getDetail() {
return new Promise((resolve, reject) => {
api.shop.getStoreDetail().then(rs => {
if (rs.code == 200) {
resolve(rs.data)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
// code
function handleModeCode(code) {
//
mode.code = code
switch (code) {
case 0:
//
getarticle()
break;
case 1:
//
getarticle()
break;
case 'form':
//
getForm()
break;
}
}
//
function getDict() {
return new Promise((resolve, reject) => {
api.shop.categoryAll({}).then(rs => {
if (rs.code == 200) {
resolve(rs.data)
dictList.length = 0
dictList.push(...rs.data)
resolve()
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
//
function getShopStatus() {
api.shop.getShopStatus().then(rs => {
if (rs.code == 200) {
Object.assign(mode, rs.data)
handleModeCode(mode.code)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function depositsPay() {
api.shop.depositsPay().then(rs => {
if (rs.code == 200) {
//
mode.code = 1
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function getarticle() {
api.getArticle({
query: {
agreementId: 4,
},
}).then(rs => {
if (rs.code == 200) {
content.value = rs.data
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
/**
* 上传图片
* @param {String} key 键值
* @param {String} type 类型 1 2
* 选择身份
* @param {Object} index
*/
function uploadImg(key, type) {
util.upload_image({
value: form[key],
success: rs => {
switch (type) {
case 1:
form[key] = rs.value
break
case 2:
form[key].push(rs.value)
break
}
},
function handleIdentityIndex(index) {
if (identityIndex.value === index) return
identityIndex.value = index
}
//
function handleNext() {
uni.navigateTo({
url: identityList[identityIndex.value].url
})
}
/**
* 移除文件
* @param {Number} index 下标
* @param {String} key
*/
function removeMedia(index, key) {
util.alert({
content: '确认删除?',
}).then(rs => {
if (rs.confirm) form[key].splice(index, 1)
})
}
/**
* 选择省市区
* @param {Object} ev
*/
function handleRegion(ev) {
console.log('handleRegion', ev)
form.province = ev.province.regionName
form.city = ev.city.regionName
form.district = ev.area.regionName
}
/**
* 切换产品分类
* @param {Object} ev 默认事件
*/
function handleDict(ev) {
if (!ev || typeof ev.detail.value === 'undefined') {
console.error('Invalid event object or missing value');
return
}
const index = ev.detail.value;
if (index === dictIndex.value) return;
if (index >= 0 && index < dictList.length) {
dictIndex.value = index;
form.categoryId = dictList[index].id;
} else {
console.error('Invalid index:', index);
}
}
//
function handleSubmit() {
const data = {
...form
}
console.log('data', data)
//
if (!data.rectangleLogo) {
util.alert('商家头像不能为空')
return
}
if (!data.name) {
util.alert('商家名称不能为空')
return
}
if (!data.phone) {
util.alert('联系方式不能为空')
return
}
if (!data.province) {
util.alert('产品所在地不能为空')
return
}
if (!data.categoryId) {
util.alert('产品类别不能为空')
return
}
if (!data.qualificationPicture[0]) {
util.alert('营业执照不能为空')
return
}
if (!data.idCardFront) {
util.alert('身份证正面不能为空')
return
}
if (!data.idCardBack) {
util.alert('身份证反面不能为空')
return
}
//
data.qualificationPicture = data.qualificationPicture.join(',')
api.shop.application({
data: data,
}).then(rs => {
if (rs.code === 200) {
util.alert({
content: '资料已申请,请等待后台审核',
showCancel: false,
}).then(rs => {
uni.navigateBack()
})
} else {
util.alert({
content: rs.msg,
showCancel: false,
})
}
})
}
// 退
function outDepositsPayAlt() {
util.alert({
content: '确认缴纳押金并放弃商家身份?',
}).then(rs => {
if (!rs.confirm) return
//
callPwd('outDepositsPay')
})
}
// 退
function outDepositsPay() {
// 退
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) {
util.isAuth({
success: () => {
pwdCb.value = {
//
'depositsPay': depositsPay,
// 退
'outDepositsPay': outDepositsPay,
} [key]
console.log('pwdCb', pwdCb.value)
//
proxy.$refs.payPwdRef.open()
}
})
}
//
function handlePayPwd() {
//
pwdCb.value()
}
</script>
<template>
<!-- 须知 -->
<template v-if="[0,1].includes(mode.code)">
<view class="app">
<view class="notice oh mtb30 mlr30 plr30 ptb20 bfff br20">
<view class="title tac f34 c333 b">商家入驻须知</view>
<view class="content mtb50">
<rich-text :nodes="content.content"></rich-text>
</view>
</view>
<view class="app">
<view class="list">
<view class="item fmid mtb30 mlr30 ptb20 br20 bfff" v-for="(item,index) in identityList" :key="index"
:class="{'active': index === identityIndex}" @click="handleIdentityIndex(index)">
<image class="wh50" :src="item.icon" mode="aspectFit" />
<view class="tac c666 f28">继续即代表同意商家入驻须知</view>
<view class="name wsn mlr20 c333">{{item.name}}</view>
<view class="fill" style="height: 160rpx;" />
<view class="footer plr30 bfff shadow">
<!-- 未缴纳押金 -->
<template v-if="mode.code == 0">
<view class="btn black" @click="callPwd('depositsPay')">缴纳押金</view>
<template v-if="index === identityIndex">
<uni-icons type="circle-filled" color="#3d3d3d" />
</template>
<template v-else>
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">申请入驻</view>
</view>
<uni-icons type="circle" color="#D8D8D8" />
</template>
</view>
</view>
</template>
<!-- 待审核 -->
<template v-else-if="mode.code == 2">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">申请中</view>
<view class="value f30">
<text class="c333">提交成功请等待后台审核</text>
</view>
</view>
<view class="fill" style="height: 150rpx;"></view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel f1" @click="outDepositsPayAlt">取消申请并退回押金</view>
</view>
<view class="footer plr30 bfff">
<view class="btn lg black" @click="handleNext">下一步</view>
</view>
</template>
<!-- 审核驳回 -->
<template v-else-if="mode.code == 4">
<view class="app">
<view class="result ver">
<uni-icons type="clear" color="#ff0000" size="160rpx" />
<view class="title mtb30 f34">审核驳回</view>
<view class="value f30">
<text class="c666">驳回原因</text>
<text class="c333">{{mode.msg}}</text>
</view>
<view class="reject mtb30 c666 f28">
<view>驳回结果异议 可在个人中心-设置里面联系我们</view>
</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">修改信息</view>
</view>
</view>
</template>
<!-- 申请成功 -->
<template v-else-if="mode.code == 3">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">恭喜您您已成为商家</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金并放弃商家身份</view>
</view>
</view>
</template>
<!-- 表单申请 -->
<template v-else-if="mode.code == 'form'">
<view class="appbw plr30">
<!-- 头像 -->
<view class="avatarBox ver mt50">
<view class="avatar oh pr wh220 br20" @click="uploadImg('rectangleLogo',1)">
<image class="img br20" :src="form.rectangleLogo" mode="aspectFill" v-if="form.rectangleLogo" />
<view class="pfull fmid" v-else>
<uni-icons type="plusempty" color="#999" size="80rpx" />
</view>
</view>
<view class="name mt20 c666 f24">店铺头像</view>
</view>
<!-- 表单 -->
<view class="form mt60 c333 f32">
<view class="title f36">我的资料</view>
<view class="item rows ptb20">
<view class="key c666">店铺名称</view>
<view class="value f1 ml20 tar">
<input v-model="form.name" type="text" placeholder="请输入店铺名称" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">联系方式</view>
<view class="value f1 ml20 tar">
<input v-model="form.phone" type="number" placeholder="请输入联系方式" />
</view>
</view>
<view class="item rows ptb20" @click="$refs.regionSelectionRef.open()">
<view class="key c666">产品所在地</view>
<view class="value f1 ml20 tar">
<!-- 省市区选择 -->
<regionSelection ref="regionSelectionRef" :province="form.province" :city="form.city"
:area="form.district" @change="handleRegion" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">详细所在地</view>
<view class="value f1 ml20 tar">
<input v-model="form.addressDetail" type="text" placeholder="请选择产品所在地" />
</view>
</view>
<view class="item ptb20">
<picker :range="dictList" range-key="name" :vlaue="dictIndex" @change="handleDict">
<view class="rows">
<view class="key c666">产品类别</view>
<view class="value f1 ml20 tar">
<text class="placeholderStyle" v-if="dictIndex === ''">请选择产品类别</text>
<text v-else>{{dictList[dictIndex].name}}</text>
</view>
</view>
</picker>
</view>
<view class="item ptb20">
<view class="key c666">营业执照</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-for="(item, index) in form.qualificationPicture" :key="index">
<image class="img br10" :src="item" mode="aspectFill" />
<view class="close" @click="removeMedia(index,'qualificationPicture')">
<uni-icons type="clear" size="50rpx" color="#f00" />
</view>
</view>
<view class="upload imgs fmid wh200 br10" @click="uploadImg('qualificationPicture',2)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证正面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardFront" @click="uploadImg('idCardFront',1)">
<image class="img br10" :src="form.idCardFront" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardFront',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证反面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardBack" @click="uploadImg('idCardBack',1)">
<image class="img br10" :src="form.idCardBack" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardBack',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
</view>
<view class="fill" style="height: 150rpx;"></view>
</view>
<view class="footer plr30 bfff shadow">
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleSubmit">申请入驻</view>
</view>
</view>
</template>
<!-- 二级密码 -->
<payPwd ref="payPwdRef" :check="true" :price="config.DEPOSIT_ALLOCATION" @confirm="handlePayPwd" />
</view>
</template>
<style lang="scss">
@ -586,30 +95,11 @@
height: 100%;
}
//
.avatar {
background-color: #F6F8FE;
}
//
.upload {
background-color: #f4f4ff;
}
//
.result {
margin-top: 30rpx;
padding: 50rpx 0;
background-color: #fff;
}
//
.menu {
.line {
padding: 20rpx 10rpx;
&+.line {
border-top: 2rpx solid #eee;
.list {
.item {
.name {
width: 220rpx;
font-size: 34rpx;
}
}
}

View File

@ -2,11 +2,12 @@
/**
* 商城
*/
//
import {
ref,
reactive,
getCurrentInstance
getCurrentInstance,
computed,
nextTick
} from 'vue'
import {
onReachBottom,
@ -15,12 +16,16 @@
onLoad,
onReady,
} from '@dcloudio/uni-app';
//
import statusBar from '@/components/header/statusBar.vue'
//
import util from '@/common/js/util.js'
//
import api from '@/api/index.js'
//
import productList from '@/components/shop/productList/productList'
//
import shopIndex from '@/pages/shop/components/shopIndex.vue'
// 线
import offlineIndex from './components/offlineIndex.vue';
//
import footerMneu from '@/components/footerMenu/footerMenu'
@ -28,32 +33,40 @@
proxy
} = getCurrentInstance()
//
const cateList = reactive([{
id: '',
name: '推荐',
}])
const navList = reactive([{
key: 'shop',
name: '商城',
load: false,
domRef: 'shopIndexRef',
},
{
key: 'offline',
name: '线下店铺',
load: false,
domRef: 'offlineIndexRef',
}
])
//
const cateIndex = ref(0)
//
const keyword = ref('')
const navIndex = ref('')
//
const navCurrent = computed(() => navList[navIndex.value] || {})
onLoad(() => {
//
getCategory()
handleNavIndex(1)
})
onReady(() => {
proxy.$refs.product.getList()
// proxy.$refs.product.getList()
})
onReachBottom(() => {
//
proxy.$refs.product.getMoreList()
// proxy.$refs.product.getMoreList()
})
onPullDownRefresh(() => {
//
proxy.$refs.product.refreshList()
// proxy.$refs.product.refreshList()
})
onShow(() => {
@ -61,94 +74,45 @@
uni.$emit('changeMine', 'shop')
})
//
function getCategory() {
api.shop.getCategory({
query: {
categoryCode: '0'
},
}).then(rs => {
if (rs.code === 200) {
cateList.length = 1
cateList.push(...rs.data)
return
}
//
function handleNavIndex(index) {
if (navIndex.value === index) return
navIndex.value = index
navCurrent.value.load = true
util.alert({
content: rs.msg,
showCancel: false,
})
nextTick(() => {
if (navCurrent.value.domRef) proxy.$refs[navCurrent.value.domRef].init()
})
}
/**
* 切换分类下标
* @param {Object} index
*/
function handleCateIndex(index) {
if (cateIndex.value === index) return
cateIndex.value = index
//
proxy.$refs.product.listPrototype.categoryId = cateList[index].id
//
proxy.$refs.product.refreshList()
}
//
function handleSearch() {
//
proxy.$refs.product.listPrototype.searchValue = keyword.value
//
proxy.$refs.product.refreshList()
}
</script>
<template>
<view class="appbw">
<!-- 轮播图 -->
<swiper class="banner oh mtb30 mlr30 br20" autoplay="true" v-if="0">
<swiper-item v-for="(item, index) in 3" :key="index">
<view class="item">
<image class="poster"
src="https://img12.360buyimg.com/babel/jfs/t20271206/247554/11/28097/64155/675290e6F829316f2/0722626e5b28b005.jpg.avif"
mode="aspectFill" />
<view class="app">
<!-- 菜单首页 -->
<view class="navBox bfff">
<statusBar />
<view class="nav">
<view class="item fmid f1" :class="{'active': index === navIndex}" v-for="(item,index) in navList"
:key="index" @click="handleNavIndex(index)">
<view class="">{{item.name}}</view>
</view>
</swiper-item>
</swiper>
<!-- 公告 -->
<swiper class="notice mtb30 mlr30 c333 f28 br20" vertical="true" v-if="0">
<swiper-item class="item bsb rows plr20" v-for="(item, index) in 2" :key="index">
<image class="wh30" src="/static/notice.png" mode="aspectFit" />
<view class="f1 mlr20">九亿商城上线啦~</view>
<uni-icons type="right" />
</swiper-item>
</swiper>
<!-- 功能区 -->
<view class="fn rows mtb30 mlr30">
<!-- <uni-icons type="scan" class="mr20" size="48rpx" color="#FF7F37" /> -->
<view class="searchBox rows f1 ptb10 plr20 bar">
<input type="text" v-model="keyword" class="f1" placeholder="请输入关键字" @blur="handleSearch" />
<uni-icons type="search" size="30rpx" color="#999" />
</view>
</view>
<!-- 滚动条 -->
<view class="cate">
<scroll-view scroll-x="true" class="scroll f30">
<view class="item" v-for="(item,index) in cateList" :key="index"
:class="{'active': index === cateIndex}" @click="handleCateIndex(index)">
<view class="name ptb20 plr40">{{item.name}}</view>
<view class="line"></view>
</view>
</scroll-view>
</view>
<template v-if="navList[0].load">
<view v-show="navCurrent.key == 'shop'">
<!-- 商城首页 -->
<shopIndex ref="shopIndexRef" />
</view>
</template>
<!-- 商品卡片组 加载更多 -->
<view class="product oh ptb30 plr30">
<productList ref="product" />
</view>
<template v-if="navList[1].load">
<view v-show="navCurrent.key == 'offline'">
<!-- 商城首页 -->
<offlineIndex ref="offlineIndexRef" />
</view>
</template>
</view>
<!-- 底部导航 -->
@ -156,67 +120,22 @@
</template>
<style lang="scss" scoped>
//
.banner {
height: 300rpx;
box-shadow: 0 0 20rpx #00000066;
//
.nav {
display: flex;
//
.item {
height: 100%;
}
color: #3d3d3d;
font-size: 36rpx;
height: 100rpx;
transition: .3s;
.poster {
width: 100%;
height: 100%;
}
}
//
.notice {
height: 80rpx;
background-color: #f8f8f8;
}
//
.fn {
.searchBox {
background-color: #f3f3f3;
}
}
//
.cate {
.scroll {
white-space: nowrap;
.item {
display: inline-block;
color: #999;
transition: .3s;
.line {
width: 0;
margin: 0 auto;
border-bottom: 3rpx solid #FF7F37;
opacity: 0;
transition: .3s;
}
&.active {
color: #FF7F37;
font-weight: bold;
.line {
width: 100%;
opacity: 1;
}
}
//
&.active {
font-weight: bold;
color: #000;
}
}
}
//
.product {
background-color: #f8f8f8;
}
</style>

View File

@ -30,12 +30,12 @@
//
addListener()
})
onUnload(() => {
//
removeListener()
})
onReachBottom(() => {
//
getMoreList()
@ -77,7 +77,7 @@
function getList() {
//
api.shop.getProductionListByUserId({
data: {
query: {
pageSize: product.pageSize,
pageNum: product.pageNum,
}
@ -161,7 +161,10 @@
</view>
<view class="info df fdc jcsb f1 ml20">
<view class="name t2hd c333 f28">{{item.name}}</view>
<view class="rows">
<view class="name t2hd c333 f28">{{item.name}}</view>
<view class="giftLogo wsn b ml10" v-if="item.categoryCode == 'GIFT_PACK'">礼包专区</view>
</view>
<view class="count fs0 c999 f24">销量{{item.sales}}</view>
@ -191,4 +194,7 @@
<style lang="scss" scoped>
//
.giftLogo {
color: rgba(246, 160, 60);
}
</style>

View File

@ -1,192 +0,0 @@
<template>
<JyCommonHead isRight>
<template v-slot:right>
<view class="df img-group">
<image @click.stop="open('more')" class="more" :src="search" />
<image @click.stop="open('share')" class="share" :src="share" />
</view>
</template>
</JyCommonHead>
<uni-popup ref="share_more" type="bottom" borderRadius="20px 20px 0 0">
<view class="popup-content">
<view class="df fjc item">
<view class="df fdc aic" @click.stop="iconClick(item)" v-for="(item, index) in more_share_data"
:key="index">
<image :src="item.icon" />
<text class="title">{{ item.title }}</text>
</view>
</view>
<p class="cancel" @click="share_more.close()" :style="{ bottom: bottomSafeAreaHeight() }">取消</p>
</view>
</uni-popup>
</template>
<script setup>
import {
ref, inject
} from 'vue'
import back from '@/static/back1.png'
import share from '@/static/share2.png'
import search from '@/static/search.png'
import news from '@/static/news.png'
import home from '@/static/home.png'
import individual from '@/static/individual.png'
import order from '@/static/order.png'
import linkage from '@/static/linkage.png'
import download from '@/static/download.png'
import wx from '@/static/wx.png'
import qq from '@/static/qq.png'
import {
screenWidth,
bottomSafeAreaHeight,
statusBarHeight,
goBack
} from '@/components/public/Mixins.js'
import { shareToPlatform } from '@/components/public/share.js'
const share_more = ref(null)
const more_share_data = ref([])
const { checkLink, copyText } = inject('util');
//
const more_share = {
more: [{
name: 'news',
icon: news,
title: '信息'
},
{
name: 'home',
icon: home,
title: '回到首页'
},
{
name: 'individual',
icon: individual,
title: '个人中心'
},
{
name: 'order',
icon: order,
title: '我的订单'
}
],
share: [{
name: 'linkage',
icon: linkage,
title: '复制链接'
},
{
name: 'download',
icon: download,
title: '保存图片'
},
{
name: 'wx',
icon: wx,
title: '微信'
},
{
name: 'qq',
icon: qq,
title: 'QQ'
}],
news() {
checkLink('pages/news/question-answer/index')
},
home() {
checkLink('pages/index/index')
},
individual() {
checkLink('pages/mine/mine')
},
order() {
checkLink('pages/shop/order/index')
},
linkage() {
// url
copyText(location.href)
},
download() {
console.log('====================================');
console.log('download');
console.log('====================================');
},
wx() {
console.log('====================================');
console.log('wx');
console.log('====================================');
//
shareToPlatform('weixin', '这是一个测试标题', 'https://example.com/image.jpg', '这是分享的内容', '');
},
qq() {
console.log('====================================');
console.log('qq');
console.log('====================================');
// QQ
shareToPlatform('qq', '这是一个测试标题', 'https://example.com/image.jpg', '这是分享的内容', '');
}
}
const iconClick = (item) => {
console.log('====================================');
console.log(item);
console.log('====================================');
more_share[item.name]()
}
const open = (val) => {
more_share_data.value = more_share[val]
share_more.value.open()
}
</script>
<style lang="scss" scoped>
.img-group {
image {
margin: 0 20rpx;
width: 34rpx;
height: 34rpx;
}
}
.popup-content {
width: 100%;
height: 600rpx;
background: #F0F0F0; //
border-top-left-radius: 50rpx;
border-top-right-radius: 50rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.item {
position: absolute;
top: 60rpx;
margin: 0 10rpx;
z-index: 1;
}
image {
margin: 0 20rpx;
width: 100rpx;
height: 100rpx;
}
.title {
margin-top: 20rpx;
color: $uni-text-color-grey;
font-size: $uni-font-size-sm;
}
.cancel {
position: absolute;
bottom: 60rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 0 20rpx 20rpx 20rpx;
width: 700rpx;
height: 80rpx;
border-radius: 2314rpx;
background: $uni-bg-color;
}
}
</style>

View File

@ -2,33 +2,49 @@
//
import {
ref,
reactive
reactive,
computed,
getCurrentInstance,
} from 'vue'
import {
onLoad,
onPageScroll
onReady,
onPageScroll,
onPullDownRefresh,
onReachBottom,
} from '@dcloudio/uni-app';
import {
useStore
} from 'vuex'
//
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 expressVue from '@/components/shop/order/express.vue';
//
import util from '@/common/js/util';
//
import api from '@/api/index.js'
const {
proxy
} = getCurrentInstance()
//
const store = useStore()
// tabs
const tabs = reactive([{
id: '',
name: '全部'
},
{
id: 2,
id: 0,
name: '待付款'
},
{
id: 3,
id: 1,
name: '待发货'
},
{
@ -36,52 +52,339 @@
name: '待收货'
},
{
id: 6,
id: 7,
name: '售后/退款'
}
])
// tab
const tabIndex = ref(0)
//
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: ''
search: '',
status: '',
data: [],
pageSize: 10,
pageNum: 1,
total: 0,
})
//
const apexBgColor = ref('#ffffff00')
//
const orderDetail = reactive({})
// 退
const address = reactive({
realName: '',
userPhone: '',
userAddress: '',
})
//
const userinfo = computed(() => store.state.userinfo)
onLoad((options) => {
// this.params.currentTab = options.currentTab / 1
//
getList()
})
//
onReady(() => {
// proxy.$refs.addressRef.open()
})
onPageScroll((ev) => {
apexBgColor.value = ev.scrollTop > 44 ? '#fff' : '#ffffff00'
})
onPullDownRefresh(() => {
refreshList()
})
onReachBottom(() => {
getMoreList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.data.length >= list.total) return
list.pageNum++
getList()
}
//
function getList() {
api.shop.getShopOrderList({
query: {
merId: userinfo.value.merId,
searchStr: list.search,
status: list.status,
pageNum: list.pageNum,
pageSize: list.pageSize,
},
}).then(res => {
if (res.code == 200) {
if (list.pageNum == 1) list.data.length = 0
list.data.push(...res.rows.map(item => {
//
item.status = Number(item.status)
item.refundStatus = Number(item.refundStatus)
//
if (item.refundStatus != 0) {
item.status_text = {
'0': '待商家审核',
'1': '商家拒绝',
'2': '退款中',
'3': '已退款',
'4': '用户退货',
'5': '商家待收货',
'6': '已撤销',
} [item.afterSaleStatus]
} else {
item.status_text = {
'0': '待支付',
'1': '待发货',
'4': '待收货',
'5': '已收货',
'6': '已完成',
'9': '已取消',
} [item.status]
}
return item
}))
list.total = res.total
return
}
util.alert({
content: res.msg,
showCancel: false
})
}).finally(rs => {
uni.stopPullDownRefresh()
})
}
/**
* 点击订单列表项
* @param {Object} ev 订单列表项
*/
function handleItem(ev) {
console.log('handleItem', ev)
return
uni.navigateTo({
url: util.setUrl('/pages/shop/order/detail')
})
}
/**
* 点击tab
* @param {Object} ev
*/
function itemClick(ev) {
list.status = ev.id
//
refreshList()
}
/* 退
* @param {Object} item 订单详情
*/
function handleExpress(item) {
Object.assign(orderDetail, {}, item)
proxy.$refs.expressRef.open()
}
/**
* 填写退货物流信息
* @param {Object} param
*/
function handleExpressConfirm(param) {
//
api.shop.setShopDeliver({
data: {
//
orderNo: orderDetail.orderNo,
//
totalNum: orderDetail.totalNum,
//
expressName: param.expressName,
//
trackingNumber: param.trackingNumber,
//
deliveryMark: '',
// id
merId: orderDetail.merId,
// ID
orderId: orderDetail.id,
//
deliveryType: param.id,
// ID
uid: orderDetail.uid,
}
}).then(res => {
//
refreshList()
})
}
/**
* 快捷改价
* @param {Object} item 订单详情
*/
function handlePriceChange(item) {
item.price = item.totalPrice
Object.assign(orderDetail, {}, item)
proxy.$refs.changePriceRef.open()
}
//
function handlePriceChangeConfirm() {
//
api.shop.setShopOrderPrice({
query: {
// ID
id: orderDetail.id,
// ID
price: orderDetail.price,
}
}).then(res => {
if (res.code === 200) {
proxy.$refs.changePriceRef.close()
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 商家拒绝售后
* @param {Object} item 订单项
*/
function handleUnrefund(item) {
api.shop.setShopOrderUnrefund({
data: {
// id
id: item.refundOrder.id,
//
refundOrderNo: item.orderNo,
//
refundPrice: item.totalPrice,
},
}).then(res => {
if (res.code === 200) {
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 商家同意售后
* @param {Object} item 订单项
*/
function handleRefund(item) {
console.log('handleRefund', item)
Object.assign(orderDetail, {}, item)
// 1-退2-退退
if (item.refundOrder.afterSalesType == 1) handleOrderRefund()
else if (item.refundOrder.afterSalesType == 2) proxy.$refs.addressRef.open()
}
//
function handleAddressConfirm() {
console.log('address', address)
//
if (!address.realName) {
util.alert('收货人姓名不能为空')
return
}
if (!address.userPhone) {
util.alert('收货人电话不能为空')
return
}
if (!address.userAddress) {
util.alert('收货地址不能为空')
return
}
//
handleOrderRefund()
}
//
function handleOrderRefund() {
//
api.shop.setShopOrderRefund({
data: {
// id
id: orderDetail.refundOrder.id,
//
refundOrderNo: orderDetail.orderNo,
//
refundPrice: orderDetail.totalPrice,
...address,
},
}).then(res => {
if (res.code === 200) {
proxy.$refs.addressRef.close()
address.realName = ''
address.userAddress = ''
address.userPhone = ''
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
/**
* 预览图片
* @param {Array} urls
* @param {Number} current
*/
function viewImage(urls, current) {
uni.previewImage({
urls,
current,
})
}
/**
* 商家确认收货
* @param {Object} item 订单项
*/
function handleRefundOrder(item) {
api.shop.setShopRefundOrder({
// id
path: [item.refundOrder.id],
}).then(res => {
if (res.code === 200) {
//
refreshList()
return
}
util.alert({
content: res.msg,
showCancel: false
})
})
}
</script>
<template>
@ -97,9 +400,9 @@
<view class="app">
<view class="shopHeaderBg bgColor"></view>
<!-- tab选项卡 -->
<view class="f1 pr">
<JyShopNavigation :current="params.currentTab" :list="tabs" @tabItemClick="itemClick" marright="25px"
activeWeight='600' activeColor="#333333" activeBarColor="initial" />
<JyShopNavigation v-model="tabIndex" :list="tabs" @tabItemClick="itemClick" />
</view>
<view class="product mlr20 pr">
@ -107,56 +410,130 @@
<view class="order">
<template v-for="(item,index) in list.data" :key="index">
<view class="mtb30">
<orderItem :item="item" mode="mine" @item="handleItem">
<orderItem :item="item" mode="shop" @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>
<!-- 售后流程 -->
<template v-if="scope.item.refundStatus == 1 ">
<!-- 退款原因 -->
<view class="menu rows ptb20">
<view class="key fs0 c333">退款原因</view>
<view class="value f1 ml20">
<view class="c333 f28">{{item.refundOrder.refundReasonWap}}</view>
<view class="c333 f28">{{item.refundOrder.refundReasonContent}}</view>
<view class="imgList mt10 c666 f24">
<template
v-for="(secItem,secIndex) in item.refundOrder.refundReasonWapImg.split(',')"
:key="secIndex">
<image class="imgs wh80 br10" :src="secItem" mode="aspectFill"
@click.stop="viewImage(item.refundOrder.refundReasonWapImg.split(','),secIndex)" />
</template>
</view>
</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 class="menu ptb20 df jcr" v-if="scope.item.afterSaleStatus == 0">
<view class="btn bar closeHollow plr30"
@click.stop="handleUnrefund(scope.item)">拒绝退款</view>
<view class="btn bar closeHollow plr30" @click.stop="handleRefund(scope.item)">
同意退款</view>
<!-- <view class="btn bar warmHollow plr30">联系用户</view> -->
</view>
<!-- 待商家确认收货 -->
<view class="menu ptb20 df jcr" v-if="scope.item.afterSaleStatus == 5">
<view class="btn bar warmHollow plr30"
@click.stop="handleRefundOrder(scope.item)">
确认收货</view>
</view>
</template>
<template v-else>
<!-- 收货地址 -->
<view class="menu rows ptb20" v-if="[1,2,3,4,5,6].includes(scope.item.status)">
<view class="key fs0 c333">收货地址</view>
<view class="value f1 ml20">
<view class="c333 f28">
{{scope.item.address.province}}{{scope.item.address.city}}{{scope.item.address.country}}{{scope.item.address.detail}}
</view>
<view class="mt10 c666 f24">
<text>{{scope.item.address.name}}</text>
<text>{{scope.item.address.mobile}}</text>
</view>
</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>
<!-- 操作按钮 -->
<view class="menu ptb20 df jcr" v-if="[0,1,6].includes(scope.item.status)">
<template v-if="scope.item.status == 0">
<view class="btn bar warmHollow plr30"
@click="handlePriceChange(scope.item)">
修改价格</view>
</template>
<template v-if="scope.item.status == 1">
<view class="btn bar warmHollow plr30"
@click.stop="handleExpress(scope.item)">
发货</view>
</template>
</view>
</template>
</template>
</orderItem>
</view>
</template>
</view>
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
</view>
<!-- 填充 -->
<view class="fill" style="height: 30rpx;"></view>
<!-- 物流弹窗 -->
<expressVue ref="expressRef" @confirm="handleExpressConfirm" />
<!-- 快捷改价 -->
<uni-popup ref="changePriceRef" type="center">
<view class="changePrice popMid bfff">
<view class="header rows ptb20 plr20">
<view>输入修改金额</view>
<uni-icons type="closeempty" @click="$refs.changePriceRef.close()" />
</view>
<view class="form oh mtb30 plr30 c333 f30">
<view class="line df aic">
<view class="mr20">输入金额</view>
<input type="text" v-model="orderDetail.price" placeholder="输入修改价格"
placeholder-class="placeholderStyle" />
</view>
</view>
<view class="btn warm mtb30 mlr30" @click="handlePriceChangeConfirm">确定金额</view>
</view>
</uni-popup>
<!-- 同意退款 -->
<uni-popup ref="addressRef" type="center">
<view class="addressAlt popMid bfff">
<view class="header rows ptb20 plr20">
<view>填写退货地址信息</view>
<uni-icons type="closeempty" @click="$refs.addressRef.close()" />
</view>
<view class="form oh plr30 c333 f30">
<view class="line mtb20">
<input type="text" v-model="address.realName" placeholder="收货人姓名"
placeholder-class="placeholderStyle" />
</view>
<view class="line mtb20">
<input type="text" v-model="address.userPhone" placeholder="收货人电话"
placeholder-class="placeholderStyle" />
</view>
<view class="line mtb20">
<input type="text" v-model="address.userAddress" placeholder="收货人详细地址"
placeholder-class="placeholderStyle" />
</view>
</view>
<view class="btn warm mtb30 mlr30" @click="handleAddressConfirm">确认</view>
</view>
</uni-popup>
</view>
</template>

View File

@ -0,0 +1,616 @@
<script setup>
/**
* 商家入驻
* 进入页面获取最新的数据 如果发生变化 同步用户信息
* 1 待申请 显示入驻须知 是否缴纳押金
* 2 已申请/待审核 已缴纳押金并且提交表单
* 3 审核驳回 可选择取消押金 修改表单内容继续提交审核
* 4 审核成功 已成为商家 可选择取消商家身份 拿回押金 修改店铺信息重新提交审核
*/
import {
ref,
reactive,
computed,
getCurrentInstance,
} from 'vue';
import {
onLoad,
onReady,
} from '@dcloudio/uni-app';
// vuex
import {
useStore
} from 'vuex'
//
import api from '@/api/index.js';
//
import util from '@/common/js/util.js'
//
import regionSelection from '@/components/public/regionSelection/regionSelection.vue';
//
import payPwd from '@/components/mine/payPwd.vue'
//
const store = useStore()
const {
proxy
} = getCurrentInstance();
//
const form = reactive({
rectangleLogo: '',
qualificationPicture: [],
idCardFront: '',
idCardBack: '',
})
// code 01234 form
const mode = reactive({
code: 0,
})
//
const content = ref({})
//
const dictList = reactive([])
//
const dictIndex = ref('')
//
const pwdCb = ref('')
//
const userinfo = computed(() => store.state.userinfo)
//
const config = computed(() => store.state.config)
onLoad(() => {
//
getShopStatus()
})
onReady(() => {
//
// callPwd('depositsPay')
})
//
function getForm() {
Promise.all([getDetail(), getDict()]).then(rs => {
//
const detail = rs[0]
//
const dict = rs[1]
if (!detail) return
form.id = detail.id
form.rectangleLogo = detail.rectangleLogo
form.qualificationPicture = detail.qualificationPicture.split(',')
form.idCardFront = detail.idCardFront
form.idCardBack = detail.idCardBack
form.name = detail.name
form.phone = detail.phone
form.addressDetail = detail.addressDetail
form.categoryId = detail.categoryId
form.province = detail.province
form.city = detail.city
form.district = detail.district
//
dictIndex.value = dict.findIndex(item => item.id == detail.categoryId)
})
}
//
function getDetail() {
return new Promise((resolve, reject) => {
api.shop.getStoreDetail().then(rs => {
if (rs.code == 200) {
resolve(rs.data)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
// code
function handleModeCode(code) {
//
mode.code = code
switch (code) {
case 0:
//
getarticle()
break;
case 1:
//
getarticle()
break;
case 'form':
//
getForm()
break;
}
}
//
function getDict() {
return new Promise((resolve, reject) => {
api.shop.categoryAll({}).then(rs => {
if (rs.code == 200) {
resolve(rs.data)
dictList.length = 0
dictList.push(...rs.data)
resolve()
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
})
}
//
function getShopStatus() {
api.shop.getShopStatus().then(rs => {
if (rs.code == 200) {
Object.assign(mode, rs.data)
handleModeCode(mode.code)
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function depositsPay() {
api.shop.depositsPay().then(rs => {
if (rs.code == 200) {
//
mode.code = 1
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
//
function getarticle() {
api.getArticle({
query: {
agreementId: 4,
},
}).then(rs => {
if (rs.code == 200) {
content.value = rs.data
return
}
util.alert({
showCancel: false,
content: rs.msg,
})
})
}
/**
* 上传图片
* @param {String} key 键值
* @param {String} type 类型 1 2
*/
function uploadImg(key, type) {
util.upload_image({
value: form[key],
success: rs => {
switch (type) {
case 1:
form[key] = rs.value
break
case 2:
form[key].push(rs.value)
break
}
},
})
}
/**
* 移除文件
* @param {Number} index 下标
* @param {String} key
*/
function removeMedia(index, key) {
util.alert({
content: '确认删除?',
}).then(rs => {
if (rs.confirm) form[key].splice(index, 1)
})
}
/**
* 选择省市区
* @param {Object} ev
*/
function handleRegion(ev) {
console.log('handleRegion', ev)
form.province = ev.province.regionName
form.city = ev.city.regionName
form.district = ev.area.regionName
}
/**
* 切换产品分类
* @param {Object} ev 默认事件
*/
function handleDict(ev) {
if (!ev || typeof ev.detail.value === 'undefined') {
console.error('Invalid event object or missing value');
return
}
const index = ev.detail.value;
if (index === dictIndex.value) return;
if (index >= 0 && index < dictList.length) {
dictIndex.value = index;
form.categoryId = dictList[index].id;
} else {
console.error('Invalid index:', index);
}
}
//
function handleSubmit() {
const data = {
...form
}
console.log('data', data)
//
if (!data.rectangleLogo) {
util.alert('商家头像不能为空')
return
}
if (!data.name) {
util.alert('商家名称不能为空')
return
}
if (!data.phone) {
util.alert('联系方式不能为空')
return
}
if (!data.province) {
util.alert('产品所在地不能为空')
return
}
if (!data.categoryId) {
util.alert('产品类别不能为空')
return
}
if (!data.qualificationPicture[0]) {
util.alert('营业执照不能为空')
return
}
if (!data.idCardFront) {
util.alert('身份证正面不能为空')
return
}
if (!data.idCardBack) {
util.alert('身份证反面不能为空')
return
}
//
data.qualificationPicture = data.qualificationPicture.join(',')
api.shop.application({
data: data,
}).then(rs => {
if (rs.code === 200) {
util.alert({
content: '资料已申请,请等待后台审核',
showCancel: false,
}).then(rs => {
uni.navigateBack()
})
} else {
util.alert({
content: rs.msg,
showCancel: false,
})
}
})
}
// 退
function outDepositsPayAlt() {
util.alert({
content: '确认缴纳押金并放弃商家身份?',
}).then(rs => {
if (!rs.confirm) return
//
callPwd('outDepositsPay')
})
}
// 退
function outDepositsPay() {
// 退
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) {
util.isAuth({
success: () => {
pwdCb.value = {
//
'depositsPay': depositsPay,
// 退
'outDepositsPay': outDepositsPay,
} [key]
console.log('pwdCb', pwdCb.value)
//
proxy.$refs.payPwdRef.open()
}
})
}
//
function handlePayPwd() {
//
pwdCb.value()
}
</script>
<template>
<!-- 须知 -->
<template v-if="[0,1].includes(mode.code)">
<view class="app">
<view class="notice oh mtb30 mlr30 plr30 ptb20 bfff br20">
<view class="title tac f34 c333 b">商家入驻须知</view>
<view class="content mtb50">
<rich-text :nodes="content.content"></rich-text>
</view>
</view>
<view class="tac c666 f28">继续即代表同意商家入驻须知</view>
<view class="fill" style="height: 160rpx;" />
<view class="footer plr30 bfff shadow">
<!-- 未缴纳押金 -->
<template v-if="mode.code == 0">
<view class="btn black" @click="callPwd('depositsPay')">缴纳押金</view>
</template>
<template v-else>
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">申请入驻</view>
</view>
</template>
</view>
</view>
</template>
<!-- 待审核 -->
<template v-else-if="mode.code == 2">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">申请中</view>
<view class="value f30">
<text class="c333">提交成功请等待后台审核</text>
</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel f1" @click="outDepositsPayAlt">取消申请并退回押金</view>
</view>
</view>
</template>
<!-- 审核驳回 -->
<template v-else-if="mode.code == 4">
<view class="app">
<view class="result ver">
<uni-icons type="clear" color="#ff0000" size="160rpx" />
<view class="title mtb30 f34">审核驳回</view>
<view class="value f30">
<text class="c666">驳回原因</text>
<text class="c333">{{mode.msg}}</text>
</view>
<view class="reject mtb30 c666 f28">
<view>驳回结果异议 可在个人中心-设置里面联系我们</view>
</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer rows plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleModeCode('form')">修改信息</view>
</view>
</view>
</template>
<!-- 申请成功 -->
<template v-else-if="mode.code == 3">
<view class="app">
<view class="result ver">
<uni-icons type="checkbox-filled" color="#20D200" size="160rpx" />
<view class="title mtb30 f34">恭喜您您已成为商家</view>
</view>
<view class="fill" style="height: 160rpx;"></view>
<view class="footer plr30 bfff shadow">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金并放弃商家身份</view>
</view>
</view>
</template>
<!-- 表单申请 -->
<template v-else-if="mode.code == 'form'">
<view class="appbw plr30">
<!-- 头像 -->
<view class="avatarBox ver mt50">
<view class="avatar oh pr wh220 br20" @click="uploadImg('rectangleLogo',1)">
<image class="img br20" :src="form.rectangleLogo" mode="aspectFill" v-if="form.rectangleLogo" />
<view class="pfull fmid" v-else>
<uni-icons type="plusempty" color="#999" size="80rpx" />
</view>
</view>
<view class="name mt20 c666 f24">店铺头像</view>
</view>
<!-- 表单 -->
<view class="form mt60 c333 f32">
<view class="title f36">我的资料</view>
<view class="item rows ptb20">
<view class="key c666">店铺名称</view>
<view class="value f1 ml20 tar">
<input v-model="form.name" type="text" placeholder="请输入店铺名称" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">联系方式</view>
<view class="value f1 ml20 tar">
<input v-model="form.phone" type="number" placeholder="请输入联系方式" />
</view>
</view>
<view class="item rows ptb20" @click="$refs.regionSelectionRef.open()">
<view class="key c666">产品所在地</view>
<view class="value f1 ml20 tar">
<!-- 省市区选择 -->
<regionSelection ref="regionSelectionRef" :province="form.province" :city="form.city"
:area="form.district" @change="handleRegion" />
</view>
</view>
<view class="item rows ptb20">
<view class="key c666">详细所在地</view>
<view class="value f1 ml20 tar">
<input v-model="form.addressDetail" type="text" placeholder="请选择产品所在地" />
</view>
</view>
<view class="item ptb20">
<picker :range="dictList" range-key="name" :vlaue="dictIndex" @change="handleDict">
<view class="rows">
<view class="key c666">产品类别</view>
<view class="value f1 ml20 tar">
<text class="placeholderStyle" v-if="dictIndex === ''">请选择产品类别</text>
<text v-else>{{dictList[dictIndex].name}}</text>
</view>
</view>
</picker>
</view>
<view class="item ptb20">
<view class="key c666">营业执照</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-for="(item, index) in form.qualificationPicture" :key="index">
<image class="img br10" :src="item" mode="aspectFill" />
<view class="close" @click="removeMedia(index,'qualificationPicture')">
<uni-icons type="clear" size="50rpx" color="#f00" />
</view>
</view>
<view class="upload imgs fmid wh200 br10" @click="uploadImg('qualificationPicture',2)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证正面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardFront" @click="uploadImg('idCardFront',1)">
<image class="img br10" :src="form.idCardFront" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardFront',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
<view class="item ptb20">
<view class="key c666">身份证反面</view>
<view class="value imgList f1 mt20 tar">
<view class="imgs wh200" v-if="form.idCardBack" @click="uploadImg('idCardBack',1)">
<image class="img br10" :src="form.idCardBack" mode="aspectFill" />
</view>
<view class="upload imgs fmid wh200 br10" v-else @click="uploadImg('idCardBack',1)">
<uni-icons type="plusempty" color="#E8E8E8" size="80rpx" />
</view>
</view>
</view>
</view>
<view class="fill" style="height: 150rpx;"></view>
</view>
<view class="footer plr30 bfff shadow">
<view class="rows">
<view class="btn cancel plr30" @click="outDepositsPayAlt">退回押金</view>
<view class="btn colourful f1" @click="handleSubmit">申请入驻</view>
</view>
</view>
</template>
<!-- 二级密码 -->
<payPwd ref="payPwdRef" :check="true" :price="config.DEPOSIT_ALLOCATION" @confirm="handlePayPwd" />
</template>
<style lang="scss">
.img {
width: 100%;
height: 100%;
}
//
.avatar {
background-color: #F6F8FE;
}
//
.upload {
background-color: #f4f4ff;
}
//
.result {
margin-top: 30rpx;
padding: 50rpx 0;
background-color: #fff;
}
//
.menu {
.line {
padding: 20rpx 10rpx;
&+.line {
border-top: 2rpx solid #eee;
}
}
}
</style>

View File

@ -145,8 +145,16 @@ https://cloud.tencent.com/document/product/269/64506
17625025837@139.com
jy3456789@A
http://1.94.221.165:3000/JY_document/jiuyi-documents/src/branch/main/%E4%B9%9D%E4%BA%BFPRD&%E4%BB%BB%E5%8A%A1%E5%88%86%E8%A7%A3.md
高德地图开放平台
https://lbs.amap.com/
账号
17625025837@163.com
密码
jy3456789
http://1.94.221.165:3000/JY_document/jiuyi-documents/src/branch/main/%E4%B9%9D%E4%BA%BFPRD&%E4%BB%BB%E5%8A%A1%E5%88%86%E8%A7%A3.md
http://1.94.221.165:3000/JY_document/jiuyi-documents/src/branch/main/%E4%B9%9D%E4%BA%BF%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86PRD&%E4%BB%BB%E5%8A%A1%E5%88%86%E8%A7%A3.md
后台任务拆解
任务拆解账号
@ -176,9 +184,7 @@ register
9 挂买榴莲果
10 用户互转
区分商家认证
isShop
1
---
我的交易
@ -233,14 +239,6 @@ call_type 通话类型 2为视频1是音频
我的团队
点击上级上上级昵称 跳转个人视频主页(关注后可发私信)
充值
支付宝
微信
第三方
购买卷轴 支付方式开关
余额
积分
榴莲果交易市场 针对所有人 开关
积分
@ -263,18 +261,6 @@ call_type 通话类型 2为视频1是音频
跟平台聊
可以选择所有的订单聊天
商城
首页
banner
公告
扫一扫 搜索
商品分类
推荐商品 的 商品列表
商品详情
商品图
价格 商品修改记录
商品名称
销量 分享到消息内的好友
投流推广
推流收藏夹视频 商家视频显示出让佣金
@ -353,9 +339,5 @@ call_type 通话类型 2为视频1是音频
3. 钱包明细
子账号不能登录app 并且区分身份标识

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

BIN
jiuyi2/static/dislike.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
jiuyi2/static/store1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
jiuyi2/static/store2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

View File

@ -28,7 +28,7 @@ export default createStore({
config: {
"DAY_POINTS_RELEASE": 0.3, //每日积分释放
"TASK_READING_SECOND": 300, //任务读秒
"EFFECTIVE_SECONDS": 300, //有效读秒
"EFFECTIVE_SECONDS": 300, //活跃读秒
"EFFECTIVE_VIDEO_TIME": 20, //有效视频时间
"UNLOCK_FLOW_STATISTICS": 30, //解锁流量统计
},
@ -41,6 +41,8 @@ export default createStore({
"updateContent": "",
"isForce": 0
},
// 未读消息条数
unreadCount: 0,
},
mutations: {
@ -62,6 +64,10 @@ export default createStore({
setTabbarMode(state, mode) {
state.tabbarMode = mode
},
// 设置未读消息
setUnreadCount(state, result) {
state.unreadCount = +result > 99 ? '99+' : result
},
},
getters: {

View File

@ -3,7 +3,9 @@ import {
} from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080'
// let target = 'http://91f.xyz:8080'
let target = 'https://3dea4c80.r9.cpolar.top'
// let target = 'http://192.168.31.61:8080'
export default defineConfig({
plugins: [uni()],