Compare commits

..

No commits in common. "32003e8f29c81f0fb15bc83c52a5343cf6c5acb7" and "c1e32ecc202cda24eed38d29aede52155535df98" have entirely different histories.

47 changed files with 27506 additions and 790 deletions

View File

@ -60,7 +60,6 @@ export const durian = {
load: true,
})
},
/**
* 交易榴莲果
* @param {Object} param
@ -73,17 +72,5 @@ export const durian = {
load: true,
})
},
/**
* 获取榴莲果兑换播放量比例
* @param {Object} param
*/
getDurainViews(param) {
return util.request({
url: `/coreplay/durianFruitTransactionType/5`,
method: 'GET',
data: param.data,
})
},
}
export default durian

View File

@ -63,29 +63,6 @@ const login = {
})
},
/**
* 登出 清空token 改变用户在线状态
* @param {Object} param
*/
logout(param) {
return util.request({
url: '/user/logout',
query: param.query,
method: 'PUT',
})
},
/**
* 注销账号
* @param {Object} param
*/
cancelAccount(param) {
return util.request({
url: '/user/user/cancelAccount',
query: param.query,
method: 'DELETE',
})
},
}
export default login

View File

@ -59,9 +59,9 @@ const mine = {
*/
myComment(param) {
return util.request({
url: `/video/comment/getMyComment`,
url: `/user/home/myComment`,
query: param.query,
method: 'GET',
method: 'POST',
})
},
@ -256,45 +256,9 @@ const mine = {
data: param.data,
method: 'POST',
load: true,
})
},
/**
* 账号挂失
* @param {Object} param
*/
lostAccount(param) {
return util.request({
url: '/user/user/lostAccount',
data: param.data,
query: param.query,
method: 'POST',
})
},
/**
* 账号冻结
* @param {Object} param
*/
freezeAccount(param) {
return util.request({
url: '/user/user/freezeAccount',
data: param.data,
query: param.query,
method: 'POST',
})
},
/**
* 账号解冻
* @param {Object} param
*/
unfreezeAccount(param) {
return util.request({
url: '/user/user/unfreezeAccount',
data: param.data,
query: param.query,
method: 'POST',
header: {
// 'Content-Type': 'multipart/form-data',
}
})
},
}

View File

@ -6,8 +6,8 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
host: 'http://91f.xyz:8080',
// host: 'http://hvw2rn.natappfree.cc',
// host: 'http://91f.xyz:8080',
host: 'https://b433d23.r24.cpolar.top/',
// #endif
// 支付方式配置
payType: {

View File

@ -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()
@ -1410,33 +1410,29 @@ const util = {
* @param {Function} cb 回调函数
*/
finalLogin(param, cb) {
try {
// 登录令牌
const token = param.data
// 缓存token
uni.setStorageSync('token', token)
// 登录令牌
const token = param.data
// 缓存token
uni.setStorageSync('token', token)
// 开启加载
uni.showLoading({
mask: true
})
// 开启加载
uni.showLoading({
mask: true
})
// 获取用户信息
util.getUserinfo((userinfo) => {
// 登录
uni.$emit('login')
// 获取用户信息
util.getUserinfo((userinfo) => {
// 登录
uni.$emit('login')
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
})
}, 500)
//
cb ? cb() : ''
})
} catch (ev) {
console.log('finalLogin catch', ev)
}
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
})
}, 500)
//
cb ? cb() : ''
})
},
// 登录腾讯聊天

View File

@ -173,11 +173,6 @@
tapTimer.value = setTimeout(() => {
let a = tapList.length
tapList.length = 0
//
let targetLike = {
0: 1,
1: 0
} [props.item.isLike]
switch (a) {
case 1:
@ -185,35 +180,19 @@
break;
case 2:
console.log('公开赞')
if (props.item.likeType == 0) {
emit('like', {
likeType: 0,
index: props.index,
isLike: targetLike
})
} else {
emit('like', {
likeType: 0,
index: props.index,
isLike: 0
})
}
emit('like', {
likeType: 0,
index: props.index,
isLike: props.item.isLike
})
break;
case 3:
console.log('隐私赞')
if (props.item.likeType == 1) {
emit('like', {
likeType: 1,
index: props.index,
isLike: targetLike
})
} else {
emit('like', {
likeType: 1,
index: props.index,
isLike: 0
})
}
emit('like', {
likeType: 1,
index: props.index,
isLike: props.item.isLike
})
break;
}
}, 200)
@ -564,7 +543,7 @@
<navigator :url="util.setUrl('/pages/index/videoHome',{userId:item.userId})" class="item pr mb10">
<view class="col">
<image class="wh80 cir" :src="item.avatar" mode="aspectFill" />
<view class="focus pa" v-if="item.isAttention !== 0">
<view class="focus pa" v-if="!item.isAttention">
<image class="wh40" src="@/static/indexAtt.png" mode="aspectFit" />
</view>
</view>
@ -574,7 +553,7 @@
<view class="item">
<view class="col">
<view class="pr">
<template v-if="item.isLike == 0">
<template v-if="item.isLike">
<!-- 公开赞 -->
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit"
v-if="item.likeType == 0" @click="handleLike(index,0, 1)" />

View File

@ -41,6 +41,7 @@
*/
function init(productId) {
if (productId) proId.value = productId
//
open()
//

View File

@ -160,7 +160,7 @@
<uni-icons type="closeempty" @click="close()" />
</view>
<view class="tac f48" v-if="price && unit">
<view class="tac f48" v-if="price || unit">
<text>{{price}}</text>
<text>{{unit.name}}</text>
</view>

View File

@ -31,7 +31,6 @@
})
onUnmounted(() => {
console.log('onUnmounted')
//
removeListener()
})
@ -47,7 +46,6 @@
//
function removeListener() {
console.log('off selectAddress')
//
uni.$off('selectAddress')
}
@ -61,7 +59,7 @@
</script>
<template>
<view class="address df fdr aic jcc" v-if="address.id">
<view class="address df fdr aic jcc">
<!-- 图标 -->
<view class="icon mr20">
<image class="wh45" src="/static/address.png" mode="aspectFill" />
@ -81,15 +79,10 @@
<!-- 选择地址 -->
<view v-if="shopEdit" class="button btn ti plr20 ml20"
@click="link('/pages/mine/address/index?select=1&addressId='+address.id)">
@click="link('/pages/mine/address/index?select=1')">
<text class="text">选择地址</text>
</view>
</view>
<view class="fmid" @click="link('/pages/mine/address/index?select=1')" v-else>
<text class="c999 f28">暂无默认地址</text>
<uni-icons type="right" color="#999" size="30rpx" />
</view>
</template>
<style lang="scss" scoped>

View File

@ -60,8 +60,6 @@
//
function initRegionIndex() {
console.log('props.province', props.province, province.value)
if(props.province) console.log('true')
if (props.province) {
const provinceIndex = region.findIndex(item => item.regionName == props.province);
regionIndex[0] = provinceIndex;
@ -77,12 +75,6 @@
regionIndex[2] = areaIndex;
}
}
} else {
emit('change', {
province: province.value,
city: city.value,
area: area.value,
});
}
}

