Commit b1889043 authored by mengcuiguang's avatar mengcuiguang

添加接口

parent 70513471
...@@ -58,5 +58,104 @@ module.exports = { ...@@ -58,5 +58,104 @@ module.exports = {
*/ */
faceResult(params) { faceResult(params) {
return post('roseApi/face/faceResultWxh5', params) return post('roseApi/face/faceResultWxh5', params)
}, },
/**
* 用户页基本信息-数量
*/
getUserHallMsg() {
return post('roseApi/hall/userHallMsg')
},
/**
* 我喜欢的
*/
getILikeList(params) {
return post('roseApi/hall/ilikeList',params)
},
/**
* 喜欢我的
*/
getLikeMeList(params) {
return post('roseApi/hall/likeMeList',params)
},
/**
* 看过我的
*/
getSeeMeList(params) {
return post('roseApi/hall/seeMeList',params)
},
/**
* 同城喜欢
*/
toLike(params) {
return post('roseApi/hall/like',params)
},
/**
* 查看资料
*/
getUserInfo() {
return post('roseApi/user/info')
},
/**
* 编辑资料
*/
setUserInfo(params) {
return post('roseApi/user/setInfo',params)
},
/**
* 查询vip产品
*/
getVipProducts() {
return post('roseApi/vip/getVipProducts/rose')
},
/**
* 提现页面接口
*/
getCashouBaseMsg() {
return post('roseApi/share/getCashouBaseMsg')
},
/**
* 提现接口
*/
addCashoutReq(params) {
return post('roseApi/share/addCashoutReq',params)
},
/**
* 用户反馈
*/
feedback(params) {
return post('roseApi/vedioV1/feedback',params)
},
/**
* 获取当前支付宝信息
*/
getAlipayMsg() {
return post('roseApi/user/getAlipayMsg')
},
/**
* 绑定支付宝信息/修改支付宝信息
*/
updateAlipayMsg(params) {
return post('roseApi/user/updateAlipayMsg',params)
},
/**
* 获取支付参数
*/
getVipPayParams(params) {
return post('roseApi/vip/getVipPayParams/rose',params)
},
} }
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<scroll-view class="scrollView" scroll-y> <scroll-view class="scrollView" scroll-y>
<view <view @click="handleUser"
@click="handleUser"
:style="'display: flex;flex-direction: row;align-items: center;padding-left: 30rpx;margin-top:'+120+'rpx;'"> :style="'display: flex;flex-direction: row;align-items: center;padding-left: 30rpx;margin-top:'+120+'rpx;'">
<view> <view>
<image class="avatar" src="@/static/logo-about.png"></image> <image class="avatar" :src="userBean.headerUrl"></image>
<image class="avatar-bot" src="@/static/ic_edit_user.png"></image> <image class="avatar-bot" src="@/static/ic_edit_user.png"></image>
</view> </view>
<view> <view>
<view class="set-left-root"> <view class="set-left-root">
<view class="user-name">名称:{{userBean.idcode}}</view> <view class="user-name">{{userBean.nickName}}</view>
<image class="avatar-name-img" src="@/static/ic_user_vip.png" mode="widthFix"> <image v-if="userBean.expireTime<=0" class="avatar-name-img" src="@/static/ic_user_vip.png"
</image> mode="widthFix">
</image>
</view> </view>
<view class="user-age">33负:{{userBean.idcode}}</view> <view class="user-age">{{userBean.age}}</view>
<view class="user-id">ID:{{userBean.idcode}}</view> <view class="user-id">ID:{{userBean.idcode}}</view>
</view> </view>
</view> </view>
<view class="like-root"> <view class="like-root">
<view @click="handleIlike" class="like-parent"> <view @click="handleIlike" class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{userHallMsgBean.like_count}}</view>
<view class="like-text">我喜欢</view> <view class="like-text">我喜欢</view>
</view> </view>
<view class="vertical-line"></view> <view class="vertical-line"></view>
<view @click="handleLikeme" class="like-parent"> <view @click="handleLikeme" class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{userHallMsgBean.likeme_count}}</view>
<view class="like-text">喜欢我</view> <view class="like-text">喜欢我</view>
</view> </view>
<view class="vertical-line"></view> <view class="vertical-line"></view>
<view @click="handleLookme" class="like-parent"> <view @click="handleLookme" class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{userHallMsgBean.seeme_count}}</view>
<view class="like-text">看过我</view> <view class="like-text">看过我</view>
</view> </view>
</view> </view>
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
<view class="vip-top-title"> <view class="vip-top-title">
<image class="vip-top-img" src="@/static/ic_is_vip.png"></image> <image class="vip-top-img" src="@/static/ic_is_vip.png"></image>
<view class="vip-bot-text" v-if="userBean.expireTime<=0"> <view class="vip-bot-text" v-if="userBean.expireTime<=0">
解锁更多权益</view> {{userBean.expireTime<=0 ? '解锁更多权益' : '限时五折起'}}
</view>
<view class="vip-bot-text" v-else> <view class="vip-bot-text" v-else>
VIP到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view> VIP到期时间:{{userBean.expireTime*1000 | formatDate('yyyy-MM-dd')}}</view>
</view> </view>
...@@ -58,12 +59,11 @@ ...@@ -58,12 +59,11 @@
<view class="draw-bag-name"> <view class="draw-bag-name">
钱包</view> 钱包</view>
<view class="draw-bag-cash"> <view class="draw-bag-cash">
10</view> {{userBean.sex==1 ? userBean.beans : userBean.rewardCoin}}
</view>
</view> </view>
<view class="draw-bag-img-root"> <view class="draw-bag-img-root">
<image class="draw-bag-img" <image class="draw-bag-img" src="@/static/ic_bag.png" mode="widthFix">
src="@/static/ic_bag.png"
mode="widthFix">
</image> </image>
</view> </view>
</view> </view>
...@@ -75,9 +75,7 @@ ...@@ -75,9 +75,7 @@
赚现金 得会员</view> 赚现金 得会员</view>
</view> </view>
<view class="draw-bag-img-root"> <view class="draw-bag-img-root">
<image class="draw-bag-img" <image class="draw-bag-img" src="@/static/ic_friends.png" mode="widthFix">
src="@/static/ic_friends.png"
mode="widthFix">
</image> </image>
</view> </view>
</view> </view>
...@@ -91,11 +89,11 @@ ...@@ -91,11 +89,11 @@
<view class="set-left-text">我的相册</view> <view class="set-left-text">我的相册</view>
</view> </view>
<view class="set-right-root"> <view class="set-right-root">
<view class="set-right-text1">0</view> <view class="set-right-text1">{{userHallMsgBean.image_count}}</view>
<view class="set-right-text2">></view> <view class="set-right-text2">></view>
</view> </view>
</view> </view>
<view class="set-root" @click="handleAuth"> <view v-if="userBean.sex!=1" class="set-root" @click="handleAuth">
<view class="set-left-root"> <view class="set-left-root">
<image class="set-left-img" src="@/static/ic_my_auth.png" mode="widthFix"> <image class="set-left-img" src="@/static/ic_my_auth.png" mode="widthFix">
</image> </image>
...@@ -109,14 +107,14 @@ ...@@ -109,14 +107,14 @@
<view class="set-left-root"> <view class="set-left-root">
<image class="set-left-img" src="@/static/ic_my_us.png" mode="widthFix"> <image class="set-left-img" src="@/static/ic_my_us.png" mode="widthFix">
</image> </image>
<view class="set-left-text"> <view class="set-left-text">
<text>如有问题,请直接联系 <text>如有问题,请直接联系
<text class="agreementText" @click="goAgreement(1)">在线客服</text> <text class="agreementText" @click="goAgreement(1)">在线客服</text>
\n处理速度更快, \n处理速度更快,
<text class="agreementText" @click="goAgreement(2)">无需联系支付宝</text> <text class="agreementText" @click="goAgreement(2)">无需联系支付宝</text>
</text> </text>
</view> </view>
</view> </view>
<view class="set-right-root"> <view class="set-right-root">
<view class="set-right-text2">></view> <view class="set-right-text2">></view>
...@@ -149,7 +147,6 @@ ...@@ -149,7 +147,6 @@
</template> </template>
<script> <script>
import common from '@/mixins/common';
import kefuPopup from '@/components/kefu-popup/kefu-popup.vue'; import kefuPopup from '@/components/kefu-popup/kefu-popup.vue';
import { import {
navigateTo, navigateTo,
...@@ -157,73 +154,93 @@ ...@@ -157,73 +154,93 @@
loading loading
} from '@/utils/fun.js'; } from '@/utils/fun.js';
import {
baseMsg,
getUserHallMsg
} from '@/common/api/user.js'
import {
setUserInfo
} from '@/common/store/user.js'
const app = getApp(); const app = getApp();
export default { export default {
name: 'my', name: 'my',
mixins: [common],
components: { components: {
kefuPopup kefuPopup
}, },
data() { data() {
return { return {
userBean: {}, userBean: {},
userHallMsgBean: {},
showKefuPop: false showKefuPop: false
}; };
}, },
methods: { methods: {
show() { show() {
this.post({ baseMsg({
url: '/user/baseMsg', os: 'H5'
showLoading: false, }).then(data => {
success: ({ this.userBean = data
data setUserInfo(data)
}) => { })
this.userBean = data; .catch((err) => {
message.notify(err)
})
getUserHallMsg().then(data => {
this.userHallMsgBean = data
})
.catch((err) => {
message.notify(err)
})
},
handleUser() {
navigateTo(`/pagesD/userDetail/userDetail`)
},
handleIlike() {
navigateTo(`/pagesD/iLikeRecord/iLikeRecord`)
},
handleLikeme() {
navigateTo(`/pagesD/likeMeRecord/likeMeRecord`)
},
handleLookme() {
navigateTo(`/pagesD/lookMeRecord/lookMeRecord`)
},
handleVip() {
navigateTo(`/pagesA/vipPay/vipPay`)
},
handleBag() {
navigateTo(`/pagesD/cashBag/cashBag`)
// if (this.userBean.sex == 1) {
// navigateTo(`/pagesD/cashBag/cashBag`)
// } else {
// navigateTo(`/pagesD/income/income`)
// }
},
handleFriends() {
navigateTo(`/pagesD/friends/friends`)
},
handleAlbum() {
navigateTo(`/pagesD/album/album`)
},
handleAuth() {
},
handleKefu() {
// this.showKefuPop = true
uni.makePhoneCall({
phoneNumber: '4000969950',
success() {
console.log('拨打电话成功');
},
fail(err) {
console.error('拨打电话失败', err);
} }
}); });
},
handleUser(){
navigateTo(`/pagesD/userDetail/userDetail`)
},
handleIlike(){
navigateTo(`/pagesD/iLikeRecord/iLikeRecord`)
},
handleLikeme(){
navigateTo(`/pagesD/likeMeRecord/likeMeRecord`)
},
handleLookme(){
navigateTo(`/pagesD/lookMeRecord/lookMeRecord`)
},
handleVip() {
navigateTo(`/pagesA/vipPay/vipPay`)
},
handleBag(){
navigateTo(`/pagesD/cashBag/cashBag`)
},
handleFriends(){
navigateTo(`/pagesD/friends/friends`)
},
handleAlbum(){
navigateTo(`/pagesD/album/album`)
},
handleAuth(){
}, },
handleKefu() { handleFeedback() {
// this.showKefuPop = true navigateTo(`/pagesD/feedback/feedback`)
uni.makePhoneCall({
phoneNumber: '4000969950',
success() {
console.log('拨打电话成功');
},
fail(err) {
console.error('拨打电话失败', err);
}
});
},
handleFeedback(){
navigateTo(`/pagesD/feedback/feedback`)
}, },
handleSet() { handleSet() {
navigateTo(`/pagesD/setting/setting`) navigateTo(`/pagesD/setting/setting`)
...@@ -245,12 +262,12 @@ ...@@ -245,12 +262,12 @@
position: absolute; position: absolute;
margin-bottom: 20rpx; margin-bottom: 20rpx;
z-index: 1; z-index: 1;
} }
.avatar-name-img { .avatar-name-img {
width: 86rpx; width: 86rpx;
height: 34rpx; height: 34rpx;
margin-left: 8rpx; margin-left: 8rpx;
} }
.avatar-bot { .avatar-bot {
...@@ -321,10 +338,10 @@ ...@@ -321,10 +338,10 @@
.vip-root { .vip-root {
display: flex; display: flex;
height: 170rpx; height: 170rpx;
background: linear-gradient(to right, #FEE0BB, #E4A35E); background: linear-gradient(to right, #FEE0BB, #E4A35E);
border-top-left-radius: 20rpx; border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx; border-top-right-radius: 20rpx;
border-bottom-right-radius: 0rpx; border-bottom-right-radius: 0rpx;
border-bottom-left-radius: 0rpx; border-bottom-left-radius: 0rpx;
margin-left: 30rpx; margin-left: 30rpx;
margin-right: 30rpx; margin-right: 30rpx;
...@@ -482,9 +499,9 @@ ...@@ -482,9 +499,9 @@
font-size: 34rpx; font-size: 34rpx;
color: #CFCFCF; color: #CFCFCF;
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
.agreementText { .agreementText {
color: #ecb882; color: #ecb882;
} }
</style> </style>
\ No newline at end of file
This diff is collapsed.
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
"js-md5": "^0.8.3", "js-md5": "^0.8.3",
"uview": "^0.1.0" "uview": "^0.1.0"
} }
} }
\ No newline at end of file
...@@ -30,8 +30,37 @@ ...@@ -30,8 +30,37 @@
"navigationBarBackgroundColor": "#000000", "navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},
{
"path": "pages/brower/brower",
"style": {
"navigationStyle": "default",
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "white"
}
} }
], ,{
"path": "uni_modules/uni-pay/pages/success/success",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "支付成功"
}
}
,{
"path": "uni_modules/uni-pay/pages/ad-interactive-webview/ad-interactive-webview",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "ad"
}
}
,{
"path": "uni_modules/uni-pay/pages/pay-desk/pay-desk",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "收银台"
}
}
],
// 分包配置 // 分包配置
"subPackages": [{ "subPackages": [{
"root": "pagesA", "root": "pagesA",
...@@ -202,6 +231,14 @@ ...@@ -202,6 +231,14 @@
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, {
"path": "alipay/alipay",
"style": {
"navigationStyle": "default",
"navigationBarTitleText": "支付宝支付",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}] }]
}], }],
// 分包预载配置 // 分包预载配置
......
...@@ -109,7 +109,8 @@ ...@@ -109,7 +109,8 @@
smsCode: this.verificationCode smsCode: this.verificationCode
}).then(data => { }).then(data => {
setUserInfo(data) setUserInfo(data)
redirectTo(`/pagesB/base/base`) // redirectTo(`/pagesB/base/base`)
redirectTo(`/pagesD/cashBag/cashBag`)
}) })
.catch((err) => { .catch((err) => {
message.notify(err) message.notify(err)
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
margin: 20rpx 30rpx;"> margin: 20rpx 30rpx;">
<input <input
style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;" style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;"
type="text" placeholder="请填写支付宝账号" v-model="account" /> type="text" placeholder="请填写支付宝账号" v-model="accountStr" />
</view> </view>
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 50rpx;">姓名</view> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 50rpx;">姓名</view>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
margin: 20rpx 30rpx;"> margin: 20rpx 30rpx;">
<input <input
style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;" style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;"
type="text" placeholder="请填写您的真实姓名" v-model="name" /> type="text" placeholder="请填写您的真实姓名" v-model="nameStr" />
</view> </view>
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 50rpx;">身份证号</view> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 50rpx;">身份证号</view>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
margin: 20rpx 30rpx;"> margin: 20rpx 30rpx;">
<input <input
style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;" style="width: 92%;height: 90rpx; font-size: 28rpx;background: white;padding-left: 30rpx;border-radius: 10rpx;"
type="text" placeholder="请填写真实身份证号" v-model="idcard" /> type="text" placeholder="请填写真实身份证号" v-model="idcardStr" />
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -72,37 +72,55 @@ ...@@ -72,37 +72,55 @@
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
updateAlipayMsg
} from '@/common/api/user.js'
import {
navigateTo,
navigateBack,
message,
loading
} from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] accountStr: '',
nameStr: '',
idcardStr: ''
}; };
}, },
methods: { methods: {
show() { handleCommit() {
if (this.$refs.paging != null) { if (this.accountStr == null || this.accountStr.length <= 0) {
this.$refs.paging.refresh(); message.notify('请填写支付宝账号');
} return
}, }
queryList(page, size) { if (this.nameStr == null || this.nameStr.length <= 0) {
this.post({ message.notify('请填写您的真实姓名');
url: '/vedio/assetsRecords/add', return
data: { }
page, if (this.idcardStr == null || this.idcardStr.length <= 0) {
size message.notify('请填写真实身份证号');
}, return
showLoading: false, }
success: ({
data updateAlipayMsg({
}) => { alipayAccount: this.accountStr,
this.$refs.paging.complete(data.list); idcardName: this.nameStr,
} idcard: this.idcardStr
}); }).then(data => {
message.notify('支付宝绑定成功!');
setTimeout(() => {
navigateBack()
}, 500);
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
......
...@@ -2,26 +2,58 @@ ...@@ -2,26 +2,58 @@
<view class="body"> <view class="body">
<view class="like-root"> <view class="like-root">
<view class="like-parent"> <view class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{userBean.beans}}</view>
<view class="like-text">充值余额(币)</view> <view class="like-text">充值余额(币)</view>
</view> </view>
<view @click="handleIncome" class="like-parent"> <view @click="handleIncome" class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{userBean.rewardCoin}}</view>
<view class="like-text">收益(币)▶</view> <view class="like-text">收益(币)▶</view>
</view> </view>
</view> </view>
<view style="font-size: 36rpx;color: #EFEEEB;margin: 30rpx;">选择充值套餐</view> <view style="font-size: 36rpx;color: #EFEEEB;margin: 30rpx;">选择充值套餐</view>
<view class="section">
<view class="pack-box">
<view class="pack-item" :class="[{active: index==selectedIndex}]" v-for='(item, index) in vipList'
:key='index' @click="choosePack(item, index)">
<view style="display: flex;flex-direction: column;align-items: center;">
<view class="set-left-root">
<image class="set-left-img" src="@/static/ic_coin.png" mode="widthFix">
</image>
<view class="set-left-text" :class="[{activeFont: index==selectedIndex}]">{{item.title}}
</view>
</view>
<view class="origin row" :class="[{activeFont: index==selectedIndex}]">
{{item.firstPayPrice}}
</view>
</view>
</view>
</view>
</view>
<view style="display: flex;justify-content: center;width: 100%;height: 90rpx;"> <view style="display: flex;justify-content: center;width: 100%;height: 90rpx;">
<view @click="handleCommit" class="vip-right-btn"> <view @click="handleCommit" class="vip-right-btn">
<image class="avatar-name-img" src="@/static/ic_alipay.png" mode="widthFix"> <image class="avatar-name-img" src="@/static/ic_alipay.png" mode="widthFix">
</image> </image>
支付宝支付 支付宝支付
</view> </view>
</view>
<view class="agreement">
<checkbox-group @change="agreeToTerms">
<label>
<checkbox checked="true" value="agree" />已阅读并同意
<text class="agree-text" @click="openUserVip">《会员付费协议》</text>
</label>
</checkbox-group>
</view> </view>
<view style="font-size: 36rpx;color: #EFEEEB;padding-top: 30rpx;margin-top: 30rpx;margin-left: 30rpx;">我的优享</view> <view style="font-size: 36rpx;color: #EFEEEB;padding-top: 30rpx;margin-top: 30rpx;margin-left: 30rpx;">我的优享
</view>
<view class="draw-root"> <view class="draw-root">
<view style="font-size: 24rpx;color: #A5A5A7;margin-left: 20rpx;">会员特权=优享特权+免费畅聊</view> <view style="font-size: 24rpx;color: #A5A5A7;margin-left: 20rpx;">会员特权=优享特权+免费畅聊</view>
...@@ -39,56 +71,104 @@ ...@@ -39,56 +71,104 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common';
import { import {
navigateTo, navigateTo,
message, message,
loading loading
} from '@/utils/fun.js'; } from '@/utils/fun.js';
import {
getVipProducts,
baseMsg,
getVipPayParams
} from '@/common/api/user.js'
import {
MEMBERS_URL
} from '@/common/constant/constant.js'
import {
openUrl
} from '@/utils/app+.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] userBean: {},
vipList: [],
selectedIndex: 0,
agreed: true,
}; };
}, },
methods: { methods: {
show() { onLoad(options) {
if (this.$refs.paging != null) { getVipProducts().then(data => {
this.$refs.paging.refresh(); this.vipList = data.vipList
} if (data.vipList != null) {
for (let i = 0; i < data.vipList.length; i++) {
if (data.vipList[i].activityType == 1) {
this.selectedIndex = i;
break;
}
}
}
})
.catch((err) => {
message.notify(err)
})
}, },
queryList(page, size) { onShow() {
this.post({ baseMsg({
url: '/vedio/assetsRecords/add', os: 'H5'
data: { }).then(data => {
page, this.userBean = data
size setUserInfo(data)
}, })
showLoading: false, .catch((err) => {
success: ({ message.notify(err)
data })
}) => { },
this.$refs.paging.complete(data.list); choosePack(item, index) {
} this.selectedIndex = index;
}); },
}, handleIncome() {
handleIncome(){ navigateTo(`/pagesD/income/income`)
navigateTo(`/pagesD/income/income`)
},
handleCommit(){
}, },
handleVip(){ openUserVip(){
navigateTo(`/pagesA/vipPay/vipPay`) openUrl(MEMBERS_URL)
}, },
handleShare(){ agreeToTerms(e) {
this.agreed = e.detail.value.includes('agree');
},
handleCommit() {
if (!this.agreed) {
message.notify("请勾选同意后再进行支付")
return
}
} // navigateTo(`/pages/brower/brower?url=`+123)
let vipBean = this.vipList[this.selectedIndex];
getVipPayParams({
web:true,
payChannel: 'ALIPAY',
pid: vipBean.pid
}).then(data => {
// openUrl(data.params.params)
navigateTo(`/pagesD/alipay/alipay?url=`+data.params.params)
})
.catch((err) => {
message.notify(err)
})
},
handleVip() {
navigateTo(`/pagesA/vipPay/vipPay`)
},
handleShare() {
}
} }
}; };
</script> </script>
...@@ -157,7 +237,7 @@ ...@@ -157,7 +237,7 @@
margin-left: 30rpx; margin-left: 30rpx;
margin-right: 30rpx; margin-right: 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
height: 100rpx; height: 100rpx;
margin-top: 30rpx; margin-top: 30rpx;
justify-content: space-between; justify-content: space-between;
width: 92%; width: 92%;
...@@ -177,4 +257,105 @@ ...@@ -177,4 +257,105 @@
margin-right: 20rpx; margin-right: 20rpx;
padding-bottom: 4rpx; padding-bottom: 4rpx;
} }
.section {
display: flex;
flex-direction: column;
background: #232122;
}
.pack-box {
margin-left: 18rpx;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
.pack-item {
margin-bottom: 25rpx;
margin-right: 28rpx;
width: calc(29%);
height: 130rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
border-radius: 10rpx;
background: #424446;
position: relative;
}
.active {
background: linear-gradient(to right, #F7DD9C, #F7C85D);
}
.activeFont {
color: #7E4A17;
}
}
.origin {
color: #F6DA8F;
}
.button2 {
width: 300rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
margin: 10rpx 20rpx;
border-radius: 10rpx;
background-color: white;
border: 1px orange solid;
color: orange;
font-size: 26rpx;
box-shadow: 0 0 2px 0px rgba(255, 255, 255, 0.1);
}
.set-left-root {
display: flex;
flex-direction: row;
align-items: center;
}
.set-left-img {
width: 50rpx;
height: 50rpx;
}
.set-left-text {
font-size: 30rpx;
color: #F6DA8F;
margin-bottom: 10rpx;
margin-left: 10rpx;
}
.set-right-root {
display: flex;
flex-direction: row;
align-items: center;
}
.set-right-text1 {
font-size: 26rpx;
color: #F0F0F0;
margin-right: 10rpx;
}
.set-right-text2 {
font-size: 34rpx;
color: #CFCFCF;
margin-bottom: 6rpx;
}
.agreement {
margin-top: 70rpx;
color: white;
text-align: center;
}
.agree-text {
color: #E8CF83;
}
</style> </style>
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<textarea style="width: 90%;height: 400rpx; margin-top: 120rpx; font-size: 28rpx;border-radius:5px;background: white; <textarea style="width: 90%;height: 400rpx; margin-top: 120rpx; font-size: 28rpx;border-radius:5px;background: white;
line-height: 20px; line-height: 20px;
padding: 10px; padding: 10px;
vertical-align: top; vertical-align: top;
border: 1px solid #ccc;" type="text" placeholder="请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)" v-model="searchStr" /> border: 1px solid #ccc;" type="text"
placeholder="请留下您的批评、表扬或者建议,我们会虚心听取, 认真改正。(请保持在5-150字内)"
v-model="searchStr" />
<view @click="handleCommit" class="vip-right-btn"> <view @click="handleCommit" class="vip-right-btn">
提交 提交
...@@ -12,7 +14,10 @@ ...@@ -12,7 +14,10 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
feedback
} from '@/common/api/user.js'
import { import {
navigateTo, navigateTo,
message, message,
...@@ -20,42 +25,32 @@ ...@@ -20,42 +25,32 @@
} from '@/utils/fun.js'; } from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [],
searchStr: '' searchStr: ''
}; };
}, },
methods: { methods: {
show() {
if (this.$refs.paging != null) {
this.$refs.paging.refresh();
}
},
queryList(page, size) {
this.post({
url: '/vedio/assetsRecords/add',
data: {
page,
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list);
}
});
},
handleCommit() { handleCommit() {
if (this.searchStr == null || this.searchStr.length <= 0) { if (this.searchStr == null || this.searchStr.length <= 0) {
message.notify('请输入内容'); message.notify('请输入内容');
return return
} }
message.notify('提交成功'); feedback({
this.searchStr = ''; type: '其他',
content: this.searchStr
}).then(data => {
message.notify('提交成功');
setTimeout(() => {
navigateBack()
}, 500);
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
...@@ -68,15 +63,15 @@ ...@@ -68,15 +63,15 @@
} }
.vip-right-btn { .vip-right-btn {
width: 84%; width: 84%;
height: 90rpx; height: 90rpx;
background-color: #FFE9CF; background-color: #FFE9CF;
border-radius: 50rpx; border-radius: 50rpx;
color: #31343B; color: #31343B;
font-size: 28rpx; font-size: 28rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
display: flex; display: flex;
margin-top: 40rpx; margin-top: 40rpx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<!-- <status-title :showBack="true">看点记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList"> <z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i"> <view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;"> <view class="set-root">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="@/static/up.png"> <view class="set-left-root">
</image> <image class="set-left-img" :src="item.headerUrl" mode="widthFix">
<view class="flex1 ml-10"> </image>
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}</view> <view style="display: flex;flex-direction: column;justify-content: center;">
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}} <view class="set-left-root">
<view class="user-name">{{item.nickName}}</view>
<image v-if="item.idcardStatus == 1" class="avatar-name-img2"
src="@/static/ic_label_real.png" mode="widthFix">
</image>
</view>
<view class="set-left-text">{{item.age}}{{item.lastCity}} {{item.career}}</view>
</view> </view>
</view> </view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"> <view class="set-right-root">
{{ '+'+ item.subValue + '看点'}} <image @click="handleStatus(item)" v-if="item.likeStatus != 0" class="set-left-img2"
src="@/static/ic_like_status_1.png" mode="widthFix">
</image>
<image @click="handleStatus(item)" v-else class="set-left-img2"
src="@/static/ic_like_status_0.png" mode="widthFix">
</image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,36 +32,51 @@ ...@@ -21,36 +32,51 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
getILikeList,
toLike
} from '@/common/api/user.js'
import {
navigateTo,
message,
loading
} from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: []
}; };
}, },
methods: { methods: {
show() { onShow() {
if (this.$refs.paging != null) { if (this.$refs.paging != null) {
this.$refs.paging.refresh(); this.$refs.paging.refresh();
} }
}, },
queryList(page, size) { queryList(page, size) {
this.post({ getILikeList({
url: '/vedio/assetsRecords/add', page: page,
data: { size: size
page, }).then(data => {
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} })
}); .catch((err) => {
message.notify(err)
})
},
handleStatus(item) {
toLike({
toUid: item.uid,
status: item.likeStatus
}).then(data => {
this.show()
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
...@@ -58,25 +84,76 @@ ...@@ -58,25 +84,76 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; padding-top: 120rpx;
background: #232122;
} }
.box-wrap { .set-root {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
height: 90rpx;
justify-content: space-between;
width: 92%;
margin: 10rpx 30rpx;
}
.set-left-root {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
}
image { .set-left-img {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} border-radius: 50%;
}
text { .set-left-img2 {
color: #2c2c2c; width: 100rpx;
} height: 100rpx;
}
.set-left-text {
font-size: 26rpx;
color: #929297;
margin-top: 10rpx;
margin-left: 20rpx;
}
.set-right-root {
display: flex;
flex-direction: row;
align-items: center;
}
.set-right-text1 {
font-size: 26rpx;
color: #F0F0F0;
margin-right: 10rpx;
}
.set-right-text2 {
font-size: 34rpx;
color: #CFCFCF;
margin-bottom: 6rpx;
}
.avatar-name-img {
width: 86rpx;
height: 34rpx;
margin-left: 8rpx;
}
.avatar-name-img2 {
width: 110rpx;
height: 38rpx;
margin-left: 20rpx;
}
.user-name {
font-size: 32rpx;
color: #F9F9F9;
margin-left: 20rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<scroll-view class="scrollView" scroll-y> <scroll-view class="scrollView" scroll-y>
<view class="like-root"> <view class="like-root">
<view class="like-parent"> <view class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{drawCashBean.canCashoutCoin}}</view>
<view class="like-text">可提取(币)</view> <view class="like-text">可提取(币)</view>
</view> </view>
<view @click="handleIncome" class="like-parent"> <view @click="handleIncome" class="like-parent">
<view class="like-num">0</view> <view class="like-num">{{drawCashBean.frozenCoin}}</view>
<view class="like-text">待审核(币)</view> <view class="like-text">待审核(币)</view>
</view> </view>
</view> </view>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view style="width: 75%;"> <view style="width: 75%;">
<input <input
style="width: 100%;height: 106rpx; font-size: 28rpx;background: white;border-top-left-radius: 10rpx;border-bottom-left-radius: 10rpx;padding-left: 14rpx;" style="width: 100%;height: 106rpx; font-size: 28rpx;background: white;border-top-left-radius: 10rpx;border-bottom-left-radius: 10rpx;padding-left: 14rpx;"
type="number" placeholder="请输入需要提现的金额" v-model="searchStr" /> value="drawCashBean.maxInput" type="number" placeholder="请输入需要提现的金额" v-model="searchStr" />
</view> </view>
<view style="display: flex;flex-direction: row;align-items: center;"> <view style="display: flex;flex-direction: row;align-items: center;">
<view class="vertical-line"></view> <view class="vertical-line"></view>
...@@ -53,22 +53,22 @@ ...@@ -53,22 +53,22 @@
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 30rpx;margin-bottom: 10rpx;"> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 30rpx;margin-bottom: 10rpx;">
收益是什么</view> 收益是什么</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">在app内通过分享有奖等活动获得的奖励,可提取消费</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">在app内通过分享有奖等活动获得的奖励,可提取消费</view>
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;"> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;">
怎么获得收益?</view> 怎么获得收益?</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">在参与平台活动如分享有奖等可获得</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">在参与平台活动如分享有奖等可获得</view>
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;"> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;">
为什么无法提取收益?</view> 为什么无法提取收益?</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">1.在因收益需要经过如无投诉类的系统审核,通过审核的可正常提取;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">1.在因收益需要经过如无投诉类的系统审核,通过审核的可正常提取;</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">2.每次提取数额不低于100元;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">2.每次提取数额不低于100元;</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">3.每日最多可发起提取10次;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">3.每日最多可发起提取10次;</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">4.每日最多可提取总金额不超过3000元;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">4.每日最多可提取总金额不超过3000元;</view>
<view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;"> <view style="font-size: 30rpx;color: #EFEEEB;margin-left: 30rpx;margin-top: 40rpx;margin-bottom: 10rpx;">
为什么实际到账金额比可提取金额少?</view> 为什么实际到账金额比可提取金额少?</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">1.当月提取总金额小于500元时,手续费2%;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">1.当月提取总金额小于500元时,手续费2%;</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">2.当月提取总金额大于500、小于5000元时,手续费5%;</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">2.当月提取总金额大于500、小于5000元时,手续费5%;</view>
<view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">3.当月提取总金额大于5000元时,手续费10%</view> <view style="font-size: 24rpx;color: #A5A5A7;margin: 10rpx 30rpx;">3.当月提取总金额大于5000元时,手续费10%</view>
</scroll-view> </scroll-view>
...@@ -80,24 +80,69 @@ ...@@ -80,24 +80,69 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
getCashouBaseMsg,
addCashoutReq,
getAlipayMsg
} from '@/common/api/user.js'
import { import {
navigateTo, navigateTo,
navigateBack,
message, message,
loading loading
} from '@/utils/fun.js'; } from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] drawCashBean: {},
alipayBean: {},
searchStr: ''
}; };
}, },
methods: { methods: {
show() {}, onShow() {
handleBindAlipay(){ getCashouBaseMsg().then(data => {
navigateTo(`/pagesD/bindalipay/bindalipay`) this.drawCashBean = data
})
.catch((err) => {
message.notify(err)
})
getAlipayMsg().then(data => {
this.alipayBean = data
})
.catch((err) => {
message.notify(err)
})
},
handleBindAlipay() {
navigateTo(`/pagesD/bindalipay/bindalipay`)
},
handleCommit() {
if (this.searchStr == null || this.searchStr.length <= 0) {
message.notify('请输入金额');
return
}
if (this.alipayBean == null ||
this.alipayBean.alipayAccount == null ||
this.alipayBean.alipayAccount.length <= 0) {
message.notify('请先绑定收款账号');
return
}
addCashoutReq({
cash: this.searchStr
}).then(data => {
message.notify('提现发起中,请稍候');
setTimeout(() => {
navigateBack()
}, 1000);
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
......
<template> <template>
<view class="body"> <view class="body">
<!-- <status-title :showBack="true">看点记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList"> <z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i"> <view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;"> <view class="set-root">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="@/static/up.png"> <view class="set-left-root">
</image> <image class="set-left-img" :src="item.headerUrl" mode="widthFix">
<view class="flex1 ml-10"> </image>
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}</view> <view style="display: flex;flex-direction: column;justify-content: center;">
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}} <view class="set-left-root">
<view class="user-name">{{item.nickName}}</view>
<image v-if="item.idcardStatus == 1" class="avatar-name-img2"
src="@/static/ic_label_real.png" mode="widthFix">
</image>
</view>
<view class="set-left-text">{{item.age}}{{item.lastCity}} {{item.career}}</view>
</view> </view>
</view> </view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"> <view class="set-right-root">
{{ '+'+ item.subValue + '看点'}} <image @click="handleStatus(item)" v-if="item.likeStatus != 0" class="set-left-img2"
src="@/static/ic_like_status_1.png" mode="widthFix">
</image>
<image @click="handleStatus(item)" v-else class="set-left-img2"
src="@/static/ic_like_status_0.png" mode="widthFix">
</image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,36 +32,51 @@ ...@@ -21,36 +32,51 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
getLikeMeList,
toLike
} from '@/common/api/user.js'
import {
navigateTo,
message,
loading
} from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: []
}; };
}, },
methods: { methods: {
show() { onShow() {
if (this.$refs.paging != null) { if (this.$refs.paging != null) {
this.$refs.paging.refresh(); this.$refs.paging.refresh();
} }
}, },
queryList(page, size) { queryList(page, size) {
this.post({ getLikeMeList({
url: '/vedio/assetsRecords/add', page: page,
data: { size: size
page, }).then(data => {
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} })
}); .catch((err) => {
message.notify(err)
})
},
handleStatus(item) {
toLike({
toUid: item.uid,
status: item.likeStatus
}).then(data => {
this.show()
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
...@@ -58,25 +84,76 @@ ...@@ -58,25 +84,76 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; padding-top: 120rpx;
background: #232122;
} }
.box-wrap { .set-root {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
height: 90rpx;
justify-content: space-between;
width: 92%;
margin: 10rpx 30rpx;
}
.set-left-root {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
}
image { .set-left-img {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} border-radius: 50%;
}
text { .set-left-img2 {
color: #2c2c2c; width: 100rpx;
} height: 100rpx;
}
.set-left-text {
font-size: 26rpx;
color: #929297;
margin-top: 10rpx;
margin-left: 20rpx;
}
.set-right-root {
display: flex;
flex-direction: row;
align-items: center;
}
.set-right-text1 {
font-size: 26rpx;
color: #F0F0F0;
margin-right: 10rpx;
}
.set-right-text2 {
font-size: 34rpx;
color: #CFCFCF;
margin-bottom: 6rpx;
}
.avatar-name-img {
width: 86rpx;
height: 34rpx;
margin-left: 8rpx;
}
.avatar-name-img2 {
width: 110rpx;
height: 38rpx;
margin-left: 20rpx;
}
.user-name {
font-size: 32rpx;
color: #F9F9F9;
margin-left: 20rpx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="body"> <view class="body">
<!-- <status-title :showBack="true">看点记录</status-title> -->
<z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList"> <z-paging class="flex-1" ref="paging" v-model="dataList" @query="queryList">
<view v-for="(item, i) in dataList" :key="i"> <view v-for="(item, i) in dataList" :key="i">
<view class="flex m-20 pd-20" style="background-color:white;border-radius:10rpx;"> <view class="set-root">
<image style="margin: auto 10rpx;width: 60rpx;height: 60rpx;" src="@/static/up.png"> <view class="set-left-root">
</image> <image class="set-left-img" :src="item.headerUrl" mode="widthFix">
<view class="flex1 ml-10"> </image>
<view class="mt-10" style="font-size: 28rpx;color: black;">{{item.remark}}</view> <view style="display: flex;flex-direction: column;justify-content: center;">
<view class="mt-10" style="font-size: 26rpx;color: darkgray;">
{{item.time}} <view class="set-left-root">
<view class="user-name">{{item.nickName}}</view>
<image v-if="item.idcardStatus == 1" class="avatar-name-img2"
src="@/static/ic_label_real.png" mode="widthFix">
</image>
</view>
<view class="set-left-text">{{item.age}}{{item.lastCity}} {{item.career}}</view>
</view> </view>
</view> </view>
<view style="margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"> <view class="set-right-root">
{{ '+'+ item.subValue + '看点'}} <image @click="handleStatus(item)" v-if="item.likeStatus != 0" class="set-left-img2"
src="@/static/ic_like_status_1.png" mode="widthFix">
</image>
<image @click="handleStatus(item)" v-else class="set-left-img2"
src="@/static/ic_like_status_0.png" mode="widthFix">
</image>
</view> </view>
</view> </view>
</view> </view>
...@@ -21,36 +32,51 @@ ...@@ -21,36 +32,51 @@
</view> </view>
</template> </template>
<script> <script>
import common from '@/mixins/common'; import {
getSeeMeList,
toLike
} from '@/common/api/user.js'
import {
navigateTo,
message,
loading
} from '@/utils/fun.js';
export default { export default {
name: 'dotRecord', name: 'dotRecord',
mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: []
}; };
}, },
methods: { methods: {
show() { onShow() {
if (this.$refs.paging != null) { if (this.$refs.paging != null) {
this.$refs.paging.refresh(); this.$refs.paging.refresh();
} }
}, },
queryList(page, size) { queryList(page, size) {
this.post({ getSeeMeList({
url: '/vedio/assetsRecords/add', page: page,
data: { size: size
page, }).then(data => {
size
},
showLoading: false,
success: ({
data
}) => {
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} })
}); .catch((err) => {
message.notify(err)
})
},
handleStatus(item) {
toLike({
toUid: item.uid,
status: item.likeStatus
}).then(data => {
this.show()
})
.catch((err) => {
message.notify(err)
})
} }
} }
}; };
...@@ -58,25 +84,76 @@ ...@@ -58,25 +84,76 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; padding-top: 120rpx;
background: #232122;
} }
.box-wrap { .set-root {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
height: 90rpx;
justify-content: space-between;
width: 92%;
margin: 10rpx 30rpx;
}
.set-left-root {
display: flex;
flex-direction: row;
align-items: center; align-items: center;
}
image { .set-left-img {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} border-radius: 50%;
}
text { .set-left-img2 {
color: #2c2c2c; width: 100rpx;
} height: 100rpx;
}
.set-left-text {
font-size: 26rpx;
color: #929297;
margin-top: 10rpx;
margin-left: 20rpx;
}
.set-right-root {
display: flex;
flex-direction: row;
align-items: center;
}
.set-right-text1 {
font-size: 26rpx;
color: #F0F0F0;
margin-right: 10rpx;
}
.set-right-text2 {
font-size: 34rpx;
color: #CFCFCF;
margin-bottom: 6rpx;
}
.avatar-name-img {
width: 86rpx;
height: 34rpx;
margin-left: 8rpx;
}
.avatar-name-img2 {
width: 110rpx;
height: 38rpx;
margin-left: 20rpx;
}
.user-name {
font-size: 32rpx;
color: #F9F9F9;
margin-left: 20rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
}, },
methods: { methods: {
handleAboutus() { handleAboutus() {
navigateTo(`/pagesD/about/about`) // navigateTo(`/pagesD/about/about`)
navigateTo(`/pages/login/login`)
}, },
handleFeedback() { handleFeedback() {
navigateTo(`/pagesD/feedback/feedback`) navigateTo(`/pagesD/feedback/feedback`)
......
This diff is collapsed.
## 1.2.2(2023-01-28)
- 修复 运行/打包 控制台警告问题
## 1.2.1(2022-09-05)
- 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
## 1.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge)
## 1.1.7(2021-11-08)
- 优化 升级ui
- 修改 size 属性默认值调整为 small
- 修改 type 属性,默认值调整为 error,info 替换 default
## 1.1.6(2021-09-22)
- 修复 在字节小程序上样式不生效的 bug
## 1.1.5(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.4(2021-07-29)
- 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性
## 1.1.3(2021-06-24)
- 优化 示例项目
## 1.1.1(2021-05-12)
- 新增 组件示例地址
## 1.1.0(2021-05-12)
- 新增 uni-badge 的 absolute 属性,支持定位
- 新增 uni-badge 的 offset 属性,支持定位偏移
- 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点
- 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+
- 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式
## 1.0.7(2021-05-07)
- 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug
- 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug
- 新增 uni-badge 属性 custom-style, 支持自定义样式
## 1.0.6(2021-02-04)
- 调整为uni_modules目录规范
<template>
<view class="uni-badge--x">
<slot />
<text v-if="text" :class="classNames" :style="[positionStyle, customStyle, dotStyle]"
class="uni-badge" @click="onClick()">{{displayValue}}</text>
</view>
</template>
<script>
/**
* Badge 数字角标
* @description 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景
* @tutorial https://ext.dcloud.net.cn/plugin?id=21
* @property {String} text 角标内容
* @property {String} size = [normal|small] 角标内容
* @property {String} type = [info|primary|success|warning|error] 颜色类型
* @value info 灰色
* @value primary 蓝色
* @value success 绿色
* @value warning 黄色
* @value error 红色
* @property {String} inverted = [true|false] 是否无需背景颜色
* @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
* @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
* @value rightTop 右上
* @value rightBottom 右下
* @value leftTop 左上
* @value leftBottom 左下
* @property {Array[number]} offset 距定位角中心点的偏移量,只有存在 absolute 属性时有效,例如:[-10, -10] 表示向外偏移 10px,[10, 10] 表示向 absolute 指定的内偏移 10px
* @property {String} isDot = [true|false] 是否显示为一个小点
* @event {Function} click 点击 Badge 触发事件
* @example <uni-badge text="1"></uni-badge>
*/
export default {
name: 'UniBadge',
emits: ['click'],
props: {
type: {
type: String,
default: 'error'
},
inverted: {
type: Boolean,
default: false
},
isDot: {
type: Boolean,
default: false
},
maxNum: {
type: Number,
default: 99
},
absolute: {
type: String,
default: ''
},
offset: {
type: Array,
default () {
return [0, 0]
}
},
text: {
type: [String, Number],
default: ''
},
size: {
type: String,
default: 'small'
},
customStyle: {
type: Object,
default () {
return {}
}
}
},
data() {
return {};
},
computed: {
width() {
return String(this.text).length * 8 + 12
},
classNames() {
const {
inverted,
type,
size,
absolute
} = this
return [
inverted ? 'uni-badge--' + type + '-inverted' : '',
'uni-badge--' + type,
'uni-badge--' + size,
absolute ? 'uni-badge--absolute' : ''
].join(' ')
},
positionStyle() {
if (!this.absolute) return {}
let w = this.width / 2,
h = 10
if (this.isDot) {
w = 5
h = 5
}
const x = `${- w + this.offset[0]}px`
const y = `${- h + this.offset[1]}px`
const whiteList = {
rightTop: {
right: x,
top: y
},
rightBottom: {
right: x,
bottom: y
},
leftBottom: {
left: x,
bottom: y
},
leftTop: {
left: x,
top: y
}
}
const match = whiteList[this.absolute]
return match ? match : whiteList['rightTop']
},
dotStyle() {
if (!this.isDot) return {}
return {
width: '10px',
minWidth: '0',
height: '10px',
padding: '0',
borderRadius: '10px'
}
},
displayValue() {
const {
isDot,
text,
maxNum
} = this
return isDot ? '' : (Number(text) > maxNum ? `${maxNum}+` : text)
}
},
methods: {
onClick() {
this.$emit('click');
}
}
};
</script>
<style lang="scss" >
$uni-primary: #2979ff !default;
$uni-success: #4cd964 !default;
$uni-warning: #f0ad4e !default;
$uni-error: #dd524d !default;
$uni-info: #909399 !default;
$bage-size: 12px;
$bage-small: scale(0.8);
.uni-badge--x {
/* #ifdef APP-NVUE */
// align-self: flex-start;
/* #endif */
/* #ifndef APP-NVUE */
display: inline-block;
/* #endif */
position: relative;
}
.uni-badge--absolute {
position: absolute;
}
.uni-badge--small {
transform: $bage-small;
transform-origin: center center;
}
.uni-badge {
/* #ifndef APP-NVUE */
display: flex;
overflow: hidden;
box-sizing: border-box;
font-feature-settings: "tnum";
min-width: 20px;
/* #endif */
justify-content: center;
flex-direction: row;
height: 20px;
padding: 0 4px;
line-height: 18px;
color: #fff;
border-radius: 100px;
background-color: $uni-info;
background-color: transparent;
border: 1px solid #fff;
text-align: center;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-size: $bage-size;
/* #ifdef H5 */
z-index: 999;
cursor: pointer;
/* #endif */
&--info {
color: #fff;
background-color: $uni-info;
}
&--primary {
background-color: $uni-primary;
}
&--success {
background-color: $uni-success;
}
&--warning {
background-color: $uni-warning;
}
&--error {
background-color: $uni-error;
}
&--inverted {
padding: 0 5px 0 0;
color: $uni-info;
}
&--info-inverted {
color: $uni-info;
background-color: transparent;
}
&--primary-inverted {
color: $uni-primary;
background-color: transparent;
}
&--success-inverted {
color: $uni-success;
background-color: transparent;
}
&--warning-inverted {
color: $uni-warning;
background-color: transparent;
}
&--error-inverted {
color: $uni-error;
background-color: transparent;
}
}
</style>
{
"id": "uni-badge",
"displayName": "uni-badge 数字角标",
"version": "1.2.2",
"description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
"keywords": [
"",
"badge",
"uni-ui",
"uniui",
"数字角标",
"徽章"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"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"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
\ No newline at end of file
## Badge 数字角标
> **组件名:uni-badge**
> 代码块: `uBadge`
数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景,
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-badge)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 0.0.3(2022-11-11)
- 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug
## 0.0.2(2021-04-16)
- 修改插件package信息
## 0.0.1(2021-03-15)
- 初始化项目
{
"id": "uni-config-center",
"displayName": "uni-config-center",
"version": "0.0.3",
"description": "uniCloud 配置中心",
"keywords": [
"配置",
"配置中心"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"directories": {
"example": "../../../scripts/dist"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "u"
}
}
}
}
}
# 为什么使用uni-config-center
实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ ├─index.js
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b // plugin-b对应的目录
├─index.js
└─config.json // plugin-b对应的配置文件
```
假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ └─index.js
├─plugin-b // plugin-b对应的目录
│ └─index.js
└─uni-config-center
├─index.js // config-center入口文件
├─plugin-a
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b
└─config.json // plugin-b对应的配置文件
```
使用uni-config-center后的优势
- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便
- 支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持)
# 用法
在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common)
```js
const createConfig = require('uni-config-center')
const uniIdConfig = createConfig({
pluginId: 'uni-id', // 插件id
defaultConfig: { // 默认配置
tokenExpiresIn: 7200,
tokenExpiresThreshold: 600,
},
customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
// defaudltConfig 默认配置
// userConfig 用户配置
return Object.assign(defaultConfig, userConfig)
}
})
// 以如下配置为例
// {
// "tokenExpiresIn": 7200,
// "passwordErrorLimit": 6,
// "bindTokenToDevice": false,
// "passwordErrorRetryTime": 3600,
// "app-plus": {
// "tokenExpiresIn": 2592000
// },
// "service": {
// "sms": {
// "codeExpiresIn": 300
// }
// }
// }
// 获取配置
uniIdConfig.config() // 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象
uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置,返回:7200
uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置,返回:300
uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置,如果不存在则取传入的默认值,返回:600
// 获取文件绝对路径
uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径
// 引用文件(require)
uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。
// 判断是否包含某文件
uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件,true: 文件存在,false: 文件不存在
```
\ No newline at end of file
{
"name": "uni-config-center",
"version": "0.0.3",
"description": "配置中心",
"main": "index.js",
"keywords": [],
"author": "DCloud",
"license": "Apache-2.0",
"origin-plugin-dev-name": "uni-config-center",
"origin-plugin-version": "0.0.3",
"plugin-dev-name": "uni-config-center",
"plugin-version": "0.0.3"
}
\ No newline at end of file
## 2.0.10(2024-06-07)
- 优化 uni-app x 中,size 属性的类型
## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14)
- 修复 项目未使用 ts 情况下,打包报错的bug
## 2.0.7(2023-12-14)
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
## 2.0.6(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.5(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.4(2023-12-06)
- 优化 uni-app x 下示例项目图标排序
## 2.0.3(2023-12-06)
- 修复 nvue下引入组件报错的bug
## 2.0.2(2023-12-05)
-优化 size 属性支持单位
## 2.0.1(2023-12-05)
- 新增 uni-app x 支持定义图标
## 1.3.5(2022-01-24)
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
- 优化 size 支持其他单位
## 1.3.3(2022-01-17)
- 修复 nvue 有些图标不显示的bug,兼容老版本图标
## 1.3.2(2021-12-01)
- 优化 示例可复制图标名称
## 1.3.1(2021-11-23)
- 优化 兼容旧组件 type 值
## 1.3.0(2021-11-19)
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.7(2021-11-08)
## 1.2.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.5(2021-05-12)
- 新增 组件示例地址
## 1.1.4(2021-02-05)
- 调整为uni_modules目录规范
<template>
<text class="uni-icons" :style="styleObj">
<slot>{{unicode}}</slot>
</text>
</template>
<script>
import { fontData, IconsDataItem } from './uniicons_file'
/**
* Icons 图标
* @description 用于展示 icon 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number,String} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: "uni-icons",
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {};
},
computed: {
unicode() : string {
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
if (codes !== null) {
return codes.unicode
}
return ''
},
iconSize() : string {
const size = this.size
if (typeof size == 'string') {
const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size
}
return this.getFontSize(size as number)
},
styleObj() : UTSJSONObject {
if (this.fontFamily !== '') {
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
}
return { color: this.color, fontSize: this.iconSize }
}
},
created() { },
methods: {
/**
* 字体大小
*/
getFontSize(size : number) : string {
return size + 'px';
},
},
}
</script>
<style scoped>
@font-face {
font-family: UniIconsFontFamily;
src: url('./uniicons.ttf');
}
.uni-icons {
font-family: UniIconsFontFamily;
font-size: 18px;
font-style: normal;
color: #333;
}
</style>
<template>
<!-- #ifdef APP-NVUE -->
<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
<slot></slot>
</text>
<!-- #endif -->
</template>
<script>
import { fontData } from './uniicons_file_vue.js';
const getVal = (val) => {
const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
}
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('" + iconUrl + "')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: 'UniIcons',
emits: ['click'],
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
customPrefix: {
type: String,
default: ''
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {
icons: fontData
}
},
computed: {
unicode() {
let code = this.icons.find(v => v.font_class === this.type)
if (code) {
return code.unicode
}
return ''
},
iconSize() {
return getVal(this.size)
},
styleObj() {
if (this.fontFamily !== '') {
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
}
return `color: ${this.color}; font-size: ${this.iconSize};`
}
},
methods: {
_onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf');
}
/* #endif */
.uni-icons {
font-family: uniicons;
text-decoration: none;
text-align: center;
}
</style>
.uniui-cart-filled:before {
content: "\e6d0";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-color:before {
content: "\e6cf";
}
.uniui-wallet:before {
content: "\e6b1";
}
.uniui-settings-filled:before {
content: "\e6ce";
}
.uniui-auth-filled:before {
content: "\e6cc";
}
.uniui-shop-filled:before {
content: "\e6cd";
}
.uniui-staff-filled:before {
content: "\e6cb";
}
.uniui-vip-filled:before {
content: "\e6c6";
}
.uniui-plus-filled:before {
content: "\e6c7";
}
.uniui-folder-add-filled:before {
content: "\e6c8";
}
.uniui-color-filled:before {
content: "\e6c9";
}
.uniui-tune-filled:before {
content: "\e6ca";
}
.uniui-calendar-filled:before {
content: "\e6c0";
}
.uniui-notification-filled:before {
content: "\e6c1";
}
.uniui-wallet-filled:before {
content: "\e6c2";
}
.uniui-medal-filled:before {
content: "\e6c3";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
.uniui-refreshempty:before {
content: "\e6bf";
}
.uniui-location-filled:before {
content: "\e6af";
}
.uniui-person-filled:before {
content: "\e69d";
}
.uniui-personadd-filled:before {
content: "\e698";
}
.uniui-arrowthinleft:before {
content: "\e6d2";
}
.uniui-arrowthinup:before {
content: "\e6d3";
}
.uniui-arrowthindown:before {
content: "\e6d4";
}
.uniui-back:before {
content: "\e6b9";
}
.uniui-forward:before {
content: "\e6ba";
}
.uniui-arrow-right:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthinright:before {
content: "\e6d1";
}
.uniui-down:before {
content: "\e6b8";
}
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-arrowright:before {
content: "\e6d5";
}
.uniui-right:before {
content: "\e6b5";
}
.uniui-up:before {
content: "\e6b6";
}
.uniui-top:before {
content: "\e6b6";
}
.uniui-left:before {
content: "\e6b7";
}
.uniui-arrowup:before {
content: "\e6d6";
}
.uniui-eye:before {
content: "\e651";
}
.uniui-eye-filled:before {
content: "\e66a";
}
.uniui-eye-slash:before {
content: "\e6b3";
}
.uniui-eye-slash-filled:before {
content: "\e6b4";
}
.uniui-info-filled:before {
content: "\e649";
}
.uniui-reload:before {
content: "\e6b2";
}
.uniui-micoff-filled:before {
content: "\e6b0";
}
.uniui-map-pin-ellipse:before {
content: "\e6ac";
}
.uniui-map-pin:before {
content: "\e6ad";
}
.uniui-location:before {
content: "\e6ae";
}
.uniui-starhalf:before {
content: "\e683";
}
.uniui-star:before {
content: "\e688";
}
.uniui-star-filled:before {
content: "\e68f";
}
.uniui-calendar:before {
content: "\e6a0";
}
.uniui-fire:before {
content: "\e6a1";
}
.uniui-medal:before {
content: "\e6a2";
}
.uniui-font:before {
content: "\e6a3";
}
.uniui-gift:before {
content: "\e6a4";
}
.uniui-link:before {
content: "\e6a5";
}
.uniui-notification:before {
content: "\e6a6";
}
.uniui-staff:before {
content: "\e6a7";
}
.uniui-vip:before {
content: "\e6a8";
}
.uniui-folder-add:before {
content: "\e6a9";
}
.uniui-tune:before {
content: "\e6aa";
}
.uniui-auth:before {
content: "\e6ab";
}
.uniui-person:before {
content: "\e699";
}
.uniui-email-filled:before {
content: "\e69a";
}
.uniui-phone-filled:before {
content: "\e69b";
}
.uniui-phone:before {
content: "\e69c";
}
.uniui-email:before {
content: "\e69e";
}
.uniui-personadd:before {
content: "\e69f";
}
.uniui-chatboxes-filled:before {
content: "\e692";
}
.uniui-contact:before {
content: "\e693";
}
.uniui-chatbubble-filled:before {
content: "\e694";
}
.uniui-contact-filled:before {
content: "\e695";
}
.uniui-chatboxes:before {
content: "\e696";
}
.uniui-chatbubble:before {
content: "\e697";
}
.uniui-upload-filled:before {
content: "\e68e";
}
.uniui-upload:before {
content: "\e690";
}
.uniui-weixin:before {
content: "\e691";
}
.uniui-compose:before {
content: "\e67f";
}
.uniui-qq:before {
content: "\e680";
}
.uniui-download-filled:before {
content: "\e681";
}
.uniui-pyq:before {
content: "\e682";
}
.uniui-sound:before {
content: "\e684";
}
.uniui-trash-filled:before {
content: "\e685";
}
.uniui-sound-filled:before {
content: "\e686";
}
.uniui-trash:before {
content: "\e687";
}
.uniui-videocam-filled:before {
content: "\e689";
}
.uniui-spinner-cycle:before {
content: "\e68a";
}
.uniui-weibo:before {
content: "\e68b";
}
.uniui-videocam:before {
content: "\e68c";
}
.uniui-download:before {
content: "\e68d";
}
.uniui-help:before {
content: "\e679";
}
.uniui-navigate-filled:before {
content: "\e67a";
}
.uniui-plusempty:before {
content: "\e67b";
}
.uniui-smallcircle:before {
content: "\e67c";
}
.uniui-minus-filled:before {
content: "\e67d";
}
.uniui-micoff:before {
content: "\e67e";
}
.uniui-closeempty:before {
content: "\e66c";
}
.uniui-clear:before {
content: "\e66d";
}
.uniui-navigate:before {
content: "\e66e";
}
.uniui-minus:before {
content: "\e66f";
}
.uniui-image:before {
content: "\e670";
}
.uniui-mic:before {
content: "\e671";
}
.uniui-paperplane:before {
content: "\e672";
}
.uniui-close:before {
content: "\e673";
}
.uniui-help-filled:before {
content: "\e674";
}
.uniui-paperplane-filled:before {
content: "\e675";
}
.uniui-plus:before {
content: "\e676";
}
.uniui-mic-filled:before {
content: "\e677";
}
.uniui-image-filled:before {
content: "\e678";
}
.uniui-locked-filled:before {
content: "\e668";
}
.uniui-info:before {
content: "\e669";
}
.uniui-locked:before {
content: "\e66b";
}
.uniui-camera-filled:before {
content: "\e658";
}
.uniui-chat-filled:before {
content: "\e659";
}
.uniui-camera:before {
content: "\e65a";
}
.uniui-circle:before {
content: "\e65b";
}
.uniui-checkmarkempty:before {
content: "\e65c";
}
.uniui-chat:before {
content: "\e65d";
}
.uniui-circle-filled:before {
content: "\e65e";
}
.uniui-flag:before {
content: "\e65f";
}
.uniui-flag-filled:before {
content: "\e660";
}
.uniui-gear-filled:before {
content: "\e661";
}
.uniui-home:before {
content: "\e662";
}
.uniui-home-filled:before {
content: "\e663";
}
.uniui-gear:before {
content: "\e664";
}
.uniui-smallcircle-filled:before {
content: "\e665";
}
.uniui-map-filled:before {
content: "\e666";
}
.uniui-map:before {
content: "\e667";
}
.uniui-refresh-filled:before {
content: "\e656";
}
.uniui-refresh:before {
content: "\e657";
}
.uniui-cloud-upload:before {
content: "\e645";
}
.uniui-cloud-download-filled:before {
content: "\e646";
}
.uniui-cloud-download:before {
content: "\e647";
}
.uniui-cloud-upload-filled:before {
content: "\e648";
}
.uniui-redo:before {
content: "\e64a";
}
.uniui-images-filled:before {
content: "\e64b";
}
.uniui-undo-filled:before {
content: "\e64c";
}
.uniui-more:before {
content: "\e64d";
}
.uniui-more-filled:before {
content: "\e64e";
}
.uniui-undo:before {
content: "\e64f";
}
.uniui-images:before {
content: "\e650";
}
.uniui-paperclip:before {
content: "\e652";
}
.uniui-settings:before {
content: "\e653";
}
.uniui-search:before {
content: "\e654";
}
.uniui-redo-filled:before {
content: "\e655";
}
.uniui-list:before {
content: "\e644";
}
.uniui-mail-open-filled:before {
content: "\e63a";
}
.uniui-hand-down-filled:before {
content: "\e63c";
}
.uniui-hand-down:before {
content: "\e63d";
}
.uniui-hand-up-filled:before {
content: "\e63e";
}
.uniui-hand-up:before {
content: "\e63f";
}
.uniui-heart-filled:before {
content: "\e641";
}
.uniui-mail-open:before {
content: "\e643";
}
.uniui-heart:before {
content: "\e639";
}
.uniui-loop:before {
content: "\e633";
}
.uniui-pulldown:before {
content: "\e632";
}
.uniui-scan:before {
content: "\e62a";
}
.uniui-bars:before {
content: "\e627";
}
.uniui-checkbox:before {
content: "\e62b";
}
.uniui-checkbox-filled:before {
content: "\e62c";
}
.uniui-shop:before {
content: "\e62f";
}
.uniui-headphones:before {
content: "\e630";
}
.uniui-cart:before {
content: "\e631";
}
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "2.0.10",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y",
"app-uvue": "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",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
## Icons 图标
> **组件名:uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 1.0.18(2024-07-08)
- checkToken时如果传入的token为空则返回uni-id-check-token-failed错误码以便uniIdRouter能正常跳转
## 1.0.17(2024-04-26)
- 兼容uni-app-x对客户端uniPlatform的调整(uni-app-x内uniPlatform区分app-android、app-ios)
## 1.0.16(2023-04-25)
- 新增maxTokenLength配置,用于限制数据库用户记录token数组的最大长度
## 1.0.15(2023-04-06)
- 修复部分语言国际化出错的Bug
## 1.0.14(2023-03-07)
- 修复 admin用户包含其他角色时未包含在token的Bug
## 1.0.13(2022-07-21)
- 修复 创建token时未传角色权限信息生成的token不正确的bug
## 1.0.12(2022-07-15)
- 提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web)
## 1.0.11(2022-07-14)
- 修复 部分情况下报`read property 'reduce' of undefined`的错误
## 1.0.10(2022-07-11)
- 将token存储在用户表的token字段内,与旧版本uni-id保持一致
## 1.0.9(2022-07-01)
- checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限
## 1.0.8(2022-07-01)
- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
## 1.0.7(2022-06-30)
- 修复config文件不合法时未抛出具体错误的Bug
## 1.0.6(2022-06-28)
- 移除插件内的数据表schema
## 1.0.5(2022-06-27)
- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
## 1.0.4(2022-06-27)
- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
## 1.0.2(2022-06-23)
- 对齐旧版本uni-id默认配置
## 1.0.1(2022-06-22)
- 补充对uni-config-center的依赖
## 1.0.0(2022-06-21)
- 提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块
{
"id": "uni-id-common",
"displayName": "uni-id-common",
"version": "1.0.18",
"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
"keywords": [
"uni-id-common",
"uniCloud",
"token",
"权限"
],
"repository": "https://gitcode.net/dcloud/uni-id-common",
"engines": {
},
"dcloudext": {
"sale": {
"regular": {
"price": 0
},
"sourcecode": {
"price": 0
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"uni_modules": {
"dependencies": ["uni-config-center"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
# uni-id-common
文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)
\ No newline at end of file
{
"name": "uni-id-common",
"version": "1.0.18",
"description": "uni-id token生成、校验、刷新",
"main": "index.js",
"homepage": "https:\/\/uniapp.dcloud.io\/uniCloud\/uni-id-common.html",
"repository": {
"type": "git",
"url": "git+https:\/\/gitee.com\/dcloud\/uni-id-common.git"
},
"author": "DCloud",
"license": "Apache-2.0",
"dependencies": {
"uni-config-center": "file:..\/..\/..\/..\/..\/uni-config-center\/uniCloud\/cloudfunctions\/common\/uni-config-center"
},
"origin-plugin-dev-name": "uni-id-common",
"origin-plugin-version": "1.0.18",
"plugin-dev-name": "uni-id-common",
"plugin-version": "1.0.18"
}
\ No newline at end of file
## 1.2.15(2025-01-08)
- 修复 示例中过期图片地址
## 1.2.14(2023-04-14)
- 优化 uni-list-chat 具名插槽`header` 非app端套一层元素,方便使用时通过外层元素定位实现样式修改
## 1.2.13(2023-03-03)
- uni-list-chat 新增 支持具名插槽`header`
## 1.2.12(2023-02-01)
- 新增 列表图标新增 customPrefix 属性 ,用法 [详见](https://uniapp.dcloud.net.cn/component/uniui/uni-icons.html#icons-props)
## 1.2.11(2023-01-31)
- 修复 无反馈效果呈现的bug
## 1.2.9(2022-11-22)
- 修复 uni-list-chat 在vue3下跳转报错的bug
## 1.2.8(2022-11-21)
- 修复 uni-list-chat avatar属性 值为本地路径时错误的问题
## 1.2.7(2022-11-21)
- 修复 uni-list-chat avatar属性 在腾讯云版uniCloud下错误的问题
## 1.2.6(2022-11-18)
- 修复 uni-list-chat note属性 支持:“草稿”字样功能 文本少1位的问题
## 1.2.5(2022-11-15)
- 修复 uni-list-item 的 customStyle 属性 padding值在 H5端 无效的bug
## 1.2.4(2022-11-15)
- 修复 uni-list-item 的 customStyle 属性 padding值在nvue(vue2)下无效的bug
## 1.2.3(2022-11-14)
- uni-list-chat 新增 avatar 支持 fileId
## 1.2.2(2022-11-11)
- uni-list 新增属性 render-reverse 详情参考:[https://uniapp.dcloud.net.cn/component/list.html](https://uniapp.dcloud.net.cn/component/list.html)
- uni-list-chat note属性 支持:“草稿”字样 加红显示 详情参考uni-im:[https://ext.dcloud.net.cn/plugin?name=uni-im](https://ext.dcloud.net.cn/plugin?name=uni-im)
- uni-list-item 新增属性 customStyle 支持设置padding、backgroundColor
## 1.2.1(2022-03-30)
- 删除无用文件
## 1.2.0(2021-11-23)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-list](https://uniapp.dcloud.io/component/uniui/uni-list)
## 1.1.3(2021-08-30)
- 修复 在vue3中to属性在发行应用的时候报错的bug
## 1.1.2(2021-07-30)
- 优化 vue3下事件警告的问题
## 1.1.1(2021-07-21)
- 修复 与其他组件嵌套使用时,点击失效的Bug
## 1.1.0(2021-07-13)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.0.17(2021-05-12)
- 新增 组件示例地址
## 1.0.16(2021-02-05)
- 优化 组件引用关系,通过uni_modules引用组件
## 1.0.15(2021-02-05)
- 调整为uni_modules目录规范
- 修复 uni-list-chat 角标显示不正常的问题
<template>
<!-- #ifdef APP-NVUE -->
<cell>
<!-- #endif -->
<view class="uni-list-ad">
<view v-if="borderShow" :class="{'uni-list--border':border,'uni-list-item--first':isFirstChild}"></view>
<ad style="width: 200px;height: 300px;border-width: 1px;border-color: red;border-style: solid;" adpid="1111111111"
unit-id="" appid="" apid="" type="feed" @error="aderror" @close="closeAd"></ad>
</view>
<!-- #ifdef APP-NVUE -->
</cell>
<!-- #endif -->
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom');
// #endif
export default {
name: 'UniListAd',
props: {
title: {
type: String,
default: '',
}
},
// inject: ['list'],
data() {
return {
isFirstChild: false,
border: false,
borderShow: true,
}
},
mounted() {
this.list = this.getForm()
if (this.list) {
if (!this.list.firstChildAppend) {
this.list.firstChildAppend = true
this.isFirstChild = true
}
this.border = this.list.border
}
},
methods: {
/**
* 获取父元素实例
*/
getForm(name = 'uniList') {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== name) {
parent = parent.$parent;
if (!parent) return false
parentName = parent.$options.name;
}
return parent;
},
aderror(e) {
console.log("aderror: " + JSON.stringify(e.detail));
},
closeAd(e) {
this.borderShow = false
}
}
}
</script>
<style lang="scss" >
.uni-list-ad {
position: relative;
border: 1px red solid;
}
.uni-list--border {
position: relative;
padding-bottom: 1px;
/* #ifdef APP-PLUS */
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 0.5px;
/* #endif */
margin-left: $uni-spacing-row-lg;
}
/* #ifndef APP-NVUE */
.uni-list--border:after {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 1px;
content: '';
-webkit-transform: scaleY(.5);
transform: scaleY(.5);
background-color: $uni-border-color;
}
.uni-list-item--first:after {
height: 0px;
}
/* #endif */
</style>
/**
* 这里是 uni-list 组件内置的常用样式变量
* 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码
*
*/
// 背景色
$background-color : #fff;
// 分割线颜色
$divide-line-color : #e5e5e5;
// 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像
// nvue 页面不支持修改头像大小
$avatar-width : 45px ;
// 头像边框
$avatar-border-radius: 5px;
$avatar-border-color: #eee;
$avatar-border-width: 1px;
// 标题文字样式
$title-size : 16px;
$title-color : #3b4144;
$title-weight : normal;
// 描述文字样式
$note-size : 12px;
$note-color : #999;
$note-weight : normal;
// 右侧额外内容默认样式
$right-text-size : 12px;
$right-text-color : #999;
$right-text-weight : normal;
// 角标样式
// nvue 页面不支持修改圆点位置以及大小
// 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动
$badge-left: 0px;
$badge-top: 0px;
// 显示圆点时,圆点大小
$dot-width: 10px;
$dot-height: 10px;
// 显示角标时,角标大小和字体大小
$badge-size : 18px;
$badge-font : 12px;
// 显示角标时,角标前景色
$badge-color : #fff;
// 显示角标时,角标背景色
$badge-background-color : #ff5a5f;
// 显示角标时,角标左右间距
$badge-space : 6px;
// 状态样式
// 选中颜色
$hover : #f5f5f5;
<template>
<!-- #ifndef APP-NVUE -->
<view class="uni-list uni-border-top-bottom">
<view v-if="border" class="uni-list--border-top"></view>
<slot />
<view v-if="border" class="uni-list--border-bottom"></view>
</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<list :bounce="false" :scrollable="true" show-scrollbar :render-reverse="renderReverse" @scroll="scroll" class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop"
loadmoreoffset="15">
<slot />
</list>
<!-- #endif -->
</template>
<script>
/**
* List 列表
* @description 列表组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=24
* @property {String} border = [true|false] 标题
*/
export default {
name: 'uniList',
'mp-weixin': {
options: {
multipleSlots: false
}
},
props: {
stackFromEnd:{
type: Boolean,
default:false
},
enableBackToTop: {
type: [Boolean, String],
default: false
},
scrollY: {
type: [Boolean, String],
default: false
},
border: {
type: Boolean,
default: true
},
renderReverse:{
type: Boolean,
default: false
}
},
// provide() {
// return {
// list: this
// };
// },
created() {
this.firstChildAppend = false;
},
methods: {
loadMore(e) {
this.$emit('scrolltolower');
},
scroll(e) {
this.$emit('scroll', e);
}
}
};
</script>
<style lang="scss">
$uni-bg-color:#ffffff;
$uni-border-color:#e5e5e5;
.uni-list {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
background-color: $uni-bg-color;
position: relative;
flex-direction: column;
}
.uni-list--border {
position: relative;
/* #ifdef APP-NVUE */
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 0.5px;
border-bottom-color: $uni-border-color;
border-bottom-style: solid;
border-bottom-width: 0.5px;
/* #endif */
z-index: -1;
}
/* #ifndef APP-NVUE */
.uni-list--border-top {
position: absolute;
top: 0;
right: 0;
left: 0;
height: 1px;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
background-color: $uni-border-color;
z-index: 1;
}
.uni-list--border-bottom {
position: absolute;
bottom: 0;
right: 0;
left: 0;
height: 1px;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
background-color: $uni-border-color;
}
/* #endif */
</style>
This diff is collapsed.
## List 列表
> **组件名:uni-list**
> 代码块: `uList`、`uListItem`
> 关联组件:`uni-list-item`、`uni-badge`、`uni-icons`、`uni-list-chat`、`uni-list-ad`
List 列表组件,包含基本列表样式、可扩展插槽机制、长列表性能优化、多端兼容。
在vue页面里,它默认使用页面级滚动。在app-nvue页面里,它默认使用原生list组件滚动。这样的长列表,在滚动出屏幕外后,系统会回收不可见区域的渲染内存资源,不会造成滚动越长手机越卡的问题。
uni-list组件是父容器,里面的核心是uni-list-item子组件,它代表列表中的一个可重复行,子组件可以无限循环。
uni-list-item有很多风格,uni-list-item组件通过内置的属性,满足一些常用的场景。当内置属性不满足需求时,可以通过扩展插槽来自定义列表内容。
内置属性可以覆盖的场景包括:导航列表、设置列表、小图标列表、通信录列表、聊天记录列表。
涉及很多大图或丰富内容的列表,比如类今日头条的新闻列表、类淘宝的电商列表,需要通过扩展插槽实现。
下文均有样例给出。
uni-list不包含下拉刷新和上拉翻页。上拉翻页另见组件:[uni-load-more](https://ext.dcloud.net.cn/plugin?id=29)
### [点击查看详细文档](https://uniapp.dcloud.io/component/uniui/uni-indexed-list)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 基于uni-list扩展的页面模板
通过扩展插槽,可实现多种常见样式的列表
**新闻列表类**
1. 云端一体混合布局:[https://ext.dcloud.net.cn/plugin?id=2546](https://ext.dcloud.net.cn/plugin?id=2546)
2. 云端一体垂直布局,大图模式:[https://ext.dcloud.net.cn/plugin?id=2583](https://ext.dcloud.net.cn/plugin?id=2583)
3. 云端一体垂直布局,多行图文混排:[https://ext.dcloud.net.cn/plugin?id=2584](https://ext.dcloud.net.cn/plugin?id=2584)
4. 云端一体垂直布局,多图模式:[https://ext.dcloud.net.cn/plugin?id=2585](https://ext.dcloud.net.cn/plugin?id=2585)
5. 云端一体水平布局,左图右文:[https://ext.dcloud.net.cn/plugin?id=2586](https://ext.dcloud.net.cn/plugin?id=2586)
6. 云端一体水平布局,左文右图:[https://ext.dcloud.net.cn/plugin?id=2587](https://ext.dcloud.net.cn/plugin?id=2587)
7. 云端一体垂直布局,无图模式,主标题+副标题:[https://ext.dcloud.net.cn/plugin?id=2588](https://ext.dcloud.net.cn/plugin?id=2588)
**商品列表类**
1. 云端一体列表/宫格视图互切:[https://ext.dcloud.net.cn/plugin?id=2651](https://ext.dcloud.net.cn/plugin?id=2651)
2. 云端一体列表(宫格模式):[https://ext.dcloud.net.cn/plugin?id=2671](https://ext.dcloud.net.cn/plugin?id=2671)
3. 云端一体列表(列表模式):[https://ext.dcloud.net.cn/plugin?id=2672](https://ext.dcloud.net.cn/plugin?id=2672)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// 各接口权限配置,未配置接口表示允许任何用户访问(包括未登录用户)
module.exports = {
refund: {
// auth: true // 已登录用户方可操作,配置角色或权限时此项可不写
role: ['admin'] // 允许进行此操作的角色,包含任一角色均可操作。
// permission: [] // 允许进行此操作的权限,包含任一权限均可操作。
// 权限角色均配置时,用户拥有任一权限或任一角色均可操作
}
}
dao名词解释:Data Access Object
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment