diff --git a/.gitignore b/.gitignore
index 5d630ad2..b95ecdaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/jiuyi2/unpackage
/jiuyi/unpackage
/jiuyi2/.hbuilderx
-/jiuyi/.hbuilderx
\ No newline at end of file
+/jiuyi/.hbuilderx
+unpackage
diff --git a/jiuyi2/api/mine.js b/jiuyi2/api/mine.js
index 1a0c466f..2f585fea 100644
--- a/jiuyi2/api/mine.js
+++ b/jiuyi2/api/mine.js
@@ -354,6 +354,7 @@ const mine = {
},
/**
+<<<<<<< HEAD
* 解锁他人评论
* @param {Object} param
*/
@@ -362,10 +363,23 @@ const mine = {
url: `/video/comment/unlockOthersComment`,
data: param,
method: 'POST',
+=======
+ * 查看已绑定的银行卡列表
+ * @param {Object} param
+ */
+ getBankCards(param) {
+ return util.request({
+ url: '/user/bank-cards/getBankCards',
+ data: param.data,
+ query: param.query,
+ method: 'GET',
+ load: true,
+>>>>>>> 0a930aa1702a2566cc55bb62dad90293c20f3b0d
})
},
/**
+<<<<<<< HEAD
* 拉黑
* @param {Object} param
*/
@@ -374,6 +388,31 @@ const mine = {
url: `/video/statistics/block`,
data: param,
method: 'POST',
+=======
+ * 添加银行卡
+ * @param {Object} param
+ */
+ addBankCard(param) {
+ return util.request({
+ url: '/user/bank-cards/addBankCard',
+ data: param.data,
+ query: param.query,
+ method: 'POST',
+ load: true,
+ })
+ },
+
+ /**
+ * 删除银行卡
+ * @param {Object} param
+ */
+ deleteBankCard(param) {
+ return util.request({
+ url: '/user/bank-cards/deleteBankCard',
+ path: param.path,
+ method: 'DELETE',
+ load: true,
+>>>>>>> 0a930aa1702a2566cc55bb62dad90293c20f3b0d
})
},
}
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index cbca85b5..d38f5920 100644
--- a/jiuyi2/common/js/config.js
+++ b/jiuyi2/common/js/config.js
@@ -6,9 +6,13 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
+<<<<<<< HEAD
// host: 'http://91f.xyz:8080',
// host: 'https://1a880cd5.r24.cpolar.top/',
host: 'http://aere2w.natappfree.cc',
+=======
+ host: 'http://91f.xyz:8080',
+>>>>>>> 0a930aa1702a2566cc55bb62dad90293c20f3b0d
// #endif
// 支付方式配置
payType: {
diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js
index b82f96e0..62bdca84 100644
--- a/jiuyi2/common/js/util.js
+++ b/jiuyi2/common/js/util.js
@@ -213,7 +213,7 @@ const util = {
responseType: params.responseType || 'text',
// 请求成功返回
success: res => {
- // console.log('request success', url, res, params.data ? params.data : '')
+ console.log('request success', url, res, params.data ? params.data : '')
// 关闭加载效果
if (params.load) {
uni.hideLoading()
@@ -224,8 +224,7 @@ const util = {
// 登出
util.logout(() => {
util.alert('请先登录')
- reject(res.data) // 链式回调0
-
+ reject(res.data)
// uni.reLaunch({
// url: '/login/login',
// })
@@ -235,7 +234,6 @@ const util = {
params.success ? params.success(res.data) : ''
// 链式回调
resolve(res.data);
-
},
// 请求失败返回
fail: res => {
@@ -1410,17 +1408,17 @@ const util = {
* @param {Function} cb 回调函数
*/
finalLogin(param, cb) {
- try {
- // 登录令牌
- const token = param.data
- // 缓存token
- uni.setStorageSync('token', token)
-
- // 开启加载
- uni.showLoading({
- mask: true
- })
+ // 登录令牌
+ const token = param.data
+ // 缓存token
+ uni.setStorageSync('token', token)
+ console.log('set token', token)
+ // 开启加载
+ uni.showLoading({
+ mask: true
+ })
+ setTimeout(() => {
// 获取用户信息
util.getUserinfo((userinfo) => {
// 登录
@@ -1435,9 +1433,7 @@ const util = {
//
cb ? cb() : ''
})
- } catch (ev) {
- console.log('finalLogin catch', ev)
- }
+ }, 500)
},
// 登录腾讯聊天
diff --git a/jiuyi2/components/shop/productList/productList.vue b/jiuyi2/components/shop/productList/productList.vue
index 33cb6680..c786f718 100644
--- a/jiuyi2/components/shop/productList/productList.vue
+++ b/jiuyi2/components/shop/productList/productList.vue
@@ -57,7 +57,6 @@
// 加载更多列表
function getMoreList() {
- console.log('getMoreList', listPrototype)
if (listPrototype.total <= listPrototype.data.length) return
listPrototype.pageNum++
getList()
diff --git a/jiuyi2/pages/index/myTeam.vue b/jiuyi2/pages/index/myTeam.vue
index 904c6c3b..1994316e 100644
--- a/jiuyi2/pages/index/myTeam.vue
+++ b/jiuyi2/pages/index/myTeam.vue
@@ -158,7 +158,10 @@
商
- {{item.userNickname}}{{item.isShop}}
+
+ {{item.userNickname}}
+ {{item.sonList.length}}
+
@@ -180,8 +183,9 @@
商
- {{secItem.userNickname}}
- {{secItem.count}}
+ {{secItem.userNickname}}
+ {{secItem.count}}
@@ -228,6 +232,15 @@
background-image: linear-gradient(114deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
}
+ // 实名
+ .name {
+ color: #FF8400;
+
+ &.auth {
+ color: #333;
+ }
+ }
+
// 二级列表
.list {
padding-left: .5em;
diff --git a/jiuyi2/pages/index/videoDetail.nvue b/jiuyi2/pages/index/videoDetail.nvue
index 8e5346c0..fabfecd3 100644
--- a/jiuyi2/pages/index/videoDetail.nvue
+++ b/jiuyi2/pages/index/videoDetail.nvue
@@ -17,6 +17,8 @@
import util from '@/common/js/util';
// api
import api from '@/api/index.js'
+ // 手机状态栏
+ import statusBar from '@/components/header/statusBar.vue';
// 首页视频
import indexVideo from '@/components/index/indexVideo.vue'
// 评论弹窗
@@ -258,15 +260,41 @@
})
})
}
+
+ /**
+ * 返回
+ */
+ function handleBack() {
+ const pages = getCurrentPages()
+
+ // 如果页面栈数量大于1
+ if (pages.length > 1) {
+ uni.navigateBack()
+ } else {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+ @dataCenter="handleDataCenter" @showProduct="handleShowProduct" @proBuy="handleProBuy" />
@@ -274,13 +302,27 @@
-
-
-
-
+
+
+
+
-
\ No newline at end of file
diff --git a/jiuyi2/pages/index/videoDetail.vue b/jiuyi2/pages/index/videoDetail.vue
index 05c99efd..fabfecd3 100644
--- a/jiuyi2/pages/index/videoDetail.vue
+++ b/jiuyi2/pages/index/videoDetail.vue
@@ -7,6 +7,7 @@
ref,
getCurrentInstance,
reactive,
+ computed,
} from 'vue'
import {
onLoad,
@@ -16,6 +17,8 @@
import util from '@/common/js/util';
// api
import api from '@/api/index.js'
+ // 手机状态栏
+ import statusBar from '@/components/header/statusBar.vue';
// 首页视频
import indexVideo from '@/components/index/indexVideo.vue'
// 评论弹窗
@@ -24,6 +27,10 @@
import collectAlt from '@/components/index/collect.vue'
// 分享到好友弹窗
import shareFirendAlt from '@/components/index/shareFirend.vue'
+ // 产品详情弹窗
+ import productAlt from '@/components/index/proDetailAlt.vue'
+ // 产品规格弹窗
+ import productSpecAlt from '@/components/shop/detail/makeOrder.vue'
const {
proxy
@@ -34,11 +41,17 @@
const detail = reactive({})
// 是否是自己
const isMine = ref(false)
+ // 显示统计
+ const statistic = ref('0')
+ // 用户信息
+ const userinfo = computed(() => uni.$store.state.userinfo)
onLoad((option) => {
if (option.videoId) videoId.value = option.videoId
// 是否我的作品
if (option.isMine && option.isMine != 'false') isMine.value = option.isMine
+ // 是否显示统计
+ if (option.statistic) statistic.value = option.statistic
// 获取视频详情
getVideoDetail()
@@ -64,12 +77,7 @@
}
}).then(rs => {
if (rs.code == 200) {
- const result = rs.data
-
- result.format_videoUrl = util.format_url(result.videoUrl, 'video')
- result.format_header = util.format_url(result.header, 'img')
-
- Object.assign(detail, result)
+ Object.assign(detail, rs.data)
// 播放视频
proxy.$refs.indexVideo.play()
@@ -107,41 +115,38 @@
proxy.$refs.shareFirendRef.open()
}
+
/**
* 视频点赞
* @param {Object} param 见下
* @param {Number} param.index 操作的视频下标
- * @param {Number|String} param.isLike 点赞操作
+ * @param {Number|String} param.isLike 0.点赞 1.取消点赞
+ * @param {Number|String} param.likeType 点赞类型 0.公开赞 1.隐私赞
*/
function videoLike(param) {
- const {
- index,
- isLike
- } = param
const item = detail
- // 操作状态
- let type = 1
- // 0未点赞 1已点赞 3私密赞
- if (item.isLike == 0) type = isLike
+ const data = {
+ // 视频id
+ videoId: item.id,
+ // 点赞用户id
+ likeUserId: userinfo.value.id,
+ // 被点赞用户id
+ targetUserId: item.userId,
+ // 点赞类型 0.公开赞 1.隐私赞
+ likeType: param.likeType,
+ // //点赞 0.点赞 1.取消点赞
+ isLike: param.isLike,
+ }
//
api.video.videoLike({
- query: {
- // 0赞1取消赞 3私密赞
- type,
- // 视频id
- videoId: item.videoId,
- }
+ data,
}).then(rs => {
if (rs.code == 200) {
- // 同步点赞状态
- item.isLike = {
- 0: 1,
- 1: 0,
- 3: 3,
- } [type]
- // 取消减数量 否则增加
- type == 1 ? item.likes-- : item.likes++
+ uni.$emit('updateVideo', {
+ ...item,
+ ...rs.data,
+ })
return
}
util.alert({
@@ -206,17 +211,90 @@
* @param {Object} detail
*/
function handleDataCenter(detail) {
+ uni.navigateTo({
+ url: util.setUrl('/pages/index/dataCenter/dataCenter', {
+ videoId: detail.id,
+ })
+ })
+ }
+
+ /**
+ * 打开产品弹窗
+ * @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 handleBack() {
+ const pages = getCurrentPages()
+
+ // 如果页面栈数量大于1
+ if (pages.length > 1) {
+ uni.navigateBack()
+ } else {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }
}
+
+
+
+
+
+
+
+
+
+
-
+ @dataCenter="handleDataCenter" @showProduct="handleShowProduct" @proBuy="handleProBuy" />
@@ -224,9 +302,27 @@
+
+
+
+
-
\ No newline at end of file
diff --git a/jiuyi2/pages/mine/myComment.vue b/jiuyi2/pages/mine/myComment.vue
index 324328f3..96248c7b 100644
--- a/jiuyi2/pages/mine/myComment.vue
+++ b/jiuyi2/pages/mine/myComment.vue
@@ -35,6 +35,7 @@ const userinfo = computed(() => {
return store.state.userinfo
})
+<<<<<<< HEAD
onLoad((option) => {
if (option.userId) {
uni.setNavigationBarTitle({
@@ -43,6 +44,53 @@ onLoad((option) => {
getList(option.userId)
} else {
getList()
+=======
+ onLoad(() => {
+ getLst()
+ })
+
+ // 重载视频列表
+ function refreshVideoList() {
+ list.pageNum = 1
+ list.total = 0
+ getLst()
+ }
+
+ // 获取更多视频列表
+ function getMoreVideoList() {
+ if (list.data.length >= list.total) return
+ list.pageNum++
+ getLst()
+ }
+
+ // 获取我的评论
+ function getLst() {
+ api.mine.myComment({
+ query: {
+ userId: userinfo.value.id,
+ pageNum: list.pageNum,
+ pageSize: list.pageSize,
+ }
+ }).then(rs => {
+ if (rs.code == 200) {
+ if (list.pageNum) list.data.length = 0
+ // 追加视频列表
+ list.data.push(...rs.rows.map(item => {
+ return item
+ }))
+ // 视频列表
+ list.total = rs.total
+ console.log('list', list.data)
+ return
+ }
+ util.alert({
+ content: rs.msg,
+ showCancel: false,
+ })
+ }).finally(() => {
+ uni.stopPullDownRefresh()
+ })
+>>>>>>> 0a930aa1702a2566cc55bb62dad90293c20f3b0d
}
})
diff --git a/jiuyi2/pages/mine/setting/bankCard.vue b/jiuyi2/pages/mine/setting/bankCard.vue
index 912b6360..076ce6e6 100644
--- a/jiuyi2/pages/mine/setting/bankCard.vue
+++ b/jiuyi2/pages/mine/setting/bankCard.vue
@@ -1,5 +1,82 @@
-
- 很行银行
- 储蓄卡
- **** **** **** 0896
-
+
+
+
+
+ {{item.bankName}}
+
+ 储蓄卡
+ 信用卡
+
+ {{item.cardNumber}}
+
+
+
+
-
+
添加银行卡
@@ -27,10 +146,11 @@