View File

@ -10,8 +10,7 @@
defineEmits,
onMounted,
defineProps,
defineExpose,
watch,
defineExpose
} from 'vue'
//
import util from '@/common/js/util.js'
@ -39,7 +38,7 @@
//
const emit = defineEmits(['confirm'])
//
const address = ref({})
const address = reactive({})
//
const spaceIndex = ref(0)
//
@ -60,10 +59,6 @@
return result
})
watch(() => address.value, (nValue) => {
console.log('address', nValue)
})
onMounted(() => {
//
if (props.mode === 'detail') getDefaultAddress()
@ -71,16 +66,14 @@
//
function getDefaultAddress() {
util.isLogin().then(res => {
api.shop.getDefaultAddress({}).then(res => {
if (res.code === 200) {
if (res.data) Object.assign(address.value, {}, res.data)
return
}
util.alert({
content: res.msg,
showCancel: false,
})
api.shop.getDefaultAddress({}).then(res => {
if (res.code === 200) {
if (res.data) Object.assign(address, {}, res.data)
return
}
util.alert({
content: res.msg,
showCancel: false,
})
})
}
@ -125,7 +118,7 @@
//
function handleConfirm() {
//
if (props.mode == 'detail' && !address.value.id) {
if (props.mode == 'detail' && !address.id) {
util.alert('请选择收货地址')
return
}
@ -137,7 +130,7 @@
}
//
if (address.value.id) param.address = address.value
if (address.id) param.address = address
emit('confirm', param)
//
@ -171,7 +164,15 @@
<uni-popup type="bottom" ref="payment" @change="handlePopChange">
<view class="buy popBot plr20 bfff">
<view class="address mtb40" v-if="mode === 'detail'">
<JyCommodityAddress v-model:address="address" />
<template v-if="address.id">
<JyCommodityAddress :address="address" />
</template>
<template v-else>
<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 File

@ -731,27 +731,6 @@
"navigationBarTitleText": "邀请",
"navigationStyle": "custom"
}
},
{
"path" : "pages/login/lostAccount",
"style" :
{
"navigationBarTitleText" : "账号挂失"
}
},
{
"path" : "pages/login/freezeAccount",
"style" :
{
"navigationBarTitleText" : "账号冻结"
}
},
{
"path" : "pages/login/unfreezeAccount",
"style" :
{
"navigationBarTitleText" : "账号解冻"
}
}
],
"subPackages": [

View File

@ -35,8 +35,6 @@
const store = useStore()
const userinfo = computed(() => store.state.userinfo)
//
const durainView = ref(0)
//
const list = reactive({
@ -53,6 +51,7 @@
context: '',
pic: [],
})
//
const apply = reactive({
author: '',
@ -83,12 +82,8 @@
})
onLoad(() => {
//
getList()
//
addListener()
//
getDurainViews()
})
onUnload(() => {
@ -113,21 +108,6 @@
uni.$off('selectPushCollectVideo')
}
//
function getDurainViews() {
api.durian.getDurainViews({}).then(rs => {
if (rs.code == 200) {
//
durainView.value = rs.data.proportion
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
//
function refreshList() {
list.pageNum = 1
@ -154,7 +134,11 @@
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = []
list.data.push(...rs.rows)
list.data.push(...rs.rows.map(item => {
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
item.format_imageUrl = util.format_url(item.imageUrl, 'img')
return item
}))
list.total = rs.total
return
}
@ -301,7 +285,7 @@
<scroll-view scroll-x="true" class="scroll">
<view class="list df">
<view class="item oh pr fs0 mr20 br20" v-for="(item,index) in myVideos" :key="index">
<image class="poster br20" :src="item.coverUrl" mode="aspectFill" />
<image class="poster br20" :src="item.format_imageUrl" mode="aspectFill" />
<!-- <view class="window pfull"></view> -->
</view>
</view>
@ -362,8 +346,7 @@
<!-- 填充 -->
<view class="footerBar footer bfff shadow">
<view class="hint ptb10 plr30 c333">消耗{{videoIds.length}}*1 榴莲果可提升 {{videoIds.length}}*{{durainView}}+ 展示量
</view>
<view class="hint ptb10 plr30 c333">消耗{{videoIds.length}}*10 榴莲果可提升 {{videoIds.length}}*10+ 展示量</view>
<view class="content rows pt30 plr30">
<view class="f1 c333 f48">当前拥有{{userinfo.fruit}}榴莲果</view>
<!-- <view class="btn colourful f1">一键投放</view> -->

View File

@ -194,8 +194,7 @@
uni.$on('focusUser', (param) => {
if (!param.userId) return
// 重载关注列表
if (tab[0].load) refreshAttList()
console.log(param)
refreshAttList()
// 切换推荐列表的关注状态
for (var index = 0; index < recList.data.length; i++) {
const item = recList.data[index]
@ -217,9 +216,9 @@
}, 50)
//
// proxy.$refs.productAltRef.init()
// handleProBuy({
// productId: 42,
// })
handleProBuy({
productId: 42,
})
})
onShow(() => {
@ -324,8 +323,7 @@
const pages = getCurrentPages()
// 判断是否当前页
if (pages[pages.length - 1].route != 'pages/index/index') {
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState
.value =
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
false
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
}
@ -616,7 +614,6 @@
// //点赞 0.点赞 1.取消点赞
isLike: param.isLike,
})
//
api.video.videoLike({
data: {
@ -628,7 +625,7 @@
targetUserId: item.userId,
// 点赞类型 0.公开赞 1.隐私赞
likeType: param.likeType,
//点赞 0.点赞 1.取消点赞
// //点赞 0.点赞 1.取消点赞
isLike: param.isLike,
}
}).then(rs => {
@ -689,7 +686,6 @@
* @param {Object} item 视频列表项
*/
function handleShowProduct(item) {
console.log('video', item)
// 打开产品详情弹窗
proxy.$refs.productAltRef.init(item.productId)
}
@ -860,7 +856,7 @@
<!-- 左侧菜单弹窗 -->
<leftMenuAlt ref="leftMenuRef" />
<!-- 产品详情弹窗 -->
<productAlt ref="productAltRef" @buy="handleProductBuy" />
<productAlt ref="productAltRef" @click="handleProductBuy" />
<!-- 产品立即下单弹窗 -->
<productSpecAlt ref="productSpecAltRef" :detail="productDetail" @confirm="handlePay" />

View File

@ -102,19 +102,19 @@
<image class="qr" :src="qrData" mode="aspectFill" />
</view>
<view class="log mtb60 f28" v-if="team.referrerReferrerUser">
<view class="log mtb60 f28" v-if="team.referrerUser">
<view class="title tac f32">上级推荐人</view>
<view class="list">
<view class="item rows mtb20">
<view class="f1">
<view>账户昵称</view>
</view>
<view class="">{{team.referrerReferrerUser.userNickname}}</view>
<view class="">{{team.referrerUser.userNickname}}</view>
</view>
</view>
</view>
<view class="log mtb60 f28" v-if="team.referrerUser">
<view class="log mtb60 f28" v-if="team.referrerReferrerUser">
<view class="title rows">
<view class="f1"></view>
<view class="tac f32 mlr20">我的推荐人</view>
@ -135,7 +135,7 @@
<view class="f1">
<view>账户昵称</view>
</view>
<view class="">{{team.referrerUser.userNickname}}</view>
<view class="">{{team.referrerReferrerUser.userNickname}}</view>
</view>
</view>
</view>
@ -177,8 +177,8 @@
<!-- 内容 -->
<view class="content df aic f1 ptb10">
<view class="line"></view>
<view class="ml10 df aic c999 f28">
<view class="count mr20 plr10 cfff br10" v-if="secItem.isShop"></view>
<view class="ml10 df aic c999 f28" :class="{'style1': secItem.isShop == 1}">
<view class="count mr20 plr10 cfff br10"></view>
<view class="name">{{secItem.userNickname}}</view>
<view class="label ml10">{{secItem.count}}</view>
</view>
@ -250,17 +250,20 @@
//
.content {
.style1 {
// color: #FF8400;
//
.label {
background-image: linear-gradient(144deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
}
}
//
// .label {
// background-image: linear-gradient(144deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;
// background-clip: text;
// text-fill-color: transparent;
// }
//
.count {
background-image: linear-gradient(114deg, #27EFE2 0%, #A45EFF 43%, #FF004F 100%);
}

View File

@ -174,7 +174,7 @@
content: '删除后不可恢复。确认删除?',
}).then(rs => {
// 删除视频
if (rs.confirm) api.video.removeVideo({
if (rs.confirm) api.video.deleteVideo({
data: {
id: detail.id,
}

View File

@ -89,6 +89,8 @@
if (rs.code == 200) {
console.log('userinfo', rs)
const result = rs.data
result.userPortrait = util.format_url(result.userPortrait, 'img')
result.background = util.format_url(result.background, 'img')
Object.assign(detail, result)
return
}
@ -119,7 +121,11 @@
}).then(rs => {
if (rs.code == 200) {
if (listProperty.pageNum == 1) listProperty.data.length = 0
listProperty.data.push(...rs.rows)
listProperty.data.push(...rs.rows.map(item => {
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
item.format_imageUrl = util.format_url(item.imageUrl, 'img')
return item
}))
listProperty.total = rs.total
return
}
@ -162,30 +168,26 @@
//
function handleAttention() {
let targetAtt = detail.isAttention == 0 ? 1 : 0
api.video.attention({
data: {
// id
userId: userinfo.value.id,
// id
attentionId: detail.id,
//
isAttention: targetAtt,
isAttention: detail.isAttention ? 1 : 0,
}
}).then(rs => {
if (rs.code == 200) {
//
detail.isAttention = targetAtt
detail.isAttention = !detail.isAttention
//
getUserinfo()
//
uni.$emit('focusUser', {
userId: detail.userId,
result: detail.isAttention,
})
//
uni.$emit('updateFocusList')
return
}
util.alert({
@ -298,7 +300,7 @@
<!-- 关注按钮 -->
<view class="btns df">
<template v-if="detail.isAttention == 0">
<template v-if="detail.isAttention">
<view class="btn lg cancel f1" @click="handleAttention">已关注</view>
<view class="btn lg cancel f1 ml20" @click="handleMessage">私信</view>
</template>

View File

@ -1,127 +0,0 @@
<script setup>
/**
* 账号挂失
*/
import {
ref,
reactive,
computed,
getCurrentInstance
} from 'vue'
import {
useStore
} from 'vuex'
// api
import api from '@/api/index'
//
import util from '@/common/js/util.js'
//
import payPwd from '@/components/mine/payPwd.vue'
const {
proxy
} = getCurrentInstance()
// vuex
const store = useStore()
//
const form = reactive({
//
phoneNumber: '',
})
//
const userinfo = computed(() => store.state.user.userinfo)
//
function handleSubmit() {
//
if (!form.phoneNumber) {
util.alert('请输入手机号')
return
}
//
proxy.$refs.payPwdRef.open()
}
/**
* 事件
* @param {Object} event
*/
function handlePayPwd(event) {
console.log('event', event)
const data = {
...form
}
data.secondLevelCipher = event
//
api.mine.freezeAccount({
data,
}).then(rs => {
if (rs.code == 200) {
if (data.phoneNumber == userinfo.value.phoneNumber) {
api.login.logout({
query: {
phoneNumber: userinfo.phoneNumber,
}
}).then(rs => {})
// 退
util.logout(() => {
// checkLink('pages/login/loginPhone', 'reLaunch')
// #ifdef APP
plus.runtime.restart()
// #endif
})
}
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
</script>
<template>
<view class="appbw">
<view class="container">
<view class="logo mauto">
<image class="logo br10" src="/static/logo.png" mode="aspectFit" />
</view>
<view class="form mt60 mlr60 mb30">
<view class="title mtb30">账号冻结</view>
<view class="inputBox mtb20 ptb10 plr30">
<input type="text" v-model="form.phoneNumber" placeholder="请输入手机号" />
</view>
<view class="btn lg bar black mtb60" @click="handleSubmit">冻结</view>
</view>
</view>
<!-- 支付密码 -->
<payPwd ref="payPwdRef" :check="true" @confirm="handlePayPwd" />
</view>
</template>
<style lang="scss">
.image {
width: 100%;
height: 100%;
}
//
.container {
margin-top: 15vh;
//
.logo {
width: 200rpx;
height: 200rpx;
}
}
</style>

View File

@ -1,116 +0,0 @@
<script setup>
/**
* 账号挂失
*/
import {
ref,
reactive,
computed,
} from 'vue'
// api
import api from '@/api/index'
//
import util from '@/common/js/util.js'
import {
useStore
} from 'vuex'
// vuex
const store = useStore()
//
const form = reactive({
//
phoneNumber: '',
//
userRealName: '',
})
//
const userinfo = computed(() => store.state.user.userinfo)
//
function handleLogin() {
const data = {
...form
}
//
if (!data.phoneNumber) {
util.alert('请输入手机号')
return
}
if (!data.userRealName) {
util.alert('请输入真实姓名')
return
}
//
api.mine.lostAccount({
data,
}).then(rs => {
if (rs.code == 200) {
if (data.phoneNumber == userinfo.value.phoneNumber) {
api.login.logout({
query: {
phoneNumber: userinfo.phoneNumber,
}
}).then(rs => {})
// 退
util.logout(() => {
// checkLink('pages/login/loginPhone', 'reLaunch')
// #ifdef APP
plus.runtime.restart()
// #endif
})
}
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
</script>
<template>
<view class="appbw">
<view class="container">
<view class="logo mauto">
<image class="logo br10" src="/static/logo.png" mode="aspectFit" />
</view>
<view class="form mt60 mlr60 mb30">
<view class="title mtb30">账号挂失</view>
<view class="inputBox mtb20 ptb10 plr30">
<input type="text" v-model="form.phoneNumber" placeholder="请输入手机号" />
</view>
<view class="inputBox rows mtb20 ptb10 plr30">
<input v-model="form.userRealName" placeholder="请输入真实姓名" />
</view>
<view class="btn lg bar black mtb60" @click="handleLogin">挂失</view>
</view>
</view>
</view>
</template>
<style lang="scss">
.image {
width: 100%;
height: 100%;
}
//
.container {
margin-top: 15vh;
//
.logo {
width: 200rpx;
height: 200rpx;
}
}
</style>

View File

@ -1,112 +0,0 @@
<script setup>
/**
* 账号挂失
*/
import {
ref,
reactive,
computed,
getCurrentInstance
} from 'vue'
import {
useStore
} from 'vuex'
// api
import api from '@/api/index'
//
import util from '@/common/js/util.js'
//
import payPwd from '@/components/mine/payPwd.vue'
const {
proxy
} = getCurrentInstance()
// vuex
const store = useStore()
//
const form = reactive({
//
phoneNumber: '',
})
//
const userinfo = computed(() => store.state.user.userinfo)
//
function handleSubmit() {
//
if (!form.phoneNumber) {
util.alert('请输入手机号')
return
}
//
proxy.$refs.payPwdRef.open()
}
/**
* 事件
* @param {Object} event
*/
function handlePayPwd(event) {
console.log('event', event)
const data = {
...form
}
data.secondLevelCipher = event
//
api.mine.unfreezeAccount({
data,
}).then(rs => {
if (rs.code == 200) {
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
</script>
<template>
<view class="appbw">
<view class="container">
<view class="logo mauto">
<image class="logo br10" src="/static/logo.png" mode="aspectFit" />
</view>
<view class="form mt60 mlr60 mb30">
<view class="title mtb30">账号解冻</view>
<view class="inputBox mtb20 ptb10 plr30">
<input type="text" v-model="form.phoneNumber" placeholder="请输入手机号" />
</view>
<view class="btn lg bar black mtb60" @click="handleSubmit">解冻</view>
</view>
</view>
<!-- 支付密码 -->
<payPwd ref="payPwdRef" :check="true" @confirm="handlePayPwd" />
</view>
</template>
<style lang="scss">
.image {
width: 100%;
height: 100%;
}
//
.container {
margin-top: 15vh;
//
.logo {
width: 200rpx;
height: 200rpx;
}
}
</style>

View File

@ -55,16 +55,12 @@
})
//
const select = ref('')
// id
const selectAddressId = ref('')
//
const userinfo = computed(() => store.state.userinfo)
onLoad((option) => {
//
if (option.select) select.value = option.select
//
if (option.addressId) selectAddressId.value = option.addressId
//
getList()
})
@ -162,7 +158,6 @@
data,
}).then(rs => {
if (rs.code == 200) {
uni.$emit('selectAddress', rs.data)
//
proxy.$refs.add.close()
//
@ -220,7 +215,6 @@
},
}).then(rs => {
if (rs.code == 200) {
uni.$emit('selectAddress', item)
//
refreshList()
return
@ -237,6 +231,7 @@
* @param {Object} item 点击的列表项
*/
function handleUpdate(item) {
console.log(item)
//
formData.id = item.id
//id
@ -285,12 +280,6 @@
}).then(rs => {
if (rs.code == 200) {
list.data.splice(index, 1)
// id
if (selectAddressId.value === item.id) {
uni.$emit('selectAddress', {})
return
}
return
}
util.alert({

View File

@ -190,11 +190,6 @@
// #ifdef APP
plus.runtime.restart()
// #endif
api.login.logout({
query: {
phoneNumber: userinfo.phoneNumber,
}
}).then(rs => {})
})
})
}
@ -221,15 +216,6 @@
<template>
<view class="page" v-if="!userinfo.id">
<statusBar />
<view class="head rows plr30">
<view class="side"></view>
<view class="f1"></view>
<view class="side">
<uni-icons type="gear" size="40rpx" color="#333" @click="link('/pages/mine/setting/setting')" />
</view>
</view>
<noLogin class="f1" />
</view>

View File

@ -57,6 +57,7 @@
function getLst() {
api.mine.myComment({
query: {
userId: userinfo.value.id,
pageNum: list.pageNum,
pageSize: list.pageSize,
}
@ -86,21 +87,19 @@
<template>
<view class="appbw">
<view class="listBox plr30 ">
<view class="list ptb30 plr10" v-for="(item,index) in list.data" :key="index">
<view class="list ptb30 plr10" v-for="(item,index) in 10" :key="index">
<view class="rows">
<view class="message">
<view class="title f32 c333">评论了 视频</view>
<view class="content t2hd mtb15 c333 f32">{{item.content}}</view>
<view class="time mt15 f28 c999">{{item.createTime}}</view>
<view class="content t2hd mtb15 c333 f32">你的视频我很喜欢关注你了赶快出续集</view>
<view class="time mt15 f28 c999">2024.12.08 18:00</view>
</view>
<view class="image ml20" v-if="item.imageUrl">
<image class="wh120 br10" :src="item.imageUrl" mode="aspectFill" />
<view class="image ml20">
<image class="wh120 br10" src="/static/openPage.png" mode="aspectFill" />
</view>
</view>
<view class=""></view>
</view>
<!-- 暂无评论 -->
<view class="nomore mtb30" v-if="!list.data[0]">暂无内容~</view>
</view>
</view>
</template>

View File

@ -1,75 +1,27 @@
<script setup>
//
import {
ref,
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'
/**
* 跳转
* @param {Object} url 跳转路径
*/
function link(url) {
uni.navigateTo({
url,
})
}
//
function accountLogout() {
util.alert({
content: '确认注销账号?',
}).then(rs => {
if(!rs.confirm) return
api.login.cancelAccount({}).then(rs => {
if (rs.code == 200) {
// 退
util.logout(() => {
// #ifdef APP
plus.runtime.restart()
// #endif
})
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
})
}
</script>
<template>
<view class="app">
<!-- 账号挂失 账号冻结 账号注销 -->
<view class="container">
<view class="line" @click="link('/pages/login/lostAccount')">
<view class="line">
<view class="title">账号挂失</view>
<view class="content">申诉找回九亿账号</view>
</view>
<view class="line" @click="link('/pages/login/freezeAccount')">
<view class="line">
<view class="title">账号冻结</view>
<view class="content">主动冻结账号保护账号资产</view>
</view>
<view class="line" @click="link('/pages/login/unfreezeAccount')">
<view class="line">
<view class="title">解冻账号</view>
<view class="content">风险解除后可选择解除冻结</view>
</view>
<view class="line" @click="accountLogout">
<view class="line">
<view class="title">账号注销</view>
<view class="content">提交申请清空当前账号</view>
</view>

View File

@ -28,23 +28,19 @@
} = getCurrentInstance()
//
const store = useStore()
// pwd rePwd check
const mode = ref('pwd')
// set rePwd check
const mode = ref('set')
//
const form = reactive({
pwd: '',
rePwd: '',
check: '',
})
//
const formKey = ref('pwd')
//
const userinfo = computed(() => {
let result = store.state.userinfo
if (result.hasSecondCipher) {
mode.value = 'check'
formKey.value = 'check'
}
if (result.hasSecondCipher) mode.value = 'check'
return result
})
@ -83,7 +79,7 @@
//
form.pwd = ''
form.rePwd = ''
mode.value = 'pwd'
mode.value = 'set'
return
}
//
@ -116,24 +112,22 @@
}
//
if (!data.check) {
if (!data.pwd) {
util.alert('二级密码不能为空')
return
}
//
data.check = CryptoJS.MD5(data.check).toString()
data.pwd = CryptoJS.MD5(data.pwd).toString()
//
//
api.mine.checkSecondLevelCipher({
data: {
id: userinfo.value.id,
secondLevelCipher: data.check,
secondLevelCipher: data.pwd,
}
}).then(rs => {
if (rs.code == 200) {
form.check = ''
mode.value = 'pwd'
formKey.value = 'pwd'
form.pwd = ''
mode.value = 'set'
return
}
util.alert({
@ -168,7 +162,7 @@
<template>
<view class="appbw">
<view class="container ver mt10p" v-if="mode === 'pwd'">
<view class="container ver mt10p" v-if="mode === 'set'">
<view class="title c333 f54">设置二级密码</view>
<view class="content mt50 c666 f32">请设置六位数字的二级密码</view>
@ -193,22 +187,14 @@
<view class="container ver mt10p" v-if="mode === 'check'">
<view class="title c333 f54">验证二级密码</view>
<view class="content mt50 c666 f32">请输入二级密码用于验证</view>
<view class="pwd">
<codeInput v-model:modelValue="form.check" />
</view>
<!-- <view class="inputBox mt50 ptb10 plr30">
<view class="inputBox mt50 ptb10 plr30">
<input type="number" :maxlength="6" v-model="form.pwd" :focus="true" placeholder="六位数字密码" />
</view> -->
</view>
<view class="btn lg black mtb50 plr50" @click="handleCheck">验证</view>
</view>
</view>
<!-- -->
<view v-show="0">{{userinfo}}</view>
<!-- 安全键盘 -->
<!-- <cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo" /> -->
<view class="keyboard">

View File

@ -118,14 +118,9 @@
content: '确定退出登录?',
}).then(res => {
if (res.confirm) {
api.login.logout({
query: {
phoneNumber: userinfo.phoneNumber,
}
}).then(rs => {})
// 退
util.logout(() => {
// checkLink('pages/login/loginPhone', 'reLaunch')
// #ifdef APP
plus.runtime.restart()
// #endif
@ -139,17 +134,17 @@
<!-- 设置页 -->
<view class="app">
<view class="area">
<template v-if="userinfo.id">
<view class="line rows" @click="loginLink('/pages/mine/userinfo')">
<view class="avatar">
<image class="head-portrait wh80" :src="userinfo.avatar" mode="aspectFill" />
</view>
<view class="info f1 ml20">
<view class="">{{userinfo.userNickname}}</view>
<!-- <view class="account mt10 c999 f26">账号{{userinfo.account}}</view> -->
</view>
<view class="line rows" @click="loginLink('/pages/mine/userinfo')">
<view class="avatar">
<image class="head-portrait wh80" :src="userinfo.avatar" mode="aspectFill" />
</view>
<view class="info f1 ml20">
<view class="">{{userinfo.userNickname}}</view>
<!-- <view class="account mt10 c999 f26">账号{{userinfo.account}}</view> -->
</view>
</view>
<template v-if="userinfo.id || 1">
<view class="line rows">
<view class="">修改账号</view>
<view class="f1 tar c999 f28">{{userinfo.account}}</view>
@ -171,7 +166,7 @@
</template>
</view>
<template v-if="userinfo.id">
<template v-if="userinfo.id || 1">
<view class="area">
<view class="line rows" @click="link('/pages/mine/setting/usePay')">
<view class="">先用后付</view>
@ -193,10 +188,10 @@
<uni-icons type="right" />
</view>
<!-- <view class="line rows">
<view class="line rows">
<view class="">邮箱</view>
<uni-icons type="right" />
</view> -->
</view>
<view class="line rows ptb20 plr10" @click="link('/pages/mine/setting/teen')">
<view class="">青少年模式</view>
@ -205,17 +200,6 @@
</view>
</view>
<!-- 支付宝 微信 -->
<view class="line rows" @click="link('/pages/mine/setting/binding')">
<view class="">我的绑定</view>
<uni-icons type="right" />
</view>
<view class="line rows" @click="link('/pages/mine/setting/bankCard')">
<view class="">我的银行卡</view>
<uni-icons type="right" />
</view>
<view class="line" v-if="userinfo.id">
<picker :range="allowType" range-key="name" @change="handleAllowType" :value="allowTypeIndex">
<view class=" rows">
@ -236,6 +220,17 @@
<uni-icons type="right" />
</view>
<!-- 支付宝 微信 -->
<view class="line rows" @click="link('/pages/mine/setting/binding')">
<view class="">我的绑定</view>
<uni-icons type="right" />
</view>
<view class="line rows" @click="link('/pages/mine/setting/bankCard')">
<view class="">我的银行卡</view>
<uni-icons type="right" />
</view>
<view class="line rows" @click="link('/pages/mine/setting/feedback')">
<view class="">意见反馈</view>
<uni-icons type="right" />
@ -269,12 +264,10 @@
<view class="mt20 c333 f26">塔罗科技网络(山东)有限公司旗下品牌---九亿</view>
</view>
<template v-if="userinfo.id">
<!-- 退出登录 -->
<view class="mtb30 c999">
<view @click="logOff" class="btn">退出登录</view>
</view>
</template>
<!-- 切换账号 退出登录 -->
<view class="mtb30 c999">
<view @click="logOff" class="btn">退出登录</view>
</view>
<view class="fill" style="height: 30rpx;"></view>
</view>

View File

@ -12,8 +12,7 @@
getCurrentInstance,
} from 'vue'
import {
onLoad,
onUnload,
onLoad
} from '@dcloudio/uni-app'
import {
useStore,
@ -32,28 +31,9 @@
})
onLoad(() => {
//
addListener()
getFriendList()
})
onUnload(() => {
//
removeListener()
})
//
function addListener() {
uni.$emit('updateFocusList', () => {
refreshFriendList()
})
}
//
function removeListener() {
uni.$off('updateFocusList')
}
//
function refreshFriendList() {
userList.pageNum = 1

View File

@ -218,7 +218,7 @@
<view class="name thd c333 f28">{{item.name}}</view>
<view class="spec line df aic thd mtb10 ptb10 plr10 df aic c666 f24 br10"
@click="handleSpec(index,secIndex)" v-if="0">
@click="handleSpec(index,secIndex)">
<view class="thd f1">已选规格 {{secItem.spec.sku}}</view>
<view class="">x{{secItem.payNum}}</view>
</view>

View File

@ -86,7 +86,7 @@
function getDetail() {
api.shop.productDetail({
query: {
userId: userinfo.value.id || '',
userId: userinfo.value.id,
// id
productionId: id.value
}
@ -109,7 +109,7 @@
//
api.shop.addBrowsing({
data: {
userId: userinfo.value.id || '',
userId: userinfo.value.id,
goodsId: id.value
},
}).then(rs => {

View File

@ -55,7 +55,6 @@ changeMine 切换个人中心
login 登录
logout 登出
focusUser 关注用户
updateFocusList 更新关注列表
updateVideo 触发视频修改
collectsVideo 收藏夹视频端
commentVideo 视频评论
@ -177,6 +176,15 @@ register
isShop
1
即时通讯 发红包
积分 余额
消息添加红包功能
群(拼手气 积分/余额)
单人(单个金额 积分/余额)
录入红包祝福语
选择红包封面
输入支付密码
---
我的交易
添加订单按钮 交易 取消
@ -185,8 +193,14 @@ isShop
交易市场确认支付之后需要输入支队密码
成功之后查看详情
首页闹钟改为 倒计时闹钟 和 计时闹钟
新增取消闹钟的按钮
我的
放我的评论 视频评论/商品评论 选择公开(放入统计)、隐藏(别人看不到) 、匿名(每条消耗榴莲果) 三天内可编辑(删除、修改属性)
商品详情增加商品修改记录
用户发布视频三个阶段
1 上传成功 但是不加入推荐池子 可以分享给朋友 不会获得任何的推广
2 后台审核成功 加入推荐池子
@ -199,6 +213,17 @@ isShop
置换弹窗提示需要的对应数量 数量不足无法置换
置换完成之后同步数据
首页视频随比例修改填充方式
购买卷轴、榴莲果增加弹窗
17000000028
21
任务有效读秒上限 300 最后一秒判断是否实名
未实名显示灰色小树苗 作为实名入口
已实名 只展示小树苗特效
用户属性
年龄
学历
@ -235,7 +260,7 @@ call_type 通话类型 2为视频1是音频
微信
第三方
购买卷轴 支付方式开关
购买卷轴 开关
余额
积分
@ -313,6 +338,7 @@ call_type 通话类型 2为视频1是音频
会员购买产品 售前售中(商家待入账) 结束售后结算
三天内可以删除 超过这个时间则不能修改
优先钱包
提现选择收款方式
商家钱包的状态主要是
@ -323,12 +349,43 @@ call_type 通话类型 2为视频1是音频
1 商家账单 包含 入账状态
2 商家提现 提现到钱包
长按二倍速
选择视频截帧
type
0 非好友
1 好友
评论列表
likeType
0 已点赞
1 未点赞
生成订单到平台客服 平台客服去跟进订单
1 充值
2 提现
3 商家入驻 并且发布商品
4 视频上传 挂商品
5 推流 榴莲果置换流量
6 商品分享到im
7 商家和用户进行交流
用户订单状态
订单状态
0待支付
1待发货
4待收货
5已收货
6已完成
9已取消
收藏 改成只能查看列表
金额显示的状态和商家同步
买家进行付款之后 卖家显示是待结算
分润相关的人显示待结算
@ -350,10 +407,32 @@ call_type 通话类型 2为视频1是音频
3. 钱包明细
商家入驻之后 所以得都在后台管理申请子账号 5个之内 随意申请 5个之外需要提交申请 商家可以对自己的子账号进行管理
账号 昵称 密码 订单权限 删除
商家客服可以和平台用户聊天 根据权限管理该商户下的订单 处理订单售后
平台建立子账号 做官方客服
账号 昵称 密码 删除 管理所有用户发起平台介入的订单
登录app和用户聊天
子账号不能登录app 并且区分身份标识
商品评论
点赞
收藏
青少年模式
闹钟
有效读秒
任务读秒
商品上传
购买流程
商家和会员之间进行沟通
购买卷轴榴莲果树释放
榴莲果兑换展播量
评论集合 查看他人评论消耗榴莲果

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,49 @@
{
"hash": "43cb4a2a",
"configHash": "e44a9f0c",
"lockfileHash": "6e88141a",
"browserHash": "4cf13013",
"optimized": {
"@tencentcloud/chat": {
"src": "../../../../../node_modules/@tencentcloud/chat/index.js",
"file": "@tencentcloud_chat.js",
"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": "4785ca3f",
"needsInterop": false
},
"tim-upload-plugin": {
"src": "../../../../../node_modules/tim-upload-plugin/index.js",
"file": "tim-upload-plugin.js",
"fileHash": "34d0cc3a",
"needsInterop": true
},
"js-pinyin": {
"src": "../../../../../node_modules/js-pinyin/index.js",
"file": "js-pinyin.js",
"fileHash": "382f4499",
"needsInterop": true
},
"lodash": {
"src": "../../../../../node_modules/lodash/lodash.js",
"file": "lodash.js",
"fileHash": "03910375",
"needsInterop": true
},
"crypto-js": {
"src": "../../../../../node_modules/crypto-js/index.js",
"file": "crypto-js.js",
"fileHash": "ae9ab40a",
"needsInterop": true
}
},
"chunks": {
"chunk-TDUMLE5V": {
"file": "chunk-TDUMLE5V.js"
}
}
}

View File

@ -0,0 +1,17 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined")
return require.apply(this, arguments);
throw Error('Dynamic require of "' + x + '" is not supported');
});
var __commonJS = (cb, mod) => function __require2() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__require,
__commonJS
};
//# sourceMappingURL=chunk-TDUMLE5V.js.map

View File

@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@ -0,0 +1,242 @@
import {
__commonJS
} from "./chunk-TDUMLE5V.js";
// ../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/tim-upload-plugin/index.js
var require_tim_upload_plugin = __commonJS({
"../../../../../桌面/jiuyiUniapp/jiuyi2/node_modules/tim-upload-plugin/index.js"(exports, module) {
!function(e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self).TIMUploadPlugin = t();
}(exports, function() {
function e(e2, t2) {
var o2 = Object.keys(e2);
if (Object.getOwnPropertySymbols) {
var n2 = Object.getOwnPropertySymbols(e2);
t2 && (n2 = n2.filter(function(t3) {
return Object.getOwnPropertyDescriptor(e2, t3).enumerable;
})), o2.push.apply(o2, n2);
}
return o2;
}
function t(t2) {
for (var o2 = 1; o2 < arguments.length; o2++) {
var n2 = null != arguments[o2] ? arguments[o2] : {};
o2 % 2 ? e(Object(n2), true).forEach(function(e2) {
s(t2, e2, n2[e2]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t2, Object.getOwnPropertyDescriptors(n2)) : e(Object(n2)).forEach(function(e2) {
Object.defineProperty(t2, e2, Object.getOwnPropertyDescriptor(n2, e2));
});
}
return t2;
}
function o(e2) {
return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
return typeof e3;
} : function(e3) {
return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
})(e2);
}
function n(e2, t2) {
if (!(e2 instanceof t2))
throw new TypeError("Cannot call a class as a function");
}
function r(e2, t2) {
for (var o2 = 0; o2 < t2.length; o2++) {
var n2 = t2[o2];
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(e2, n2.key, n2);
}
}
function a(e2, t2, o2) {
return t2 && r(e2.prototype, t2), o2 && r(e2, o2), Object.defineProperty(e2, "prototype", { writable: false }), e2;
}
function s(e2, t2, o2) {
return t2 in e2 ? Object.defineProperty(e2, t2, { value: o2, enumerable: true, configurable: true, writable: true }) : e2[t2] = o2, e2;
}
function i(e2, t2) {
if (null == e2)
return {};
var o2, n2, r2 = function(e3, t3) {
if (null == e3)
return {};
var o3, n3, r3 = {}, a3 = Object.keys(e3);
for (n3 = 0; n3 < a3.length; n3++)
o3 = a3[n3], t3.indexOf(o3) >= 0 || (r3[o3] = e3[o3]);
return r3;
}(e2, t2);
if (Object.getOwnPropertySymbols) {
var a2 = Object.getOwnPropertySymbols(e2);
for (n2 = 0; n2 < a2.length; n2++)
o2 = a2[n2], t2.indexOf(o2) >= 0 || Object.prototype.propertyIsEnumerable.call(e2, o2) && (r2[o2] = e2[o2]);
}
return r2;
}
var u = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}, l = "undefined" != typeof wx && "function" == typeof wx.getSystemInfoSync && Boolean(wx.getSystemInfoSync().fontSizeSetting), f = "undefined" != typeof qq && "function" == typeof qq.getSystemInfoSync && Boolean(qq.getSystemInfoSync().fontSizeSetting), c = "undefined" != typeof tt && "function" == typeof tt.getSystemInfoSync && Boolean(tt.getSystemInfoSync().fontSizeSetting), d = "undefined" != typeof swan && "function" == typeof swan.getSystemInfoSync && Boolean(swan.getSystemInfoSync().fontSizeSetting), p = "undefined" != typeof my && "function" == typeof my.getSystemInfoSync && Boolean(my.getSystemInfoSync().fontSizeSetting), y = "undefined" != typeof uni && "undefined" == typeof window && "function" == typeof uni.requireNativePlugin, h = y && "ios" === uni.getDeviceInfo().platform.toLocaleLowerCase(), g = (y && uni.getDeviceInfo().platform.toLocaleLowerCase(), l || f || c || d || p || y), m = void 0 !== u && (void 0 !== u.nativeModuleProxy || void 0 !== u.ReactNative), v = f ? qq : c ? tt : d ? swan : p ? my : l ? wx : y ? uni : {}, b = function(e2) {
if ("object" !== o(e2) || null === e2)
return false;
var t2 = Object.getPrototypeOf(e2);
if (null === t2)
return true;
for (var n2 = t2; null !== Object.getPrototypeOf(n2); )
n2 = Object.getPrototypeOf(n2);
return t2 === n2;
};
function w(e2) {
if (null == e2)
return true;
if ("boolean" == typeof e2)
return false;
if ("number" == typeof e2)
return 0 === e2;
if ("string" == typeof e2)
return 0 === e2.length;
if ("function" == typeof e2)
return 0 === e2.length;
if (Array.isArray(e2))
return 0 === e2.length;
if (e2 instanceof Error)
return "" === e2.message;
if (b(e2)) {
for (var t2 in e2)
if (Object.prototype.hasOwnProperty.call(e2, t2))
return false;
return true;
}
return false;
}
var O = function() {
function e2() {
n(this, e2), this._n = "WebRequest";
}
return a(e2, [{ key: "request", value: function(e3, o2) {
var n2 = this, r2 = "".concat(this._n, ".request"), a2 = e3.downloadUrl || "", s2 = (e3.method || "PUT").toUpperCase(), i2 = e3.url;
if (console.log("%c tim-upload-plugin %c", "background:#0abf5b; padding:1px; border-radius:3px; color: #fff", "background:transparent", "".concat(r2, " URL:").concat(i2)), e3.qs) {
var u2 = function(e4) {
var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "&", o3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "=";
return w(e4) ? "" : b(e4) ? Object.keys(e4).map(function(n3) {
var r3 = encodeURIComponent(n3) + o3;
return Array.isArray(e4[n3]) ? e4[n3].map(function(e5) {
return r3 + encodeURIComponent(e5);
}).join(t2) : r3 + encodeURIComponent(e4[n3]);
}).filter(Boolean).join(t2) : void 0;
}(e3.qs);
u2 && (i2 += "".concat(-1 === i2.indexOf("?") ? "?" : "&").concat(u2));
}
var l2 = new XMLHttpRequest();
l2.open(s2, i2, true), l2.responseType = e3.dataType || "text";
var f2 = e3.headers || {};
if (e3.uploadByIP && (f2 = t(t({}, f2), {}, { host: e3.uploadIP })), !w(f2))
for (var c2 in f2)
f2.hasOwnProperty(c2) && "content-length" !== c2.toLowerCase() && "user-agent" !== c2.toLowerCase() && "origin" !== c2.toLowerCase() && "host" !== c2.toLowerCase() && l2.setRequestHeader(c2, f2[c2]);
return l2.onload = function() {
if (200 === l2.status)
o2(null, n2._xhrRes(l2, n2._xhrBody(l2, a2, e3.uploadByIP && e3.uploadIP), f2));
else {
if (e3.uploadIP && -1 === e3.url.indexOf(e3.uploadIP))
return e3.url = function(e4, t3) {
return e4.replace(/^http(s)?:\/\/(.*?)\//, "https://".concat(t3, "/"));
}(e3.url, e3.uploadIP), e3.uploadByIP = true, n2.request(e3, o2);
var t2 = { code: l2.status, message: JSON.stringify(l2.responseText) };
o2(t2, n2._xhrRes(l2, n2._xhrBody(l2, a2, e3.uploadByIP && e3.uploadIP), f2));
}
}, l2.onerror = function(t2) {
var r3 = n2._xhrBody(l2, a2, e3.uploadByIP && e3.uploadIP), s3 = { code: l2.status, message: JSON.stringify(l2.responseText) };
r3 || l2.statusText || 0 !== l2.status || (t2.message = "CORS blocked or network error"), o2(s3, n2._xhrRes(l2, r3)), s3 = null;
}, e3.onProgress && l2.upload && (l2.upload.onprogress = function(t2) {
var o3 = t2.total, n3 = t2.loaded, r3 = Math.floor(100 * n3 / o3);
e3.onProgress({ total: o3, loaded: n3, percent: (r3 >= 100 ? 100 : r3) / 100 });
}), l2.send(e3.resources), l2;
} }, { key: "_xhrRes", value: function(e3, t2) {
var o2 = {};
return e3.getAllResponseHeaders().trim().split("\n").forEach(function(e4) {
if (e4) {
var t3 = e4.indexOf(":"), n2 = e4.substr(0, t3).trim().toLowerCase(), r2 = e4.substr(t3 + 1).trim();
o2[n2] = r2;
}
}), { statusCode: e3.status, statusMessage: e3.statusText, headers: o2, data: t2 };
} }, { key: "_xhrBody", value: function(e3, t2, o2) {
return 200 === e3.status && t2 ? { location: t2, uploadIP: o2 } : { response: e3.responseText, uploadIP: o2 };
} }]), e2;
}(), S = ["unknown", "image", "video", "audio", "log"], P = ["name"], I = function() {
function e2() {
n(this, e2);
}
return a(e2, [{ key: "request", value: function(e3, o2) {
var n2 = this, r2 = e3.resources, a2 = void 0 === r2 ? "" : r2, s2 = e3.headers, u2 = void 0 === s2 ? {} : s2, l2 = e3.url, f2 = e3.downloadUrl, c2 = void 0 === f2 ? "" : f2, d2 = l2, y2 = null, g2 = c2.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/), m2 = decodeURIComponent(g2[3]), b2 = m2.indexOf("?") > -1 ? m2.split("?")[0] : m2, w2 = { key: e3.fileKey ? e3.fileKey : b2, success_action_status: 200, "Content-Type": "" }, O2 = {};
if (h) {
var I2 = l2.split("?sign=");
if (I2.length > 1) {
var C2 = I2[1];
d2 = "".concat(I2[0], "?sign=").concat(encodeURIComponent("".concat(C2))), O2.sign = decodeURIComponent(C2), O2.signature = decodeURIComponent(C2);
}
}
var k = { url: d2, header: u2, name: "file", filePath: a2, formData: t(t({}, w2), O2), timeout: e3.timeout || 3e5 };
if (p) {
var x = k;
x.name;
k = t(t({}, i(x, P)), {}, { fileName: "file", fileType: S[e3.fileType] });
}
return (y2 = v.uploadFile(t(t({}, k), {}, { success: function(e4) {
n2._handleResponse({ response: e4, downloadUrl: c2, callback: o2 });
}, fail: function(e4) {
n2._handleResponse({ response: e4, downloadUrl: c2, callback: o2 });
} }))).onProgressUpdate && y2.onProgressUpdate(function(t2) {
e3.onProgress && e3.onProgress({ total: t2.totalBytesExpectedToSend, loaded: t2.totalBytesSent, percent: Math.floor(t2.progress) / 100 });
}), y2;
} }, { key: "_handleResponse", value: function(e3) {
var o2 = e3.downloadUrl, n2 = e3.response, r2 = e3.callback, a2 = n2.header, s2 = {};
if (a2)
for (var i2 in a2)
a2.hasOwnProperty(i2) && (s2[i2.toLowerCase()] = a2[i2]);
var u2 = +n2.statusCode;
200 === u2 ? r2(null, { statusCode: u2, headers: s2, data: t(t({}, n2.data), {}, { location: o2 }) }) : r2({ code: u2, message: JSON.stringify(n2.data) }, { statusCode: u2, headers: s2, data: void 0 });
} }]), e2;
}(), C = function() {
function e2() {
n(this, e2);
}
return a(e2, [{ key: "request", value: function(e3, t2) {
var o2 = this, n2 = e3.resources, r2 = void 0 === n2 ? "" : n2, a2 = e3.fileKey, s2 = void 0 === a2 ? "" : a2, i2 = e3.url, u2 = e3.downloadUrl, l2 = void 0 === u2 ? "" : u2, f2 = new FormData();
f2.append("key", s2), f2.append("success_action_status", 200), f2.append("file", { uri: r2, type: "application/octet-stream", name: "uploaded_file" }), fetch(i2, { method: "POST", headers: { "Content-Type": "multipart/form-data" }, body: f2 }).then(function(e4) {
o2._handleResponse({ response: e4, downloadUrl: l2, callback: t2 });
}).catch(function(e4) {
o2._handleResponse({ response: e4, downloadUrl: l2, callback: t2 });
});
} }, { key: "_handleResponse", value: function(e3) {
var t2 = e3.downloadUrl, o2 = e3.response, n2 = e3.callback, r2 = o2.headers, a2 = o2.status, s2 = r2 && r2.map || {};
200 === a2 ? n2(null, { statusCode: 200, headers: s2, data: { location: t2 } }) : n2({ code: a2, message: JSON.stringify(o2) }, { statusCode: a2, headers: s2, data: void 0 });
} }]), e2;
}();
return function() {
function e2() {
n(this, e2), this.retry = 1, this.tryCount = 0, this.systemClockOffset = 0, this.httpRequest = g ? new I() : m ? new C() : new O(), console.log("TIMUploadPlugin.VERSION: ".concat("1.4.1"));
}
return a(e2, [{ key: "uploadFile", value: function(e3, t2) {
var o2 = this;
return this.httpRequest.request(e3, function(n2, r2) {
n2 && o2.tryCount < o2.retry && o2.allowRetry(n2) ? (o2.tryCount++, o2.uploadFile(e3, t2)) : (o2.tryCount = 0, t2(n2, r2));
});
} }, { key: "allowRetry", value: function(e3) {
var t2 = false, o2 = false;
if (e3) {
var n2 = e3.headers && (e3.headers.date || e3.headers.Date) || e3.error && e3.error.ServerTime;
try {
var r2 = e3.error && e3.error.Code, a2 = e3.error && e3.error.Message;
("RequestTimeTooSkewed" === r2 || "AccessDenied" === r2 && "Request has expired" === a2) && (o2 = true);
} catch (u2) {
}
if (o2 && n2) {
var s2 = Date.now(), i2 = Date.parse(n2);
Math.abs(s2 + this.systemClockOffset - i2) >= 3e4 && (this.systemClockOffset = i2 - s2, t2 = true);
} else
5 === Math.floor(e3.statusCode / 100) && (t2 = true);
}
return t2;
} }], [{ key: "getVersion", value: function() {
return "1.4.1";
} }]), e2;
}();
});
}
});
export default require_tim_upload_plugin();
//# sourceMappingURL=tim-upload-plugin.js.map

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,9 @@ import {
} from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080'
// let target = 'http://hvw2rn.natappfree.cc'
// let target = 'http://91f.xyz:8080'
let target = 'https://b433d23.r24.cpolar.top/'
export default defineConfig({
plugins: [uni()],