diff --git a/jiuyi2/androidPrivacy.json b/jiuyi2/androidPrivacy.json
index 505b6c74..dec5a812 100644
--- a/jiuyi2/androidPrivacy.json
+++ b/jiuyi2/androidPrivacy.json
@@ -2,14 +2,14 @@
"version" : "1",
"prompt" : "template",
"title" : "隐私政策",
- "message" : " 请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
你可阅读《用户协议》和《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
+ "message" : " 请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
你可阅读《用户协议》和《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system|default",
"backToExit" : "false",
"second" : {
"title" : "确认提示",
- "message" : " 进入应用前,你需先同意《隐私政策》和《隐私政策》",
+ "message" : " 进入应用前,你需先同意《用户协议》和《隐私政策》",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "拒绝"
},
diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js
index a21aa1a4..43aef5e2 100644
--- a/jiuyi2/api/video.js
+++ b/jiuyi2/api/video.js
@@ -24,6 +24,19 @@ const video = {
url: `/video/video/add`,
data: param.data,
method: 'POST',
+ load: true,
+ })
+ },
+
+ /**
+ * 删除视频
+ * @param {Object} param
+ */
+ removeVideo(param) {
+ return util.request({
+ url: `/video/video/deleteVideo`,
+ data: param.data,
+ method: 'POST',
})
},
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index 36f1528f..92c59f9f 100644
--- a/jiuyi2/common/js/config.js
+++ b/jiuyi2/common/js/config.js
@@ -6,10 +6,9 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
- host: 'http://91f.xyz:8080',
+ // host: 'http://91f.xyz:8080',
// host: 'http://192.168.0.110:8080',
- // host: 'http://192.168.0.100:8080',
- // host: 'http://192.168.0.114:8080',
+ host: 'http://192.168.0.100:8080',
// #endif
// 支付方式配置
payType: {
diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js
index 1ad97988..9e431736 100644
--- a/jiuyi2/common/js/util.js
+++ b/jiuyi2/common/js/util.js
@@ -5,8 +5,6 @@ import config from '@/common/js/config.js'
// 接口
import api from '@/api/index.js'
-const msgType = {}
-
// 工具库
const util = {
// 配置参数
diff --git a/jiuyi2/components/shop/productList/productList.vue b/jiuyi2/components/shop/productList/productList.vue
index f34b130e..46768968 100644
--- a/jiuyi2/components/shop/productList/productList.vue
+++ b/jiuyi2/components/shop/productList/productList.vue
@@ -50,12 +50,19 @@
// 重载列表
function refreshList() {
- console.log('listPrototype', listPrototype)
listPrototype.pageNum = 1
listPrototype.total = 0
getList()
}
+ // 加载更多列表
+ function getMoreList() {
+ console.log('getMoreList', listPrototype)
+ if (listPrototype.total <= listPrototype.data.length) return
+ listPrototype.pageNum++
+ getList()
+ }
+
// 获取商品
function getList() {
api.shop.getProduct({
@@ -90,6 +97,7 @@
getList,
listPrototype,
refreshList,
+ getMoreList,
})
diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue
index cb7ed8e5..b0ae8db0 100644
--- a/jiuyi2/pages/index/index.nvue
+++ b/jiuyi2/pages/index/index.nvue
@@ -211,7 +211,6 @@
})
onHide(() => {
- console.log('onHide', current[tabIndex.value], currentVideoRef)
// 暂停视频
if (proxy.$refs[`videoRef${tabIndex.value}`]) {
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
diff --git a/jiuyi2/pages/index/videoDetail.nvue b/jiuyi2/pages/index/videoDetail.nvue
index 6ac3ff0d..93942d9b 100644
--- a/jiuyi2/pages/index/videoDetail.nvue
+++ b/jiuyi2/pages/index/videoDetail.nvue
@@ -159,10 +159,10 @@
// 菜单
let menu = [{
name: '编辑',
- fn: function() {
+ fn: () => {
uni.navigateTo({
url: util.setUrl('/pages/release/video', {
- videoId: detail.videoId,
+ videoId: detail.id,
})
})
}
@@ -174,10 +174,9 @@
content: '删除后不可恢复。确认删除?',
}).then(rs => {
// 删除视频
- if (rs.confirm) api.video.updateVideo({
+ if (rs.confirm) api.video.deleteVideo({
data: {
- videoId: detail.videoId,
- isDeleted: 1,
+ id: detail.id,
}
}).then(rs => {
if (rs.code == 200) {
@@ -214,9 +213,10 @@
-
+
diff --git a/jiuyi2/pages/index/videoDetail.vue b/jiuyi2/pages/index/videoDetail.vue
index feaef2f5..05c99efd 100644
--- a/jiuyi2/pages/index/videoDetail.vue
+++ b/jiuyi2/pages/index/videoDetail.vue
@@ -33,12 +33,12 @@
// 视频详情
const detail = reactive({})
// 是否是自己
- const isMine = ref(0)
+ const isMine = ref(false)
onLoad((option) => {
if (option.videoId) videoId.value = option.videoId
// 是否我的作品
- if (option.isMine) isMine.value = option.isMine
+ if (option.isMine && option.isMine != 'false') isMine.value = option.isMine
// 获取视频详情
getVideoDetail()
@@ -58,7 +58,6 @@
// 获取视频详情
function getVideoDetail() {
- console.log('videoId.value', videoId.value)
api.video.getVideoById({
data: {
id: videoId.value,
@@ -160,10 +159,10 @@
// 菜单
let menu = [{
name: '编辑',
- fn: function() {
+ fn: () => {
uni.navigateTo({
url: util.setUrl('/pages/release/video', {
- videoId: detail.videoId,
+ videoId: detail.id,
})
})
}
@@ -175,10 +174,9 @@
content: '删除后不可恢复。确认删除?',
}).then(rs => {
// 删除视频
- if (rs.confirm) api.video.updateVideo({
+ if (rs.confirm) api.video.removeVideo({
data: {
- videoId: detail.videoId,
- isDeleted: 1,
+ id: detail.id,
}
}).then(rs => {
if (rs.code == 200) {
@@ -202,12 +200,23 @@
}
})
}
+
+ /**
+ * 跳转数据中心
+ * @param {Object} detail
+ */
+ function handleDataCenter(detail) {
+ //
+ }
-
+
diff --git a/jiuyi2/pages/mine/homepage.vue b/jiuyi2/pages/mine/homepage.vue
index 34d3d552..8966292e 100644
--- a/jiuyi2/pages/mine/homepage.vue
+++ b/jiuyi2/pages/mine/homepage.vue
@@ -83,12 +83,8 @@
onLoad(() => {
// 初始化
handleTabIndex(0)
-
// 开启监听
- uni.$on('focusUser', () => {
- // 更新用户信息
- util.getUserinfo()
- })
+ addListener()
})
onReady(() => {
@@ -97,7 +93,8 @@
})
onUnload(() => {
- uni.$off('focusUser')
+ // 移除监听
+ removeList()
})
// 滚动
@@ -110,6 +107,26 @@
proxy.$refs[tabCurrent.value.ref].getMoreList()
})
+ // 开启监听
+ function addListener() {
+ // 开启监听
+ uni.$on('focusUser', () => {
+ // 更新用户信息
+ util.getUserinfo()
+ })
+
+ // 开启监听
+ uni.$on('deleteVideo', () => {
+ proxy.$refs[tabCurrent.value.ref].refreshList()
+ })
+ }
+
+ // 移除监听
+ function removeList() {
+ uni.$off('focusUser')
+ uni.$off('deleteVideo')
+ }
+
// 举报
function handleReport() {
// 关闭弹窗
@@ -313,7 +330,7 @@
-
+
diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue
index 355680bb..e37c4ae7 100644
--- a/jiuyi2/pages/release/commodity.vue
+++ b/jiuyi2/pages/release/commodity.vue
@@ -14,6 +14,7 @@
import util from '@/common/js/util.js'
// 表单
const form = reactive({
+ id: '',
categoryId: '',
sliderImage: [],
spec: [],
@@ -23,13 +24,65 @@
// 分类下标
const categoryIndex = ref('')
- onLoad((options) => {
- // 添加商品规格
- handlePushSpec()
- // 获取商品分类
- getCategory()
+ onLoad((option) => {
+ if (option.id) {
+ form.id = option.id
+ Promise.all([getProDetail(), getCategory()]).then(rs => {
+ const detail = rs[0]
+ const cate = rs[1]
+ // 商品图片
+ form.sliderImage = detail.sliderImage.split(',')
+ // 下标
+ categoryIndex.value = cate.findIndex(item => item.id === detail.categoryId)
+ // 商品id
+ form.id = detail.id
+ // 商品规格
+ form.categoryId = detail.categoryId
+ // 商品价格
+ form.price = detail.price
+ // 商品名称
+ form.name = detail.name
+ // 商品成本价
+ form.cost = detail.cost
+ // 商品佣金
+ form.commission = detail.commission
+ // 规格
+ form.spec = detail.specs.map(item => {
+ return {
+ image: item.image,
+ sku: item.sku,
+ stock: item.stock,
+ }
+ })
+ })
+ } else {
+ // 添加商品规格
+ handlePushSpec()
+ // 获取商品分类
+ getCategory()
+ }
})
+ // 获取商品详情
+ function getProDetail() {
+ return new Promise((resolve, reject) => {
+ api.shop.productDetail({
+ query: {
+ productionId: form.id
+ },
+ }).then(rs => {
+ if (rs.code === 200) {
+ resolve(rs.data)
+ return
+ }
+ util.alert({
+ content: rs.msg,
+ showCancel: false,
+ })
+ })
+ })
+ }
+
// 获取商品分类
function getCategory() {
return new Promise((resolve, reject) => {
@@ -88,7 +141,6 @@
type: 1,
success: rs => {
item.image = rs.value
- console.log('spec', form.spec)
}
})
}
@@ -160,7 +212,7 @@
-
+
类目
diff --git a/jiuyi2/pages/release/video.vue b/jiuyi2/pages/release/video.vue
index 52244958..079c10e7 100644
--- a/jiuyi2/pages/release/video.vue
+++ b/jiuyi2/pages/release/video.vue
@@ -83,35 +83,44 @@
form.videoId = option.videoId
// 获取标签 获取详情
Promise.all([getVideoDetail(), getLabel()]).then(rs => {
+ // 详情
const detail = rs[0]
+ // 标签
const labels = rs[1]
+ // at用户
const users = rs[2]
console.log('release getDetail', detail)
- // 视频地址
- form.videoUrl = util.format_url(detail.videoUrl, 'video')
+
+ // 视频id
+ form.id = detail.id
+ // 视频大小
+ form.videoSize = detail.videoSize
+ // 宽
+ form.breadth = detail.breadth
+ // 高
+ form.height = detail.height
+ // 时长
+ form.videoDuration = detail.videoDuration
// 缩略图
- form.imageUrl = util.format_url(detail.imageUrl, 'img')
+ form.coverUrl = detail.coverUrl
+ // 视频地址
+ form.videoUrl = detail.videoUrl
// 标题
form.title = detail.title
// 正文
- form.content = detail.content
- // 0正常1草稿
- form.isDraft = detail.isDraft
- // 匹配话题id
- // detail.talkId.split(',').forEach(node => {
- // for (let i = 0; i < labelList.length; i++) {
- // const item = labelList[i]
- // if (node == item.id) labelSelect.push(item)
- // }
- // })
+ form.description = detail.description
+ // //视频状态 0草稿 1待审核 2审核失败 3已发布 4已下架
+ form.status = detail.status
+ // 回显话题列表
+ if (detail.tagsList) labelSelect.push(...detail.tagsList)
// 匹配用户id
- detail.subscriber = detail.subscriber.split(',')
- detail.subscriberId.split(',').forEach((item, index) => {
- userSelect.push({
- userId: item,
- userNickname: detail.subscriber[index]
- })
- })
+ // detail.subscriber = detail.subscriber.split(',')
+ // detail.subscriberId.split(',').forEach((item, index) => {
+ // userSelect.push({
+ // userId: item,
+ // userNickname: detail.subscriber[index]
+ // })
+ // })
})
} else {
// 获取标签
@@ -126,8 +135,8 @@
function getVideoDetail() {
return new Promise((resolve, reject) => {
api.video.getVideoById({
- query: {
- videoId: form.videoId,
+ data: {
+ id: form.videoId,
}
}).then(rs => {
if (rs.code == 200) {
@@ -343,13 +352,13 @@
util.alert('封面不能为空')
return
}
+ if (!data.title) {
+ util.alert('标题不能为空')
+ return
+ }
// 如果不是草稿箱
if (data.status == 1) {
- if (!data.title) {
- util.alert('标题不能为空')
- return
- }
if (!data.description) {
util.alert('正文不能为空')
return
diff --git a/jiuyi2/pages/shop/shop.vue b/jiuyi2/pages/shop/shop.vue
index 5eea535d..93b3a3f1 100644
--- a/jiuyi2/pages/shop/shop.vue
+++ b/jiuyi2/pages/shop/shop.vue
@@ -47,11 +47,13 @@
})
onReachBottom(() => {
- //
+ // 重载列表
+ proxy.$refs.product.getMoreList()
})
onPullDownRefresh(() => {
- //
+ // 重载列表
+ proxy.$refs.product.refreshList()
})
onShow(() => {
diff --git a/jiuyi2/static/settedBoard.png b/jiuyi2/static/settedBoard.png
deleted file mode 100644
index b8175735..00000000
Binary files a/jiuyi2/static/settedBoard.png and /dev/null differ
diff --git a/jiuyi2/static/settedCartoon.png b/jiuyi2/static/settedCartoon.png
deleted file mode 100644
index 1abbe13b..00000000
Binary files a/jiuyi2/static/settedCartoon.png and /dev/null differ
diff --git a/jiuyi2/static/settedCartoon1.png b/jiuyi2/static/settedCartoon1.png
deleted file mode 100644
index d8a79cdc..00000000
Binary files a/jiuyi2/static/settedCartoon1.png and /dev/null differ
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index 4f576d65..57ca504a 100644
--- a/jiuyi2/vite.config.js
+++ b/jiuyi2/vite.config.js
@@ -7,7 +7,6 @@ import uni from '@dcloudio/vite-plugin-uni';
// let target = 'http://91f.xyz:8080'
// let target = 'http://192.168.0.110:8080'
let target = 'http://192.168.0.100:8080'
-// let target = 'http://192.168.0.114:8080'
export default defineConfig({
plugins: [uni()],