Compare commits

..

No commits in common. "c4a23be60c90e4067632e95af119cc5d897e73bd" and "38c39e193006f51b97c1605f4fdb8527b37feb29" have entirely different histories.

14 changed files with 41 additions and 131 deletions

View File

@ -260,11 +260,11 @@ const util = {
}) })
}, },
/** // 替换图片的宽度为最大宽度100% (移动端解析html富文本专用)
* 替换图片的宽度为最大宽度100% (移动端解析html富文本专用) imgReplace(value, th) {
* @param {Object} value 富文本 if (!th) {
*/ 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')

View File

@ -317,6 +317,13 @@ function handleDate(timestamp) {
@click="handleMenu($event, item)"> @click="handleMenu($event, item)">
<view class="item rows ptb20 plr30" @click.stop="handleChat(item)"> <view class="item rows ptb20 plr30" @click.stop="handleChat(item)">
<view class="image wh90 pr"> <view class="image wh90 pr">
<!-- <template v-if="item.groupId == null">
<image class="cir wh90" :src="item.callbackJson.from_url" mode="aspectFill" />
</template>
<template v-else>
<image class="cir wh90" :src="item.groupChatDTO.groupFaceUrl" mode="aspectFill" />
</template> -->
<image class="cir wh90" :src="item.avatar" mode="aspectFill" /> <image class="cir wh90" :src="item.avatar" mode="aspectFill" />
<view class="mark pa t0 r0 cfff f22 cir" v-if="item.unreadCount">{{ item.unreadCount }} <view class="mark pa t0 r0 cfff f22 cir" v-if="item.unreadCount">{{ item.unreadCount }}
</view> </view>
@ -324,6 +331,12 @@ function handleDate(timestamp) {
<view class="col f1 ml20"> <view class="col f1 ml20">
<view class="rows"> <view class="rows">
<view class="name f1 thd c333 f32">{{ item.name }}</view> <view class="name f1 thd c333 f32">{{ item.name }}</view>
<!-- <template v-if="item.groupId == null">
<view class="name f1 thd c333 f32">{{ item.callbackJson.from_name }}</view>
</template>
<template v-else>
<view class="name f1 thd c333 f32">{{ item.groupChatDTO.name }}</view>
</template> -->
<view class="datetime c999 f22"> <view class="datetime c999 f22">
{{ util.formatTime('MM-dd HH:mm', item.MsgTime) }}</view> {{ util.formatTime('MM-dd HH:mm', item.MsgTime) }}</view>
</view> </view>

View File

@ -7,7 +7,6 @@
getCurrentInstance, getCurrentInstance,
defineProps, defineProps,
defineEmits, defineEmits,
defineExpose,
} from 'vue' } from 'vue'
// //
import util from '@/common/js/util' import util from '@/common/js/util'
@ -17,11 +16,8 @@
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
const props = defineProps({
modelValue: String const emits = defineEmits(['update:modelValue']);
})
//
const emit = defineEmits(['update:modelValue']);
// //
const formats = reactive({}) const formats = reactive({})
// //
@ -37,33 +33,17 @@
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()
@ -85,7 +65,7 @@
} = event.target.dataset } = event.target.dataset
if (!name) return if (!name) return
editorCtx.value.format(name, value) editorCtx.value.format(name, value)
} }
/** /**
* 编辑器状态被变化 * 编辑器状态被变化
@ -178,16 +158,6 @@
} }
}) })
} }
//
function handleEditorInput(event) {
emit('update:modelValue', event.detail.html)
}
defineExpose({
init,
getEditorContents,
})
</script> </script>
<template> <template>
@ -251,8 +221,9 @@
<!-- 内容 --> <!-- 内容 -->
<view class="main"> <view class="main">
<editor id="editor" class="ql-container" placeholder="在此输入产品详情" showImgSize showImgToolbar showImgResize <editor id="editor" class="ql-container" placeholder="在此输入产品详情" showImgSize
@statuschange="onStatusChange" @ready="onEditorReady" @input="handleEditorInput"> showImgToolbar showImgResize @statuschange="onStatusChange" @ready="onEditorReady"
@input="$emit('update:modelValue', $event.target.value)">
</editor> </editor>
</view> </view>
</view> </view>

View File

@ -2,8 +2,8 @@
"name" : "九亿", "name" : "九亿",
"appid" : "__UNI__08B31BC", "appid" : "__UNI__08B31BC",
"description" : "", "description" : "",
"versionName" : "1.0.7", "versionName" : "1.0.6",
"versionCode" : 1007, "versionCode" : 1006,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
/** /**
* 账号冻结 * 账号挂失
*/ */
import { import {
ref, ref,

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
/** /**
* 账号解冻 * 账号挂失
*/ */
import { import {
ref, ref,

View File

@ -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>

View File

@ -36,6 +36,7 @@
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)
// //

View File

@ -39,6 +39,7 @@
ref, ref,
inject inject
} from 'vue' } from 'vue'
import JyCommonHead from '@/components/public/jy-common-head'
import { import {
useStore useStore
} from 'vuex' } from 'vuex'

View File

@ -212,10 +212,7 @@ function sendMsg(param) {
data: param.data, data: param.data,
}).then((rs) => { }).then((rs) => {
if (rs.code == 200) { if (rs.code == 200) {
getHistory({ getHistory()
msgId: '',
limit: 1,
})
param.success ? param.success() : '' param.success ? param.success() : ''
return return
} }

View File

@ -2,9 +2,7 @@
// //
import { import {
ref, ref,
reactive, reactive
getCurrentInstance,
nextTick
} from 'vue' } from 'vue'
// //
import { import {
@ -16,16 +14,13 @@
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([])
@ -54,10 +49,6 @@
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 {
@ -186,45 +177,6 @@
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(',')
@ -238,7 +190,6 @@
content: '商品发布成功,请等待后台审核', content: '商品发布成功,请等待后台审核',
showCancel: false, showCancel: false,
}).then(() => { }).then(() => {
uni.$emit('updateUserProduct')
uni.navigateBack() uni.navigateBack()
}) })
return return
@ -260,7 +211,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" @click="removeImage(index)"> <view class="close">
<uni-icons type="clear" color="#f00" size="40rpx" /> <uni-icons type="clear" color="#f00" size="40rpx" />
</view> </view>
</view> </view>
@ -376,7 +327,7 @@
</view> </view>
<view class="main area editor"> <view class="main area editor">
<editorArea ref="editorAreaRef" v-model="form.infoRichText" /> <!-- <editorArea v-model="form.infoRichText" /> -->
</view> </view>
</view> </view>

View File

@ -92,10 +92,7 @@
} }
}).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({

View File

@ -6,7 +6,6 @@
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
onUnload,
onReachBottom, onReachBottom,
onPullDownRefresh onPullDownRefresh
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
@ -27,15 +26,8 @@
onLoad(() => { onLoad(() => {
// //
getList() getList()
//
addListener()
}) })
onUnload(() => {
//
removeListener()
})
onReachBottom(() => { onReachBottom(() => {
// //
getMoreList() getMoreList()
@ -46,19 +38,6 @@
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

View File

@ -63,7 +63,7 @@ deleteVideo 删除视频
selectAddress 选择地址 selectAddress 选择地址
updateOrderList 更新订单列表 updateOrderList 更新订单列表
updateOrderDetail 更新订单详情 updateOrderDetail 更新订单详情
updateUserProduct 更新用户商品
缓存 缓存
--- ---