diff --git a/jiuyi2/api/mine.js b/jiuyi2/api/mine.js
index 38c664c7..1b08a2d9 100644
--- a/jiuyi2/api/mine.js
+++ b/jiuyi2/api/mine.js
@@ -297,6 +297,61 @@ const mine = {
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
\ No newline at end of file
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index efd8ba89..4336ad84 100644
--- a/jiuyi2/common/js/config.js
+++ b/jiuyi2/common/js/config.js
@@ -7,7 +7,10 @@ const config = {
// #endif
// #ifndef H5
host: 'http://91f.xyz:8080',
+<<<<<<< HEAD
// host: 'https://1a880cd5.r24.cpolar.top/',
+=======
+>>>>>>> 409f137e8990b13381bdbe7efca7eec9a3cfc89e
// #endif
// 支付方式配置
payType: {
diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js
index 7034117b..b82f96e0 100644
--- a/jiuyi2/common/js/util.js
+++ b/jiuyi2/common/js/util.js
@@ -260,11 +260,11 @@ const util = {
})
},
- // 替换图片的宽度为最大宽度100% (移动端解析html富文本专用)
- imgReplace(value, th) {
- if (!th) {
- value = value.replace(/
/ig, '
')
.replace(/
{
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 => {
let res = rs.data.conversation;
item.chatText = res.lastMessage.messageForShow;
item.unreadCount = res.unreadCount;
- if (item.Type == 1) {
+ if (item.type == 'C2C') {
item.avatar = res.userProfile.avatar;
item.name = res.userProfile.nick;
- } else if (item.Type == 2) {
+ } else if (item.type == 'GROUP') {
item.avatar = res.groupProfile.avatar;
item.name = res.groupProfile.name;
item.num = res.groupProfile.memberCount;
@@ -256,7 +256,7 @@ function delMsg(item) {
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 => {
getList()
@@ -274,7 +274,7 @@ function setRead(item) {
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({
conversationID: conversationId,
}).then(rs => {
diff --git a/jiuyi2/components/public/editor/editor.vue b/jiuyi2/components/public/editor/editor.vue
index 5fe46120..47a9317f 100644
--- a/jiuyi2/components/public/editor/editor.vue
+++ b/jiuyi2/components/public/editor/editor.vue
@@ -7,6 +7,7 @@
getCurrentInstance,
defineProps,
defineEmits,
+ defineExpose,
} from 'vue'
// 工具库
import util from '@/common/js/util'
@@ -16,6 +17,11 @@
const {
proxy
} = getCurrentInstance()
+ const props = defineProps({
+ modelValue: String
+ })
+ //
+ const emit = defineEmits(['update:modelValue']);
// 编辑器内容
const formats = reactive({})
// 编辑器上下文对象
@@ -31,17 +37,33 @@
const colorKey = ref('forecolor')
onMounted(() => {
- // 初始化
+ // 创建编辑器上下文对象
onEditorReady()
})
- // 初始化
+ // 创建编辑器上下文对象
function onEditorReady() {
uni.createSelectorQuery().select('#editor').context((res) => {
editorCtx.value = res.context
}).exec()
}
+ // 初始化编辑器上下文对象
+ function init(html) {
+ editorCtx.value.setContents({
+ html,
+ })
+ }
+
+ // 获取内容
+ function getEditorContents() {
+ editorCtx.value.getContents({
+ success: rs => {
+ return rs
+ }
+ })
+ }
+
// 撤销
function undo() {
editorCtx.value.undo()
@@ -57,14 +79,13 @@
* @param {Object} event
*/
function handleEditor(event) {
- console.log('format', event.target.dataset)
let {
name,
value
} = event.target.dataset
if (!name) return
editorCtx.value.format(name, value)
- }
+ }
/**
* 编辑器状态被变化
@@ -157,6 +178,16 @@
}
})
}
+
+ // 富文本编辑
+ function handleEditorInput(event) {
+ emit('update:modelValue', event.detail.html)
+ }
+
+ defineExpose({
+ init,
+ getEditorContents,
+ })
@@ -221,7 +252,7 @@
+ @statuschange="onStatusChange" @ready="onEditorReady" @input="handleEditorInput">
diff --git a/jiuyi2/manifest.json b/jiuyi2/manifest.json
index 5ecd2de4..216590c9 100644
--- a/jiuyi2/manifest.json
+++ b/jiuyi2/manifest.json
@@ -2,8 +2,8 @@
"name" : "九亿",
"appid" : "__UNI__08B31BC",
"description" : "",
- "versionName" : "1.0.6",
- "versionCode" : 1006,
+ "versionName" : "1.0.7",
+ "versionCode" : 1007,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/jiuyi2/pages/index/dataCenter/push.vue b/jiuyi2/pages/index/dataCenter/push.vue
index ee2994e7..2fb4a106 100644
--- a/jiuyi2/pages/index/dataCenter/push.vue
+++ b/jiuyi2/pages/index/dataCenter/push.vue
@@ -18,17 +18,18 @@
import util from '@/common/js/util';
// api
import api from '@/api/index.js'
- import videoApi from '@/api/video.js'
import {
onLoad,
onReady,
onHide,
onUnload,
} from '@dcloudio/uni-app'
+
// 顶部
import apex from '@/components/header/apex.vue';
// 视频菜单
import videoMenu from '@/components/index/videoMenu.vue';
+
const {
proxy
} = getCurrentInstance()
@@ -37,7 +38,6 @@
const userinfo = computed(() => store.state.userinfo)
// 榴莲果兑换播放量数量
const durainView = ref(0)
-
// 列表数据
const list = reactive({
data: [],
@@ -182,7 +182,7 @@
return
}
- videoApi.pushVideo({
+ api.video.pushVideo({
query: {
ids: videoIds.value.join(','),
}
@@ -219,7 +219,7 @@
return
}
- videoApi.applyVideo({
+ api.video.applyVideo({
data: {
videoIds: videoIds.value.join(","),
author: apply.author,
@@ -256,17 +256,15 @@
})
}
- //
+ // 推流收藏视频
function pushCollect() {
- uni.navigateTo({
- url: util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
- ids: collectVideoIds.value.join(','),
- })
- })
+ link(util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
+ ids: collectVideoIds.value.join(','),
+ }))
}
// 跳转
- function navigateToPage(path) {
+ function link(path) {
uni.navigateTo({
url: path
});
@@ -277,7 +275,7 @@
- 历史推流
+ 历史推流
@@ -432,7 +430,6 @@
-
\ No newline at end of file
diff --git a/jiuyi2/pages/merchant/order/index.vue b/jiuyi2/pages/merchant/order/index.vue
deleted file mode 100644
index bed50595..00000000
--- a/jiuyi2/pages/merchant/order/index.vue
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/jiuyi2/pages/merchant/specifications/index.vue b/jiuyi2/pages/merchant/specifications/index.vue
deleted file mode 100644
index 4f7292cc..00000000
--- a/jiuyi2/pages/merchant/specifications/index.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- 添加
-
-
-
-
-
-
-
- 确定
-
-
-
-
\ No newline at end of file
diff --git a/jiuyi2/pages/merchant/specifications/jy-specifications-card/index.vue b/jiuyi2/pages/merchant/specifications/jy-specifications-card/index.vue
deleted file mode 100644
index 7afb47d1..00000000
--- a/jiuyi2/pages/merchant/specifications/jy-specifications-card/index.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/jiuyi2/pages/mine/setting/binding.vue b/jiuyi2/pages/mine/setting/binding.vue
index 37a740d7..9ad9c3f8 100644
--- a/jiuyi2/pages/mine/setting/binding.vue
+++ b/jiuyi2/pages/mine/setting/binding.vue
@@ -91,6 +91,7 @@
data,
}).then(rs => {
if (rs.code == 200) {
+ uni.$emit('updateBindingAccount')
//
detail[bindItem.value.key] = bindItem.value.value
//
diff --git a/jiuyi2/pages/mine/setting/safeCenter.vue b/jiuyi2/pages/mine/setting/safeCenter.vue
index 220b6e48..8945a367 100644
--- a/jiuyi2/pages/mine/setting/safeCenter.vue
+++ b/jiuyi2/pages/mine/setting/safeCenter.vue
@@ -65,7 +65,7 @@
- 解冻账号
+ 账号解冻
风险解除后,可选择解除冻结
diff --git a/jiuyi2/pages/mine/setting/setting.vue b/jiuyi2/pages/mine/setting/setting.vue
index 4afb4cf2..525f795e 100644
--- a/jiuyi2/pages/mine/setting/setting.vue
+++ b/jiuyi2/pages/mine/setting/setting.vue
@@ -173,7 +173,7 @@
-
+
先用后付
diff --git a/jiuyi2/pages/mine/setting/usePay.vue b/jiuyi2/pages/mine/setting/usePay.vue
index dd2db1ac..a77631b9 100644
--- a/jiuyi2/pages/mine/setting/usePay.vue
+++ b/jiuyi2/pages/mine/setting/usePay.vue
@@ -36,7 +36,6 @@
screenHeight,
bottomSafeAreaHeight
} from '@/components/public/Mixins.js'
- // import JyCommonHead from '@/components/public/jy-common-head'
const PayUse = ref(false)
// 我是关闭服务
diff --git a/jiuyi2/pages/mine/switch-accounts/index.vue b/jiuyi2/pages/mine/switch-accounts/index.vue
index 47f3d9e6..4eb9953e 100644
--- a/jiuyi2/pages/mine/switch-accounts/index.vue
+++ b/jiuyi2/pages/mine/switch-accounts/index.vue
@@ -39,7 +39,6 @@
ref,
inject
} from 'vue'
- // import JyCommonHead from '@/components/public/jy-common-head'
import {
useStore
} from 'vuex'
diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue
index 82f3559a..8fe153e8 100644
--- a/jiuyi2/pages/release/commodity.vue
+++ b/jiuyi2/pages/release/commodity.vue
@@ -2,7 +2,9 @@
// 发布商品
import {
ref,
- reactive
+ reactive,
+ getCurrentInstance,
+ nextTick
} from 'vue'
//
import {
@@ -14,13 +16,16 @@
import util from '@/common/js/util.js'
// 编辑器
import editorArea from '@/components/public/editor/editor'
-
+ const {
+ proxy
+ } = getCurrentInstance()
// 表单
const form = reactive({
id: '',
categoryId: '',
sliderImage: [],
specs: [],
+ infoRichText: '',
})
// 分类
const category = reactive([])
@@ -49,6 +54,10 @@
form.cost = detail.cost
// 商品佣金
form.commission = detail.commission
+ // 商品详情
+ form.infoRichText = detail.infoRichText || ''
+ // 富文本编辑器初始化
+ proxy.$refs.editorAreaRef.init(form.infoRichText)
// 规格
form.specs = detail.specs.map(item => {
return {
@@ -177,6 +186,45 @@
const data = {
...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(',')
@@ -190,6 +238,7 @@
content: '商品发布成功,请等待后台审核',
showCancel: false,
}).then(() => {
+ uni.$emit('updateUserProduct')
uni.navigateBack()
})
return
@@ -211,7 +260,7 @@
-
+
@@ -327,7 +376,7 @@
-
+
diff --git a/jiuyi2/pages/shop/commodity/index.vue b/jiuyi2/pages/shop/commodity/index.vue
index 240c9bbc..e1faffba 100644
--- a/jiuyi2/pages/shop/commodity/index.vue
+++ b/jiuyi2/pages/shop/commodity/index.vue
@@ -92,7 +92,10 @@
}
}).then(rs => {
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
}
util.alert({
diff --git a/jiuyi2/pages/shop/store/commodities.vue b/jiuyi2/pages/shop/store/commodities.vue
index c60a2783..d5b456a6 100644
--- a/jiuyi2/pages/shop/store/commodities.vue
+++ b/jiuyi2/pages/shop/store/commodities.vue
@@ -6,6 +6,7 @@
} from 'vue'
import {
onLoad,
+ onUnload,
onReachBottom,
onPullDownRefresh
} from "@dcloudio/uni-app"
@@ -26,8 +27,15 @@
onLoad(() => {
// 获取列表
getList()
+ // 开启监听
+ addListener()
})
-
+
+ onUnload(() => {
+ // 关闭监听
+ removeListener()
+ })
+
onReachBottom(() => {
// 获取更多商品
getMoreList()
@@ -38,6 +46,19 @@
refeshList()
})
+ // 开启监听
+ function addListener() {
+ uni.$on('updateUserProduct', () => {
+ // 重载商品列表
+ refeshList()
+ })
+ }
+
+ // 关闭监听
+ function removeListener() {
+ uni.$off('updateUserProduct')
+ }
+
// 重载商品列表
function refeshList() {
if (product.list.length >= product.total) return
diff --git a/jiuyi2/pages/shop/store/components/jy-store-head/index.vue b/jiuyi2/pages/shop/store/components/jy-store-head/index.vue
index 65249312..06380079 100644
--- a/jiuyi2/pages/shop/store/components/jy-store-head/index.vue
+++ b/jiuyi2/pages/shop/store/components/jy-store-head/index.vue
@@ -43,7 +43,6 @@ import {
statusBarHeight,
goBack
} from '@/components/public/Mixins.js'
-import JyCommonHead from '@/components/public/jy-common-head'
import { shareToPlatform } from '@/components/public/share.js'
const share_more = ref(null)
const more_share_data = ref([])
diff --git a/jiuyi2/readme.md b/jiuyi2/readme.md
index ccd95322..111c7cca 100644
--- a/jiuyi2/readme.md
+++ b/jiuyi2/readme.md
@@ -63,7 +63,9 @@ deleteVideo 删除视频
selectAddress 选择地址
updateOrderList 更新订单列表
updateOrderDetail 更新订单详情
-
+updateUserProduct 更新用户商品
+updateBindingAccount 更新绑定账号
+selectBindingBank 选择绑定的银行卡
缓存
---
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index 9602af2b..c88a2788 100644
--- a/jiuyi2/vite.config.js
+++ b/jiuyi2/vite.config.js
@@ -4,7 +4,10 @@ import {
import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080'
+<<<<<<< HEAD
// let target = 'https://1a880cd5.r24.cpolar.top/'
+=======
+>>>>>>> 409f137e8990b13381bdbe7efca7eec9a3cfc89e
export default defineConfig({
plugins: [uni()],