Compare commits
No commits in common. "0a930aa1702a2566cc55bb62dad90293c20f3b0d" and "a8684b1956a92b2e4de0d5c37c0f79e2583d94d0" have entirely different histories.
0a930aa170
...
a8684b1956
|
@ -1,5 +1,4 @@
|
||||||
/jiuyi2/unpackage
|
/jiuyi2/unpackage
|
||||||
/jiuyi/unpackage
|
/jiuyi/unpackage
|
||||||
/jiuyi2/.hbuilderx
|
/jiuyi2/.hbuilderx
|
||||||
/jiuyi/.hbuilderx
|
/jiuyi/.hbuilderx
|
||||||
unpackage
|
|
|
@ -352,47 +352,6 @@ const mine = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 查看已绑定的银行卡列表
|
|
||||||
* @param {Object} param
|
|
||||||
*/
|
|
||||||
getBankCards(param) {
|
|
||||||
return util.request({
|
|
||||||
url: '/user/bank-cards/getBankCards',
|
|
||||||
data: param.data,
|
|
||||||
query: param.query,
|
|
||||||
method: 'GET',
|
|
||||||
load: true,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加银行卡
|
|
||||||
* @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,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default mine
|
export default mine
|
|
@ -7,6 +7,8 @@ const config = {
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
|
// host: 'https://1a880cd5.r24.cpolar.top/',
|
||||||
|
// host: 'http://6mkwby.natappfree.cc',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -213,7 +213,7 @@ const util = {
|
||||||
responseType: params.responseType || 'text',
|
responseType: params.responseType || 'text',
|
||||||
// 请求成功返回
|
// 请求成功返回
|
||||||
success: res => {
|
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) {
|
if (params.load) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -224,7 +224,8 @@ const util = {
|
||||||
// 登出
|
// 登出
|
||||||
util.logout(() => {
|
util.logout(() => {
|
||||||
util.alert('请先登录')
|
util.alert('请先登录')
|
||||||
reject(res.data)
|
reject(res.data) // 链式回调0
|
||||||
|
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url: '/login/login',
|
// url: '/login/login',
|
||||||
// })
|
// })
|
||||||
|
@ -234,6 +235,7 @@ const util = {
|
||||||
params.success ? params.success(res.data) : ''
|
params.success ? params.success(res.data) : ''
|
||||||
// 链式回调
|
// 链式回调
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
|
|
||||||
},
|
},
|
||||||
// 请求失败返回
|
// 请求失败返回
|
||||||
fail: res => {
|
fail: res => {
|
||||||
|
@ -1408,17 +1410,17 @@ const util = {
|
||||||
* @param {Function} cb 回调函数
|
* @param {Function} cb 回调函数
|
||||||
*/
|
*/
|
||||||
finalLogin(param, cb) {
|
finalLogin(param, cb) {
|
||||||
// 登录令牌
|
try {
|
||||||
const token = param.data
|
// 登录令牌
|
||||||
// 缓存token
|
const token = param.data
|
||||||
uni.setStorageSync('token', token)
|
// 缓存token
|
||||||
console.log('set token', token)
|
uni.setStorageSync('token', token)
|
||||||
|
|
||||||
|
// 开启加载
|
||||||
|
uni.showLoading({
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
|
||||||
// 开启加载
|
|
||||||
uni.showLoading({
|
|
||||||
mask: true
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
util.getUserinfo((userinfo) => {
|
util.getUserinfo((userinfo) => {
|
||||||
// 登录
|
// 登录
|
||||||
|
@ -1433,7 +1435,9 @@ const util = {
|
||||||
//
|
//
|
||||||
cb ? cb() : ''
|
cb ? cb() : ''
|
||||||
})
|
})
|
||||||
}, 500)
|
} catch (ev) {
|
||||||
|
console.log('finalLogin catch', ev)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 登录腾讯聊天
|
// 登录腾讯聊天
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
// 加载更多列表
|
// 加载更多列表
|
||||||
function getMoreList() {
|
function getMoreList() {
|
||||||
|
console.log('getMoreList', listPrototype)
|
||||||
if (listPrototype.total <= listPrototype.data.length) return
|
if (listPrototype.total <= listPrototype.data.length) return
|
||||||
listPrototype.pageNum++
|
listPrototype.pageNum++
|
||||||
getList()
|
getList()
|
||||||
|
|
|
@ -158,10 +158,7 @@
|
||||||
<view class="li mtb30" v-for="(item,index) in team.sonUser" :key="item.id">
|
<view class="li mtb30" v-for="(item,index) in team.sonUser" :key="item.id">
|
||||||
<view class="menber df aic">
|
<view class="menber df aic">
|
||||||
<view class="count mr20 plr10 cfff br10" v-if="item.isShop == 1">商</view>
|
<view class="count mr20 plr10 cfff br10" v-if="item.isShop == 1">商</view>
|
||||||
<view class="c333 f32">
|
<view class="c333 f32">{{item.userNickname}}{{item.isShop}}</view>
|
||||||
<text class="name" :class="{'auth': item.isRealName}">{{item.userNickname}}</text>
|
|
||||||
<text class="ml20" v-if="item.sonList.length != 0">{{item.sonList.length}}</text>
|
|
||||||
</view>
|
|
||||||
<template v-if="item.sonList[0]">
|
<template v-if="item.sonList[0]">
|
||||||
<uni-icons @click="lowTeam(item)" type="up" color="#A45EFF" size="28rpx"
|
<uni-icons @click="lowTeam(item)" type="up" color="#A45EFF" size="28rpx"
|
||||||
v-if="item.showSecond" />
|
v-if="item.showSecond" />
|
||||||
|
@ -183,9 +180,8 @@
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="ml10 df aic c999 f28">
|
<view class="ml10 df aic c999 f28">
|
||||||
<view class="count mr20 plr10 cfff br10" v-if="secItem.isShop == 1">商</view>
|
<view class="count mr20 plr10 cfff br10" v-if="secItem.isShop == 1">商</view>
|
||||||
<text class="name"
|
<view class="name">{{secItem.userNickname}}</view>
|
||||||
:class="{'auth': secItem.isRealName}">{{secItem.userNickname}}</text>
|
<view class="label ml10">{{secItem.count}}</view>
|
||||||
<view class="label ml20" v-if="secItem.count != 0">{{secItem.count}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -232,15 +228,6 @@
|
||||||
background-image: linear-gradient(114deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
|
background-image: linear-gradient(114deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 实名
|
|
||||||
.name {
|
|
||||||
color: #FF8400;
|
|
||||||
|
|
||||||
&.auth {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 二级列表
|
// 二级列表
|
||||||
.list {
|
.list {
|
||||||
padding-left: .5em;
|
padding-left: .5em;
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 手机状态栏
|
|
||||||
import statusBar from '@/components/header/statusBar.vue';
|
|
||||||
// 首页视频
|
// 首页视频
|
||||||
import indexVideo from '@/components/index/indexVideo.vue'
|
import indexVideo from '@/components/index/indexVideo.vue'
|
||||||
// 评论弹窗
|
// 评论弹窗
|
||||||
|
@ -260,41 +258,15 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 返回
|
|
||||||
*/
|
|
||||||
function handleBack() {
|
|
||||||
const pages = getCurrentPages()
|
|
||||||
|
|
||||||
// 如果页面栈数量大于1
|
|
||||||
if (pages.length > 1) {
|
|
||||||
uni.navigateBack()
|
|
||||||
} else {
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="page f1">
|
<view class="page f1">
|
||||||
<view class="apex">
|
|
||||||
<statusBar />
|
|
||||||
|
|
||||||
<view class="head df fdr jcsb">
|
|
||||||
<view class="back" @click="handleBack">
|
|
||||||
<uni-icons type="left" color="#fff" size="40rpx" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<indexVideo ref="indexVideo" :statistic="statistic" :item="detail" :tabIndex="0" :isMine="isMine" :index="0"
|
<indexVideo ref="indexVideo" :statistic="statistic" :item="detail" :tabIndex="0" :isMine="isMine" :index="0"
|
||||||
:current="0" mode="detail" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
|
:current="0" mode="detail" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
|
||||||
@showShareFirend="handleShowShareFirend" @like="videoLike" @detailMenu="detailMenu"
|
@showShareFirend="handleShowShareFirend" @like="videoLike" @detailMenu="detailMenu"
|
||||||
@dataCenter="handleDataCenter" @showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
@dataCenter="handleDataCenter"@showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
||||||
|
|
||||||
<!-- 评论弹窗 -->
|
<!-- 评论弹窗 -->
|
||||||
<commentAlt ref="commentRef" />
|
<commentAlt ref="commentRef" />
|
||||||
|
@ -302,27 +274,13 @@
|
||||||
<collectAlt ref="collectRef" />
|
<collectAlt ref="collectRef" />
|
||||||
<!-- 分享到好友弹窗 -->
|
<!-- 分享到好友弹窗 -->
|
||||||
<shareFirendAlt ref="shareFirendRef" />
|
<shareFirendAlt ref="shareFirendRef" />
|
||||||
<!-- 产品详情弹窗 -->
|
<!-- 产品详情弹窗 -->
|
||||||
<productAlt ref="productAltRef" @buy="handleProductBuy" />
|
<productAlt ref="productAltRef" @buy="handleProductBuy" />
|
||||||
<!-- 产品立即下单弹窗 -->
|
<!-- 产品立即下单弹窗 -->
|
||||||
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />
|
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
// 顶部
|
//
|
||||||
.apex {
|
|
||||||
position: fixed;
|
|
||||||
top: 0%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
// 返回
|
|
||||||
.back {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
background-color: rgba(0, 0, 0, .8);
|
|
||||||
border-radius: 100rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -7,7 +7,6 @@
|
||||||
ref,
|
ref,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
reactive,
|
reactive,
|
||||||
computed,
|
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
@ -17,8 +16,6 @@
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 手机状态栏
|
|
||||||
import statusBar from '@/components/header/statusBar.vue';
|
|
||||||
// 首页视频
|
// 首页视频
|
||||||
import indexVideo from '@/components/index/indexVideo.vue'
|
import indexVideo from '@/components/index/indexVideo.vue'
|
||||||
// 评论弹窗
|
// 评论弹窗
|
||||||
|
@ -27,10 +24,6 @@
|
||||||
import collectAlt from '@/components/index/collect.vue'
|
import collectAlt from '@/components/index/collect.vue'
|
||||||
// 分享到好友弹窗
|
// 分享到好友弹窗
|
||||||
import shareFirendAlt from '@/components/index/shareFirend.vue'
|
import shareFirendAlt from '@/components/index/shareFirend.vue'
|
||||||
// 产品详情弹窗
|
|
||||||
import productAlt from '@/components/index/proDetailAlt.vue'
|
|
||||||
// 产品规格弹窗
|
|
||||||
import productSpecAlt from '@/components/shop/detail/makeOrder.vue'
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
|
@ -41,17 +34,11 @@
|
||||||
const detail = reactive({})
|
const detail = reactive({})
|
||||||
// 是否是自己
|
// 是否是自己
|
||||||
const isMine = ref(false)
|
const isMine = ref(false)
|
||||||
// 显示统计
|
|
||||||
const statistic = ref('0')
|
|
||||||
// 用户信息
|
|
||||||
const userinfo = computed(() => uni.$store.state.userinfo)
|
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
if (option.videoId) videoId.value = option.videoId
|
if (option.videoId) videoId.value = option.videoId
|
||||||
// 是否我的作品
|
// 是否我的作品
|
||||||
if (option.isMine && option.isMine != 'false') isMine.value = option.isMine
|
if (option.isMine && option.isMine != 'false') isMine.value = option.isMine
|
||||||
// 是否显示统计
|
|
||||||
if (option.statistic) statistic.value = option.statistic
|
|
||||||
|
|
||||||
// 获取视频详情
|
// 获取视频详情
|
||||||
getVideoDetail()
|
getVideoDetail()
|
||||||
|
@ -77,7 +64,12 @@
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
Object.assign(detail, rs.data)
|
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)
|
||||||
|
|
||||||
// 播放视频
|
// 播放视频
|
||||||
proxy.$refs.indexVideo.play()
|
proxy.$refs.indexVideo.play()
|
||||||
|
@ -115,38 +107,41 @@
|
||||||
proxy.$refs.shareFirendRef.open()
|
proxy.$refs.shareFirendRef.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频点赞
|
* 视频点赞
|
||||||
* @param {Object} param 见下
|
* @param {Object} param 见下
|
||||||
* @param {Number} param.index 操作的视频下标
|
* @param {Number} param.index 操作的视频下标
|
||||||
* @param {Number|String} param.isLike 0.点赞 1.取消点赞
|
* @param {Number|String} param.isLike 点赞操作
|
||||||
* @param {Number|String} param.likeType 点赞类型 0.公开赞 1.隐私赞
|
|
||||||
*/
|
*/
|
||||||
function videoLike(param) {
|
function videoLike(param) {
|
||||||
|
const {
|
||||||
|
index,
|
||||||
|
isLike
|
||||||
|
} = param
|
||||||
const item = detail
|
const item = detail
|
||||||
const data = {
|
// 操作状态
|
||||||
// 视频id
|
let type = 1
|
||||||
videoId: item.id,
|
// 0未点赞 1已点赞 3私密赞
|
||||||
// 点赞用户id
|
if (item.isLike == 0) type = isLike
|
||||||
likeUserId: userinfo.value.id,
|
|
||||||
// 被点赞用户id
|
|
||||||
targetUserId: item.userId,
|
|
||||||
// 点赞类型 0.公开赞 1.隐私赞
|
|
||||||
likeType: param.likeType,
|
|
||||||
// //点赞 0.点赞 1.取消点赞
|
|
||||||
isLike: param.isLike,
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
api.video.videoLike({
|
api.video.videoLike({
|
||||||
data,
|
query: {
|
||||||
|
// 0赞1取消赞 3私密赞
|
||||||
|
type,
|
||||||
|
// 视频id
|
||||||
|
videoId: item.videoId,
|
||||||
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
uni.$emit('updateVideo', {
|
// 同步点赞状态
|
||||||
...item,
|
item.isLike = {
|
||||||
...rs.data,
|
0: 1,
|
||||||
})
|
1: 0,
|
||||||
|
3: 3,
|
||||||
|
} [type]
|
||||||
|
// 取消减数量 否则增加
|
||||||
|
type == 1 ? item.likes-- : item.likes++
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.alert({
|
util.alert({
|
||||||
|
@ -211,90 +206,17 @@
|
||||||
* @param {Object} detail
|
* @param {Object} detail
|
||||||
*/
|
*/
|
||||||
function handleDataCenter(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'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="page f1">
|
<view class="page f1">
|
||||||
<view class="apex">
|
|
||||||
<statusBar />
|
|
||||||
|
|
||||||
<view class="head df fdr jcsb">
|
|
||||||
<view class="back" @click="handleBack">
|
|
||||||
<uni-icons type="left" color="#fff" size="40rpx" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<indexVideo ref="indexVideo" :statistic="statistic" :item="detail" :tabIndex="0" :isMine="isMine" :index="0"
|
<indexVideo ref="indexVideo" :statistic="1" :item="detail" :tabIndex="0" :isMine="isMine" :index="0"
|
||||||
:current="0" mode="detail" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
|
:current="0" mode="detail" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
|
||||||
@showShareFirend="handleShowShareFirend" @like="videoLike" @detailMenu="detailMenu"
|
@showShareFirend="handleShowShareFirend" @like="videoLike" @detailMenu="detailMenu"
|
||||||
@dataCenter="handleDataCenter" @showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
@dataCenter="handleDataCenter" />
|
||||||
|
|
||||||
<!-- 评论弹窗 -->
|
<!-- 评论弹窗 -->
|
||||||
<commentAlt ref="commentRef" />
|
<commentAlt ref="commentRef" />
|
||||||
|
@ -302,27 +224,9 @@
|
||||||
<collectAlt ref="collectRef" />
|
<collectAlt ref="collectRef" />
|
||||||
<!-- 分享到好友弹窗 -->
|
<!-- 分享到好友弹窗 -->
|
||||||
<shareFirendAlt ref="shareFirendRef" />
|
<shareFirendAlt ref="shareFirendRef" />
|
||||||
<!-- 产品详情弹窗 -->
|
|
||||||
<productAlt ref="productAltRef" @buy="handleProductBuy" />
|
|
||||||
<!-- 产品立即下单弹窗 -->
|
|
||||||
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
// 顶部
|
//
|
||||||
.apex {
|
|
||||||
position: fixed;
|
|
||||||
top: 0%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
// 返回
|
|
||||||
.back {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
background-color: rgba(0, 0, 0, .8);
|
|
||||||
border-radius: 100rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -57,7 +57,6 @@
|
||||||
function getLst() {
|
function getLst() {
|
||||||
api.mine.myComment({
|
api.mine.myComment({
|
||||||
query: {
|
query: {
|
||||||
userId: userinfo.value.id,
|
|
||||||
pageNum: list.pageNum,
|
pageNum: list.pageNum,
|
||||||
pageSize: list.pageSize,
|
pageSize: list.pageSize,
|
||||||
}
|
}
|
||||||
|
@ -80,6 +79,7 @@
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,82 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 我的银行卡
|
// 我的银行卡
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
reactive,
|
|
||||||
} from 'vue'
|
|
||||||
import {
|
|
||||||
useStore
|
|
||||||
} from 'vuex'
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onUnload,
|
|
||||||
} from '@dcloudio/uni-app'
|
|
||||||
// 工具库
|
|
||||||
import util from '@/common/js/util.js'
|
|
||||||
// api
|
|
||||||
import api from '@/api/index.js'
|
|
||||||
// 列表
|
|
||||||
const list = reactive([])
|
|
||||||
// 滑动菜单
|
|
||||||
const options = reactive([{
|
|
||||||
text: '解绑',
|
|
||||||
style: {
|
|
||||||
backgroundColor: '#007aff'
|
|
||||||
},
|
|
||||||
cb: (event) => removeBank(event)
|
|
||||||
}])
|
|
||||||
|
|
||||||
onLoad(() => {
|
|
||||||
// 获取列表
|
|
||||||
getList()
|
|
||||||
// 开启监听
|
|
||||||
addListener()
|
|
||||||
})
|
|
||||||
|
|
||||||
onUnload(() => {
|
|
||||||
// 关闭监听
|
|
||||||
removeListener()
|
|
||||||
})
|
|
||||||
|
|
||||||
// 开启监听
|
|
||||||
function addListener() {
|
|
||||||
uni.$on('updateBindingBank', () => {
|
|
||||||
// 获取列表
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭监听
|
|
||||||
function removeListener() {
|
|
||||||
uni.$off('updateBindingBank')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
function getList() {
|
|
||||||
api.mine.getBankCards({}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
Object.assign(list, rs.data)
|
|
||||||
list.push({
|
|
||||||
bankName: "建设银行",
|
|
||||||
cardHolderName: "商旭",
|
|
||||||
cardId: "1",
|
|
||||||
cardNumber: "6217002270031535710",
|
|
||||||
cardType: "DEBIT",
|
|
||||||
createTime: null,
|
|
||||||
delFlag: "0",
|
|
||||||
isDefault: null,
|
|
||||||
updateTime: null,
|
|
||||||
userId: 13,
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
function link(url) {
|
function link(url) {
|
||||||
|
@ -84,60 +7,18 @@
|
||||||
url,
|
url,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 右滑菜单项点击
|
|
||||||
* @param {Object} event
|
|
||||||
*/
|
|
||||||
function handleItem(event, item) {
|
|
||||||
console.log('event', event, item)
|
|
||||||
item.cb(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除银行卡
|
|
||||||
* @param {Object} item 银行卡信息
|
|
||||||
*/
|
|
||||||
function removeBank(item) {
|
|
||||||
util.alert({
|
|
||||||
content: '删除后不可恢复,确认删除?',
|
|
||||||
}).then(rs => {
|
|
||||||
api.mine.deleteBankCard({
|
|
||||||
path: [item.cardId],
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
// 获取列表
|
|
||||||
getList()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<uni-swipe-action ref="swipeAction">
|
<view class="card item" v-for="(item,index) in 3" :key="index">
|
||||||
<view class="card item" v-for="(item,index) in list" :key="index">
|
<view class="name">很行银行</view>
|
||||||
<uni-swipe-action-item :right-options="options" @click="handleItem($event,item)">
|
<view class="type">储蓄卡</view>
|
||||||
<view class="main ptb30 plr40">
|
<view class="number">**** **** **** 0896</view>
|
||||||
<view class="name">{{item.bankName}}</view>
|
</view>
|
||||||
<view class="type">
|
|
||||||
<text v-if="item.cardType == 'DEBIT'">储蓄卡</text>
|
|
||||||
<text v-else-if="item.cardType == 'CREDIT'">信用卡</text>
|
|
||||||
</view>
|
|
||||||
<view class="number">{{item.cardNumber}}</view>
|
|
||||||
</view>
|
|
||||||
</uni-swipe-action-item>
|
|
||||||
</view>
|
|
||||||
</uni-swipe-action>
|
|
||||||
|
|
||||||
<view class="item add rows ptb30 plr40" @click="link('/pages/mine/setting/bankCardAdd')">
|
<view class="item add rows" @click="link('/pages/mine/setting/bankCardAdd')">
|
||||||
<view>添加银行卡</view>
|
<view>添加银行卡</view>
|
||||||
<uni-icons type="right" color="#999" />
|
<uni-icons type="right" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -146,11 +27,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 列表
|
|
||||||
.list {
|
.list {
|
||||||
.item {
|
.item {
|
||||||
overflow: hidden;
|
|
||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
|
padding: 30rpx 40rpx;
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,83 +1,30 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 添加银行卡
|
// 添加银行卡
|
||||||
import {
|
import {
|
||||||
ref,
|
reactive
|
||||||
reactive,
|
} from 'vue';
|
||||||
computed,
|
|
||||||
} from 'vue'
|
|
||||||
import {
|
|
||||||
useStore
|
|
||||||
} from 'vuex'
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
} from '@dcloudio/uni-app'
|
|
||||||
// 工具库
|
|
||||||
import util from '@/common/js/util.js'
|
|
||||||
// api
|
|
||||||
import api from '@/api/index.js'
|
|
||||||
// 获取验证码
|
|
||||||
import getCode from '@/components/getCode/getCode'
|
import getCode from '@/components/getCode/getCode'
|
||||||
|
|
||||||
// 银行卡列表
|
// 银行卡列表
|
||||||
const bankList = reactive([])
|
const bankList = reactive([
|
||||||
// 表单对象
|
{
|
||||||
const form = reactive({
|
name: '银行卡1',
|
||||||
cardNumber: '',
|
},
|
||||||
phoneNumber: '',
|
{
|
||||||
userIdCard: '',
|
name: '银行卡2',
|
||||||
userRealName: '',
|
},
|
||||||
})
|
{
|
||||||
|
name: '银行卡3',
|
||||||
// 绑定
|
},
|
||||||
function handleSubmit() {
|
])
|
||||||
const data = {
|
|
||||||
...form
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
if (!data.phoneNumber) {
|
|
||||||
util.alert('手机号不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!data.userIdCard) {
|
|
||||||
util.alert('身份证号不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!data.cardNumber) {
|
|
||||||
util.alert('用户手机号不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!data.userRealName) {
|
|
||||||
util.alert('真实姓名不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
api.mine.addBankCard({
|
|
||||||
data,
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
uni.$emit('updateBindingBank')
|
|
||||||
util.alert('添加成功')
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 500)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="appbw">
|
<view class="appbw">
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<view class="form mtb30 mlr40">
|
<view class="form mtb30 mlr40">
|
||||||
<!-- <view class="line">
|
|
||||||
|
<view class="line">
|
||||||
<view class="title">银行卡类型</view>
|
<view class="title">银行卡类型</view>
|
||||||
<view class="inputBox">
|
<view class="inputBox">
|
||||||
<picker :range="bankList" range-key="name">
|
<picker :range="bankList" range-key="name">
|
||||||
|
@ -87,47 +34,48 @@
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="title">银行卡卡号</view>
|
<view class="title">银行卡卡号</view>
|
||||||
<view class="inputBox">
|
<view class="inputBox">
|
||||||
<input class="input" v-model="form.cardNumber" type="text" placeholder="请输入银行卡卡号" />
|
<input class="input" type="text" placeholder="请输入银行卡卡号" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="title">姓名</view>
|
<view class="title">姓名</view>
|
||||||
<view class="inputBox">
|
<view class="inputBox">
|
||||||
<input class="input" v-model="form.userRealName" type="text" placeholder="请输入姓名" />
|
<input class="input" type="text" placeholder="请输入姓名" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="title">身份证号</view>
|
<view class="title">身份证号</view>
|
||||||
<view class="inputBox">
|
<view class="inputBox">
|
||||||
<input class="input" v-model="form.userIdCard" type="text" placeholder="请输入身份证号" />
|
<input class="input" type="text" placeholder="请输入身份证号" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="title">手机号(银行绑定的手机号)</view>
|
<view class="title">手机号(银行绑定的手机号)</view>
|
||||||
<view class="inputBox">
|
|
||||||
<input class="input" v-model="form.phoneNumber" type="text" placeholder="请输入手机号" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="line">
|
|
||||||
<view class="title">验证码</view>
|
|
||||||
<view class="inputBox rows">
|
<view class="inputBox rows">
|
||||||
<input class="input" type="text" placeholder="请输入验证码" />
|
<input class="input" type="text" placeholder="请输入手机号" />
|
||||||
|
|
||||||
<view class="getCode btn black plr30">
|
<view class="getCode btn black plr30">
|
||||||
<getCode />
|
<getCode />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<view class="btn lg black mt50" @click="handleSubmit">绑定</view>
|
<view class="line">
|
||||||
|
<view class="title">验证码</view>
|
||||||
|
<view class="inputBox">
|
||||||
|
<input class="input" type="text" placeholder="请输入验证码" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn lg black mt50">绑定</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="fill"></view>
|
<view class="fill"></view>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 设置
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
|
|
|
@ -66,7 +66,6 @@ updateOrderDetail 更新订单详情
|
||||||
updateUserProduct 更新用户商品
|
updateUserProduct 更新用户商品
|
||||||
updateBindingAccount 更新绑定账号
|
updateBindingAccount 更新绑定账号
|
||||||
selectBindingBank 选择绑定的银行卡
|
selectBindingBank 选择绑定的银行卡
|
||||||
updateBindingBank 更新绑定的银行卡
|
|
||||||
|
|
||||||
缓存
|
缓存
|
||||||
---
|
---
|
||||||
|
|
|
@ -4,6 +4,8 @@ import {
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
|
// let target = 'https://1a880cd5.r24.cpolar.top/'
|
||||||
|
// let target = 'http://6mkwby.natappfree.cc'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue