Compare commits
5 Commits
684f621e4b
...
c1e32ecc20
Author | SHA1 | Date |
---|---|---|
|
c1e32ecc20 | |
|
0afeee6877 | |
|
12437feec2 | |
|
2e76dd427e | |
|
4f178171c2 |
|
@ -0,0 +1,4 @@
|
|||
/jiuyi2/unpackage
|
||||
/jiuyi/unpackage
|
||||
/jiuyi2/.hbuilderx
|
||||
/jiuyi/.hbuilderx
|
|
@ -217,6 +217,17 @@ export const news = {
|
|||
method: 'GET'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 客服发消息
|
||||
sendCusomterService(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/sendMsgToPlatformService`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default news
|
|
@ -437,6 +437,18 @@ const shop = {
|
|||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取店铺客服信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCustomerService(param) {
|
||||
return util.request({
|
||||
url: `/user/MCustomerService/random`,
|
||||
method: 'GET',
|
||||
query: param,
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default shop
|
|
@ -7,7 +7,7 @@ const config = {
|
|||
// #endif
|
||||
// #ifndef H5
|
||||
// host: 'http://91f.xyz:8080',
|
||||
host: 'https://1a4b9ed1.r24.cpolar.top/',
|
||||
host: 'https://b433d23.r24.cpolar.top/',
|
||||
// #endif
|
||||
// 支付方式配置
|
||||
payType: {
|
||||
|
|
|
@ -134,7 +134,7 @@ const util = {
|
|||
reject(res)
|
||||
},
|
||||
complete(rs) {
|
||||
console.log('upload complete',rs)
|
||||
console.log('upload complete', rs)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -69,9 +69,10 @@
|
|||
default: 0,
|
||||
},
|
||||
})
|
||||
|
||||
//
|
||||
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
|
||||
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap', 'dataCenter'
|
||||
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap', 'dataCenter', 'showProduct', 'proBuy'
|
||||
])
|
||||
|
||||
// 视频上下文对象
|
||||
|
@ -458,11 +459,21 @@
|
|||
videoCtx.value.playbackRate(2)
|
||||
}
|
||||
|
||||
//
|
||||
// 前往数据中心
|
||||
function handleData() {
|
||||
emit('dataCenter', props.item)
|
||||
}
|
||||
|
||||
// 点击商品广告
|
||||
function handleShowProduct() {
|
||||
emit('showProduct', props.item)
|
||||
}
|
||||
|
||||
// 点击商品广告购买
|
||||
function handleProBuy() {
|
||||
emit('proBuy', props.item)
|
||||
}
|
||||
|
||||
//
|
||||
defineExpose({
|
||||
play,
|
||||
|
@ -620,19 +631,24 @@
|
|||
<!-- 底部用户信息 -->
|
||||
<view class="panelBottom pa l0 r0 b0 pl40 pb30">
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods df fdr mb20 br10" :class="{'active': showAd}" v-if="showAd">
|
||||
<view class="goods df fdr mb20 br10" :class="{'active': showAd}" v-if="showAd"
|
||||
@click.stop="handleShowProduct">
|
||||
<!-- 商品图片 -->
|
||||
<image class="image wh100 mr15 br10" :src="item.productImage" mode="aspectFill" />
|
||||
|
||||
<view class="df fdc jcsb f1">
|
||||
<view class="name">
|
||||
<text class="text cfff f28">{{item.productName}}</text>
|
||||
<text class="text c333 f30">{{item.productName}}</text>
|
||||
</view>
|
||||
<view class="info df fdr aic mr10">
|
||||
<text class="price mr10 cfff f28 b">¥{{item.productPrice}}</text>
|
||||
<text class="cfff f1 f20">已售{{item.sales}}单</text>
|
||||
<text class="price mr10 c333 f28 b">¥{{item.productPrice}}</text>
|
||||
<text class="c666 f1 f20">已售{{item.sales}}单</text>
|
||||
<!-- <uni-icons type="close" color="#fff" /> -->
|
||||
</view>
|
||||
|
||||
<view class="btn sm warm">
|
||||
<text class="cfff f24 tac" @click.stop="handleProBuy">立即购买</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -743,20 +759,20 @@
|
|||
|
||||
// 底部
|
||||
.panelBottom {
|
||||
padding-right: 150rpx;
|
||||
padding-right: 100rpx;
|
||||
|
||||
// 图片
|
||||
.image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
// 产品
|
||||
.goods {
|
||||
padding: 10rpx;
|
||||
width: 480rpx;
|
||||
width: 550rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
transition-duration: .5s;
|
||||
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
defineExpose,
|
||||
computed,
|
||||
onBeforeUnmount,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
} from 'vue';
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
// api
|
||||
import api from '@/api/index.js'
|
||||
// 产品详情
|
||||
import proDetail from '@/components/shop/detail/detail'
|
||||
//底部
|
||||
import footerMenu from '@/components/shop/detail/footerMenu';
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
|
||||
const props = defineProps({
|
||||
//
|
||||
})
|
||||
//
|
||||
const emit = defineEmits(['buy'])
|
||||
// 商品id
|
||||
const proId = ref('42')
|
||||
// 详情
|
||||
const detail = reactive({})
|
||||
// 用户信息
|
||||
const userinfo = computed(() => uni.$store.state.userinfo || {})
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
* @param {Object} productId 产品id
|
||||
*/
|
||||
function init(productId) {
|
||||
if (productId) proId.value = productId
|
||||
|
||||
// 打开
|
||||
open()
|
||||
// 获取详情
|
||||
getDetail()
|
||||
// 添加商品浏览记录
|
||||
addBrowsing()
|
||||
}
|
||||
|
||||
// 获取详情
|
||||
function getDetail() {
|
||||
api.shop.productDetail({
|
||||
query: {
|
||||
userId: userinfo.value.id,
|
||||
// 产品id
|
||||
productionId: proId.value
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
Object.assign(detail, {}, rs.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 添加商品浏览记录
|
||||
function addBrowsing() {
|
||||
// 验证登录
|
||||
util.isLogin(() => {
|
||||
// 添加浏览记录
|
||||
api.shop.addBrowsing({
|
||||
data: {
|
||||
userId: userinfo.value.id,
|
||||
goodsId: proId.value
|
||||
},
|
||||
}).then(rs => {
|
||||
if (rs.code != 200) console.log('addbrows err', rs.msg)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 购买
|
||||
function handleBuy() {
|
||||
emit('buy', detail)
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param {Object} ev 修改的详情
|
||||
*/
|
||||
function handleDetail(ev) {
|
||||
Object.assign(detail, {}, ev)
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
function open() {
|
||||
proxy.$refs.detailAlt.open()
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
function close() {
|
||||
proxy.$refs.detailAlt.close()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
open,
|
||||
close,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<uni-popup ref="detailAlt" type="bottom">
|
||||
<view class="container popBot">
|
||||
<view class="header">
|
||||
<image @click="close" class="back wh55" src="/static/back.png" />
|
||||
</view>
|
||||
|
||||
<scroll-view class="scroll" :scroll-y="true">
|
||||
<view class="main">
|
||||
<!-- 获取详情 -->
|
||||
<proDetail :id="proId" :detail="detail" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部 -->
|
||||
<view class="footerMenu pt30">
|
||||
<view class="content ptb30 plr20 bfff">
|
||||
<footerMenu :detail="detail" @update="handleDetail" @buy="handleBuy" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
// 详情
|
||||
.container {
|
||||
position: relative;
|
||||
height: 1300rpx;
|
||||
background-color: #f8f8f8;
|
||||
|
||||
// 头
|
||||
.header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// 阴影盒子底部
|
||||
.footerMenu {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
//
|
||||
.content {
|
||||
box-shadow: 0 0rpx 10rpx rgba(102, 102, 102, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -59,7 +59,7 @@
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<view class="address df aic jcc">
|
||||
<view class="address df fdr aic jcc">
|
||||
<!-- 图标 -->
|
||||
<view class="icon mr20">
|
||||
<image class="wh45" src="/static/address.png" mode="aspectFill" />
|
||||
|
@ -68,8 +68,8 @@
|
|||
<!-- 收获地址 姓名电话 -->
|
||||
<view class="info f1">
|
||||
<!-- 收获地址 -->
|
||||
<view class="location f30">
|
||||
<text class="c333">{{address.province}}{{address.city}}{{address.country}}{{address.detail}}</text>
|
||||
<view class="location">
|
||||
<text class="c333 f30">{{address.province}}{{address.city}}{{address.country}}{{address.detail}}</text>
|
||||
</view>
|
||||
<!-- 姓名电话 -->
|
||||
<view class="name">
|
||||
|
@ -78,12 +78,21 @@
|
|||
</view>
|
||||
|
||||
<!-- 选择地址 -->
|
||||
<view v-if="shopEdit" class="btn ti warmHollow plr20 ml20" @click="link('/pages/mine/address/index?select=1')">
|
||||
<text class="cFF9B27">选择地址</text>
|
||||
<view v-if="shopEdit" class="button btn ti plr20 ml20"
|
||||
@click="link('/pages/mine/address/index?select=1')">
|
||||
<text class="text">选择地址</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
.button {
|
||||
border: 2rpx solid #FF9B27;
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
color: #FF9B27;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -2,11 +2,484 @@
|
|||
/**
|
||||
* 商品详情
|
||||
*/
|
||||
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
nextTick,
|
||||
getCurrentInstance,
|
||||
computed,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
defineProps,
|
||||
} from 'vue'
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
// 接口地址
|
||||
import api from '@/api/index.js'
|
||||
//
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 传参
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: [Number, String],
|
||||
default: ''
|
||||
},
|
||||
detail: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
})
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
// 在这里设置swiper高度补足多端差异
|
||||
const bannerHeight = ref('800rpx')
|
||||
// 轮播图详情
|
||||
const bannerIndex = ref(0)
|
||||
// 商品评论
|
||||
const comment = reactive({
|
||||
list: [],
|
||||
total: 0,
|
||||
})
|
||||
// 最近购买订单列表
|
||||
const recentOrderList = ref([])
|
||||
//
|
||||
const menuFn = {
|
||||
// 店铺
|
||||
store() {
|
||||
link('/pages/shop/store/index')
|
||||
},
|
||||
// 客服
|
||||
customerService() {
|
||||
link('/pages/news/question-answer/index')
|
||||
},
|
||||
// 收藏
|
||||
heibianStar() {
|
||||
//
|
||||
}
|
||||
}
|
||||
// 已选择的规格下标
|
||||
const spaceIndex = ref(0)
|
||||
// 数量
|
||||
const payNum = ref(1)
|
||||
// 当前选择的规格
|
||||
const currentSpec = computed(() => {
|
||||
let spec = props.detail.specs || []
|
||||
return spec[spaceIndex.value] || {}
|
||||
})
|
||||
// 应付总价
|
||||
const total = computed(() => {
|
||||
let price = parseFloat(props.detail.price) * 100
|
||||
let result = parseInt(price * payNum.value) / 100
|
||||
return result
|
||||
})
|
||||
// 详情
|
||||
const banner = computed(() => {
|
||||
let result = []
|
||||
if (props.detail.sliderImage) result = props.detail.sliderImage.split(',')
|
||||
return result
|
||||
})
|
||||
// 当前登录的用户信息
|
||||
const userinfo = computed(() => {
|
||||
return uni.$store.state.userinfo
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 获取商品评论
|
||||
getProComment()
|
||||
// 获取最近购买
|
||||
getRecentOrder()
|
||||
})
|
||||
|
||||
|
||||
// 获取最近购买
|
||||
function getRecentOrder() {
|
||||
api.shop.recentOrder({
|
||||
query: {
|
||||
// 产品id
|
||||
productId: props.id,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 结果
|
||||
const result = rs.data
|
||||
let list = []
|
||||
//
|
||||
for (let i = 0; i < result.length / 2; i++) {
|
||||
if (!result[i * 2 + 1]) break
|
||||
list.push([result[i * 2], result[i * 2 + 1]])
|
||||
}
|
||||
recentOrderList.value = list
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品评论
|
||||
function getProComment() {
|
||||
api.shop.getProComment({
|
||||
query: {
|
||||
// 产品id
|
||||
productId: props.id,
|
||||
pageNum: 1,
|
||||
pageSize: 2,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
comment.list = rs.rows
|
||||
comment.total = rs.total
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转路径
|
||||
* @param {Object} url
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
// 收藏店铺
|
||||
function handleCollectStore() {
|
||||
api.shop.followShop({
|
||||
data: {
|
||||
shopId: props.detail.merId,
|
||||
status: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [props.detail.isFollow]
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 关注状态
|
||||
props.detail.isFollow = {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [props.detail.isFollow]
|
||||
// 关注数量
|
||||
props.detail.merFollowNumber = rs.data
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取店铺信息
|
||||
function getShop() {
|
||||
api.shop.shopDetail({
|
||||
query: {
|
||||
shopId: props.detail.merId
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
Object.assign(props.detail, {}, rs.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<view class="banner pr" v-if="detail.sliderImage">
|
||||
<swiper class="swiper" :style="{height: bannerHeight,}" :current="bannerIndex"
|
||||
@change="($event) => bannerIndex = $event.detail.current">
|
||||
<swiper-item v-for="(item, index) in banner" :key="index">
|
||||
<image class="poster" :src="item" mode="aspectFill" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 计数器 -->
|
||||
<view class="count pa ptb5 plr20 bar">
|
||||
<text class="text cfff f24">{{ bannerIndex + 1 }} / {{ banner.length }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="detail bfff ptb25 plr20">
|
||||
<view class="line df fdr jcsb">
|
||||
<view class="price df fdr aic">
|
||||
<text class="txt">¥</text>
|
||||
<text class="txt f56">{{detail.price}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 已售 -->
|
||||
<view class="sold">
|
||||
<text class="c999 f26">已售 {{detail.sales}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券 -->
|
||||
<view class="coupon df fdr fww f26 mtb20 cFF9B27" v-if="0">
|
||||
<view class="item">
|
||||
<text>限时直降0.5元</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>平台立减1元</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>关注店铺1元优惠券</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品名称 -->
|
||||
<view class="name mtb20 t2hd">
|
||||
<text class="c333 f34">{{detail.name}}</text>
|
||||
</view>
|
||||
|
||||
<view class="history mtb20 df fdr jcsb aic">
|
||||
<text class="c666 f28">商品修改历史</text>
|
||||
<uni-icons type="right" color="#999" size="30rpx" />
|
||||
</view>
|
||||
|
||||
<!-- 福利政策 -->
|
||||
<view class="gift df fdr fww mtb20">
|
||||
<view class="item">
|
||||
<text class="text">假一赔十</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="text">7天无理由退货</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="text">全场包邮</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="text">48h内发货</text>
|
||||
</view>
|
||||
<view class="item" v-if="0">
|
||||
<text class="text">支持先用后付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 最近购买 -->
|
||||
<view class="recently mtb20" v-if="recentOrderList[0]">
|
||||
<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">
|
||||
<view class="item bsb df fdr jcsb aic plr10" v-for="(secItem, secIndex) in item" :key="secIndex">
|
||||
<view class="avatar">
|
||||
<image class="avatar wh70 cir" :src="secItem.avatar" mode="aspectFill" />
|
||||
</view>
|
||||
|
||||
<view class="name f1 mlr10">
|
||||
<text class="name c666 f28">{{secItem.nickname}}</text>
|
||||
</view>
|
||||
<view class="info mlr10 tar">
|
||||
<!-- <view class="fn">刚刚下单</view> -->
|
||||
<view class="time">
|
||||
<text class="c999 f26">{{secItem.time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn sm warm plr15">
|
||||
<text class="cfff f26">立即购买</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 商品评价 -->
|
||||
<view class="evaluate mtb20 plr25 bfff">
|
||||
<view class="header df fdr jcsb aic ptb25"
|
||||
@click="link(util.setUrl('/pages/shop/commodity/evaluate',{id: detail.id}))">
|
||||
<text class="modelTitle">商品评价({{comment.total}})</text>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<!-- 部分评论 -->
|
||||
<view class="list">
|
||||
<view class="item ptb20" v-for="(item, index) in comment.list" :key="index">
|
||||
<view class="userinfo df fdr aic">
|
||||
<image class="avatar wh45 cir" :src="item.avatar" mode="aspectFill" />
|
||||
<view class="name thd f32 f1 ml20">
|
||||
<text class="c666 f28">{{item.nickname}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content t2hd mt10">
|
||||
<text class="c333 f28">{{item.content}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 店铺 -->
|
||||
<view class="store df fdr aic jcsb mtb20 ptb20 plr25 bfff">
|
||||
<view class="header df fdr jcsb aic">
|
||||
<!-- 店铺头像 -->
|
||||
<image class="wh140 br20" :src="detail.merAvatar" mode="aspectFill" />
|
||||
<!-- 店铺信息 名称 评分 关注数量 -->
|
||||
<view class="info f1 mlr20">
|
||||
<!-- 店铺名称 -->
|
||||
<view class="name thd">
|
||||
<text class="f34 c333">{{detail.merName}}</text>
|
||||
</view>
|
||||
<view class="line df fdr aic mt10">
|
||||
<!-- 评分 -->
|
||||
<!-- <view class="item f24 c666 df aic ">
|
||||
<uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" readonly />
|
||||
<text>4.5</text>
|
||||
</view> -->
|
||||
<!-- 关注数量 -->
|
||||
<view class="item follow">
|
||||
<text class=" c666 f24">{{detail.merFollowNumber}}关注</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 关注按钮 -->
|
||||
<view @click="handleCollectStore" class="btn sm warm fmid fdr plr30">
|
||||
<uni-icons class="mr10" color="#fff" type="plusempty" size="13" v-if="detail.isFollow != 1" />
|
||||
<text class="cfff f28" v-else>已</text>
|
||||
<text class="cfff f28">关注</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 宝贝详情 -->
|
||||
<view class="p25 mtb240 bfff">
|
||||
<view class="title">
|
||||
<text class="modelTitle">宝贝详情</text>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="content mt30">
|
||||
<rich-text :nodes="detail.infoRichText || ''" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 填充 -->
|
||||
<view class="fill" style="height: 180rpx;"></view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
<style lang="scss">
|
||||
.container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 轮播图
|
||||
.banner {
|
||||
.swiper {
|
||||
|
||||
.poster {
|
||||
width: 750rpx;
|
||||
height: 800rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.count {
|
||||
bottom: 20rpx;
|
||||
right: 20rpx;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
|
||||
.text {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 模块标题
|
||||
.modelTitle {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
// 详情
|
||||
.detail {
|
||||
.price .txt {
|
||||
color: #FF7F37;
|
||||
}
|
||||
|
||||
// 优惠券
|
||||
.coupon {
|
||||
.item {
|
||||
padding: 2rpx 10rpx;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 15rpx;
|
||||
border: 2rpx solid;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.gift {
|
||||
.item {
|
||||
margin-right: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 最近购买
|
||||
.recently {
|
||||
height: 220rpx;
|
||||
|
||||
.item {
|
||||
height: 110rpx;
|
||||
|
||||
&+.item {
|
||||
border-top: 2rpx solid #eee;
|
||||
}
|
||||
|
||||
.info .fn {
|
||||
color: #FF9B27;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品评价
|
||||
.evaluate {
|
||||
.header {
|
||||
border-bottom: 2rpx solid #eee;
|
||||
}
|
||||
|
||||
.list {
|
||||
.item+.item {
|
||||
border-top: 2rpx solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 店铺
|
||||
.store {
|
||||
|
||||
.info {
|
||||
.item {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.item+.item {
|
||||
padding-left: 10rpx;
|
||||
border-left: 2rpx solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,168 @@
|
|||
<script setup>
|
||||
// 店铺 客服 收藏 支付
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
computed,
|
||||
defineEmits,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
//
|
||||
import util from '@/common/js/util.js'
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
//
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
//
|
||||
const store = useStore()
|
||||
//
|
||||
const props = defineProps({
|
||||
// 商品信息
|
||||
detail: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
//
|
||||
const emit = defineEmits(['update', 'buy'])
|
||||
// 用户信息
|
||||
const userinfo = computed(() => store.state.userinfo)
|
||||
|
||||
// 商品收藏
|
||||
function handleCollect() {
|
||||
util.isLogin().then(rs => {
|
||||
//
|
||||
api.shop.addProductCollect({
|
||||
query: {
|
||||
productId: props.detail.id,
|
||||
type: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
}[props.detail.isCollect]
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 关注状态
|
||||
props.detail.isCollect = {
|
||||
0: 1,
|
||||
1: 0,
|
||||
}[props.detail.isCollect]
|
||||
// 关注数量
|
||||
props.detail.collectNumber = rs.data
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
// 登录
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/loginPhone'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} url 跳转路径
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
// 商品购买
|
||||
function handleBuy() {
|
||||
emit('buy')
|
||||
}
|
||||
|
||||
|
||||
// 客服
|
||||
function toCustomer() {
|
||||
api.shop.getCustomerService({ merchantId: props.detail.merId }).then(rs => {
|
||||
console.log(rs);
|
||||
|
||||
//
|
||||
if (rs.code == 200) {
|
||||
|
||||
} else {
|
||||
util.alert(rs.msg)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let param = {};
|
||||
param.type = 'C2C'
|
||||
param.name = `${props.detail.merName}`
|
||||
param.msgId = `${props.detail.merId}`
|
||||
param.isCustomer = true
|
||||
|
||||
util.toChat(param)
|
||||
|
||||
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/news/chat/chat', param)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 底部 -->
|
||||
<view class="footerMneu df fdr jcsb aic">
|
||||
<view class="menu df fdr jcsb aic">
|
||||
<view class="option df fdc aic">
|
||||
<image class="wh30" src="/static/store.png" mode="aspectFit" />
|
||||
<text class="text mt10">店铺</text>
|
||||
</view>
|
||||
|
||||
<view class="option df fdc aic" @click="handleCollect">
|
||||
<view class="wh30 fmid">
|
||||
<uni-icons type="star-filled" size="45rpx" color="#FF9B27" v-if="detail.isCollect == 1" />
|
||||
<uni-icons type="star" size="45rpx" color="#666" v-else />
|
||||
</view>
|
||||
<view class="df fdr aic mt10">
|
||||
<text class="text" v-if="detail.isCollect == 1">已</text>
|
||||
<text class="text">收藏</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="option ver" @click="toCustomer">
|
||||
<image class="wh30" src="/static/customer-service.png" mode="aspectFit" />
|
||||
<text class="text mt10">客服</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 下单 -->
|
||||
<view class="btn primary f1 ml30" @click="handleBuy">
|
||||
<text class="tac cfff f32">立即购买</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 底部菜单
|
||||
.footerMneu {
|
||||
|
||||
// 选项
|
||||
.option {
|
||||
width: 80rpx;
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -168,21 +168,22 @@
|
|||
<JyCommodityAddress :address="address" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="fmid c999 f28" @click="link('/pages/mine/address/index?select=1')">
|
||||
<view>暂无默认地址</view>
|
||||
<view class="fmid" @click="link('/pages/mine/address/index?select=1')">
|
||||
<text class="c999 f28">暂无默认地址</text>
|
||||
<uni-icons type="right" color="#999" size="30rpx" />
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 商品图 价格 明细 数量 -->
|
||||
<view class="jy-card-commodity-content df mtb40">
|
||||
<view class="jy-card-commodity-content df fdr mtb40">
|
||||
<!-- 商品图 -->
|
||||
<image class="wh200 br10" :src="currentSpec.image" mode="aspectFill" />
|
||||
|
||||
<!-- 价格 明细 数量 -->
|
||||
<view class="info f1 df fdc jcsb ml30">
|
||||
<!-- 价格 -->
|
||||
<view class="content-info-price">
|
||||
<view class="price df fdr aic">
|
||||
<text class="cFF9B27 f28">单价</text>
|
||||
<text class="cFF9B27 f24">¥</text>
|
||||
<text class="cFF9B27 f50">{{detail.price}}</text>
|
||||
|
@ -200,18 +201,17 @@
|
|||
|
||||
<!-- 规格 -->
|
||||
<view class="spec">
|
||||
<view class="selection df">
|
||||
<view class="selection df fdr fww">
|
||||
<!-- disabled 销量为零不能选 -->
|
||||
<view class="option mtb20 mr20" :class="{'active': spaceIndex === index}"
|
||||
v-for="(item,index) in detail.specs" :key="index" @click="handleSpec(index)">
|
||||
<text class="txt">{{item.sku}}</text>
|
||||
</view>
|
||||
<text class="option mtb20 mr20 f26" :class="{'active': spaceIndex === index}"
|
||||
v-for="(item,index) in detail.specs" :key="item.id"
|
||||
@click="handleSpec(index)">{{item.sku}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn lg primary mtb30" @click="handleConfirm">
|
||||
<text class="cfff" v-if="mode == 'detail'">立即下单 ¥{{total}}</text>
|
||||
<text class="cfff" v-if="mode == 'collect'">确定</text>
|
||||
<text class="tac cfff" v-if="mode == 'detail'">立即下单 ¥{{total}}</text>
|
||||
<text class="tac cfff" v-if="mode == 'collect'">确定</text>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
@ -224,25 +224,23 @@
|
|||
// 选项
|
||||
.option {
|
||||
padding: 5rpx 15rpx;
|
||||
color: #333;
|
||||
background-color: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
transition: .3s;
|
||||
border: 2rpx solid #F7F7F7;
|
||||
|
||||
.txt {
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
transition: .3s;
|
||||
}
|
||||
.text {}
|
||||
|
||||
// .text {
|
||||
// color: #FF9B27;
|
||||
// }
|
||||
|
||||
// 被选中
|
||||
&.active {
|
||||
color: #FF9B27;
|
||||
background-color: #FFFBF8;
|
||||
border-color: #FF9B27;
|
||||
|
||||
.txt {
|
||||
color: #FF9B27;
|
||||
}
|
||||
}
|
||||
|
||||
// 不能选
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"pages": [
|
||||
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
|
@ -92,12 +91,24 @@
|
|||
"navigationBarTitleText": "问答页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/news/chat/customeChat",
|
||||
"style": {
|
||||
"navigationBarTitleText": "客服聊天"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/news/red-envelope/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "红包详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/news/goodsList/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/mine",
|
||||
"style": {
|
||||
|
@ -219,7 +230,6 @@
|
|||
"navigationBarTitleText": "我的分享"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/index/deal",
|
||||
"style": {
|
||||
|
@ -453,7 +463,6 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "账单详情",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -724,57 +733,59 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
|
||||
"subPackages": [{
|
||||
"root": "TUIKit",
|
||||
"pages": [{
|
||||
"path": "components/TUIConversation/index",
|
||||
"style": {
|
||||
"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": "聊天记录"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": [{
|
||||
"list": [
|
||||
{
|
||||
"text": "视频",
|
||||
"pagePath": "pages/index/index"
|
||||
},
|
||||
|
@ -796,7 +807,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "九亿",
|
||||
|
@ -806,14 +816,14 @@
|
|||
"bounce": "none" //关闭窗口回弹效果
|
||||
}
|
||||
},
|
||||
|
||||
"condition": {
|
||||
"current": 0,
|
||||
"list": [{
|
||||
"name": "test",
|
||||
"path": "pages/index/index"
|
||||
}]
|
||||
"list": [
|
||||
{
|
||||
"name": "test",
|
||||
"path": "pages/index/index"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"uniIdRouter": {}
|
||||
}
|
|
@ -240,7 +240,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="item tac mt20" @click="link('/pages/index/dataCenter/otherPush')">
|
||||
<view class="key">他人推广</view>
|
||||
<view class="key">推广总数</view>
|
||||
<view class="value">{{detail.othersPromotionCount}}</view>
|
||||
</view>
|
||||
<view class="item tac mt20">
|
||||
|
|
|
@ -34,10 +34,7 @@
|
|||
} = getCurrentInstance()
|
||||
|
||||
const store = useStore()
|
||||
const userinfo = computed(() => {
|
||||
let result = store.state.userinfo
|
||||
return result
|
||||
})
|
||||
const userinfo = computed(() => store.state.userinfo)
|
||||
|
||||
// 列表数据
|
||||
const list = reactive({
|
||||
|
@ -128,10 +125,9 @@
|
|||
// 获取列表
|
||||
function getList() {
|
||||
//
|
||||
api.video.myVideoList({
|
||||
api.video.myWorks({
|
||||
query: {
|
||||
isDraft: 0,
|
||||
userId: form.userId,
|
||||
userId: userinfo.value.id,
|
||||
pageSize: list.pageSize,
|
||||
pageNum: list.pageNum,
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn plus black mt60 mlr60" @click="navigateToPage('/pages/index/extend')">置换流量</view>
|
||||
<view class="btn plus black mt60 mlr60" @click="navigateToPage('/pages/index/dataCenter/push')">置换流量</view>
|
||||
</view>
|
||||
|
||||
<view class="fill" style="height: 60rpx;"></view>
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
import fastCollect from '@/components/index/fastCollect.vue';
|
||||
// 青少年模式
|
||||
import teen from '@/components/index/teen.vue'
|
||||
// 产品详情弹窗
|
||||
import productAlt from '@/components/index/proDetailAlt.vue'
|
||||
// 产品规格弹窗
|
||||
import productSpecAlt from '@/components/shop/detail/makeOrder.vue'
|
||||
|
||||
const {
|
||||
proxy
|
||||
|
@ -124,6 +128,8 @@
|
|||
const completeKey = ref('')
|
||||
// 底部菜单高度
|
||||
const footerMenuHeight = ref(0)
|
||||
// 当前产品详情
|
||||
const productDetail = reactive({})
|
||||
// 当前任务
|
||||
const task = computed(() => uni.$store.state.task)
|
||||
// 用户信息
|
||||
|
@ -208,6 +214,11 @@
|
|||
viewSize.width = option.size.width
|
||||
})
|
||||
}, 50)
|
||||
//
|
||||
// proxy.$refs.productAltRef.init()
|
||||
handleProBuy({
|
||||
productId: 42,
|
||||
})
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
|
@ -669,6 +680,86 @@
|
|||
function showAlarm() {
|
||||
proxy.$refs.timeRef.open()
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开产品弹窗
|
||||
* @param {Object} item 视频列表项
|
||||
*/
|
||||
function handleShowProduct(item) {
|
||||
// 打开产品详情弹窗
|
||||
proxy.$refs.productAltRef.init(item.productId)
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品弹窗购买
|
||||
* @param {Object} product
|
||||
*/
|
||||
function handleProductBuy(product) {
|
||||
Object.assign(productDetail, {}, product)
|
||||
//
|
||||
proxy.$refs.productSpecAltRef.open()
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品购买
|
||||
* @param {Object} video 视频列表
|
||||
*/
|
||||
function handleProBuy(video) {
|
||||
// 获取商品详情
|
||||
api.shop.productDetail({
|
||||
query: {
|
||||
// 产品id
|
||||
productionId: video.productId,
|
||||
},
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
//
|
||||
handleProductBuy(rs.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 立即下单
|
||||
*/
|
||||
function handlePay(event) {
|
||||
// 产生待付款订单
|
||||
api.shop.addOrder({
|
||||
data: [{
|
||||
// 地址id
|
||||
addressId: event.address.id,
|
||||
// 产品id
|
||||
productId: productDetail.id,
|
||||
// 规格id
|
||||
attrValueId: event.spec.id,
|
||||
// 数量
|
||||
payNum: event.payNum,
|
||||
// 0-普通订单,1-视频号订单
|
||||
orderType: 1,
|
||||
// 分享人id
|
||||
// shareId: userinfo.id,
|
||||
}],
|
||||
}).then(rs => {
|
||||
if (rs.code === 200) {
|
||||
// 跳转
|
||||
if (rs.data && rs.data[0]) uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/commodity/payment', {
|
||||
orderId: rs.data[0].orderId,
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -731,7 +822,8 @@
|
|||
@showTime="handleShowTime" @showComment="handleShowCommentAlt"
|
||||
@showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend"
|
||||
@onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike"
|
||||
@longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect" />
|
||||
@longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect"
|
||||
@showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
||||
<!-- </template> -->
|
||||
</cell>
|
||||
</list>
|
||||
|
@ -763,6 +855,10 @@
|
|||
<shareFirendAlt ref="shareFirendRef" />
|
||||
<!-- 左侧菜单弹窗 -->
|
||||
<leftMenuAlt ref="leftMenuRef" />
|
||||
<!-- 产品详情弹窗 -->
|
||||
<productAlt ref="productAltRef" @click="handleProductBuy" />
|
||||
<!-- 产品立即下单弹窗 -->
|
||||
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />
|
||||
|
||||
</template>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,197 +1,204 @@
|
|||
<script setup>
|
||||
// + 页面
|
||||
// 腾讯云聊天
|
||||
import TencentCloudChat from '@tencentcloud/chat';
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
nextTick,
|
||||
computed,
|
||||
} from 'vue'
|
||||
import {
|
||||
screenHeight
|
||||
} from '@/components/public/Mixins'
|
||||
import JyCommodityInformation from '@/components/public/jy-commodity-information'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
//
|
||||
const props = defineProps({
|
||||
msg: {
|
||||
type: Object,
|
||||
},
|
||||
})
|
||||
// + 页面
|
||||
// 腾讯云聊天
|
||||
import TencentCloudChat from '@tencentcloud/chat';
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
nextTick,
|
||||
computed,
|
||||
} from 'vue'
|
||||
import {
|
||||
screenHeight
|
||||
} from '@/components/public/Mixins'
|
||||
import JyCommodityInformation from '@/components/public/jy-commodity-information'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
import { inject } from 'vue'
|
||||
|
||||
// 调用父级方法
|
||||
const emit = defineEmits(['plusClick', 'send'])
|
||||
// 加号菜单
|
||||
const plusList = computed(() => {
|
||||
let result = [
|
||||
// {
|
||||
// type: 'order.png',
|
||||
// label: '订单',
|
||||
// value: 'chooseOrder'
|
||||
// }, {
|
||||
// type: 'shop.png',
|
||||
// label: '商品',
|
||||
// value: 'chooseShop'
|
||||
// },
|
||||
{
|
||||
type: 'picture.png',
|
||||
label: '照片',
|
||||
value: 'chooseImage'
|
||||
}, {
|
||||
type: 'photograph.png',
|
||||
label: '拍摄',
|
||||
value: 'takePhoto'
|
||||
}, {
|
||||
type: 'red-envelope.png',
|
||||
label: '红包',
|
||||
value: 'redEnvelope'
|
||||
}
|
||||
]
|
||||
// 单聊
|
||||
if (props.msg.type == 'C2C') result.push({
|
||||
type: 'news-voice.png',
|
||||
label: '音视频',
|
||||
value: 'voice'
|
||||
})
|
||||
return result
|
||||
})
|
||||
const { checkLink } = inject('util');
|
||||
//
|
||||
const props = defineProps({
|
||||
msg: {
|
||||
type: Object,
|
||||
},
|
||||
})
|
||||
|
||||
const popupRef = ref(null)
|
||||
const popupRE = ref(null)
|
||||
const formData = reactive({
|
||||
name: ''
|
||||
})
|
||||
const popupData = reactive({
|
||||
show: false,
|
||||
title: '选择订单'
|
||||
})
|
||||
|
||||
// 加号方法对象
|
||||
const plusClickObj = {
|
||||
voice: () => {
|
||||
// 菜单
|
||||
const menu = [{
|
||||
name: '语音通话',
|
||||
type: 1,
|
||||
},
|
||||
{
|
||||
nanme: '视频通话',
|
||||
type: 2,
|
||||
}
|
||||
]
|
||||
|
||||
uni.showActionSheet({
|
||||
itemList: ['语音通话', '视频通话'],
|
||||
success: rs => {
|
||||
uni.$TUICallKit.call({
|
||||
userID: props.msg.id,
|
||||
callMediaType: menu[rs.tapIndex].type,
|
||||
// callParams: {
|
||||
// roomID: 234,
|
||||
// strRoomID: '2323423',
|
||||
// timeout: 30
|
||||
// },
|
||||
}, res => {
|
||||
console.log('[TUICallKit] call params: ', JSON.stringify(res));
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 选择订单
|
||||
chooseOrder: () => {
|
||||
nextTick().then(() => {
|
||||
popupRef.value.open()
|
||||
});
|
||||
},
|
||||
|
||||
// 选择商品
|
||||
chooseShop: () => {
|
||||
// checkLink('pages/mine/browsed/index')
|
||||
},
|
||||
|
||||
// 发送红包
|
||||
redEnvelope() {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/news/redPacket', {
|
||||
// 聊天对象
|
||||
msgId: props.msg.id,
|
||||
// 发送方式
|
||||
sendType: {
|
||||
'C2C': 1,
|
||||
'GROUP': 2,
|
||||
} [props.msg.type],
|
||||
num: props.msg.num,
|
||||
})
|
||||
})
|
||||
// popupRE.value.open()
|
||||
},
|
||||
|
||||
//拍照
|
||||
takePhoto: () => {
|
||||
console.log('takePhoto')
|
||||
sendMsgImg({
|
||||
sourceType: ['album'],
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImage: () => {
|
||||
console.log('chooseImage')
|
||||
sendMsgImg({
|
||||
sourceType: ['album'],
|
||||
})
|
||||
// 调用父级方法
|
||||
const emit = defineEmits(['plusClick', 'send'])
|
||||
// 加号菜单
|
||||
const plusList = computed(() => {
|
||||
let result = [
|
||||
{
|
||||
type: 'picture.png',
|
||||
label: '照片',
|
||||
value: 'chooseImage',
|
||||
}, {
|
||||
type: 'photograph.png',
|
||||
label: '拍摄',
|
||||
value: 'takePhoto',
|
||||
}, {
|
||||
type: 'red-envelope.png',
|
||||
label: '红包',
|
||||
value: 'redEnvelope',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
// 发送图片消息
|
||||
function sendMsgImg(option) {
|
||||
util.upload_image({
|
||||
count: 1,
|
||||
const isCustomer = props.msg.isCustomer;
|
||||
|
||||
// 单聊
|
||||
if (props.msg.type == 'C2C' && !isCustomer) result.push({
|
||||
type: 'news-voice.png',
|
||||
label: '音视频',
|
||||
value: 'voice'
|
||||
})
|
||||
// 客服
|
||||
if (isCustomer) result.unshift({
|
||||
type: 'order.png',
|
||||
label: '订单',
|
||||
value: 'chooseOrder',
|
||||
}, {
|
||||
type: 'shop.png',
|
||||
label: '商品',
|
||||
value: 'chooseShop',
|
||||
})
|
||||
return result
|
||||
})
|
||||
|
||||
const popupRef = ref(null)
|
||||
const popupRE = ref(null)
|
||||
const formData = reactive({
|
||||
name: ''
|
||||
})
|
||||
const popupData = reactive({
|
||||
show: false,
|
||||
title: '选择订单'
|
||||
})
|
||||
|
||||
// 加号方法对象
|
||||
const plusClickObj = {
|
||||
voice: () => {
|
||||
// 菜单
|
||||
const menu = [{
|
||||
name: '语音通话',
|
||||
type: 1,
|
||||
},
|
||||
{
|
||||
nanme: '视频通话',
|
||||
type: 2,
|
||||
}
|
||||
]
|
||||
|
||||
uni.showActionSheet({
|
||||
itemList: ['语音通话', '视频通话'],
|
||||
success: rs => {
|
||||
emit('send', {
|
||||
query: {
|
||||
toUserId: props.msg.id,
|
||||
msgType: TencentCloudChat.TYPES.MSG_IMAGE,
|
||||
},
|
||||
data: {
|
||||
imgUrl: rs.value
|
||||
},
|
||||
})
|
||||
uni.$TUICallKit.call({
|
||||
userID: props.msg.id,
|
||||
callMediaType: menu[rs.tapIndex].type,
|
||||
// callParams: {
|
||||
// roomID: 234,
|
||||
// strRoomID: '2323423',
|
||||
// timeout: 30
|
||||
// },
|
||||
}, res => {
|
||||
console.log('[TUICallKit] call params: ', JSON.stringify(res));
|
||||
});
|
||||
}
|
||||
})
|
||||
return
|
||||
// 选择图片
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sourceType: option.sourceType, // 从相册选择
|
||||
success: (res) => {
|
||||
let message = uni.$chat.createImageMessage({
|
||||
to: props.msg.id,
|
||||
conversationType: props.msg.type,
|
||||
payload: {
|
||||
file: res
|
||||
},
|
||||
onProgress: function(event) {
|
||||
console.log('file uploading:', event)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 咨询订单
|
||||
const consult = (content) => {
|
||||
let obj = {
|
||||
content,
|
||||
type: 'order'
|
||||
}
|
||||
popupRef.value.close()
|
||||
// 选择订单
|
||||
chooseOrder: () => {
|
||||
nextTick().then(() => {
|
||||
popupRef.value.open()
|
||||
});
|
||||
},
|
||||
|
||||
// 选择商品
|
||||
chooseShop: () => {
|
||||
checkLink('pages/news/goodsList/index')
|
||||
},
|
||||
|
||||
// 发送红包
|
||||
redEnvelope() {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/news/redPacket', {
|
||||
// 聊天对象
|
||||
msgId: props.msg.id,
|
||||
// 发送方式
|
||||
sendType: {
|
||||
'C2C': 1,
|
||||
'GROUP': 2,
|
||||
}[props.msg.type],
|
||||
num: props.msg.num,
|
||||
})
|
||||
})
|
||||
// popupRE.value.open()
|
||||
},
|
||||
|
||||
//拍照
|
||||
takePhoto: () => {
|
||||
console.log('takePhoto')
|
||||
sendMsgImg({
|
||||
sourceType: ['album'],
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImage: () => {
|
||||
console.log('chooseImage')
|
||||
sendMsgImg({
|
||||
sourceType: ['album'],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 发送图片消息
|
||||
function sendMsgImg(option) {
|
||||
util.upload_image({
|
||||
count: 1,
|
||||
type: 1,
|
||||
success: rs => {
|
||||
emit('send', {
|
||||
query: {
|
||||
toUserId: props.msg.id,
|
||||
msgType: TencentCloudChat.TYPES.MSG_IMAGE,
|
||||
},
|
||||
data: {
|
||||
imgUrl: rs.value
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
// 选择图片
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sourceType: option.sourceType, // 从相册选择
|
||||
success: (res) => {
|
||||
let message = uni.$chat.createImageMessage({
|
||||
to: props.msg.id,
|
||||
conversationType: props.msg.type,
|
||||
payload: {
|
||||
file: res
|
||||
},
|
||||
onProgress: function (event) {
|
||||
console.log('file uploading:', event)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 咨询订单
|
||||
const consult = (content) => {
|
||||
let obj = {
|
||||
content,
|
||||
type: 'order'
|
||||
}
|
||||
popupRef.value.close()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -233,65 +240,65 @@
|
|||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.NewsPlus {
|
||||
// 一行四个
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20rpx;
|
||||
.NewsPlus {
|
||||
// 一行四个
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20rpx;
|
||||
|
||||
.imageBox {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.imageBox {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.jy-popup {
|
||||
.jy-popup {
|
||||
width: 100%;
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
// 底部边框显示
|
||||
color: #3D3D3D;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 40rpx;
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 52rpx;
|
||||
background: #D8D8D8;
|
||||
color: #999999;
|
||||
font-size: 30rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: translate(50%, -50%);
|
||||
}
|
||||
|
||||
.input-view {
|
||||
// 只显示上下边框不显示左右
|
||||
border-top: 1px solid #E5E5E5;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.easyinput {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.time {
|
||||
padding: 24rpx 20rpx 0 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
// 底部边框显示
|
||||
color: #3D3D3D;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 40rpx;
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 52rpx;
|
||||
background: #D8D8D8;
|
||||
color: #999999;
|
||||
font-size: 30rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transform: translate(50%, -50%);
|
||||
}
|
||||
|
||||
.input-view {
|
||||
// 只显示上下边框不显示左右
|
||||
border-top: 1px solid #E5E5E5;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.easyinput {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.time {
|
||||
padding: 24rpx 20rpx 0 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,22 @@
|
|||
<script setup>
|
||||
|
||||
/**
|
||||
* 客服聊天界面商品列表
|
||||
*/
|
||||
|
||||
// 商品信息
|
||||
import JyCommodityInformation from '@/components/public/jy-commodity-information'
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="appbw">
|
||||
<scroll-view scroll-y scroll-with-animation>
|
||||
<view v-for="(item, index) in 10">
|
||||
<JyCommodityInformation :showType="5"></JyCommodityInformation>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
|
@ -160,7 +160,6 @@
|
|||
</view>
|
||||
|
||||
<view class="listArea plr30 bfff">
|
||||
<!-- -->
|
||||
<view class="item ptb30 c333 f32" v-for="(item,index) in userList.data" :key="index" @click="handleUser(item)">
|
||||
<view class="rows">
|
||||
<view class="avatar fs0">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
id: '',
|
||||
categoryId: '',
|
||||
sliderImage: [],
|
||||
spec: [],
|
||||
specs: [],
|
||||
})
|
||||
// 分类
|
||||
const category = reactive([])
|
||||
|
@ -47,7 +47,7 @@
|
|||
// 商品佣金
|
||||
form.commission = detail.commission
|
||||
// 规格
|
||||
form.spec = detail.specs.map(item => {
|
||||
form.specs = detail.specs.map(item => {
|
||||
return {
|
||||
image: item.image,
|
||||
sku: item.sku,
|
||||
|
@ -107,7 +107,7 @@
|
|||
|
||||
// 添加商品规格
|
||||
function handlePushSpec() {
|
||||
form.spec.push({
|
||||
form.specs.push({
|
||||
// 图片
|
||||
image: '',
|
||||
// 名称
|
||||
|
@ -132,7 +132,7 @@
|
|||
* @param {Object} index 下标
|
||||
*/
|
||||
function handleRemoveSpec(index) {
|
||||
form.spec.splice(index, 1)
|
||||
form.specs.splice(index, 1)
|
||||
}
|
||||
|
||||
// 上传轮播图
|
||||
|
@ -238,7 +238,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="main area" v-for="(item,index) in form.spec" :key="index">
|
||||
<view class="main area" v-for="(item,index) in form.specs" :key="index">
|
||||
<view class="line rows">
|
||||
<view class="name mtb30 f32">规格{{index + 1}}</view>
|
||||
<view class="" @click="handleRemoveSpec(index)">
|
||||
|
@ -316,11 +316,16 @@
|
|||
<image src="/static/commodity-release-video.png" mode="aspectFit" class="wh45" />
|
||||
<view class="f1 ml20">添加链接到视频</view>
|
||||
</view>
|
||||
|
||||
<view class="rows mtb20">
|
||||
<view class="mr10 f28">再第几秒展示</view>
|
||||
<input type="text" placeholder="输入秒数" placeholder-class="placeholderStyle" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="main area editor" v-if="0">
|
||||
<editor class="mtb30" placeholder="在此输入产品详情" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fill" style="height: 210rpx;"></view>
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
<script setup>
|
||||
// 店铺 客服 收藏 支付
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
computed,
|
||||
defineEmits,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
//
|
||||
import util from '@/common/js/util.js'
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
//
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
// 生成订单
|
||||
import makeOrder from '@/components/shop/detail/makeOrder.vue'
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
//
|
||||
const store = useStore()
|
||||
//
|
||||
const props = defineProps({
|
||||
// 商品信息
|
||||
detail: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
//
|
||||
const emit = defineEmits(['update'])
|
||||
// 已选择的规格下标
|
||||
const spaceIndex = ref(0)
|
||||
// 数量
|
||||
const payNum = ref(1)
|
||||
// 当前选择的规格
|
||||
const currentSpec = computed(() => {
|
||||
let spec = props.detail.specs || []
|
||||
return spec[spaceIndex.value] || {}
|
||||
})
|
||||
// 用户信息
|
||||
const userinfo = computed(() => store.state.userinfo)
|
||||
// 应付总价
|
||||
const total = computed(() => {
|
||||
let price = parseFloat(props.detail.price) * 100
|
||||
let result = parseInt(price * payNum.value) / 100
|
||||
return result
|
||||
})
|
||||
//
|
||||
const menuFn = {
|
||||
// 店铺
|
||||
store() {
|
||||
link('/pages/shop/store/index')
|
||||
},
|
||||
// 客服
|
||||
customerService() {
|
||||
link('/pages/news/question-answer/index')
|
||||
},
|
||||
// 收藏
|
||||
heibianStar() {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
* @param {Object} url 跳转路径
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
// 切换收藏
|
||||
function handleCollect() {
|
||||
//
|
||||
api.shop.addProductCollect({
|
||||
query: {
|
||||
productId: props.detail.id,
|
||||
type: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
}[props.detail.isCollect]
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
emit('update', {
|
||||
...props.detail,
|
||||
isCollect: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
}[props.detail.isCollect]
|
||||
})
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 立即下单
|
||||
*/
|
||||
function handlePay(event) {
|
||||
// 产生待付款订单
|
||||
api.shop.addOrder({
|
||||
data: [{
|
||||
// 地址id
|
||||
addressId: event.address.id,
|
||||
// 产品id
|
||||
productId: props.detail.id,
|
||||
// 规格id
|
||||
attrValueId: event.spec.id,
|
||||
// 数量
|
||||
payNum: event.payNum,
|
||||
// 0-普通订单,1-视频号订单
|
||||
orderType: 0,
|
||||
// 分享人id
|
||||
// shareId: userinfo.id,
|
||||
}],
|
||||
}).then(rs => {
|
||||
if (rs.code === 200) {
|
||||
// 跳转
|
||||
if (rs.data && rs.data[0]) uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/commodity/payment', {
|
||||
orderId: rs.data[0].orderId,
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 填充 -->
|
||||
<view class="fill" style="height: 180rpx;"></view>
|
||||
|
||||
<!-- 底部 -->
|
||||
<view class="footer footerMneu rows plr20 shadow bfff">
|
||||
<view class="menu df fdr aic">
|
||||
<view class="option ver">
|
||||
<image class="wh30" src="/static/store.png" mode="widthFix" />
|
||||
<view class="f24 c999 mt10">店铺</view>
|
||||
</view>
|
||||
|
||||
<view class="option ver " @click="handleCollect">
|
||||
<view class="wh30 fmid">
|
||||
<uni-icons type="star-filled" size="45rpx" color="#FF9B27" v-if="detail.isCollect == 1" />
|
||||
<uni-icons type="star" size="45rpx" color="#666" v-else />
|
||||
</view>
|
||||
<view class="f24 c999 mt10">
|
||||
<text v-if="detail.isCollect == 1">已</text>
|
||||
<text>收藏</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="option ver ">
|
||||
<image class="wh30" src="/static/customer-service.png" mode="widthFix" />
|
||||
<view class="f24 c999 mt10">客服</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 下单 -->
|
||||
<view class="btn lg primary f1 ml30" @click="$refs.makeOrderRef.open()">
|
||||
<text>立即购买</text>
|
||||
</view>
|
||||
|
||||
<!-- 立即支付 -->
|
||||
<makeOrder ref="makeOrderRef" :detail="detail" @confirm="handlePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// 底部菜单
|
||||
.menu {
|
||||
|
||||
// 选项
|
||||
.option {
|
||||
width: 80rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -24,31 +24,21 @@
|
|||
import apex from './components/jy-commodity-head';
|
||||
// 商品列表
|
||||
import productList from '@/components/shop/productList/productList'
|
||||
// 产品详情
|
||||
import proDetail from '@/components/shop/detail/detail'
|
||||
//底部
|
||||
import JyCommodityFoot from './components/jy-commodity-foot';
|
||||
import footerMenu from '@/components/shop/detail/footerMenu';
|
||||
// 生成订单
|
||||
import makeOrder from '@/components/shop/detail/makeOrder.vue'
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
const store = useStore()
|
||||
// 产品详情
|
||||
const detail = reactive({})
|
||||
// 产品id
|
||||
const id = ref('')
|
||||
// 轮播图详情
|
||||
const bannerIndex = ref(0)
|
||||
// 商品评论
|
||||
const comment = reactive({
|
||||
list: [],
|
||||
total: 0,
|
||||
})
|
||||
// 最近购买订单列表
|
||||
const recentOrderList = ref([])
|
||||
// 详情
|
||||
const banner = computed(() => {
|
||||
let result = []
|
||||
if (detail.sliderImage) result = detail.sliderImage.split(',')
|
||||
return result
|
||||
})
|
||||
// 产品详情
|
||||
const detail = reactive({})
|
||||
// 当前登录的用户信息
|
||||
const userinfo = computed(() => {
|
||||
return store.state.userinfo
|
||||
|
@ -60,10 +50,6 @@
|
|||
getDetail()
|
||||
// 添加商品浏览记录
|
||||
addBrowsing()
|
||||
// 获取商品评论
|
||||
getProComment()
|
||||
// 获取最近购买
|
||||
getRecentOrder()
|
||||
// 开启监听
|
||||
addListener()
|
||||
})
|
||||
|
@ -96,75 +82,6 @@
|
|||
uni.$off('commodityDetail')
|
||||
}
|
||||
|
||||
// 获取最近购买
|
||||
function getRecentOrder() {
|
||||
api.shop.recentOrder({
|
||||
query: {
|
||||
// 产品id
|
||||
productId: id.value,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 结果
|
||||
const result = rs.data
|
||||
let list = []
|
||||
//
|
||||
for (let i = 0; i < result.length / 2; i++) {
|
||||
if (!result[i * 2 + 1]) break
|
||||
list.push([result[i * 2], result[i * 2 + 1]])
|
||||
}
|
||||
recentOrderList.value = list
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品评论
|
||||
function getProComment() {
|
||||
api.shop.getProComment({
|
||||
query: {
|
||||
// 产品id
|
||||
productId: id.value,
|
||||
pageNum: 1,
|
||||
pageSize: 2,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
comment.list = rs.rows
|
||||
comment.total = rs.total
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 添加商品浏览记录
|
||||
function addBrowsing() {
|
||||
// 验证登录
|
||||
util.isLogin(() => {
|
||||
try {
|
||||
// 添加浏览记录
|
||||
api.shop.addBrowsing({
|
||||
data: {
|
||||
userId: userinfo.value.id,
|
||||
goodsId: id.value
|
||||
},
|
||||
}).then(rs => {
|
||||
if (rs.code != 200) console.log('addbrows err', rs.msg)
|
||||
})
|
||||
} catch (ev) {
|
||||
console.log('addBrowsing', ev)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取详情
|
||||
function getDetail() {
|
||||
api.shop.productDetail({
|
||||
|
@ -185,94 +102,18 @@
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转路径
|
||||
* @param {Object} url
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
// 收藏店铺
|
||||
function handleCollectStore() {
|
||||
api.shop.followShop({
|
||||
data: {
|
||||
shopId: detail.merId,
|
||||
status: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [detail.isFollow]
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 关注状态
|
||||
detail.isFollow = {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [detail.isFollow]
|
||||
// 关注数量
|
||||
detail.merFollowNumber = rs.data
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 商品收藏
|
||||
function handleCollect() {
|
||||
util.isLogin().then(rs => {
|
||||
//
|
||||
api.shop.addProductCollect({
|
||||
// 添加商品浏览记录
|
||||
function addBrowsing() {
|
||||
// 验证登录
|
||||
util.isLogin(() => {
|
||||
// 添加浏览记录
|
||||
api.shop.addBrowsing({
|
||||
data: {
|
||||
productId: id.value,
|
||||
status: {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [detail.isCollect]
|
||||
}
|
||||
userId: userinfo.value.id,
|
||||
goodsId: id.value
|
||||
},
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// 关注状态
|
||||
detail.isCollect = {
|
||||
0: 1,
|
||||
1: 0,
|
||||
} [detail.isCollect]
|
||||
// 关注数量
|
||||
detail.collectNumber = rs.data
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
// 登录
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/loginPhone'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取店铺信息
|
||||
function getShop() {
|
||||
api.shop.shopDetail({
|
||||
query: {
|
||||
shopId: detail.merId
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
Object.assign(detail, {}, rs.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
if (rs.code != 200) console.log('addbrows err', rs.msg)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -284,302 +125,78 @@
|
|||
function handleDetail(ev) {
|
||||
Object.assign(detail, {}, ev)
|
||||
}
|
||||
|
||||
// 拉起订单
|
||||
function showMakeOrder() {
|
||||
proxy.$refs.makeOrderRef.open()
|
||||
}
|
||||
|
||||
/**
|
||||
* 立即下单
|
||||
*/
|
||||
function handlePay(event) {
|
||||
// 产生待付款订单
|
||||
api.shop.addOrder({
|
||||
data: [{
|
||||
// 地址id
|
||||
addressId: event.address.id,
|
||||
// 产品id
|
||||
productId: detail.id,
|
||||
// 规格id
|
||||
attrValueId: event.spec.id,
|
||||
// 数量
|
||||
payNum: event.payNum,
|
||||
// 0-普通订单,1-视频号订单
|
||||
orderType: 0,
|
||||
// 分享人id
|
||||
// shareId: userinfo.id,
|
||||
}],
|
||||
}).then(rs => {
|
||||
if (rs.code === 200) {
|
||||
// 跳转
|
||||
if (rs.data && rs.data[0]) uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/commodity/payment', {
|
||||
orderId: rs.data[0].orderId,
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="app pr">
|
||||
<!-- 头部 -->
|
||||
<apex ref="apexRef" :detail="detail"></apex>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<view class="banner pr" v-if="detail.sliderImage">
|
||||
<swiper class="swiper" :current="bannerIndex" @change="($event) => bannerIndex = $event.detail.current">
|
||||
<swiper-item v-for="(item, index) in banner" :key="index">
|
||||
<image class="poster" :src="item" mode="aspectFill" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 计数器 -->
|
||||
<view class="text pa ptb5 plr20 cfff f24 bar">{{ bannerIndex + 1 }} / {{ banner.length }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="detail bfff ptb25 plr20">
|
||||
<view class="line rows">
|
||||
<view class="price">
|
||||
<text class="txt">¥</text>
|
||||
<text class="txt f56">{{detail.price}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 已售 -->
|
||||
<view class="sold">
|
||||
<text class="c999 f26">已售 {{detail.sales}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券 -->
|
||||
<view class="coupon df fdr fww f26 mtb20 cFF9B27" v-if="0">
|
||||
<view class="item">
|
||||
<text>限时直降0.5元</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>平台立减1元</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>关注店铺1元优惠券</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品名称 -->
|
||||
<view class="name mtb20 f34 c333 t2hd">{{detail.name}}</view>
|
||||
|
||||
<view class="history mtb20 rows">
|
||||
<view class="c666 f28">商品修改历史</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<!-- 福利政策 -->
|
||||
<view class="gift df fdr fww c999 f24 mtb20">
|
||||
<view class="item">
|
||||
<text>假一赔十</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>7天无理由退货</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>全场包邮</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>48h内发货</text>
|
||||
</view>
|
||||
<view class="item" v-if="0">
|
||||
<text>支持先用后付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 最近购买 -->
|
||||
<view class="recently mtb20" v-if="recentOrderList[0]">
|
||||
<swiper class="swiper" :autoplay="true" vertical="true">
|
||||
<swiper-item v-for="(item, index) in recentOrderList" :key="index">
|
||||
<view class="list plr10 bfff">
|
||||
<view class="item bsb rows plr10" v-for="(secItem, secIndex) in item" :key="secIndex">
|
||||
<view class="avatar">
|
||||
<image class="avatar wh70 cir" :src="secItem.avatar" mode="aspectFill" />
|
||||
</view>
|
||||
|
||||
<view class="name f1 mlr10 f28">{{secItem.nickname}}</view>
|
||||
<view class="info mlr10 f26 tar">
|
||||
<!-- <view class="fn">刚刚下单</view> -->
|
||||
<view class="time c999">{{secItem.time}}</view>
|
||||
</view>
|
||||
<view class="btn sm warm plr15">立即购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 商品评价 -->
|
||||
<view class="evaluate mtb20 plr25 bfff">
|
||||
<view class="header rows ptb25"
|
||||
@click="link(util.setUrl('/pages/shop/commodity/evaluate',{id: detail.id}))">
|
||||
<text class="modelTitle">商品评价({{comment.total}})</text>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
<!-- 部分评论 -->
|
||||
<view class="list">
|
||||
<view class="item ptb20" v-for="(item, index) in comment.list" :key="index">
|
||||
<view class="userinfo df c666 f28">
|
||||
<image class="avatar wh45 cir" :src="item.avatar" mode="aspectFill" />
|
||||
<view class="name thd f32 f1 ml20">{{item.nickname}}</view>
|
||||
</view>
|
||||
<view class="content t2hd mt10 c333 f28">{{item.content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 店铺 -->
|
||||
<view class="store df aic jcsb mtb20 ptb20 plr25 bfff">
|
||||
<view class="header rows">
|
||||
<!-- 店铺头像 -->
|
||||
<image class="wh140 br20" :src="detail.merAvatar" mode="aspectFill" />
|
||||
<!-- 店铺信息 名称 评分 关注数量 -->
|
||||
<view class="info f1 mlr20">
|
||||
<!-- 店铺名称 -->
|
||||
<view class="name thd">
|
||||
<text class="f34 c333">{{detail.merName}}</text>
|
||||
</view>
|
||||
<view class="line df dfr aic mt10">
|
||||
<!-- 评分 -->
|
||||
<!-- <view class="item f24 c666 df aic ">
|
||||
<uni-rate class="mr10" :value="4.5" :size="12" activeColor="#FF9B27" readonly />
|
||||
<text>4.5</text>
|
||||
</view> -->
|
||||
<!-- 关注数量 -->
|
||||
<view class="item follow c666 f24">
|
||||
<text>{{detail.merFollowNumber}}关注</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 关注按钮 -->
|
||||
<view @click="handleCollectStore" class="btn sm warm plr30">
|
||||
<uni-icons class="mr10" color="#fff" type="plusempty" size="13" v-if="detail.isFollow != 1" />
|
||||
<text class="cfff" v-else>已</text>
|
||||
<text class="cfff">关注</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 宝贝详情 -->
|
||||
<view class="p25 mtb240 bfff">
|
||||
<view class="title">
|
||||
<text class="modelTitle">宝贝详情</text>
|
||||
</view>
|
||||
<!-- 商品详情 -->
|
||||
<view class="content mt30">
|
||||
<rich-text :nodes="detail.intro" />
|
||||
</view>
|
||||
</view>
|
||||
<apex ref="apexRef" :detail="detail" />
|
||||
|
||||
<!-- 获取详情 -->
|
||||
<proDetail :id="id" :detail="detail" />
|
||||
<!-- 精选 -->
|
||||
<view class="recommend mlr20">
|
||||
<productList :choicenessTitle="true" />
|
||||
</view>
|
||||
|
||||
<!-- 底部 -->
|
||||
<JyCommodityFoot :detail="detail" @update="handleDetail" />
|
||||
<!-- 底部菜单 -->
|
||||
<view class="footer plr20 shadow bfff">
|
||||
<footerMenu :detail="detail" @update="handleDetail" @buy="showMakeOrder" />
|
||||
</view>
|
||||
|
||||
<!-- 立即支付 -->
|
||||
<makeOrder ref="makeOrderRef" :detail="detail" @confirm="handlePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 补齐轮播图高度
|
||||
.swiper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
// 轮播图
|
||||
.banner {
|
||||
|
||||
.swiper {
|
||||
height: 800rpx;
|
||||
|
||||
.poster {
|
||||
width: 750rpx;
|
||||
height: 800rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
bottom: 20rpx;
|
||||
right: 20rpx;
|
||||
color: #fff;
|
||||
background-color: #000a;
|
||||
}
|
||||
}
|
||||
|
||||
// 模块标题
|
||||
.modelTitle {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
// 详情
|
||||
.detail {
|
||||
.price .txt {
|
||||
color: #FF7F37;
|
||||
}
|
||||
|
||||
// 优惠券
|
||||
.coupon {
|
||||
.item {
|
||||
padding: 2rpx 10rpx;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 15rpx;
|
||||
border: 2rpx solid;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.gift {
|
||||
.item {
|
||||
margin-right: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 最近购买
|
||||
.recently {
|
||||
height: 220rpx;
|
||||
|
||||
.item {
|
||||
height: 110rpx;
|
||||
|
||||
&+.item {
|
||||
border-top: 2rpx solid #eee;
|
||||
}
|
||||
|
||||
.info .fn {
|
||||
color: #FF9B27;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品评价
|
||||
.evaluate {
|
||||
.header {
|
||||
border-bottom: 2rpx solid #eee;
|
||||
}
|
||||
|
||||
.list {
|
||||
.item+.item {
|
||||
border-top: 2rpx solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-popup {
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 600;
|
||||
padding: 28rpx 0 14rpx 0;
|
||||
font-size: $uni-font-size-lg;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 30rpx;
|
||||
display: inline-block;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
//滚动
|
||||
.jy-comment-list-content {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// 店铺
|
||||
.store {
|
||||
|
||||
.info {
|
||||
.item {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.item+.item {
|
||||
padding-left: 10rpx;
|
||||
border-left: 2rpx solid #eee;
|
||||
}
|
||||
}
|
||||
//
|
||||
.footerMenu {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
|
@ -7,37 +7,37 @@
|
|||
"@tencentcloud/chat": {
|
||||
"src": "../../../../../node_modules/@tencentcloud/chat/index.js",
|
||||
"file": "@tencentcloud_chat.js",
|
||||
"fileHash": "021c5bcc",
|
||||
"fileHash": "5fdcda29",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@tencentcloud/chat/modules/group-module.js": {
|
||||
"src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js",
|
||||
"file": "@tencentcloud_chat_modules_group-module__js.js",
|
||||
"fileHash": "6530f974",
|
||||
"fileHash": "4785ca3f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tim-upload-plugin": {
|
||||
"src": "../../../../../node_modules/tim-upload-plugin/index.js",
|
||||
"file": "tim-upload-plugin.js",
|
||||
"fileHash": "010825d4",
|
||||
"fileHash": "34d0cc3a",
|
||||
"needsInterop": true
|
||||
},
|
||||
"js-pinyin": {
|
||||
"src": "../../../../../node_modules/js-pinyin/index.js",
|
||||
"file": "js-pinyin.js",
|
||||
"fileHash": "f576117e",
|
||||
"fileHash": "382f4499",
|
||||
"needsInterop": true
|
||||
},
|
||||
"lodash": {
|
||||
"src": "../../../../../node_modules/lodash/lodash.js",
|
||||
"file": "lodash.js",
|
||||
"fileHash": "29d13de3",
|
||||
"fileHash": "03910375",
|
||||
"needsInterop": true
|
||||
},
|
||||
"crypto-js": {
|
||||
"src": "../../../../../node_modules/crypto-js/index.js",
|
||||
"file": "crypto-js.js",
|
||||
"fileHash": "db1532a6",
|
||||
"fileHash": "ae9ab40a",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
|
||||
// let target = 'http://91f.xyz:8080'
|
||||
let target = 'https://1a4b9ed1.r24.cpolar.top/'
|
||||
let target = 'https://b433d23.r24.cpolar.top/'
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
|
|
|
@ -18,10 +18,10 @@ export default {
|
|||
value: userinfo
|
||||
})
|
||||
|
||||
// 腾讯im登录
|
||||
util.getUserinfo().then(rs => {
|
||||
util.loginTencent(userinfo)
|
||||
})
|
||||
// // 腾讯im登录
|
||||
// util.getUserinfo().then(rs => {
|
||||
// util.loginTencent(userinfo)
|
||||
// })
|
||||
} else {
|
||||
// 如果未登录,跳转到登录页面
|
||||
uni.redirectTo({
|
||||
|
|
|
@ -7,10 +7,11 @@ const mine = {
|
|||
* 获取用户信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
getUserinfo(param) {
|
||||
getUserinfo(query) {
|
||||
return util.request({
|
||||
url: `/user/getUserData`,
|
||||
url: `/user/MCustomerService/getInfo`,
|
||||
method: 'GET',
|
||||
query: query,
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -207,6 +207,17 @@ export const news = {
|
|||
method: 'POST'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 获取消息列表
|
||||
getMessageList(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/getMessageList`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'GET'
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default news
|
|
@ -4,8 +4,9 @@ const config = {
|
|||
// #ifdef H5
|
||||
host: 'http://localhost:5173',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host: 'https://1a4b9ed1.r24.cpolar.top/',
|
||||
// #ifndef H5
|
||||
// host: 'http://91f.xyz:8080',
|
||||
host: 'https://b433d23.r24.cpolar.top/',
|
||||
// #endif
|
||||
// 支付方式配置
|
||||
payType: {
|
||||
|
|
|
@ -1411,27 +1411,22 @@ const util = {
|
|||
*/
|
||||
finalLogin(param, cb) {
|
||||
// 登录令牌
|
||||
const token = param.data
|
||||
const token = param.data.token
|
||||
// 缓存token
|
||||
uni.setStorageSync('token', token)
|
||||
|
||||
// 开启加载
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
// 缓存用户信息
|
||||
let userinfo = param.data.customerService;
|
||||
|
||||
uni.setStorageSync('userinfo', JSON.stringify(userinfo))
|
||||
|
||||
store.commit('setState', {
|
||||
key: 'userinfo',
|
||||
value: userinfo
|
||||
})
|
||||
|
||||
// 获取用户信息
|
||||
util.getUserinfo((userinfo) => {
|
||||
// 登录
|
||||
uni.$emit('login')
|
||||
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 500)
|
||||
//
|
||||
cb ? cb() : ''
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1466,34 +1461,34 @@ const util = {
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param {Function} cb 回调函数
|
||||
*/
|
||||
getUserinfo(cb) {
|
||||
return new Promise(reslove => {
|
||||
// 请求接口
|
||||
api.mine.getUserinfo().then(rs => {
|
||||
if (rs.code === 200) {
|
||||
reslove(rs.data)
|
||||
const userinfo = rs.data
|
||||
// 如果开启了青少年模式
|
||||
if (userinfo.teenTime) util.getTeenMode(userinfo.teenTime)
|
||||
// 提交
|
||||
store.commit('setState', {
|
||||
key: 'userinfo',
|
||||
value: userinfo
|
||||
})
|
||||
// 用户信息
|
||||
uni.setStorageSync('userinfo', userinfo)
|
||||
cb ? cb(userinfo) : ''
|
||||
}
|
||||
}).finally(() => {
|
||||
// 关闭加载
|
||||
uni.hideLoading()
|
||||
})
|
||||
})
|
||||
},
|
||||
// /**
|
||||
// * 获取用户信息
|
||||
// * @param {Function} cb 回调函数
|
||||
// */
|
||||
// getUserinfo(cb) {
|
||||
// return new Promise(reslove => {
|
||||
// // 请求接口
|
||||
// api.mine.getUserinfo().then(rs => {
|
||||
// if (rs.code === 200) {
|
||||
// reslove(rs.data)
|
||||
// const userinfo = rs.data
|
||||
// // 如果开启了青少年模式
|
||||
// if (userinfo.teenTime) util.getTeenMode(userinfo.teenTime)
|
||||
// // 提交
|
||||
// store.commit('setState', {
|
||||
// key: 'userinfo',
|
||||
// value: userinfo
|
||||
// })
|
||||
// // 用户信息
|
||||
// uni.setStorageSync('userinfo', userinfo)
|
||||
// cb ? cb(userinfo) : ''
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// // 关闭加载
|
||||
// uni.hideLoading()
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
|
||||
// 青少年模式
|
||||
getTeenMode(teenTime) {
|
||||
|
@ -1562,6 +1557,14 @@ const util = {
|
|||
}).catch(rs => {
|
||||
console.log('tim logout error:', rs);
|
||||
});
|
||||
|
||||
api.login.userLoginOut().then(rs => {
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
// 把vuex的值改成未登录的状态
|
||||
|
|
|
@ -1,61 +1,125 @@
|
|||
<script setup>
|
||||
// 消息首页
|
||||
// 消息首页
|
||||
|
||||
import {
|
||||
onMounted,
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onHide,
|
||||
onPullDownRefresh,
|
||||
onReachBottom,
|
||||
} from '@dcloudio/uni-app'
|
||||
// 路由
|
||||
import util from '@/common/js/util.js'
|
||||
import api from '@/api/index.js'
|
||||
import {
|
||||
onMounted, onUnmounted,
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onHide,
|
||||
onPullDownRefresh,
|
||||
onReachBottom,
|
||||
} from '@dcloudio/uni-app'
|
||||
// 路由
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
const chatList = reactive([{
|
||||
id: 1,
|
||||
avatar: 'https://p3-flow-imagex-sign.byteimg.com/user-avatar/9f4488a87a17f6f31b9716331e14fe26~tplv-a9rns2rl98-icon-tiny.jpeg?rk3s=98c978ad&x-expires=1740537084&x-signature=OrjX8tZaafN4XJE2o8QzZDs3Q20%3D',
|
||||
name: '客户 A',
|
||||
lastMessage: '您好,商品什么时候发货?',
|
||||
dot: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
avatar: 'https://p3-flow-imagex-sign.byteimg.com/user-avatar/9f4488a87a17f6f31b9716331e14fe26~tplv-a9rns2rl98-icon-tiny.jpeg?rk3s=98c978ad&x-expires=1740537084&x-signature=OrjX8tZaafN4XJE2o8QzZDs3Q20%3D',
|
||||
name: '客户 B',
|
||||
lastMessage: '这个商品有优惠吗?',
|
||||
dot: '',
|
||||
const chatList = reactive([{
|
||||
id: 1,
|
||||
avatar: 'https://p3-flow-imagex-sign.byteimg.com/user-avatar/9f4488a87a17f6f31b9716331e14fe26~tplv-a9rns2rl98-icon-tiny.jpeg?rk3s=98c978ad&x-expires=1740537084&x-signature=OrjX8tZaafN4XJE2o8QzZDs3Q20%3D',
|
||||
name: '客户 A',
|
||||
lastMessage: '您好,商品什么时候发货?',
|
||||
dot: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
avatar: 'https://p3-flow-imagex-sign.byteimg.com/user-avatar/9f4488a87a17f6f31b9716331e14fe26~tplv-a9rns2rl98-icon-tiny.jpeg?rk3s=98c978ad&x-expires=1740537084&x-signature=OrjX8tZaafN4XJE2o8QzZDs3Q20%3D',
|
||||
name: '客户 B',
|
||||
lastMessage: '这个商品有优惠吗?',
|
||||
dot: '',
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
// 用户信息
|
||||
const userinfo = JSON.parse(uni.getStorageSync('userinfo'))
|
||||
|
||||
|
||||
console.log(userinfo);
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
addListener()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
removeListener()
|
||||
})
|
||||
|
||||
// 开启监听消息
|
||||
function addListener() {
|
||||
let onMessageReceived = function (event) {
|
||||
getList()
|
||||
}
|
||||
|
||||
uni.$chat.on(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED, onMessageReceived);
|
||||
}
|
||||
|
||||
// 移除监听
|
||||
function removeListener() {
|
||||
uni.$chat.on(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED);
|
||||
}
|
||||
|
||||
// 获取消息列表
|
||||
function getList() {
|
||||
api.news.getMessageList({
|
||||
query: {
|
||||
userId: userinfo.serviceId,
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
// // 用户信息
|
||||
// const userinfo = computed(() => {
|
||||
// return store.state.userinfo
|
||||
// })
|
||||
|
||||
/**
|
||||
* 去聊天
|
||||
* @param {Number} item 聊天对象
|
||||
*/
|
||||
function handleChat(item) {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
* @param {String} url 路由地址
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
// list.data = handleList(rs.data);
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 去聊天
|
||||
* @param {Number} item 聊天对象
|
||||
*/
|
||||
function handleChat(item) {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转
|
||||
* @param {String} url 路由地址
|
||||
*/
|
||||
function link(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 退出登录
|
||||
function handleLogout() {
|
||||
util.alert({
|
||||
content: '确认退出登录吗?',
|
||||
}).then(rs => {
|
||||
if (!rs.confirm) return
|
||||
|
||||
util.logout(() => {
|
||||
// #ifdef APP
|
||||
plus.runtime.restart()
|
||||
// #endif
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -69,18 +133,21 @@
|
|||
</view>
|
||||
|
||||
<view class="info f1 ml20">
|
||||
<view class="name c333 f34">客服小A</view>
|
||||
<view class="name c333 f34">{{ userinfo.serviceName }}</view>
|
||||
<view class="mt10 c666 f28">店铺客服</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pr login-out">
|
||||
<view class="out-btn" @click="handleLogout">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商家订单 -->
|
||||
<view class="rows ptb30 plr20">
|
||||
<view class=" rows ptb30 plr20">
|
||||
<view class="">商家订单管理</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
||||
|
||||
<view class="list">
|
||||
<view class="item rows ptb20 plr20" v-for="(item, index) in chatList" :key="index"
|
||||
@click="handleChat(item)">
|
||||
|
@ -97,7 +164,7 @@
|
|||
<view class="rows">
|
||||
<view class="content mt10 c666 f24">{{ item.lastMessage }}</view>
|
||||
<view class="dot cfff f22">
|
||||
<view class="content" v-if="item.dot">{{item.dot}}</view>
|
||||
<view class="content" v-if="item.dot">{{ item.dot }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -107,33 +174,45 @@
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 个人信息
|
||||
.header {
|
||||
.background {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
// 个人信息
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.background {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
//
|
||||
.list {
|
||||
.item {
|
||||
border-top: 1rpx solid #eee;
|
||||
.login-out {
|
||||
display: table;
|
||||
|
||||
.dot {
|
||||
padding: 5rpx;
|
||||
border-radius: 100rpx;
|
||||
background-color: #f00;
|
||||
.out-btn {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 内容
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
//
|
||||
.list {
|
||||
.item {
|
||||
border-top: 1rpx solid #eee;
|
||||
|
||||
.dot {
|
||||
padding: 5rpx;
|
||||
border-radius: 100rpx;
|
||||
background-color: #f00;
|
||||
|
||||
// 内容
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -135,5 +135,4 @@ function handleLogin() {
|
|||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -2,9 +2,9 @@ import {
|
|||
__commonJS
|
||||
} from "./chunk-TDUMLE5V.js";
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/@tencentcloud/chat/index.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/@tencentcloud/chat/index.js
|
||||
var require_chat = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/@tencentcloud/chat/index.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/@tencentcloud/chat/index.js"(exports, module) {
|
||||
!function(e, t) {
|
||||
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).TencentCloudChat = t();
|
||||
}(exports, function() {
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
"hash": "a409d935",
|
||||
"configHash": "da5c2bdf",
|
||||
"lockfileHash": "7b6ef450",
|
||||
"browserHash": "8066c8cc",
|
||||
"hash": "983ba944",
|
||||
"configHash": "74c0c30e",
|
||||
"lockfileHash": "278dad13",
|
||||
"browserHash": "7f88594e",
|
||||
"optimized": {
|
||||
"@tencentcloud/chat": {
|
||||
"src": "../../../../../node_modules/@tencentcloud/chat/index.js",
|
||||
"file": "@tencentcloud_chat.js",
|
||||
"fileHash": "0e28df2d",
|
||||
"fileHash": "68cefafa",
|
||||
"needsInterop": true
|
||||
},
|
||||
"crypto-js": {
|
||||
"src": "../../../../../node_modules/crypto-js/index.js",
|
||||
"file": "crypto-js.js",
|
||||
"fileHash": "d3e1eda0",
|
||||
"fileHash": "d5371c8c",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
|
|
|
@ -16,9 +16,9 @@ var require_crypto = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/core.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/core.js
|
||||
var require_core = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/core.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/core.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory();
|
||||
|
@ -624,9 +624,9 @@ var require_core = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/x64-core.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/x64-core.js
|
||||
var require_x64_core = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/x64-core.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/x64-core.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -881,9 +881,9 @@ var require_x64_core = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/lib-typedarrays.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/lib-typedarrays.js
|
||||
var require_lib_typedarrays = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/lib-typedarrays.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/lib-typedarrays.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -926,9 +926,9 @@ var require_lib_typedarrays = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-utf16.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-utf16.js
|
||||
var require_enc_utf16 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-utf16.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-utf16.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1044,9 +1044,9 @@ var require_enc_utf16 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-base64.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-base64.js
|
||||
var require_enc_base64 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-base64.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-base64.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1152,9 +1152,9 @@ var require_enc_base64 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-base64url.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-base64url.js
|
||||
var require_enc_base64url = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/enc-base64url.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/enc-base64url.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1271,9 +1271,9 @@ var require_enc_base64url = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/md5.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/md5.js
|
||||
var require_md5 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/md5.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/md5.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1450,9 +1450,9 @@ var require_md5 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha1.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha1.js
|
||||
var require_sha1 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha1.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha1.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1541,9 +1541,9 @@ var require_sha1 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha256.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha256.js
|
||||
var require_sha256 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha256.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha256.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -1662,9 +1662,9 @@ var require_sha256 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha224.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha224.js
|
||||
var require_sha224 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha224.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha224.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_sha256());
|
||||
|
@ -1707,9 +1707,9 @@ var require_sha224 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha512.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha512.js
|
||||
var require_sha512 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha512.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha512.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_x64_core());
|
||||
|
@ -1989,9 +1989,9 @@ var require_sha512 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha384.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha384.js
|
||||
var require_sha384 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha384.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha384.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_x64_core(), require_sha512());
|
||||
|
@ -2035,9 +2035,9 @@ var require_sha384 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha3.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha3.js
|
||||
var require_sha3 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/sha3.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/sha3.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_x64_core());
|
||||
|
@ -2237,9 +2237,9 @@ var require_sha3 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/ripemd160.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/ripemd160.js
|
||||
var require_ripemd160 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/ripemd160.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/ripemd160.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -2708,9 +2708,9 @@ var require_ripemd160 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/hmac.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/hmac.js
|
||||
var require_hmac = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/hmac.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/hmac.js"(exports, module) {
|
||||
(function(root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core());
|
||||
|
@ -2815,9 +2815,9 @@ var require_hmac = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pbkdf2.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pbkdf2.js
|
||||
var require_pbkdf2 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pbkdf2.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pbkdf2.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_sha256(), require_hmac());
|
||||
|
@ -2913,9 +2913,9 @@ var require_pbkdf2 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/evpkdf.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/evpkdf.js
|
||||
var require_evpkdf = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/evpkdf.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/evpkdf.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_sha1(), require_hmac());
|
||||
|
@ -3004,9 +3004,9 @@ var require_evpkdf = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/cipher-core.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/cipher-core.js
|
||||
var require_cipher_core = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/cipher-core.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/cipher-core.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_evpkdf());
|
||||
|
@ -3648,9 +3648,9 @@ var require_cipher_core = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-cfb.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-cfb.js
|
||||
var require_mode_cfb = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-cfb.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-cfb.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3700,9 +3700,9 @@ var require_mode_cfb = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ctr.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ctr.js
|
||||
var require_mode_ctr = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ctr.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ctr.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3740,9 +3740,9 @@ var require_mode_ctr = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ctr-gladman.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ctr-gladman.js
|
||||
var require_mode_ctr_gladman = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ctr-gladman.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ctr-gladman.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3815,9 +3815,9 @@ var require_mode_ctr_gladman = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ofb.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ofb.js
|
||||
var require_mode_ofb = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ofb.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ofb.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3853,9 +3853,9 @@ var require_mode_ofb = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ecb.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ecb.js
|
||||
var require_mode_ecb = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/mode-ecb.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/mode-ecb.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3884,9 +3884,9 @@ var require_mode_ecb = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-ansix923.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-ansix923.js
|
||||
var require_pad_ansix923 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-ansix923.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-ansix923.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3916,9 +3916,9 @@ var require_pad_ansix923 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-iso10126.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-iso10126.js
|
||||
var require_pad_iso10126 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-iso10126.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-iso10126.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3944,9 +3944,9 @@ var require_pad_iso10126 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-iso97971.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-iso97971.js
|
||||
var require_pad_iso97971 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-iso97971.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-iso97971.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -3971,9 +3971,9 @@ var require_pad_iso97971 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-zeropadding.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-zeropadding.js
|
||||
var require_pad_zeropadding = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-zeropadding.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-zeropadding.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -4005,9 +4005,9 @@ var require_pad_zeropadding = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-nopadding.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-nopadding.js
|
||||
var require_pad_nopadding = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/pad-nopadding.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/pad-nopadding.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -4028,9 +4028,9 @@ var require_pad_nopadding = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/format-hex.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/format-hex.js
|
||||
var require_format_hex = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/format-hex.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/format-hex.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_cipher_core());
|
||||
|
@ -4088,9 +4088,9 @@ var require_format_hex = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/aes.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/aes.js
|
||||
var require_aes = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/aes.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/aes.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -4242,9 +4242,9 @@ var require_aes = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/tripledes.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/tripledes.js
|
||||
var require_tripledes = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/tripledes.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/tripledes.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -5023,9 +5023,9 @@ var require_tripledes = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/rc4.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rc4.js
|
||||
var require_rc4 = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/rc4.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rc4.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -5106,9 +5106,9 @@ var require_rc4 = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/rabbit.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rabbit.js
|
||||
var require_rabbit = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/rabbit.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rabbit.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -5235,9 +5235,9 @@ var require_rabbit = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/rabbit-legacy.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rabbit-legacy.js
|
||||
var require_rabbit_legacy = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/rabbit-legacy.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/rabbit-legacy.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -5361,9 +5361,9 @@ var require_rabbit_legacy = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/blowfish.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/blowfish.js
|
||||
var require_blowfish = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/blowfish.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/blowfish.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_enc_base64(), require_md5(), require_evpkdf(), require_cipher_core());
|
||||
|
@ -6550,9 +6550,9 @@ var require_blowfish = __commonJS({
|
|||
}
|
||||
});
|
||||
|
||||
// ../../../../document/九亿商城/jy/service/node_modules/crypto-js/index.js
|
||||
// ../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/index.js
|
||||
var require_crypto_js = __commonJS({
|
||||
"../../../../document/九亿商城/jy/service/node_modules/crypto-js/index.js"(exports, module) {
|
||||
"../../../../../桌面/jiuyiUniapp/service/node_modules/crypto-js/index.js"(exports, module) {
|
||||
(function(root, factory, undef) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = exports = factory(require_core(), require_x64_core(), require_lib_typedarrays(), require_enc_utf16(), require_enc_base64(), require_enc_base64url(), require_md5(), require_sha1(), require_sha256(), require_sha224(), require_sha512(), require_sha384(), require_sha3(), require_ripemd160(), require_hmac(), require_pbkdf2(), require_evpkdf(), require_cipher_core(), require_mode_cfb(), require_mode_ctr(), require_mode_ctr_gladman(), require_mode_ofb(), require_mode_ecb(), require_pad_ansix923(), require_pad_iso10126(), require_pad_iso97971(), require_pad_zeropadding(), require_pad_nopadding(), require_format_hex(), require_aes(), require_tripledes(), require_rc4(), require_rabbit(), require_rabbit_legacy(), require_blowfish());
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@ import {
|
|||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
|
||||
// let target = 'http://91f.xyz:8080'
|
||||
let target = 'http://1a4b9ed1.r24.cpolar.top'
|
||||
let target = 'https://b433d23.r24.cpolar.top/'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue