新增营销系统、分销系统、会员功能、门店、提现功能

This commit is contained in:
Shaw
2024-02-08 21:01:37 +08:00
parent 68b3f2dcc3
commit 17c043348a
1398 changed files with 81279 additions and 56269 deletions

View File

@ -1,5 +1,5 @@
## 1.0.12023-05-16
1. 优化组件依赖,修改后无需全局引入,组件导入即可使用
2. 优化部分功能
## 1.0.02023-05-10
uv-read-more 展开阅读更多
## 1.0.02023-05-10
uv-read-more 展开阅读更多

View File

@ -1,62 +1,62 @@
export default {
props: {
// 默认的显示占位高度
showHeight: {
type: [String, Number],
default: 400
},
// 展开后是否显示"收起"按钮
toggle: {
type: Boolean,
default: false
},
// 关闭时的提示文字
closeText: {
type: String,
default: '展开阅读全文'
},
// 展开时的提示文字
openText: {
type: String,
default: '收起'
},
// 提示的文字颜色
color: {
type: String,
default: '#2979ff'
},
// 提示文字的大小
fontSize: {
type: [String, Number],
default: 14
},
// 是否显示阴影
// 此参数不能写在props/readMore.js中进行默认配置因为使用了条件编译在外部js中
// uni无法准确识别当前是否处于nvue还是非nvue下
shadowStyle: {
type: Object,
default: () => ({
// #ifndef APP-NVUE
backgroundImage: 'linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)',
// #endif
// #ifdef APP-NVUE
// nvue上不支持设置复杂的backgroundImage属性
backgroundImage: 'linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))',
// #endif
paddingTop: '100px',
marginTop: '-100px'
})
},
// 段落首行缩进的字符个数
textIndent: {
type: String,
default: '2em'
},
// open和close事件时将此参数返回在回调参数中
name: {
type: [String, Number],
default: ''
},
...uni.$uv?.props?.readMore
}
export default {
props: {
// 默认的显示占位高度
showHeight: {
type: [String, Number],
default: 400
},
// 展开后是否显示"收起"按钮
toggle: {
type: Boolean,
default: false
},
// 关闭时的提示文字
closeText: {
type: String,
default: '展开阅读全文'
},
// 展开时的提示文字
openText: {
type: String,
default: '收起'
},
// 提示的文字颜色
color: {
type: String,
default: '#2979ff'
},
// 提示文字的大小
fontSize: {
type: [String, Number],
default: 14
},
// 是否显示阴影
// 此参数不能写在props/readMore.js中进行默认配置因为使用了条件编译在外部js中
// uni无法准确识别当前是否处于nvue还是非nvue下
shadowStyle: {
type: Object,
default: () => ({
// #ifndef APP-NVUE
backgroundImage: 'linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)',
// #endif
// #ifdef APP-NVUE
// nvue上不支持设置复杂的backgroundImage属性
backgroundImage: 'linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))',
// #endif
paddingTop: '100px',
marginTop: '-100px'
})
},
// 段落首行缩进的字符个数
textIndent: {
type: String,
default: '2em'
},
// open和close事件时将此参数返回在回调参数中
name: {
type: [String, Number],
default: ''
},
...uni.$uv?.props?.readMore
}
}

View File

@ -1,162 +1,162 @@
<template>
<view class="uv-read-more">
<view
class="uv-read-more__content"
:style="{
height: isLongContent && status === 'close' ? $uv.addUnit(showHeight) : $uv.addUnit(contentHeight),
textIndent: textIndent
}"
>
<view
class="uv-read-more__content__inner"
ref="uv-read-more__content__inner"
:class="[elId]"
>
<slot></slot>
</view>
</view>
<view
class="uv-read-more__toggle"
:style="[innerShadowStyle]"
v-if="isLongContent"
>
<slot name="toggle">
<view
class="uv-read-more__toggle__text"
@tap="toggleReadMore"
>
<uv-text
:text="status === 'close' ? closeText : openText"
:color="color"
:size="fontSize"
:lineHeight="fontSize"
margin="0 5px 0 0"
></uv-text>
<view class="uv-read-more__toggle__icon">
<uv-icon
:color="color"
:size="fontSize + 2"
:name="status === 'close' ? 'arrow-down' : 'arrow-up'"
></uv-icon>
</view>
</view>
</slot>
</view>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom')
// #endif
import props from './props.js';
/**
* readMore 阅读更多
* @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
* @tutorial https://www.uvui.cn/components/readMore.html
* @property {String | Number} showHeight 内容超出此高度才会显示展开全文按钮单位px默认 400
* @property {Boolean} toggle 展开后是否显示收起按钮(默认 false
* @property {String} closeText 关闭时的提示文字(默认 '展开阅读全文'
* @property {String} openText 展开时的提示文字(默认 '收起'
* @property {String} color 提示文字的颜色(默认 '#2979ff'
* @property {String | Number} fontSize 提示文字的大小单位px (默认 14
* @property {Object} shadowStyle 显示阴影的样式
* @property {String} textIndent 段落首行缩进的字符个数 (默认 '2em'
* @property {String | Number} name 用于在 open 和 close 事件中当作回调参数返回
* @event {Function} open 内容被展开时触发
* @event {Function} close 内容被收起时触发
* @example <uv-read-more><rich-text :nodes="content"></rich-text></uv-read-more>
*/
export default {
name: 'uv-read-more',
mixins: [mpMixin, mixin, props],
data() {
return {
isLongContent: false, // 是否需要隐藏一部分内容
status: 'close', // 当前隐藏与显示的状态close-收起状态open-展开状态
elId: '', // 生成唯一class
contentHeight: 100, // 内容高度
}
},
computed: {
// 展开后无需阴影,收起时才需要阴影样式
innerShadowStyle() {
if (this.status === 'open') return {}
else return this.shadowStyle
}
},
created() {
this.elId = this.$uv.guid();
},
mounted() {
this.init()
},
methods: {
async init() {
this.getContentHeight().then(height => {
this.contentHeight = height
// 判断高度,如果真实内容高度大于占位高度,则显示收起与展开的控制按钮
if (height > this.$uv.getPx(this.showHeight)) {
this.isLongContent = true
this.status = 'close'
}
})
},
// 获取内容的高度
async getContentHeight() {
// 延时一定时间再获取节点
await this.$uv.sleep(30)
return new Promise(resolve => {
// #ifndef APP-NVUE
this.$uvGetRect('.' + this.elId).then(res => {
resolve(res.height)
})
// #endif
// #ifdef APP-NVUE
const ref = this.$refs['uv-read-more__content__inner']
dom.getComponentRect(ref, (res) => {
resolve(res.size.height)
})
// #endif
})
},
// 展开或者收起
toggleReadMore() {
this.status = this.status === 'close' ? 'open' : 'close'
// 如果toggle为false隐藏"收起"部分的内容
if (this.toggle == false) this.isLongContent = false
// 发出打开或者收齐的事件
this.$emit(this.status, this.name)
}
}
}
</script>
<style lang="scss" scoped>
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
.uv-read-more {
&__content {
overflow: hidden;
color: $uv-content-color;
font-size: 15px;
text-align: left;
}
&__toggle {
@include flex;
justify-content: center;
&__text {
@include flex;
align-items: center;
justify-content: center;
margin-top: 5px;
}
}
}
</style>
<template>
<view class="uv-read-more">
<view
class="uv-read-more__content"
:style="{
height: isLongContent && status === 'close' ? $uv.addUnit(showHeight) : $uv.addUnit(contentHeight),
textIndent: textIndent
}"
>
<view
class="uv-read-more__content__inner"
ref="uv-read-more__content__inner"
:class="[elId]"
>
<slot></slot>
</view>
</view>
<view
class="uv-read-more__toggle"
:style="[innerShadowStyle]"
v-if="isLongContent"
>
<slot name="toggle">
<view
class="uv-read-more__toggle__text"
@tap="toggleReadMore"
>
<uv-text
:text="status === 'close' ? closeText : openText"
:color="color"
:size="fontSize"
:lineHeight="fontSize"
margin="0 5px 0 0"
></uv-text>
<view class="uv-read-more__toggle__icon">
<uv-icon
:color="color"
:size="fontSize + 2"
:name="status === 'close' ? 'arrow-down' : 'arrow-up'"
></uv-icon>
</view>
</view>
</slot>
</view>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom')
// #endif
import props from './props.js';
/**
* readMore 阅读更多
* @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
* @tutorial https://www.uvui.cn/components/readMore.html
* @property {String | Number} showHeight 内容超出此高度才会显示展开全文按钮单位px默认 400
* @property {Boolean} toggle 展开后是否显示收起按钮(默认 false
* @property {String} closeText 关闭时的提示文字(默认 '展开阅读全文'
* @property {String} openText 展开时的提示文字(默认 '收起'
* @property {String} color 提示文字的颜色(默认 '#2979ff'
* @property {String | Number} fontSize 提示文字的大小单位px (默认 14
* @property {Object} shadowStyle 显示阴影的样式
* @property {String} textIndent 段落首行缩进的字符个数 (默认 '2em'
* @property {String | Number} name 用于在 open 和 close 事件中当作回调参数返回
* @event {Function} open 内容被展开时触发
* @event {Function} close 内容被收起时触发
* @example <uv-read-more><rich-text :nodes="content"></rich-text></uv-read-more>
*/
export default {
name: 'uv-read-more',
mixins: [mpMixin, mixin, props],
data() {
return {
isLongContent: false, // 是否需要隐藏一部分内容
status: 'close', // 当前隐藏与显示的状态close-收起状态open-展开状态
elId: '', // 生成唯一class
contentHeight: 100, // 内容高度
}
},
computed: {
// 展开后无需阴影,收起时才需要阴影样式
innerShadowStyle() {
if (this.status === 'open') return {}
else return this.shadowStyle
}
},
created() {
this.elId = this.$uv.guid();
},
mounted() {
this.init()
},
methods: {
async init() {
this.getContentHeight().then(height => {
this.contentHeight = height
// 判断高度,如果真实内容高度大于占位高度,则显示收起与展开的控制按钮
if (height > this.$uv.getPx(this.showHeight)) {
this.isLongContent = true
this.status = 'close'
}
})
},
// 获取内容的高度
async getContentHeight() {
// 延时一定时间再获取节点
await this.$uv.sleep(30)
return new Promise(resolve => {
// #ifndef APP-NVUE
this.$uvGetRect('.' + this.elId).then(res => {
resolve(res.height)
})
// #endif
// #ifdef APP-NVUE
const ref = this.$refs['uv-read-more__content__inner']
dom.getComponentRect(ref, (res) => {
resolve(res.size.height)
})
// #endif
})
},
// 展开或者收起
toggleReadMore() {
this.status = this.status === 'close' ? 'open' : 'close'
// 如果toggle为false隐藏"收起"部分的内容
if (this.toggle == false) this.isLongContent = false
// 发出打开或者收齐的事件
this.$emit(this.status, this.name)
}
}
}
</script>
<style lang="scss" scoped>
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
.uv-read-more {
&__content {
overflow: hidden;
color: $uv-content-color;
font-size: 15px;
text-align: left;
}
&__toggle {
@include flex;
justify-content: center;
&__text {
@include flex;
align-items: center;
justify-content: center;
margin-top: 5px;
}
}
}
</style>

View File

@ -1,89 +1,89 @@
{
"id": "uv-read-more",
"displayName": "uv-read-more 展开阅读更多 全面兼容小程序、nvue、vue2、vue3等多端",
"version": "1.0.1",
"description": "uv-read-more 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。",
"keywords": [
"uv-read-more",
"uvui",
"uv-ui",
"read",
"展开阅读更多"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [
"uv-ui-tools",
"uv-icon",
"uv-text"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
{
"id": "uv-read-more",
"displayName": "uv-read-more 展开阅读更多 全面兼容小程序、nvue、vue2、vue3等多端",
"version": "1.0.1",
"description": "uv-read-more 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。",
"keywords": [
"uv-read-more",
"uvui",
"uv-ui",
"read",
"展开阅读更多"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [
"uv-ui-tools",
"uv-icon",
"uv-text"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@ -1,11 +1,11 @@
## ReadMore 展开阅读更多
> **组件名uv-read-more**
该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
### <a href="https://www.uvui.cn/components/readMore.html" target="_blank">查看文档</a>
### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui)
#### 如使用过程中有任何问题或者您对uv-ui有一些好的建议欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>
## ReadMore 展开阅读更多
> **组件名uv-read-more**
该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
### <a href="https://www.uvui.cn/components/readMore.html" target="_blank">查看文档</a>
### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui)
#### 如使用过程中有任何问题或者您对uv-ui有一些好的建议欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a>