Compare commits
6 Commits
61dd26ab64
...
1d2efd6397
Author | SHA1 | Date |
---|---|---|
|
1d2efd6397 | |
|
409f137e89 | |
|
69babb6f3e | |
|
c4a23be60c | |
|
3e4f7e3c09 | |
|
38c39e1930 |
|
@ -297,6 +297,61 @@ const mine = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号解冻
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getWalletBillList(param) {
|
||||||
|
return util.request({
|
||||||
|
url: '/user/walletTransaction/list',
|
||||||
|
data: param.data,
|
||||||
|
query: param.query,
|
||||||
|
method: 'GET',
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝提现
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getToAlipay(param) {
|
||||||
|
return util.request({
|
||||||
|
url: '/user/alipay/withdraw',
|
||||||
|
data: param.data,
|
||||||
|
query: param.query,
|
||||||
|
method: 'POST',
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡提现
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getToBank(param) {
|
||||||
|
return util.request({
|
||||||
|
url: '/user/alipay/withdrawToBankCard',
|
||||||
|
data: param.data,
|
||||||
|
query: param.query,
|
||||||
|
method: 'POST',
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取提现配置
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getPayConfig(param) {
|
||||||
|
return util.request({
|
||||||
|
url: '/user/alipay/getPayConfig',
|
||||||
|
data: param.data,
|
||||||
|
query: param.query,
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default mine
|
export default mine
|
|
@ -7,7 +7,10 @@ const config = {
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
|
<<<<<<< HEAD
|
||||||
// host: 'https://1a880cd5.r24.cpolar.top/',
|
// host: 'https://1a880cd5.r24.cpolar.top/',
|
||||||
|
=======
|
||||||
|
>>>>>>> 409f137e8990b13381bdbe7efca7eec9a3cfc89e
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -260,11 +260,11 @@ const util = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 替换图片的宽度为最大宽度100% (移动端解析html富文本专用)
|
/**
|
||||||
imgReplace(value, th) {
|
* 替换图片的宽度为最大宽度100% (移动端解析html富文本专用)
|
||||||
if (!th) {
|
* @param {Object} value 富文本
|
||||||
value = value.replace(/<img src="/ig, '<img src="' + util.config.host);
|
*/
|
||||||
}
|
imgReplace(value) {
|
||||||
return value.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, '<p')
|
return value.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, '<p')
|
||||||
.replace(/<p>/ig, '<p style="font-size: 15px; line-height: 25px;">')
|
.replace(/<p>/ig, '<p style="font-size: 15px; line-height: 25px;">')
|
||||||
.replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, '<img$1')
|
.replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, '<img$1')
|
||||||
|
|
|
@ -173,16 +173,16 @@ function handleList(list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
item.MsgTime = handleDate(item.MsgTime)
|
item.MsgTime = handleDate(item.MsgTime)
|
||||||
|
|
||||||
let type = item.Type == 1 ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`;
|
let type = item.type == 'C2C' ? `C2C${item.To_Account}` : `GROUP${item.GroupId}`;
|
||||||
uni.$chat.getConversationProfile(type).then(rs => {
|
uni.$chat.getConversationProfile(type).then(rs => {
|
||||||
let res = rs.data.conversation;
|
let res = rs.data.conversation;
|
||||||
|
|
||||||
item.chatText = res.lastMessage.messageForShow;
|
item.chatText = res.lastMessage.messageForShow;
|
||||||
item.unreadCount = res.unreadCount;
|
item.unreadCount = res.unreadCount;
|
||||||
if (item.Type == 1) {
|
if (item.type == 'C2C') {
|
||||||
item.avatar = res.userProfile.avatar;
|
item.avatar = res.userProfile.avatar;
|
||||||
item.name = res.userProfile.nick;
|
item.name = res.userProfile.nick;
|
||||||
} else if (item.Type == 2) {
|
} else if (item.type == 'GROUP') {
|
||||||
item.avatar = res.groupProfile.avatar;
|
item.avatar = res.groupProfile.avatar;
|
||||||
item.name = res.groupProfile.name;
|
item.name = res.groupProfile.name;
|
||||||
item.num = res.groupProfile.memberCount;
|
item.num = res.groupProfile.memberCount;
|
||||||
|
@ -256,7 +256,7 @@ function delMsg(item) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let conversationId = item.Type == 1 ? `C2C${item.userID}` : `GROUP${item.groupID}`;
|
let conversationId = item.type == 'C2C' ? `C2C${item.userID}` : `GROUP${item.groupID}`;
|
||||||
|
|
||||||
uni.$chat.deleteConversation(conversationId).then(rs => {
|
uni.$chat.deleteConversation(conversationId).then(rs => {
|
||||||
getList()
|
getList()
|
||||||
|
@ -274,7 +274,7 @@ function setRead(item) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let conversationId = item.Type == 1 ? `C2C${item.userID}` : `GROUP${item.groupID}`;
|
let conversationId = item.type == 'C2C' ? `C2C${item.userID}` : `GROUP${item.groupID}`;
|
||||||
uni.$chat.setMessageRead({
|
uni.$chat.setMessageRead({
|
||||||
conversationID: conversationId,
|
conversationID: conversationId,
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
defineProps,
|
defineProps,
|
||||||
defineEmits,
|
defineEmits,
|
||||||
|
defineExpose,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util'
|
import util from '@/common/js/util'
|
||||||
|
@ -16,6 +17,11 @@
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: String
|
||||||
|
})
|
||||||
|
//
|
||||||
|
const emit = defineEmits(['update:modelValue']);
|
||||||
// 编辑器内容
|
// 编辑器内容
|
||||||
const formats = reactive({})
|
const formats = reactive({})
|
||||||
// 编辑器上下文对象
|
// 编辑器上下文对象
|
||||||
|
@ -31,17 +37,33 @@
|
||||||
const colorKey = ref('forecolor')
|
const colorKey = ref('forecolor')
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始化
|
// 创建编辑器上下文对象
|
||||||
onEditorReady()
|
onEditorReady()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化
|
// 创建编辑器上下文对象
|
||||||
function onEditorReady() {
|
function onEditorReady() {
|
||||||
uni.createSelectorQuery().select('#editor').context((res) => {
|
uni.createSelectorQuery().select('#editor').context((res) => {
|
||||||
editorCtx.value = res.context
|
editorCtx.value = res.context
|
||||||
}).exec()
|
}).exec()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化编辑器上下文对象
|
||||||
|
function init(html) {
|
||||||
|
editorCtx.value.setContents({
|
||||||
|
html,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取内容
|
||||||
|
function getEditorContents() {
|
||||||
|
editorCtx.value.getContents({
|
||||||
|
success: rs => {
|
||||||
|
return rs
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 撤销
|
// 撤销
|
||||||
function undo() {
|
function undo() {
|
||||||
editorCtx.value.undo()
|
editorCtx.value.undo()
|
||||||
|
@ -57,7 +79,6 @@
|
||||||
* @param {Object} event
|
* @param {Object} event
|
||||||
*/
|
*/
|
||||||
function handleEditor(event) {
|
function handleEditor(event) {
|
||||||
console.log('format', event.target.dataset)
|
|
||||||
let {
|
let {
|
||||||
name,
|
name,
|
||||||
value
|
value
|
||||||
|
@ -157,6 +178,16 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 富文本编辑
|
||||||
|
function handleEditorInput(event) {
|
||||||
|
emit('update:modelValue', event.detail.html)
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
init,
|
||||||
|
getEditorContents,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -221,7 +252,7 @@
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<editor id="editor" class="ql-container" placeholder="在此输入产品详情" showImgSize showImgToolbar showImgResize
|
<editor id="editor" class="ql-container" placeholder="在此输入产品详情" showImgSize showImgToolbar showImgResize
|
||||||
@statuschange="onStatusChange" @ready="onEditorReady">
|
@statuschange="onStatusChange" @ready="onEditorReady" @input="handleEditorInput">
|
||||||
</editor>
|
</editor>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "九亿",
|
"name" : "九亿",
|
||||||
"appid" : "__UNI__08B31BC",
|
"appid" : "__UNI__08B31BC",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.6",
|
"versionName" : "1.0.7",
|
||||||
"versionCode" : 1006,
|
"versionCode" : 1007,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -18,17 +18,18 @@
|
||||||
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 videoApi from '@/api/video.js'
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReady,
|
onReady,
|
||||||
onHide,
|
onHide,
|
||||||
onUnload,
|
onUnload,
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
|
||||||
// 顶部
|
// 顶部
|
||||||
import apex from '@/components/header/apex.vue';
|
import apex from '@/components/header/apex.vue';
|
||||||
// 视频菜单
|
// 视频菜单
|
||||||
import videoMenu from '@/components/index/videoMenu.vue';
|
import videoMenu from '@/components/index/videoMenu.vue';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
const userinfo = computed(() => store.state.userinfo)
|
const userinfo = computed(() => store.state.userinfo)
|
||||||
// 榴莲果兑换播放量数量
|
// 榴莲果兑换播放量数量
|
||||||
const durainView = ref(0)
|
const durainView = ref(0)
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const list = reactive({
|
const list = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
videoApi.pushVideo({
|
api.video.pushVideo({
|
||||||
query: {
|
query: {
|
||||||
ids: videoIds.value.join(','),
|
ids: videoIds.value.join(','),
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
videoApi.applyVideo({
|
api.video.applyVideo({
|
||||||
data: {
|
data: {
|
||||||
videoIds: videoIds.value.join(","),
|
videoIds: videoIds.value.join(","),
|
||||||
author: apply.author,
|
author: apply.author,
|
||||||
|
@ -256,17 +256,15 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 推流收藏视频
|
||||||
function pushCollect() {
|
function pushCollect() {
|
||||||
uni.navigateTo({
|
link(util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
|
||||||
url: util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
|
|
||||||
ids: collectVideoIds.value.join(','),
|
ids: collectVideoIds.value.join(','),
|
||||||
})
|
}))
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
function navigateToPage(path) {
|
function link(path) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: path
|
url: path
|
||||||
});
|
});
|
||||||
|
@ -277,7 +275,7 @@
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<apex title="投流推广">
|
<apex title="投流推广">
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="c333 f28" @click="navigateToPage('/pages/index/dataCenter/pushHistory')">历史推流</view>
|
<view class="c333 f28" @click="link('/pages/index/dataCenter/pushHistory')">历史推流</view>
|
||||||
</template>
|
</template>
|
||||||
</apex>
|
</apex>
|
||||||
|
|
||||||
|
@ -432,7 +430,6 @@
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -13,27 +13,148 @@
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
//
|
||||||
|
import api from '@/api/index.js'
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util.js'
|
||||||
|
// 列表
|
||||||
|
const list = reactive({
|
||||||
|
pageSize: 10,
|
||||||
|
pageNum: 1,
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
})
|
||||||
|
// 类型列表
|
||||||
|
const typeList = reactive([{
|
||||||
|
name: '全部',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '余额',
|
||||||
|
id: 'balance',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '积分',
|
||||||
|
id: 'score',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '种子',
|
||||||
|
id: 'seed',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '榴莲果',
|
||||||
|
id: 'fruit',
|
||||||
|
}
|
||||||
|
])
|
||||||
|
// 类型索引
|
||||||
|
const typeIndex = ref(0)
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
//
|
// 获取列表
|
||||||
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
// 获取更多列表
|
||||||
|
getMoreList()
|
||||||
|
})
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
// 重载当前列表
|
||||||
|
refreshList()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 重载当前列表
|
||||||
|
function refreshList() {
|
||||||
|
list.pageNum = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取更多列表
|
||||||
|
function getMoreList() {
|
||||||
|
if (list.data.length >= list.total) return
|
||||||
|
list.pageNum++
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
function getList() {
|
||||||
|
api.mine.getWalletBillList({
|
||||||
|
query: {
|
||||||
|
pageSize: list.pageSize,
|
||||||
|
pageNum: list.pageNum,
|
||||||
|
type: typeList[typeIndex.value].id,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
if (list.pageNum == 1) list.data.length = 0
|
||||||
|
list.data.push(...rs.rows.map(item => {
|
||||||
|
// 交易类型
|
||||||
|
item.typeName = typeList.find(type => type.id == item.type).name
|
||||||
|
return item
|
||||||
|
}))
|
||||||
|
list.total = rs.total
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
function handleTypeIndex(index) {
|
||||||
|
if (typeIndex.value === index) return
|
||||||
|
typeIndex.value = index
|
||||||
|
// 重载当前列表
|
||||||
|
refreshList()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
|
<view class="typeList df bfff shadow">
|
||||||
|
<view class="item f1 fmid fdc" v-for="(item,index) in typeList" :class="{active: index == typeIndex}"
|
||||||
|
@click="handleTypeIndex(index)">
|
||||||
|
<view class="txt">{{item.name}}</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="ghost"></view>
|
||||||
|
|
||||||
<view class="listBox mtb30 mlr30">
|
<view class="listBox mtb30 mlr30">
|
||||||
|
<view class="list oh mtb30 plr30 bfff br20" v-for="(item,index) in list.data" :key="item.id">
|
||||||
<view class="list oh mtb30 plr30 bfff br20" v-for="(item,index) in 3" :key="index">
|
<view class="line ptb20 tac">
|
||||||
<view class="line tac">
|
<view class="title mtb30">{{item.reason}}</view>
|
||||||
<view class="title mtb30">使用积分支付</view>
|
|
||||||
<view class="price mtb30 c111">
|
<view class="price mtb30 c111">
|
||||||
<text class="unit">¥</text>
|
<text class="numer b">{{item.amount}}</text>
|
||||||
<text class="numer b">1000</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="time mtb30 c999 f28">2024.12.07 17:00</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line rows">
|
<view class="line f28">
|
||||||
|
<view class="df aic mtb20">
|
||||||
|
<view class="key w150">明细类型</view>
|
||||||
|
<view class="value f1 c999">{{item.typeName}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="df aic mtb20">
|
||||||
|
<view class="key w150">交易时间</view>
|
||||||
|
<view class="value f1 c999">{{item.createTime}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="df aic mtb20" @click.stop="util.copyText(item.transactionId)">
|
||||||
|
<view class="key w150">订单流水</view>
|
||||||
|
<view class="value f1 thd c999">{{item.transactionId}}</view>
|
||||||
|
<image class="copy wh24" src="/static/copy.png" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="line ptb20 rows" v-if="0">
|
||||||
<view class="key">查看详情</view>
|
<view class="key">查看详情</view>
|
||||||
<uni-icons type="right" />
|
<uni-icons type="right" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -45,14 +166,49 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
//
|
||||||
|
.ghost,
|
||||||
|
.typeList {
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 类型列表
|
||||||
|
.typeList {
|
||||||
|
position: fixed;
|
||||||
|
top: clac(-window-top + 0);
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
color: #999;
|
||||||
|
transition: .3s;
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 6rpx;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
background-color: #333;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
opacity: 0;
|
||||||
|
transition: .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
.line {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 列表盒子
|
// 列表盒子
|
||||||
.listBox {
|
.listBox {
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
.list {
|
.list {
|
||||||
.line {
|
|
||||||
padding: 20rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line+.line {
|
.line+.line {
|
||||||
border-top: 2rpx solid #ddd;
|
border-top: 2rpx solid #ddd;
|
||||||
|
@ -61,7 +217,7 @@
|
||||||
//
|
//
|
||||||
.price {
|
.price {
|
||||||
.unit {
|
.unit {
|
||||||
font-size: 40rpx;
|
// font-size: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.numer {
|
.numer {
|
||||||
|
|
|
@ -5,30 +5,97 @@
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onReady,
|
||||||
|
onUnload,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
|
// 接口
|
||||||
import api from '@/api/index.js';
|
import api from '@/api/index.js';
|
||||||
|
|
||||||
// 表单
|
// 表单
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
amount: '',
|
withdrawAmount: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 提现方式列表
|
// 提现方式列表
|
||||||
const typeList = reactive([{
|
const typeList = reactive([{
|
||||||
key: 'bank',
|
|
||||||
name: '银行卡',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'wechat',
|
|
||||||
name: '微信',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'alipay',
|
key: 'alipay',
|
||||||
name: '支付宝',
|
name: '支付宝',
|
||||||
}
|
confirm: (event) => getToAlipay(event)
|
||||||
])
|
}, {
|
||||||
|
key: 'wechat',
|
||||||
|
name: '微信',
|
||||||
|
confirm: (event) => getToWechat(event)
|
||||||
|
}, {
|
||||||
|
key: 'bank',
|
||||||
|
name: '银行卡',
|
||||||
|
confirm: (event) => getToBank(event)
|
||||||
|
}, ])
|
||||||
// 支付方式下标
|
// 支付方式下标
|
||||||
const typeIndex = ref(0)
|
const typeIndex = ref(0)
|
||||||
|
// 支付宝账号
|
||||||
|
const alipayAccount = ref('未绑定')
|
||||||
|
// 微信账号
|
||||||
|
const wechatAccount = ref('未绑定')
|
||||||
|
// 提现配置
|
||||||
|
const config = reactive({})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
// 获取已绑定的账号
|
||||||
|
getBindAccount()
|
||||||
|
// 获取提现配置
|
||||||
|
getPayConfig()
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
// 移除监听
|
||||||
|
removeListener()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 开启监听
|
||||||
|
function addListener() {
|
||||||
|
uni.$on('updateBindingAccount', () => {
|
||||||
|
// 获取已绑定的账号
|
||||||
|
getBindAccount()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除监听
|
||||||
|
function removeListener() {
|
||||||
|
uni.$off('updateBindingAccount')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取提现配置
|
||||||
|
function getPayConfig() {
|
||||||
|
api.mine.getPayConfig({}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
Object.assign(config, {}, rs.data)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取已绑定的账号
|
||||||
|
function getBindAccount() {
|
||||||
|
api.mine.getBindAccount().then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
const result = rs.data
|
||||||
|
if (result.alipayId) alipayAccount.value = result.alipayId
|
||||||
|
if (result.wechatId) wechatAccount.value = result.wechatId
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 切换下标
|
* 切换下标
|
||||||
|
@ -44,6 +111,81 @@
|
||||||
function handleFast() {
|
function handleFast() {
|
||||||
// 银行取银行卡 微信 支付宝去我的绑定页面
|
// 银行取银行卡 微信 支付宝去我的绑定页面
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转
|
||||||
|
* @param {Object} url 跳转
|
||||||
|
*/
|
||||||
|
function link(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击提现
|
||||||
|
function handleSubmit() {
|
||||||
|
if (!form.withdrawAmount) {
|
||||||
|
util.alert('提现金额不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (form.withdrawAmount < config.minWithdrawalAmount) {
|
||||||
|
util.alert(`提现金额不能小于${config.minWithdrawalAmount}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//
|
||||||
|
typeList[typeIndex.value].confirm()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现到支付宝
|
||||||
|
function getToAlipay() {
|
||||||
|
api.mine.getToAlipay({
|
||||||
|
query: {
|
||||||
|
account: alipayAccount.value,
|
||||||
|
withdrawAmount: form.withdrawAmount,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
// 提现回调
|
||||||
|
getToWalletCallback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现到微信
|
||||||
|
function getToWechat() {
|
||||||
|
util.alert('微信暂未开通,请联系管理员')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现到银行卡
|
||||||
|
function getToBank() {
|
||||||
|
api.mine.getToBank({}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
// 提现回调
|
||||||
|
getToWalletCallback()
|
||||||
|
|
||||||
|
util.alert({
|
||||||
|
content: '已发起提现申请,请等待后台审核',
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提现回调
|
||||||
|
function getToWalletCallback() {
|
||||||
|
// 获取钱包
|
||||||
|
util.getPurse()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -54,14 +196,14 @@
|
||||||
<view class="key">提现金额</view>
|
<view class="key">提现金额</view>
|
||||||
<view class="value inputBox df aic">
|
<view class="value inputBox df aic">
|
||||||
<view class="c333 f40 b">¥</view>
|
<view class="c333 f40 b">¥</view>
|
||||||
<input type="text" v-model="form.amount" placeholder="输入金额" />
|
<input type="text" v-model="form.withdrawAmount" placeholder="输入金额" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="key rows">
|
<view class="key rows">
|
||||||
<view>选择提现方式</view>
|
<view>选择提现方式</view>
|
||||||
<view class="c999 f26" @click="handleFast">快速选择</view>
|
<view class="c999 f26" @click="handleFast" v-if="typeList[typeIndex].key === 'bank'">快速选择</view>
|
||||||
</view>
|
</view>
|
||||||
<picker :range="typeList" range-key="name" @change="handleTypeIndex">
|
<picker :range="typeList" range-key="name" @change="handleTypeIndex">
|
||||||
<view class="value inputBox rows">
|
<view class="value inputBox rows">
|
||||||
|
@ -71,8 +213,8 @@
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 银行卡 -->
|
||||||
<template v-if="typeList[typeIndex].key === 'bank'">
|
<template v-if="typeList[typeIndex].key === 'bank'">
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="key">银行名称</view>
|
<view class="key">银行名称</view>
|
||||||
<view class="value inputBox">
|
<view class="value inputBox">
|
||||||
|
@ -88,6 +230,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 微信 -->
|
||||||
<template v-if="typeList[typeIndex].key === 'wechat'">
|
<template v-if="typeList[typeIndex].key === 'wechat'">
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="key">微信号</view>
|
<view class="key">微信号</view>
|
||||||
|
@ -97,22 +240,30 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 支付宝 -->
|
||||||
<template v-if="typeList[typeIndex].key === 'alipay'">
|
<template v-if="typeList[typeIndex].key === 'alipay'">
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="key">支付宝账号</view>
|
<view class="key f1">支付宝账号</view>
|
||||||
<view class="value inputBox">
|
|
||||||
<input v-model="form.alipay" placeholder="输入金额" />
|
<view class="value df aic inputBox" @click="link('/pages/mine/setting/binding')">
|
||||||
|
{{alipayAccount}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 温馨提示 -->
|
||||||
<view class="line notice ptb20 plr30 br20">
|
<view class="line notice ptb20 plr30 br20">
|
||||||
<view class="key">温馨提示</view>
|
<view class="key">温馨提示</view>
|
||||||
<view class="content mt15 c333 f28">为保证账户资金安全,请仔细核对好填写信息,在申请提现</view>
|
<view class="content mt15 c333 f28">
|
||||||
|
<view>为保证账户资金安全,请仔细核对好填写信息,再申请提现</view>
|
||||||
|
<view>每次最低提现金额 {{config.minWithdrawalAmount}}</view>
|
||||||
|
<view>每次提现手续费 {{config.feeRate * 100}}%</view>
|
||||||
|
<view>每日最多提现次数 {{config.dailyWithdrawalLimit}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<view class="btn pro black">提现</view>
|
<view class="btn pro black" @click="handleSubmit">提现</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,10 @@
|
||||||
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreGetList">
|
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreGetList">
|
||||||
<view class="list c333 f30">
|
<view class="list c333 f30">
|
||||||
<view class="item mtb30 f32" v-for="(item,index) in getLog.data" :key="index">
|
<view class="item mtb30 f32" v-for="(item,index) in getLog.data" :key="index">
|
||||||
<view>{{item.typeName}}{{item.amount}}</view>
|
<view class="rows">
|
||||||
|
<view class="f1 f32">{{item.typeName}}</view>
|
||||||
|
<view class="f28">{{item.amount}}积分</view>
|
||||||
|
</view>
|
||||||
<view class="time mt10 c999 f28 ">{{item.createTime}}</view>
|
<view class="time mt10 c999 f28 ">{{item.createTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 账号挂失
|
* 账号冻结
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 账号挂失
|
* 账号解冻
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
<!-- 商品管理 -->
|
|
||||||
<template>
|
|
||||||
<view class="jy-business-operator-order">
|
|
||||||
<JyCommonHead title="商品管理" isRight>
|
|
||||||
<template v-slot:right>
|
|
||||||
<view @click="right">添加</view>
|
|
||||||
</template>
|
|
||||||
</JyCommonHead>
|
|
||||||
<view class="p16">
|
|
||||||
<JyOrderCard v-for="(item, index) in 10" type="merchandise_control"></JyOrderCard>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue'
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onReachBottom
|
|
||||||
} from "@dcloudio/uni-app"
|
|
||||||
import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
//顶部条件栏
|
|
||||||
import JyOrderCard from '@/components/public/jy-order-card'
|
|
||||||
|
|
||||||
onReachBottom(() => {
|
|
||||||
//
|
|
||||||
})
|
|
||||||
</script>
|
|
|
@ -1,155 +0,0 @@
|
||||||
<!-- 商品发布 -->
|
|
||||||
<template>
|
|
||||||
<view class="jy-commodity_release">
|
|
||||||
<!-- 商品图片多选 -->
|
|
||||||
<uni-forms :modelValue="paramsData">
|
|
||||||
<uni-forms-item class="vertical-label margins" label="商品图片" name="name">
|
|
||||||
<uni-file-picker :imageStyles="{
|
|
||||||
width: '150rpx',
|
|
||||||
height: '150rpx'
|
|
||||||
}" limit="9">
|
|
||||||
<view>
|
|
||||||
<image class="wh120" src="/static/shop-upload-image.png"></image>
|
|
||||||
</view>
|
|
||||||
</uni-file-picker>
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item class="vertical-label margins" labelPosition="top" label="商品标题" name="name">
|
|
||||||
<uni-easyinput type="textarea" autoHeight :inputBorder="false" maxlength="30"
|
|
||||||
placeholder="最多输入60字符(30个汉字)" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<view class="margins mb20">
|
|
||||||
<uni-forms-item label="类目" name="name">
|
|
||||||
<view class="df jcsb aic hohp" @click="category.open()">
|
|
||||||
<text class="click_select">点击选择</text>
|
|
||||||
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
|
|
||||||
</view>
|
|
||||||
<JyPopup ref="category" title="请选择申请原因" :showSave="false">
|
|
||||||
<view class="reason-list" v-for="item in 10" @click="selectReason(item)">
|
|
||||||
<text class="label">{{ item }}</text>
|
|
||||||
</view>
|
|
||||||
</JyPopup>
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="规格" name="name">
|
|
||||||
<text class="click_select hohp df aic" @click="addSpecifications">添加规格</text>
|
|
||||||
<!-- <uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="" /> -->
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="价格" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="¥0.00" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="库存" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="输入库存" />
|
|
||||||
</uni-forms-item>
|
|
||||||
</view>
|
|
||||||
<uni-forms-item class="margins" label="发货" name="name">
|
|
||||||
<view class="df jcsb aic hohp">
|
|
||||||
<text class="click_select">点击选择</text>
|
|
||||||
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
|
|
||||||
</view>
|
|
||||||
<JyPopup ref="category" title="发货" :showSave="false">
|
|
||||||
<uni-forms :modelValue="paramsDeliveryData">
|
|
||||||
<uni-forms-item label="发货时间" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入时间" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="运费" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入运费" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="所在地" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入省,市,区" />
|
|
||||||
</uni-forms-item>
|
|
||||||
</uni-forms>
|
|
||||||
</JyPopup>
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item class="margins" name="name">
|
|
||||||
<view class="df jcsb aic hohp">
|
|
||||||
<view class="df aic hohp">
|
|
||||||
<image class="wh50 mr40" src="/static/commodity-release-video.png" mode="aspectFit" />
|
|
||||||
<text>添加链接到视频</text>
|
|
||||||
</view>
|
|
||||||
<uni-icons color="#d8d8d8" type="arrowright" size="18" />
|
|
||||||
</view>
|
|
||||||
</uni-forms-item>
|
|
||||||
</uni-forms>
|
|
||||||
</view>
|
|
||||||
<!-- 立即发布 -->
|
|
||||||
<JyBottomBtn @click="postApi">立即发布</JyBottomBtn>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, reactive, inject, onMounted, onUnmounted } from 'vue'
|
|
||||||
import JyBottomBtn from '@/components/public/jy-bottom-button'
|
|
||||||
import JyPopup from '@/components/public/jy-popup'
|
|
||||||
const { checkLink } = inject('util');
|
|
||||||
import { eventBus } from '@/components/public/event-bus'
|
|
||||||
onMounted(() => {
|
|
||||||
eventBus.on('business-operator', businessOperator)
|
|
||||||
})
|
|
||||||
onUnmounted(() => {
|
|
||||||
eventBus.off('business-operator')
|
|
||||||
});
|
|
||||||
const businessOperator = (value) => {
|
|
||||||
console.log('====================================');
|
|
||||||
console.log(value);
|
|
||||||
console.log('====================================');
|
|
||||||
}
|
|
||||||
|
|
||||||
const category = ref(null)
|
|
||||||
const paramsData = reactive({
|
|
||||||
name: ''
|
|
||||||
})
|
|
||||||
const paramsDeliveryData = reactive({
|
|
||||||
name: ''
|
|
||||||
})
|
|
||||||
const postApi = () => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '发布成功',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const addSpecifications = () => {
|
|
||||||
checkLink('pages/merchant/specifications/index')
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.jy-commodity_release {
|
|
||||||
padding: 26rpx;
|
|
||||||
|
|
||||||
.vertical-label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-forms-item {
|
|
||||||
margin-bottom: 20rpx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .file-picker__box-content {
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .uni-easyinput {
|
|
||||||
.uni-easyinput__content-input {
|
|
||||||
padding: 0px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-input-placeholder {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #c9c9c9 !important;
|
|
||||||
font-size: 28rpx !important;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.margins {
|
|
||||||
padding: 16rpx 24rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.click_select {
|
|
||||||
color: #C9C9C9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!-- 我的订单 -->
|
|
||||||
<template>
|
|
||||||
<view class="jy-business-operator-order">
|
|
||||||
<JyCommonHead>
|
|
||||||
<template v-slot:center>
|
|
||||||
<uni-easyinput prefixIcon="search" v-model="value" placeholder="搜索内容" />
|
|
||||||
</template>
|
|
||||||
</JyCommonHead>
|
|
||||||
<JyShopNavigation :current="params.currentTab" :list="tabs" @tabItemClick="itemClick" marright="25px"
|
|
||||||
activeWeight='600' activeColor="#333333" activeBarColor="initial" />
|
|
||||||
<view class="p16">
|
|
||||||
<JyOrderCard v-for="(item, index) in 10" type="business_order"></JyOrderCard>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import { onLoad } from "@dcloudio/uni-app"
|
|
||||||
import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
//顶部条件栏
|
|
||||||
import JyShopNavigation from '@/components/public/jy-shop-navigation'
|
|
||||||
import JyOrderCard from '@/components/public/jy-order-card'
|
|
||||||
import { onReachBottom } from '@dcloudio/uni-app';
|
|
||||||
onReachBottom(() => {
|
|
||||||
console.log('====================================');
|
|
||||||
console.log("加载到底了通知刷新");
|
|
||||||
console.log('====================================');
|
|
||||||
})
|
|
||||||
const itemClick = (item, index) => {
|
|
||||||
}
|
|
||||||
const tabs = ref([{
|
|
||||||
id: 1,
|
|
||||||
name: '全部'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '待付款'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: '待发货'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
name: '待收货'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 6,
|
|
||||||
name: '售后/退款'
|
|
||||||
}])
|
|
||||||
const value = ref('')
|
|
||||||
const params = ref({
|
|
||||||
currentTab: 0
|
|
||||||
})
|
|
||||||
// 获取路由传的参数
|
|
||||||
onLoad(options => {
|
|
||||||
params.value.currentTab = options.currentTab / 1
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.jy-order {
|
|
||||||
::v-deep .uni-easyinput__content {
|
|
||||||
border-radius: 18rpx;
|
|
||||||
width: 542rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,33 +0,0 @@
|
||||||
<!-- 规格 -->
|
|
||||||
<template>
|
|
||||||
<view class="jy-specifications p25">
|
|
||||||
<JyCommonHead title="商品管理" @back="sendCommodity">
|
|
||||||
<template v-slot:right>
|
|
||||||
<text @click="add">添加</text>
|
|
||||||
</template>
|
|
||||||
</JyCommonHead>
|
|
||||||
<view v-if="list.length > 0">
|
|
||||||
<JySpecificationsCard class="mt20" v-for="(item, index) in list" :key="index" :item="item">
|
|
||||||
</JySpecificationsCard>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<JyBottomBtn @click="postApi">确定</JyBottomBtn>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
import JySpecificationsCard from './jy-specifications-card'
|
|
||||||
import { eventBus } from '@/components/public/event-bus.js'
|
|
||||||
import JyBottomBtn from '@/components/public/jy-bottom-button'
|
|
||||||
|
|
||||||
const list = ref([{}])
|
|
||||||
const sendCommodity = () => {
|
|
||||||
eventBus.emit('business-operator', list.value)
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
const add = () => {
|
|
||||||
list.value.push({})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss"></style>
|
|
|
@ -1,51 +0,0 @@
|
||||||
<!-- 规格卡片 -->
|
|
||||||
<template>
|
|
||||||
<view class="jy-specifications-card bfff p25 br25">
|
|
||||||
<uni-forms :modelValue="paramsData">
|
|
||||||
<uni-forms-item label="商品图片" name="name">
|
|
||||||
<uni-file-picker :imageStyles="{
|
|
||||||
width: '150rpx',
|
|
||||||
height: '150rpx'
|
|
||||||
}" limit="9">
|
|
||||||
<uni-icons type="camera" color="#B2B2B2" size="60"></uni-icons>
|
|
||||||
</uni-file-picker>
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="规格" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="text" :inputBorder="false" placeholder="输入规格" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<view class="df">
|
|
||||||
<uni-forms-item label="价格" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="¥0.00" />
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="库存" name="name">
|
|
||||||
<uni-easyinput class="hohp df aic" type="number" :inputBorder="false" placeholder="输入库存" />
|
|
||||||
</uni-forms-item>
|
|
||||||
</view>
|
|
||||||
</uni-forms>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from 'vue'
|
|
||||||
const props = defineProps({
|
|
||||||
item: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const paramsData = ref({})
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.jy-specifications-card {
|
|
||||||
::v-deep .uni-forms-item {
|
|
||||||
margin-bottom: 16rpx !important;
|
|
||||||
|
|
||||||
.uni-forms-item__content {
|
|
||||||
display: flex !important;
|
|
||||||
align-items: center !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -91,6 +91,7 @@
|
||||||
data,
|
data,
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
uni.$emit('updateBindingAccount')
|
||||||
//
|
//
|
||||||
detail[bindItem.value.key] = bindItem.value.value
|
detail[bindItem.value.key] = bindItem.value.value
|
||||||
//
|
//
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line" @click="link('/pages/login/unfreezeAccount')">
|
<view class="line" @click="link('/pages/login/unfreezeAccount')">
|
||||||
<view class="title">解冻账号</view>
|
<view class="title">账号解冻</view>
|
||||||
<view class="content">风险解除后,可选择解除冻结</view>
|
<view class="content">风险解除后,可选择解除冻结</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@
|
||||||
|
|
||||||
<template v-if="userinfo.id">
|
<template v-if="userinfo.id">
|
||||||
<view class="area">
|
<view class="area">
|
||||||
<view class="line rows" @click="link('/pages/mine/setting/usePay')">
|
<view class="line rows" @click="link('/pages/mine/setting/usePay')" v-if="0">
|
||||||
<view class="">先用后付</view>
|
<view class="">先用后付</view>
|
||||||
<uni-icons type="right" />
|
<uni-icons type="right" />
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
screenHeight,
|
screenHeight,
|
||||||
bottomSafeAreaHeight
|
bottomSafeAreaHeight
|
||||||
} from '@/components/public/Mixins.js'
|
} from '@/components/public/Mixins.js'
|
||||||
// import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
|
|
||||||
const PayUse = ref(false)
|
const PayUse = ref(false)
|
||||||
// 我是关闭服务
|
// 我是关闭服务
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
ref,
|
ref,
|
||||||
inject
|
inject
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
// 发布商品
|
// 发布商品
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive
|
reactive,
|
||||||
|
getCurrentInstance,
|
||||||
|
nextTick
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
//
|
//
|
||||||
import {
|
import {
|
||||||
|
@ -14,13 +16,16 @@
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
// 编辑器
|
// 编辑器
|
||||||
import editorArea from '@/components/public/editor/editor'
|
import editorArea from '@/components/public/editor/editor'
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
// 表单
|
// 表单
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
sliderImage: [],
|
sliderImage: [],
|
||||||
specs: [],
|
specs: [],
|
||||||
|
infoRichText: '',
|
||||||
})
|
})
|
||||||
// 分类
|
// 分类
|
||||||
const category = reactive([])
|
const category = reactive([])
|
||||||
|
@ -49,6 +54,10 @@
|
||||||
form.cost = detail.cost
|
form.cost = detail.cost
|
||||||
// 商品佣金
|
// 商品佣金
|
||||||
form.commission = detail.commission
|
form.commission = detail.commission
|
||||||
|
// 商品详情
|
||||||
|
form.infoRichText = detail.infoRichText || ''
|
||||||
|
// 富文本编辑器初始化
|
||||||
|
proxy.$refs.editorAreaRef.init(form.infoRichText)
|
||||||
// 规格
|
// 规格
|
||||||
form.specs = detail.specs.map(item => {
|
form.specs = detail.specs.map(item => {
|
||||||
return {
|
return {
|
||||||
|
@ -177,6 +186,45 @@
|
||||||
const data = {
|
const data = {
|
||||||
...form
|
...form
|
||||||
}
|
}
|
||||||
|
console.log('data', data)
|
||||||
|
|
||||||
|
if (!data.sliderImage[0]) {
|
||||||
|
util.alert('商品图片不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.categoryId) {
|
||||||
|
util.alert('商品类目不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.specs[0]) {
|
||||||
|
util.alert('商品规格不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.price) {
|
||||||
|
util.alert('商品价格不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.cost) {
|
||||||
|
util.alert('商品成本价不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查找规格是否有空值
|
||||||
|
for (let i = 0; i < data.specs.length; i++) {
|
||||||
|
let item = data.specs[i]
|
||||||
|
if (!item.image) {
|
||||||
|
util.alert('规格图片不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!item.sku) {
|
||||||
|
util.alert('规格名称不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!item.stock) {
|
||||||
|
util.alert('规格库存不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 轮播图
|
// 轮播图
|
||||||
data.sliderImage = data.sliderImage.join(',')
|
data.sliderImage = data.sliderImage.join(',')
|
||||||
|
@ -190,6 +238,7 @@
|
||||||
content: '商品发布成功,请等待后台审核',
|
content: '商品发布成功,请等待后台审核',
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
uni.$emit('updateUserProduct')
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
@ -211,7 +260,7 @@
|
||||||
<view class="imgList mt20">
|
<view class="imgList mt20">
|
||||||
<view class="imgs" v-for="(item,index) in form.sliderImage">
|
<view class="imgs" v-for="(item,index) in form.sliderImage">
|
||||||
<image class="wh120 br10" :src="item" mode="aspectFill" />
|
<image class="wh120 br10" :src="item" mode="aspectFill" />
|
||||||
<view class="close">
|
<view class="close" @click="removeImage(index)">
|
||||||
<uni-icons type="clear" color="#f00" size="40rpx" />
|
<uni-icons type="clear" color="#f00" size="40rpx" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -327,7 +376,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="main area editor">
|
<view class="main area editor">
|
||||||
<editorArea />
|
<editorArea ref="editorAreaRef" v-model="form.infoRichText" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,10 @@
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
Object.assign(detail, {}, rs.data)
|
//
|
||||||
|
const result = rs.data
|
||||||
|
if (result.infoRichText) result.infoRichText = util.imgReplace(result.infoRichText)
|
||||||
|
Object.assign(detail, {}, result)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.alert({
|
util.alert({
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
|
onUnload,
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
|
@ -26,6 +27,13 @@
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList()
|
getList()
|
||||||
|
// 开启监听
|
||||||
|
addListener()
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
// 关闭监听
|
||||||
|
removeListener()
|
||||||
})
|
})
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
|
@ -38,6 +46,19 @@
|
||||||
refeshList()
|
refeshList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 开启监听
|
||||||
|
function addListener() {
|
||||||
|
uni.$on('updateUserProduct', () => {
|
||||||
|
// 重载商品列表
|
||||||
|
refeshList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭监听
|
||||||
|
function removeListener() {
|
||||||
|
uni.$off('updateUserProduct')
|
||||||
|
}
|
||||||
|
|
||||||
// 重载商品列表
|
// 重载商品列表
|
||||||
function refeshList() {
|
function refeshList() {
|
||||||
if (product.list.length >= product.total) return
|
if (product.list.length >= product.total) return
|
||||||
|
|
|
@ -43,7 +43,6 @@ import {
|
||||||
statusBarHeight,
|
statusBarHeight,
|
||||||
goBack
|
goBack
|
||||||
} from '@/components/public/Mixins.js'
|
} from '@/components/public/Mixins.js'
|
||||||
import JyCommonHead from '@/components/public/jy-common-head'
|
|
||||||
import { shareToPlatform } from '@/components/public/share.js'
|
import { shareToPlatform } from '@/components/public/share.js'
|
||||||
const share_more = ref(null)
|
const share_more = ref(null)
|
||||||
const more_share_data = ref([])
|
const more_share_data = ref([])
|
||||||
|
|
|
@ -63,7 +63,9 @@ deleteVideo 删除视频
|
||||||
selectAddress 选择地址
|
selectAddress 选择地址
|
||||||
updateOrderList 更新订单列表
|
updateOrderList 更新订单列表
|
||||||
updateOrderDetail 更新订单详情
|
updateOrderDetail 更新订单详情
|
||||||
|
updateUserProduct 更新用户商品
|
||||||
|
updateBindingAccount 更新绑定账号
|
||||||
|
selectBindingBank 选择绑定的银行卡
|
||||||
|
|
||||||
缓存
|
缓存
|
||||||
---
|
---
|
||||||
|
|
|
@ -4,7 +4,10 @@ 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'
|
||||||
|
<<<<<<< HEAD
|
||||||
// let target = 'https://1a880cd5.r24.cpolar.top/'
|
// let target = 'https://1a880cd5.r24.cpolar.top/'
|
||||||
|
=======
|
||||||
|
>>>>>>> 409f137e8990b13381bdbe7efca7eec9a3cfc89e
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue