吆喝
@@ -0,0 +1,26 @@
|
|||||||
|
# Build and Release Folders
|
||||||
|
bin-debug/
|
||||||
|
bin-release/
|
||||||
|
[Oo]bj/
|
||||||
|
[Bb]in/
|
||||||
|
|
||||||
|
# Other files and folders
|
||||||
|
.settings/
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.swf
|
||||||
|
*.air
|
||||||
|
*.ipa
|
||||||
|
# *.apk
|
||||||
|
*.idea
|
||||||
|
|
||||||
|
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
|
||||||
|
# should NOT be excluded as they contain compiler settings and other important
|
||||||
|
# information for Eclipse / Flash Builder.
|
||||||
|
|
||||||
|
.hbuilderx/
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
unpackage/
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
<script>
|
||||||
|
import login from "@/utils/login";
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
const PlayerManager = require('@/utils/playerManager')
|
||||||
|
const playletPlugin = requirePlugin('playlet-plugin')
|
||||||
|
// #endif
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
playerManagerList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLaunch: function(e) {
|
||||||
|
uni.getLocation({
|
||||||
|
|
||||||
|
})
|
||||||
|
let that = this;
|
||||||
|
if (e.query.invite) {
|
||||||
|
uni.setStorageSync('invite_number', e.query.invite);
|
||||||
|
}
|
||||||
|
if (e.query.fxpid && e.query.fxpid > 0) {
|
||||||
|
uni.setStorageSync('fxpid', e.query.fxpid);
|
||||||
|
}
|
||||||
|
if (e.invite) {
|
||||||
|
uni.setStorageSync('invite_number', e.invite)
|
||||||
|
}
|
||||||
|
if (e.fxpid && e.fxpid > 0) {
|
||||||
|
uni.setStorageSync('fxpid', e.fxpid)
|
||||||
|
}
|
||||||
|
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {};
|
||||||
|
if (extConfig.appid) {
|
||||||
|
this.$config.appId = extConfig.appid;
|
||||||
|
}
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
// 扫描小程序二维码使用
|
||||||
|
this.getScence(e.query.scene)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
playletPlugin.onPageLoad(this.onPlayerLoad.bind(this))
|
||||||
|
})
|
||||||
|
// wx.setVisualEffectOnCapture({
|
||||||
|
// visualEffect: 'hidden',
|
||||||
|
// success: (res) => {
|
||||||
|
// console.log(res)
|
||||||
|
// },
|
||||||
|
// fail: (err) => {
|
||||||
|
// console.log(err)
|
||||||
|
// },
|
||||||
|
// complete: (res) => {
|
||||||
|
// console.log(res)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
let info = uni.getStorageSync("userinfo");
|
||||||
|
let token = info ? info.token : '';
|
||||||
|
if (token) {
|
||||||
|
login.wxLogin();
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
//跨屏幕防止ios录频
|
||||||
|
// if (/ios/i.test(wx.getSystemInfoSync().system) && wx.getScreenRecordingState) {
|
||||||
|
// // res.state的值有两种情况 on(正在录屏) | off(没有开始录屏)
|
||||||
|
// wx.getScreenRecordingState({
|
||||||
|
// success: res => {
|
||||||
|
// if (res.state != 'off') {
|
||||||
|
// // that.setData({
|
||||||
|
// // isShow: false //这里我对页面进行了遮挡处理
|
||||||
|
// // })
|
||||||
|
// } else {
|
||||||
|
// // that.setData({
|
||||||
|
// // isShow: true
|
||||||
|
// // })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// 在当前页面点击录频
|
||||||
|
// if (/ios/i.test(wx.getSystemInfoSync().system) && wx.onScreenRecordingStateChanged) {
|
||||||
|
// // res.state的值有两种情况 start(开始录屏) | stop(结束录屏)
|
||||||
|
// wx.onScreenRecordingStateChanged(res => {
|
||||||
|
// if (res.state == 'start') {
|
||||||
|
// that.setData({
|
||||||
|
// isShow: false //这里我对页面进行了遮挡处理
|
||||||
|
// })
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
// that.setData({
|
||||||
|
// isShow: true
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// 小程序新版本检测
|
||||||
|
uni.getUpdateManager().onCheckForUpdate(function(res) {
|
||||||
|
// 请求完新版本信息的回调
|
||||||
|
if (res.hasUpdate) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '新版本已经准备好,是否重启应用?',
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||||
|
uni.getUpdateManager().applyUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: function(res) {
|
||||||
|
if (res.statusBarHeight == 0) {
|
||||||
|
res.statusBarHeight = 30;
|
||||||
|
}
|
||||||
|
// menuButtonInfo.statusBarHeight = res.statusBarHeight;
|
||||||
|
// res.menuButtonInfo = menuButtonInfo;
|
||||||
|
// uni.setStorageSync("setGetSystemInfo", res);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
console.log('App Show')
|
||||||
|
},
|
||||||
|
onHide: function() {
|
||||||
|
console.log('App Hide')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取扫描小程序二维码
|
||||||
|
getScence(scene) {
|
||||||
|
const sceneParams = {};
|
||||||
|
const params = decodeURIComponent(scene).split('&');
|
||||||
|
for (const param of params) {
|
||||||
|
const [key, value] = param.split('=');
|
||||||
|
sceneParams[key] = value;
|
||||||
|
}
|
||||||
|
if (sceneParams.invite) {
|
||||||
|
uni.setStorageSync("invite_number", sceneParams.invite)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPlayerLoad(info) {
|
||||||
|
let destroyedIndex = -1
|
||||||
|
for (let i = 0; i < this.playerManagerList.length; i++) {
|
||||||
|
if (this.playerManagerList[i].isDestroy && this.playerManagerList[i].isDestroy()) {
|
||||||
|
destroyedIndex = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (destroyedIndex >= 0) {
|
||||||
|
this.playerManagerList.splice(destroyedIndex, 1)
|
||||||
|
}
|
||||||
|
const playerManager = new PlayerManager()
|
||||||
|
playerManager._onPlayerLoad(info)
|
||||||
|
this.playerManagerList.push(playerManager)
|
||||||
|
console.log('this.playerManagerList', this.playerManagerList.length)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@import url("@/utils/default.css");
|
||||||
|
|
||||||
|
view {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*每个页面公共css */
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,736 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pay_box">
|
||||||
|
<view class="noRecharge" v-if="is_check && system=='ios'">
|
||||||
|
根据相关规范ios暂不可用此功能,请使用android手机体验
|
||||||
|
</view>
|
||||||
|
<view class="recharge" v-else>
|
||||||
|
<view class="header_top">
|
||||||
|
<text style="font-size: 32rpx;">解锁后可继续观看</text>
|
||||||
|
<image @tap="close_pay_box" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fanhui.png"
|
||||||
|
style="width: 36rpx;height: 36rpx;"></image>
|
||||||
|
</view>
|
||||||
|
<view class="vider_juji">
|
||||||
|
<text style="font-size: 24rpx;">{{ videoSynopsis.name }} · 第{{ serialNo }}集</text>
|
||||||
|
<text style="font-size: 24rpx;color: #333333;">本剧共{{ videoSynopsis.sum }}集</text>
|
||||||
|
</view>
|
||||||
|
<view class="vider_juji">
|
||||||
|
<text style="font-size: 24rpx;">解锁本集需要: {{ videoSynopsis.beans }}金豆</text>
|
||||||
|
</view>
|
||||||
|
<view class="other_recharge">
|
||||||
|
<text style="font-size: 28rpx;">金豆充值</text>
|
||||||
|
<text style="font-size: 28rpx;color: #333333;font-weight: bold;">我的金豆:{{ userInfo.beans || 0 }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="vipCarBox" v-if="payListGroupId==1">
|
||||||
|
<view :class="[
|
||||||
|
'vipCarItem',
|
||||||
|
{'vipCarFirst':item.pay_type == 1},
|
||||||
|
{'vipCarSecond': item.pay_type == 2},
|
||||||
|
{'vipCarThird':item.pay_type == 3},
|
||||||
|
{'vipCarFourth':item.pay_type == 4},
|
||||||
|
] " v-for="item in list_pay" :key="item.id" @click="getSelectItemId(item)">
|
||||||
|
<text class="icon" v-if="item.pay_tab">{{ item.pay_tab }}</text>
|
||||||
|
<view class="moneyLine">
|
||||||
|
<view class="money">¥{{ item.pay_money }}</view>
|
||||||
|
<view class="beanBtn" v-if="item.pay_give_num && item.pay_type == 2">赠{{ item.pay_give_num }}金豆
|
||||||
|
</view>
|
||||||
|
<view class="moneyInfoBtn" v-if="item.pay_type == 4">解锁全集</view>
|
||||||
|
</view>
|
||||||
|
<text class="depict" v-if="item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{ item.pay_num }}金豆+{{ item.pay_give_num }}豆
|
||||||
|
</text>
|
||||||
|
<text class="depict" v-if="!item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{ item.pay_num }}金豆
|
||||||
|
</text>
|
||||||
|
<view class="explainText" v-if="item.pay_type != 2">
|
||||||
|
<text v-if="item.pay_type == 1" style="color: #333333;">全部影片免费观看</text>
|
||||||
|
<text v-if="item.pay_type == 3" style="color: #FF6900;">本剧订阅全集</text>
|
||||||
|
<text v-if="item.pay_type == 4" style="color: #ffffff;">邀请好友拼团享返利</text>
|
||||||
|
</view>
|
||||||
|
<view class="choiceNum" v-if="item.menber_sel">{{ item.menber_sel }}%用户选择</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="vipCarBox vipCarBoxSecond" v-else>
|
||||||
|
<view
|
||||||
|
:class="['vipCarItem',{'border':item.is_red==1},{'der':item.pay_give_num == 0},{'one':item.pay_type == 1},{'vipCarFourth':item.pay_type == 4}]"
|
||||||
|
v-for="item in list_pay" :key="item.id" @click="getSelectItemId(item)">
|
||||||
|
<text class="rightIcon" v-if="item.pay_tab">{{ item.pay_tab }}</text>
|
||||||
|
<view class="VipCardContent">
|
||||||
|
<view :class="['carMoney',{'redColor':item.is_red==1}]">
|
||||||
|
<text>{{ item.pay_money }}</text>
|
||||||
|
元
|
||||||
|
</view>
|
||||||
|
<view class="carMoneyExplain" v-if="item.pay_give_money>0">多送{{ item.pay_give_money }}元</view>
|
||||||
|
<!-- <view v-else :class="item.pay_type == 4?'carMoneyExplainText':'carMoneyExplain'">{{item.pay_type == 4?'解锁全集':' '}}</view>-->
|
||||||
|
<view v-else class="carMoneyExplain"></view>
|
||||||
|
</view>
|
||||||
|
<view :class="['vipCarFooter',{'footerRedColor':item.is_red!=1}]">
|
||||||
|
{{ item.remark ? item.remark : '' }}
|
||||||
|
</view>
|
||||||
|
<image v-if="item.is_finger" class="hands"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/hands.gif" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="explainList">
|
||||||
|
<text class="explainItem"> 充值代表接受
|
||||||
|
<text class="explainText" @click="goAgreement(1)">《充值/退款协议》</text>
|
||||||
|
和
|
||||||
|
<text class="explainText" @click="goAgreement(2)">《会员服务协议》</text>
|
||||||
|
</text>
|
||||||
|
<text class="explainItem"> 本小程序共有{{ allVideoNum }}部剧正在热播</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<uni-popup ref="back_ref" type="center">
|
||||||
|
<view class="teamPupCont">
|
||||||
|
<view class="closeIcon" @click="closePup">
|
||||||
|
<uni-icons type="closeempty" size="16" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="textBox">
|
||||||
|
<view class="textLine">用户只能发起一次邀请</view>
|
||||||
|
<view class="textLine">有效时间为24小时</view>
|
||||||
|
<view class="textLine">分享好友拼团,拼成退差价</view>
|
||||||
|
</view>
|
||||||
|
<button open-type="share" class="inviteBtn">立即邀请</button>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
httpRequest
|
||||||
|
} from '@/utils/request'
|
||||||
|
import PAY from '@/utils/pay'
|
||||||
|
const playletPlugin = requirePlugin('playlet-plugin')
|
||||||
|
export default {
|
||||||
|
name: "payDom",
|
||||||
|
props: {
|
||||||
|
playerId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
srcAppid: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
dramaId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
serialNo: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
extParam: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
_isInitChargeDialog: false,
|
||||||
|
list_pay: [],
|
||||||
|
payListGroupId: 1,
|
||||||
|
userInfo: {},
|
||||||
|
videoSynopsis: {},
|
||||||
|
vid: "",
|
||||||
|
mid: '',
|
||||||
|
system: "",
|
||||||
|
payItemData: {},
|
||||||
|
g_order_id: "",
|
||||||
|
is_check: false,
|
||||||
|
allVideoNum: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
serialNo(newValue, oldvalue) {
|
||||||
|
console.log('ready get pay list')
|
||||||
|
this.is_check = uni.getStorageSync('config').is_check == 1 ? true : false;
|
||||||
|
this.userInfo = uni.getStorageSync('userinfo');
|
||||||
|
this.system = uni.getSystemInfoSync().osName;
|
||||||
|
this.initChargeDialog();
|
||||||
|
this.getVideoData();
|
||||||
|
this.getAllVideoNum();
|
||||||
|
this.getPayList();
|
||||||
|
},
|
||||||
|
playerId(newValue, oldvalue) {
|
||||||
|
console.log('this.initChargeDialog', newValue)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
goAgreement(num) {
|
||||||
|
const pm = this.getPlayerManager()
|
||||||
|
pm.navigateTo({
|
||||||
|
url: '/pagesA/agreement/agreement?id=' + num
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initChargeDialog() {
|
||||||
|
if (!this.playerId) return
|
||||||
|
if (this._isInitChargeDialog) return
|
||||||
|
this._isInitChargeDialog = true;
|
||||||
|
this.g_order_id = uni.getStorageSync('g_order_id');
|
||||||
|
const pm = this.getPlayerManager()
|
||||||
|
if (pm) {
|
||||||
|
let extparams = pm.getInfo().extParam;
|
||||||
|
if (extparams) {
|
||||||
|
if (extparams.indexOf('%') < 0) {
|
||||||
|
this.vid = JSON.parse(extparams).vid;
|
||||||
|
} else {
|
||||||
|
this.vid = JSON.parse(decodeURIComponent(extparams)).vid
|
||||||
|
}
|
||||||
|
console.log('ChargeDialog res', extparams)
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log(this.pm.getInfo())
|
||||||
|
// 注册弹窗显示事件
|
||||||
|
pm.onShowChargeDialog(this.onShowChargeDialog.bind(this))
|
||||||
|
// 注册弹窗隐藏事件
|
||||||
|
pm.onHideChargeDialog(this.onHideChargeDialog.bind(this))
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPlayerManager() {
|
||||||
|
return playletPlugin.PlayletManager.getPageManager(this.playerId);
|
||||||
|
},
|
||||||
|
onShowChargeDialog() {
|
||||||
|
console.log('onShowChargeDialog bbs')
|
||||||
|
this.getPayList();
|
||||||
|
},
|
||||||
|
onHideChargeDialog() {
|
||||||
|
// this.$refs.back_ref.close();
|
||||||
|
},
|
||||||
|
close_pay_box(){
|
||||||
|
const pm = this.getPlayerManager()
|
||||||
|
pm.hideChargeDialog();
|
||||||
|
},
|
||||||
|
getAllVideoNum() {
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/video/videoCount",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
this.allVideoNum = res.data.count
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 视频信息
|
||||||
|
getVideoData() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/video/dramaIdToVideoId",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
drama_id: this.dramaId,
|
||||||
|
no: this.serialNo
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.videoSynopsis = res.data;
|
||||||
|
that.vid = res.data.drama_vid
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//充值方式
|
||||||
|
getPayList() {
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/beans/payList",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
gid: uni.getStorageSync('g_order_id') || '',
|
||||||
|
vs_id: uni.getStorageSync('vs_id_code'),
|
||||||
|
token: this.userInfo.token,
|
||||||
|
video_list_id: this.vid
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if(res.code == 1){
|
||||||
|
this.payListGroupId = uni.getStorageSync('config').pay_tpl;
|
||||||
|
// this.payListGroupId = 2;
|
||||||
|
this.list_pay = res.data
|
||||||
|
}else if(res.code ==50){
|
||||||
|
this.is_check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSelectItemId(item) {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/video/dramaIdToVideoId",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
drama_id: that.dramaId,
|
||||||
|
no: that.serialNo
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.mid = res.data.id;
|
||||||
|
that.selectPayItem(item)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
selectPayItem(item) {
|
||||||
|
let that = this,
|
||||||
|
pms = that.getPlayerManager();
|
||||||
|
this.payItemData = item;
|
||||||
|
let gid = "",
|
||||||
|
gvid = uni.getStorageSync('g_order_vid');
|
||||||
|
if (gvid) {
|
||||||
|
if (gvid == that.vid) {
|
||||||
|
gid = uni.getStorageSync('g_order_id') || ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.system == 'android') {
|
||||||
|
wx.login({
|
||||||
|
success(login) {
|
||||||
|
let upData = {
|
||||||
|
new: 1,
|
||||||
|
id: item.id,
|
||||||
|
pay_type: 5,
|
||||||
|
code: login.code,
|
||||||
|
token: that.userInfo.token,
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
vid: that.mid,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code'),
|
||||||
|
gid: gid,
|
||||||
|
}
|
||||||
|
PAY.pays.serverCreatOrder(upData).then(resa => {
|
||||||
|
PAY.pays.wxAppletAndroidPay(resa.data.data).then(payRes => {
|
||||||
|
let payParam = {
|
||||||
|
status: 'paySuccess',
|
||||||
|
serialNo: that.serialNo,
|
||||||
|
gOrderId: "",
|
||||||
|
vid: that.vid,
|
||||||
|
oid: resa.data.oid
|
||||||
|
}
|
||||||
|
if (that.payItemData.pay_type == 4) {
|
||||||
|
// that.$refs.back_ref.open('center');
|
||||||
|
that.payEnd(payParam)
|
||||||
|
} else {
|
||||||
|
pms.emitCustomEvent('chargeEnd', payParam)
|
||||||
|
}
|
||||||
|
}).catch(payErr => {
|
||||||
|
console.log(payErr)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let upData = {
|
||||||
|
new: 1,
|
||||||
|
id: item.id,
|
||||||
|
sum: 1,
|
||||||
|
buytype: "微信",
|
||||||
|
pricebuy: item.pay_money,
|
||||||
|
token: that.userInfo.token,
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
vid: that.mid,
|
||||||
|
wxlx: "wxxcx",
|
||||||
|
openid: uni.getStorageSync("openid"),
|
||||||
|
gid: gid,
|
||||||
|
};
|
||||||
|
PAY.pays.wxIosCreatOrder(upData).then(resa => {
|
||||||
|
PAY.pays.wxAppletIosPay(resa.data.data).then(payRes => {
|
||||||
|
let payParam = {
|
||||||
|
status: 'paySuccess',
|
||||||
|
serialNo: that.serialNo,
|
||||||
|
gOrderId: "",
|
||||||
|
vid: that.vid,
|
||||||
|
oid: resa.data.oid
|
||||||
|
}
|
||||||
|
if (that.payItemData.pay_type == 4) {
|
||||||
|
// that.$refs.back_ref.open('center');
|
||||||
|
that.payEnd(payParam)
|
||||||
|
} else {
|
||||||
|
pms.emitCustomEvent('chargeEnd', payParam)
|
||||||
|
}
|
||||||
|
}).catch(payErr => {
|
||||||
|
console.log('ios pay err', payErr)
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('creat ios order err', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
payEnd(payParam) {
|
||||||
|
let that = this;
|
||||||
|
console.log("payEnd getOrderId", payParam)
|
||||||
|
console.log(that.vid)
|
||||||
|
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/order/getGroupOrderId",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
vid: that.vid
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log("payEnd getOrderId Success", res)
|
||||||
|
let pms = that.getPlayerManager();
|
||||||
|
payParam.gOrderId = res.data.gid;
|
||||||
|
pms.emitCustomEvent('chargeEnd', payParam)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// wxxcx_xuni(data) {
|
||||||
|
// console.log(data)
|
||||||
|
// let that = this,
|
||||||
|
// pms = that.getPlayerManager();
|
||||||
|
// uni.requestVirtualPayment({
|
||||||
|
// signData: JSON.stringify({
|
||||||
|
// buyQuantity: data.signData.buyQuantity,
|
||||||
|
// currencyType: data.signData.currencyType,
|
||||||
|
// env: data.signData.env,
|
||||||
|
// goodsPrice: data.signData.goodsPrice,
|
||||||
|
// offerId: data.signData.offerId,
|
||||||
|
// outTradeNo: data.signData.outTradeNo,
|
||||||
|
// platform: data.signData.platform,
|
||||||
|
// productId: data.signData.productId,
|
||||||
|
// attach: data.signData.attach,
|
||||||
|
// }),
|
||||||
|
// paySig: data.paySig,
|
||||||
|
// signature: data.signature,
|
||||||
|
// mode: 'short_series_coin',
|
||||||
|
// success(res) {
|
||||||
|
// let payParam = {
|
||||||
|
// status: 'paySuccess',
|
||||||
|
// serialNo: that.serialNo,
|
||||||
|
// gOrderId: "",
|
||||||
|
// vid: that.vid,
|
||||||
|
// oid: data.oid
|
||||||
|
// }
|
||||||
|
// if (that.payItemData.pay_type == 4) {
|
||||||
|
// // that.$refs.back_ref.open('center');
|
||||||
|
// that.payEnd(payParam)
|
||||||
|
// } else {
|
||||||
|
// pms.emitCustomEvent('chargeEnd', payParam)
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// fail({errMsg, errCode}) {
|
||||||
|
// console.log(errMsg, errCode, data.signature)
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// wxxcx(data) {
|
||||||
|
// let that = this,
|
||||||
|
// pms = that.getPlayerManager();
|
||||||
|
// uni.requestPayment({
|
||||||
|
// "provider": 'wxpay',
|
||||||
|
// "appId": data.appId,
|
||||||
|
// "timeStamp": data.timeStamp + '',
|
||||||
|
// "nonceStr": data.nonceStr,
|
||||||
|
// "package": data.package,
|
||||||
|
// "signType": 'MD5',
|
||||||
|
// "paySign": data.sign,
|
||||||
|
// success: function (res1) {
|
||||||
|
// let payParam = {
|
||||||
|
// status: 'paySuccess',
|
||||||
|
// serialNo: that.serialNo,
|
||||||
|
// gOrderId: "",
|
||||||
|
// vid: that.vid,
|
||||||
|
// oid: data.oid
|
||||||
|
// }
|
||||||
|
// if (that.payItemData.pay_type == 4) {
|
||||||
|
// // that.$refs.back_ref.open('center');
|
||||||
|
//
|
||||||
|
// that.payEnd(payParam)
|
||||||
|
// } else {
|
||||||
|
// pms.emitCustomEvent('chargeEnd', payParam)
|
||||||
|
// }
|
||||||
|
// console.log('success:' + JSON.stringify(res1));
|
||||||
|
// },
|
||||||
|
// fail: function (err1) {
|
||||||
|
// console.log('fail:' + JSON.stringify(err1));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
closePup() {
|
||||||
|
// this.$refs.back_ref.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.noRecharge {
|
||||||
|
font-size: 40rpx;
|
||||||
|
line-height: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay_box {
|
||||||
|
width: 750rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 28rpx 28rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header_top {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx 24rpx 12rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vider_juji {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other_recharge {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBox {
|
||||||
|
padding: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarItem {
|
||||||
|
width: 336rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFirst {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarSecond {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/taoc2.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/dingyue_a.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 35rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 0rpx 0rpx 16rpx 0rpx;
|
||||||
|
background: linear-gradient(180deg, #FFFFFF 0%, #FFC833 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .icon {
|
||||||
|
background: linear-gradient(180deg, #FF8F8F 0%, #FF3333 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .icon {
|
||||||
|
background: linear-gradient(90deg, #FFBC48 0%, #FF5D41 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyLine {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 45rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .moneyLine {
|
||||||
|
color: #FF300A;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.money {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .money {
|
||||||
|
color: #FF300A;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .money {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beanBtn {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 48rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background: linear-gradient(180deg, #FFF2D1 0%, #FFC323 100%);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.depict {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 44rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText {
|
||||||
|
margin-top: 26rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceNum {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFCA3A;
|
||||||
|
line-height: 32rpx;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新版
|
||||||
|
.vipCarBoxSecond {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.VipCardContent {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .vipCarItem {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .border {
|
||||||
|
border: 6rpx solid #dc3a35;
|
||||||
|
background: #f6e2af;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: -20rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
border-radius: 0 12rpx 0 12rpx;
|
||||||
|
background: #dc3a35;
|
||||||
|
max-width: 336rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoneyExplain {
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFooter {
|
||||||
|
line-height: 45rpx;
|
||||||
|
background: #dc3a35;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redColor {
|
||||||
|
color: #dc3a35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerRedColor {
|
||||||
|
line-height: 50rpx;
|
||||||
|
background: #fde6e6;
|
||||||
|
color: #dc3a35;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
border-radius: 0 0 12rpx 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hands {
|
||||||
|
position: absolute;
|
||||||
|
right: -10px;
|
||||||
|
bottom: 0rpx;
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
z-index: 300;
|
||||||
|
transform: rotate(-15deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainList {
|
||||||
|
padding: 40rpx 0 20rpx 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
|
||||||
|
.explainItem {
|
||||||
|
font-size: 22rpx;
|
||||||
|
|
||||||
|
.explainText {
|
||||||
|
color: #0a5ab6;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<view style="position: relative;">
|
||||||
|
<view class="sign_conent_box">
|
||||||
|
<view class="sign_conent">
|
||||||
|
<view class="sign_conent_title">
|
||||||
|
<text class="zitiyangshi">你已连续签到</text>
|
||||||
|
<span class="sign_conent_title_span zitiyangshi">{{qdjl}}</span>
|
||||||
|
<text class="zitiyangshi">天</text>
|
||||||
|
</view>
|
||||||
|
<view class="ft12 mt10" style="color: #999;">签到领金豆,新剧抢先看。连续签到7天领惊喜礼包</view>
|
||||||
|
<view class="sign_list_aligns"
|
||||||
|
style="background-color: #fff;padding: 30rpx;margin-top: 48rpx;border-radius: 10rpx;">
|
||||||
|
<scroll-view class="scroll-view_H" scroll-x="true" show-scrollbar='false'>
|
||||||
|
<view class="scroll_view_items" v-for="(item, index) in sign_list" :key="index">
|
||||||
|
<!-- -->
|
||||||
|
<view class="scroll_view_itemsv">
|
||||||
|
<view class="scroll_view_item">
|
||||||
|
<view class="scroll_view_item_img_box">
|
||||||
|
<view v-if="item.xz==2"
|
||||||
|
style="width: 80rpx;height: 104rpx;background: linear-gradient(360deg, #64C700 0%, #85ED1C 100%);text-align: center;border-radius: 8rpx;">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jindou.png"
|
||||||
|
style="width: 54rpx;height: 56rpx;margin-top: 10rpx;"></image>
|
||||||
|
<view
|
||||||
|
style="color: #fff;font-size: 30rpx;position: absolute;top: 56rpx;left: 10rpx;">
|
||||||
|
+{{item.beans}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- <image v-if="item.xz==2" :src="statics.xuanzhong" class="scroll_view_item_img" mode=""></image> -->
|
||||||
|
<!-- <image v-if="item.xz==1" :src="statics.yuanq" class="scroll_view_item_img" mode=""></image> -->
|
||||||
|
<!-- <view v-if="item.xz==1" class="scroll_view_item_top">{{ item.discount }}</view> -->
|
||||||
|
<view v-if="item.xz==1"
|
||||||
|
style="width: 80rpx;height: 104rpx;background-color: #F4F4F4;text-align: center;border-radius: 8rpx;">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jindou.png"
|
||||||
|
style="width: 54rpx;height: 56rpx;margin-top: 10rpx;"></image>
|
||||||
|
<view
|
||||||
|
style="color: #999999;font-size: 30rpx;position: absolute;top: 56rpx;left: 10rpx;">
|
||||||
|
+{{item.beans}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="scroll_view_item_tips" style="margin-top: 60rpx;">{{ item.day }}</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="sign_conent_btn" style="margin-top: 20rpx;" @click="cksigin()">今日签到</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
sign_list: {},
|
||||||
|
qdjl: 0,
|
||||||
|
tdsy: 0,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cksigin() {
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
let this_ = this
|
||||||
|
this_.$httpRequest({
|
||||||
|
url:"/api/user/qingdao",
|
||||||
|
method:"GET",
|
||||||
|
data:{
|
||||||
|
tdsy: this_.tdsy
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: res.msg,
|
||||||
|
showCancel: false,
|
||||||
|
success: modelRes => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this_.$emit('cksigin')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '请先登录',
|
||||||
|
showCancel: true,
|
||||||
|
confirmText: "登录",
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
//uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// @font-face {
|
||||||
|
// font-family: "MyFont";
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
.zitiyangshi {
|
||||||
|
font-family: 'MyFont';
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
|
||||||
|
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||||
|
display: none;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign_conent_box {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 30upx;
|
||||||
|
|
||||||
|
.sign_conent {
|
||||||
|
width: 686upx;
|
||||||
|
// background: white;
|
||||||
|
// border-radius: 20upx;
|
||||||
|
padding: 0upx 0upx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.sign_conent_title {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 36upx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
.sign_conent_title_span {
|
||||||
|
color: #64C700 !important;
|
||||||
|
font-size: 48rpx;
|
||||||
|
margin-left: 12rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign_list_aligns {
|
||||||
|
width: 100%;
|
||||||
|
padding: 30upx 0 30upx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.scroll-view_H {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.scroll_view_items {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_view_itemsv {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_view_item {
|
||||||
|
.scroll_view_item_img_box {
|
||||||
|
width: 100upx;
|
||||||
|
height: 30upx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.scroll_view_item_top {
|
||||||
|
font-size: 24upx;
|
||||||
|
color: #bfbfbf;
|
||||||
|
// font-weight: bold;
|
||||||
|
position: absolute;
|
||||||
|
top: 14upx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_view_item_bottom {
|
||||||
|
font-size: 12upx;
|
||||||
|
color: #ffe29d;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 18upx;
|
||||||
|
left: 42upx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_view_item_tips {
|
||||||
|
width: 60upx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24upx;
|
||||||
|
padding-top: 40upx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_view_item_img {
|
||||||
|
width: 60upx;
|
||||||
|
height: 60upx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll_xian {
|
||||||
|
width: 40upx;
|
||||||
|
height: 4upx;
|
||||||
|
background: #bfbfbf;
|
||||||
|
margin-top: 30upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign_conent_btn {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 45upx;
|
||||||
|
background: linear-gradient(#ACFD28 0%, #0AD89D 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 22upx 0;
|
||||||
|
font-size: 32upx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<swiper class="home-swiper-banner" indicator-color="rgba(255, 255, 255, 0.3)" indicator-active-color="#FFFFFF" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="500">
|
||||||
|
<swiper-item v-for="(item,index) in banners" :key="index" @tap="detail(item.link,0)">
|
||||||
|
<image :src="item.src" mode="aspectFill" style="border-radius: 16rpx"></image>
|
||||||
|
</swiper-item>
|
||||||
|
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
props: ['banners'],
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
banners1:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods:{
|
||||||
|
detail(url,mid) {
|
||||||
|
console.log('ok')
|
||||||
|
console.log(url)
|
||||||
|
var fxpid = 1
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
fxpid = uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/'+url + '?mid=' + mid + '&fxpid=' + fxpid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.home-swiper-banner{
|
||||||
|
height: 350rpx;
|
||||||
|
box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.home-swiper-banner image{
|
||||||
|
width: 100%;
|
||||||
|
height: 350rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- style="margin-bottom: 80upx;" -->
|
||||||
|
<view class="pd16_15">
|
||||||
|
<view class="flex alcenter space" style="margin-bottom: 30upx;">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<image style="width: 28rpx;height: 28rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/star.png"></image>
|
||||||
|
<text class="ft16 ftw600 cl-main ml15">最新热播</text>
|
||||||
|
</view>
|
||||||
|
<navigator url="/pages/client/tuan/search">
|
||||||
|
<view class="ft14 cl-notice">大家都在看的热播好剧</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
<view class="flex " style="overflow-x: auto; flex-wrap: wrap;">
|
||||||
|
<!-- <block v-for="(value,key) in datasa" :key="key">
|
||||||
|
<view class=" pb10 mb15 videoItem" @click="detail(value.id,0)">
|
||||||
|
<image class="integral-mall-goods" mode="scaleToFill" :src="value.img"></image>
|
||||||
|
<view class=" ft14 ftw500 text-over cl-main">{{ value.name }}</view>
|
||||||
|
<view class=" ft10 ftw500 cl-999 text-over cl-main">{{ value.text }}</view>
|
||||||
|
</view>
|
||||||
|
</block> -->
|
||||||
|
|
||||||
|
<block v-for="(value,key) in datasa" :key="key">
|
||||||
|
<view class=" pb10 defaultItem" style="width:207rpx; display: inline-block; border-radius:20rpx;"
|
||||||
|
@click="detail(value)">
|
||||||
|
<image class="integral-mall-goods" mode="scaleToFill" :src="value.img"></image>
|
||||||
|
<view class=" ft14 ftw500 text-over cl-main">{{ value.name }}</view>
|
||||||
|
<view class=" ft10 ftw500 cl-999 text-over cl-main">{{ value.text }}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="home-main" style="height: 50upx;">
|
||||||
|
<com-copyright></com-copyright>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<dialog-couponshareget @loginAct="showLoginCouponShareGet" v-if="showCouponShareGet"
|
||||||
|
@closed="showCouponShareGet = false"></dialog-couponshareget>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ['datasa'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isLogin: false,
|
||||||
|
showBirthday: false,
|
||||||
|
showLogin: false,
|
||||||
|
showQrcode: false,
|
||||||
|
showCouponShareGet: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
// uni.setNavigationBarTitle({
|
||||||
|
// title: '夜趣小视频'
|
||||||
|
// });
|
||||||
|
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.showCouponShareGet = true;
|
||||||
|
// },1000);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//'/pages/client/tuan/detail?id='+value.id
|
||||||
|
detail(data) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/player/detailPlayer?vid=' + data.id + '&mid=' + 0
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showLoginAct() {
|
||||||
|
this.showLogin = true;
|
||||||
|
},
|
||||||
|
showLoginCouponShareGet() {
|
||||||
|
this.showLogin = true;
|
||||||
|
},
|
||||||
|
loginYes() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.home-header {
|
||||||
|
height: 304rpx;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
background: #363B4D;
|
||||||
|
border-radius: 0rpx 0rpx 48rpx 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-main {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -156rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-mendian {
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-l {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoItem {
|
||||||
|
width: 330rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-goods {
|
||||||
|
width: 330rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.integral-mall-goods {
|
||||||
|
min-width: 206rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-r {
|
||||||
|
width: calc(100% - 320rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.defaultItem {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.defaultItem:nth-of-type(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
<template>
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
|
||||||
|
<button v-if="getGridOne!=null && getGridOne.model=='share'" open-type="share" class="grid-left-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridOne.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridOne.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="left-bg" :src="statics.gridLeft"></image>
|
||||||
|
<image class="left-icon" :src="getGridOne.icon"></image>
|
||||||
|
</button>
|
||||||
|
<view v-if="getGridOne!=null && getGridOne.model!='share'" :data-model="getGridOne.model" @click="linkTo" class="grid-left-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridOne.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridOne.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="left-bg" :src="statics.gridLeft"></image>
|
||||||
|
<image class="left-icon" :src="getGridOne.icon"></image>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<button v-if="getGridTwo!=null && getGridTwo.model=='share'" open-type="share" class="grid-right-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridTwo.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridTwo.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="right-bg" :src="statics.gridRight"></image>
|
||||||
|
<image class="right-icon" :src="getGridTwo.icon"></image>
|
||||||
|
</button>
|
||||||
|
<view v-if="getGridTwo!=null && getGridTwo.model!='share'" :data-model="getGridTwo.model" @click="linkTo" class="grid-right-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridTwo.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridTwo.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="right-bg" :src="statics.gridRight"></image>
|
||||||
|
<image class="right-icon" :src="getGridTwo.icon"></image>
|
||||||
|
</view>
|
||||||
|
<view class="mt15">
|
||||||
|
<button v-if="getGridThree!=null && getGridThree.model=='share'" open-type="share" class="grid-right-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridThree.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridThree.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="right-bg" :src="statics.gridRight"></image>
|
||||||
|
<image class="right-icon" :src="getGridThree.icon"></image>
|
||||||
|
</button>
|
||||||
|
<view v-if="getGridThree!=null && getGridThree.model!='share'" :data-model="getGridThree.model" @click="linkTo" class="grid-right-box">
|
||||||
|
<view class="main pd16_15">
|
||||||
|
<view class="ft16 ftw600 cl-default">{{getGridThree.name}}</view>
|
||||||
|
<view class="mt4 ft12" :style="{color:tempColor}">{{getGridThree.desc}}</view>
|
||||||
|
<view class="btn-go" :style="{background:tempColor}">GO<text class="iconfont iconicon_arrow_small ft12"></text></view>
|
||||||
|
</view>
|
||||||
|
<image class="right-bg" :src="statics.gridRight"></image>
|
||||||
|
<image class="right-icon" :src="getGridThree.icon"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
gridData:[
|
||||||
|
{name:'VIP特惠',desc:'尊享会员折上折',model:'tuan',icon:this.$config.staticUrl +'vipcard_home_tehui@2x.png',show:1},
|
||||||
|
{name:'领优惠券',desc:'领券更省钱',model:'coupon',icon:this.$config.staticUrl +'vipcard_home_coupon@2x.png',show:1},
|
||||||
|
{name:'邀请好友',desc:'越邀请,越优惠',model:'share',icon:this.$config.staticUrl +'vipcard_home_invite@2x.png',show:0},
|
||||||
|
{name:'积分商城',desc:'小积分兑豪礼',model:'integral',icon:this.$config.staticUrl +'vipcard_home_integralmall@2x.png',show:1},
|
||||||
|
{name:'开通次卡',desc:'省钱升级必备',model:'card',icon:this.$config.staticUrl +'vipcard_home_cika@2x.png',show:0},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
getGridDatas(){
|
||||||
|
let arr = new Array;
|
||||||
|
for(var a in this.gridData){
|
||||||
|
if(this.gridData[a].show == 1){
|
||||||
|
arr.push(this.gridData[a]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
},
|
||||||
|
getGridOne(){
|
||||||
|
return this.getGridDatas[0] ? this.getGridDatas[0] : null;
|
||||||
|
},
|
||||||
|
getGridTwo(){
|
||||||
|
return this.getGridDatas[1] ? this.getGridDatas[1] : null;
|
||||||
|
},
|
||||||
|
getGridThree(){
|
||||||
|
return this.getGridDatas[2] ? this.getGridDatas[2] : null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
linkTo(e){
|
||||||
|
let model = e.currentTarget.dataset.model;
|
||||||
|
let url = '';
|
||||||
|
switch(model){
|
||||||
|
case 'coupon':
|
||||||
|
url = '/pages/client/coupon/index';
|
||||||
|
break;
|
||||||
|
case 'integral':
|
||||||
|
url = '/pages/client/integral/index';
|
||||||
|
break;
|
||||||
|
case 'card':
|
||||||
|
url = '/pages/client/card/index';
|
||||||
|
break;
|
||||||
|
case 'tuan':
|
||||||
|
url = '/pages/client/tuan/index';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(url == '') return;
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.grid-left-box{
|
||||||
|
width: 330rpx;
|
||||||
|
height: 430rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
|
||||||
|
border-radius: 32rpx;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.grid-right-box{
|
||||||
|
width: 330rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
|
||||||
|
border-radius: 32rpx;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.grid-left-box .main,.grid-right-box .main{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
.grid-left-box .left-bg{
|
||||||
|
width: 100%;
|
||||||
|
height: 140rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.grid-left-box .left-icon{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.grid-right-box .right-icon{
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.grid-right-box .right-bg{
|
||||||
|
width: 100%;
|
||||||
|
height: 74rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.btn-go{
|
||||||
|
display: block;
|
||||||
|
width: 92rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-style:italic;
|
||||||
|
}
|
||||||
|
.btn-go text{
|
||||||
|
font-weight: 400;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="pd16_15" style="margin-bottom: 80upx;">
|
||||||
|
<view class="" style="">
|
||||||
|
<block v-for="(value,key) in datasa" :key="key">
|
||||||
|
<view @click="detail(value.id,0)" style="" class="flex alcenter mb16 showStyle">
|
||||||
|
<image mode="aspectFill" class="tuan-product-l" :src="value.img"></image>
|
||||||
|
<!-- <view class="btn-mini" style="position: absolute; top: 40upx; left: 280upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
||||||
|
<view class="tuan-product-r pl15">
|
||||||
|
<view class="ft16 ftw600 cl-main text-over1">{{value.name}}</view>
|
||||||
|
<view class="mt5">
|
||||||
|
<text class="ft14 cl-main text-over4" style="line-height: 50upx;">{{value.story}}</text>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="mt16 flex space alcenter">
|
||||||
|
<view class="ft14 cl-notice">{{value.mname}}</view>
|
||||||
|
<view class="btn-vip-adviser ml15">继续观看</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="home-main" style="height: 50upx;">
|
||||||
|
<!-- <com-copyright></com-copyright> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <dialog-couponshareget @loginAct="showLoginCouponShareGet" v-if="showCouponShareGet" @closed="showCouponShareGet = false"></dialog-couponshareget>-->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
props: ['datasa'],
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
isLogin:false,
|
||||||
|
showBirthday:false,
|
||||||
|
showLogin:false,
|
||||||
|
showQrcode:false,
|
||||||
|
showCouponShareGet:false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created(){
|
||||||
|
|
||||||
|
// uni.setNavigationBarTitle({
|
||||||
|
// title: '夜趣小视频'
|
||||||
|
// });
|
||||||
|
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.showCouponShareGet = true;
|
||||||
|
// },1000);
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
//'/pages/client/tuan/detail?id='+value.id
|
||||||
|
detail(vid,mid){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/client/tuan/detail?vid='+vid+'&mid='+mid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showLoginAct(){
|
||||||
|
this.showLogin = true;
|
||||||
|
},
|
||||||
|
showLoginCouponShareGet(){
|
||||||
|
this.showLogin = true;
|
||||||
|
},
|
||||||
|
loginYes(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.showStyle::before{
|
||||||
|
content:'';
|
||||||
|
position:'absolute';
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(31, 33, 41, 0.4);
|
||||||
|
z-index:-1;
|
||||||
|
backdrop-filter:blur(80px);
|
||||||
|
}
|
||||||
|
.showStyle{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.home-header{
|
||||||
|
height: 304rpx;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
background: #363B4D;
|
||||||
|
border-radius: 0rpx 0rpx 48rpx 48rpx;
|
||||||
|
}
|
||||||
|
.home-main{
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -156rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.home-mendian{
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background:rgba(255,255,255,0.1);
|
||||||
|
border-radius: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-l{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 260rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
.tuan-product-r{
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
height:260rpx;
|
||||||
|
}
|
||||||
|
.btn-vip-adviser{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
/* font-weight: 600; */
|
||||||
|
background: #FF6600;
|
||||||
|
color:#FFFFFF;
|
||||||
|
}
|
||||||
|
.integral-mall-goods{
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view v-if="userinfo.isLogin" class="box pd16_15">
|
||||||
|
<navigator url="/pages/client/vipcard/index">
|
||||||
|
<view class="home-vip-tag-box">
|
||||||
|
<image class="bg" v-if="userinfo.group_id == 1" :src="statics.vipbg"></image>
|
||||||
|
<image class="bg" v-else :src="statics.vipBgHas"></image>
|
||||||
|
<view v-if="userinfo.group_id == 1" class="main plr15 flex alcenter space">
|
||||||
|
<view class="tag-no-vip">普通用户</view>
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="ft12 cl-default mr15 ftw500">升级VIP,省更多钱</text>
|
||||||
|
<image class="right-icon" :src="statics.rightIcon"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-else class="main plr15 flex alcenter space">
|
||||||
|
<view class="tag-has-vip flex alcenter center">
|
||||||
|
<image class="vip-level-icon" :src="statics.vipLevelImg[0]"></image>
|
||||||
|
<text class="vip-level-means">VIP会员</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<view v-if="userinfo.dqts<0" class="ft12 cl-default mr15 ftw500">您好!尊敬的VIP<br>您的会员已经到期{{-userinfo.dqts}}天</view>
|
||||||
|
<view v-if="userinfo.dqts>=0" class="ft12 cl-default mr15 ftw500">您好!尊敬的VIP<br>您的会员{{userinfo.dqts}}天后到期</view>
|
||||||
|
<image class="right-icon" :src="statics.rightIcon"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</navigator>
|
||||||
|
<view class="mt24 flex space">
|
||||||
|
<view class="col3 text-center">
|
||||||
|
<navigator url="/pages/client/vipcard/moneylog">
|
||||||
|
<view class="cl-notice ft12">余额</view>
|
||||||
|
<view class="mt8 ft20 ftw600 cl-default">{{userinfo.money}}</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="col3 text-center" style="display: none;">
|
||||||
|
<!-- <navigator url="/pages/client/coupon/mine/index"> -->
|
||||||
|
<view class="cl-notice ft12">优惠券</view>
|
||||||
|
<view class="mt8 ft20 ftw600 cl-default">0</view>
|
||||||
|
<!-- </navigator> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="col3 text-center">
|
||||||
|
<navigator url="/pages/client/vipcard/integrallog">
|
||||||
|
<view class="cl-notice ft12">积分</view>
|
||||||
|
<view class="mt8 ft20 ftw600 cl-default">{{userinfo.score}}</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex space alcenter mt24" style="padding-bottom: 16rpx;">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<navigator url="/pages/client/vipcard/recharge">
|
||||||
|
<view class="btn-vip-money" :style="getBtnStyle">充值</view>
|
||||||
|
</navigator>
|
||||||
|
<navigator v-if="userinfo.zstx>0" url="/pages/client/member/tx">
|
||||||
|
<view class="btn-vip-adviser ml15" :style="getBtnPlanStyle">提现</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<view @click="showQrcodeAct" v-if="userinfo.config.iskq==1" class="vip-qrcode-tag" :style="getBtnStyle">
|
||||||
|
<!-- <text class="iconfont iconbtn_card_ma-copy ft20 cl-w"></text> -->
|
||||||
|
<image style="width: 50upx; height: 50upx;" src="/static/share-fill.png"></image>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef MP-WEIXIN -->
|
||||||
|
<view @click="wdfxm" v-if="userinfo.config.iskq==1" class="vip-qrcode-tag" :style="getBtnStyle">
|
||||||
|
<text class="iconfont iconbtn_card_ma-copy ft20 cl-w"></text>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="box pd24_15">
|
||||||
|
<view class="text-center ft14 cl-info2">您还没登录,登录后即可体验VIP会员</view>
|
||||||
|
<view class="flex center mt24">
|
||||||
|
<button class="btn-mid" @click="loginAct" :style="getBtnStyle">立即登录</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
props: ['userinfo'],
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
isLogin:true,
|
||||||
|
vipLevel:0,//普通用户
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
loginAct(){
|
||||||
|
this.$emit('loginAct');
|
||||||
|
},
|
||||||
|
showQrcodeAct(){
|
||||||
|
this.$emit('qrcode');
|
||||||
|
},
|
||||||
|
wdfxm(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/client/member/qrshare'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.home-vip-tag-box{
|
||||||
|
height: 100rpx;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
.home-vip-tag-box .main{
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.home-vip-tag-box .bg{
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
.tag-no-vip{
|
||||||
|
width: 128rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color:#8A8D99;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.tag-has-vip{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background: linear-gradient(180deg, #333333 0%, #000000 100%);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.tag-has-vip .vip-level-icon{
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
}
|
||||||
|
.tag-has-vip .vip-level-means{
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
background: linear-gradient(180deg, #F2DCA9 0%, #C79556 100%);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
.home-vip-tag-box .main .right-icon{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.vip-qrcode-tag{
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.btn-vip-money,.btn-vip-adviser{
|
||||||
|
width: 208rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color:#FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup type="center" ref="redeemVip">
|
||||||
|
<view class="vipBox">
|
||||||
|
<view class="vipTitle">VIP激活</view>
|
||||||
|
<view class="vipContent">
|
||||||
|
<input type="text" class="ipt" placeholder="请输入卡密" v-model="vipCode">
|
||||||
|
<!-- <input type="text" class="ipt" placeholder="请输入密码" v-model="vipPass">-->
|
||||||
|
</view>
|
||||||
|
<view class="vipFooter">
|
||||||
|
<view class="vipConfirmBtn footerBtn" @click="submitCard">确定</view>
|
||||||
|
<view class="vipCancelBtn footerBtn" @click="closeRedeem">取消</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "depositPup",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
vipCode: '',
|
||||||
|
vipPass: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitCard(){
|
||||||
|
let that = this;
|
||||||
|
uni.request({
|
||||||
|
url: that.configs.webUrl + '/api/Cryptocard/exchangeCard',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
dense: this.vipCode,
|
||||||
|
vipPass: this.vipPass
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
if(res.data.code == 1){
|
||||||
|
this.$emit('redeemVip',res.data.data)
|
||||||
|
this.closeRedeem()
|
||||||
|
}else{
|
||||||
|
uni.showToast()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
showRedeem() {
|
||||||
|
this.$refs.redeemVip.open('center')
|
||||||
|
},
|
||||||
|
closeRedeem() {
|
||||||
|
this.$refs.redeemVip.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
.vipBox{
|
||||||
|
width: 600rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
|
.vipTitle{
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.vipContent{
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.ipt{
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
padding-left: 15rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border: 1rpx solid #eeeeee;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.vipFooter{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content:space-around;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
margin: 0 30rpx;
|
||||||
|
}
|
||||||
|
.footerBtn{
|
||||||
|
width: 200rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.vipConfirmBtn{
|
||||||
|
background-color: #00C657;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.vipCancelBtn{
|
||||||
|
background-color: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,401 @@
|
|||||||
|
<template>
|
||||||
|
<view class="compontents">
|
||||||
|
<uni-popup ref="choiceNumPup" type="bottom" :safe-area="fales">
|
||||||
|
<view class="choiceNumPupConts" v-if="selectType=='1'">
|
||||||
|
<view class="firstSelectHeader">
|
||||||
|
<text> 当前播放第{{ playVideoInfo.weigh }}个视频</text>
|
||||||
|
<uni-icons type="down" size="20" color="#999999" @click="hideChoicePup"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y class="videoScroll">
|
||||||
|
<view class="firstList">
|
||||||
|
<view class="firstItem" v-for="videos in videoListData" :key="videos.id" @click="clickItem(videos)">
|
||||||
|
<image class="videoCover" :src="videos.img" mode="widthFix"></image>
|
||||||
|
<view class="videoCont">
|
||||||
|
<text class="videoNum">{{ videos.name }}</text>
|
||||||
|
<view class="videoNameBox">
|
||||||
|
<text class="videoName"> {{ videos.title }}</text>
|
||||||
|
<image class="lock" v-if="videos.pays=='1'" mode="scaleToFill" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/2.png"></image>
|
||||||
|
</view>
|
||||||
|
<text class="videoInfo"> {{ videos.msg }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<view class="choiceNumPupConts" v-if="selectType=='2'">
|
||||||
|
<view class="choiceTItle">
|
||||||
|
<text class="videoName">{{ videoInfo.name }}
|
||||||
|
<!-- <text class="videoNameSecond">更新至({{ videoInfo.sum }})</text> -->
|
||||||
|
</text>
|
||||||
|
<view class="schoiceClose" @click="hideChoicePup">
|
||||||
|
<uni-icons type="closeempty" size="20" color="#999999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-x="true" class="pageLine">
|
||||||
|
<text :class="['pageItem',{'pageItemCheck': index+1 == page.currentPage}]"
|
||||||
|
v-for="(item,index) in pageList" :key="index" @click="changePage(index)"
|
||||||
|
>{{ item }}
|
||||||
|
</text>
|
||||||
|
</scroll-view>
|
||||||
|
<scroll-view scroll-y class="choiceScroll">
|
||||||
|
<view class="videoList">
|
||||||
|
<view :class="['videoItem',{'videoItemCheck': videos.playing}]" @click="clickItem(videos)"
|
||||||
|
v-for="videos in videoListData" :key="videos.id">
|
||||||
|
<view class="tag" v-if="videos.pays==1">
|
||||||
|
<image class="lock" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/white_lock_icon.png" mode="scaleToFill"></image>
|
||||||
|
</view>
|
||||||
|
<image v-if="videos.playing && videos.pays==2" class="playGif" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/player.gif"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<text v-else class="videoNumber">{{ videos.numText }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {httpRequest} from "@/utils/request";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
playVideoInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: ()=>{
|
||||||
|
return new Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
videoInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: ()=>{
|
||||||
|
return new Object
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
videoListData: [],
|
||||||
|
pageList: [],
|
||||||
|
videoDel: {},
|
||||||
|
userInfo: {},
|
||||||
|
page: {
|
||||||
|
pageSize: 25,
|
||||||
|
currentPage: 1,
|
||||||
|
allPage: 1,
|
||||||
|
totalNum: 0
|
||||||
|
},
|
||||||
|
selectType: '2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.userInfo = uni.getStorageSync('userinfo');
|
||||||
|
// this.videoDel = Object.assign({},{},this.videoInfo);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickItem(item) {
|
||||||
|
this.$emit('choiceVideoItem', item)
|
||||||
|
this.hideChoicePup()
|
||||||
|
},
|
||||||
|
showChoicePup() {
|
||||||
|
this.getVideoList();
|
||||||
|
this.$refs.choiceNumPup.open()
|
||||||
|
},
|
||||||
|
hideChoicePup() {
|
||||||
|
this.$refs.choiceNumPup.close()
|
||||||
|
},
|
||||||
|
creatFirstPaging(ResData) {
|
||||||
|
let that = this;
|
||||||
|
ResData.data.forEach((item, index) => {
|
||||||
|
item.ranking_num = Number(index);
|
||||||
|
})
|
||||||
|
if (that.page.currentPage == 1) {
|
||||||
|
that.page.totalNum = ResData.total;
|
||||||
|
that.videoListData = ResData.data
|
||||||
|
} else {
|
||||||
|
that.videoListData = that.videoListData.concat(ResData.data)
|
||||||
|
}
|
||||||
|
that.page.currentPage += 1;
|
||||||
|
},
|
||||||
|
|
||||||
|
creatSecondPaging(ResData) {
|
||||||
|
let that = this;
|
||||||
|
ResData.data.forEach((item, index) => {
|
||||||
|
item.ranking_num = (that.page.currentPage - 1) * that.page.pageSize + index;
|
||||||
|
item.numText = (that.page.currentPage - 1) * that.page.pageSize + index + 1;
|
||||||
|
if (item.id == that.playVideoInfo.id) {
|
||||||
|
item.playing = true;
|
||||||
|
} else {
|
||||||
|
item.playing = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.videoListData = ResData.data;
|
||||||
|
that.page.totalNum = ResData.total;
|
||||||
|
if (that.page.currentPage == 1) {
|
||||||
|
that.videoDel = ResData.videodata;
|
||||||
|
let pageItemLength = Math.ceil(Number(ResData.total) / that.page.pageSize),
|
||||||
|
listData = [];
|
||||||
|
for (let i = 1; i <= pageItemLength; i++) {
|
||||||
|
if (i == 1) {
|
||||||
|
listData.push(`${i} - ${that.page.pageSize}`)
|
||||||
|
} else {
|
||||||
|
if (i == pageItemLength) {
|
||||||
|
listData.push(`${(i - 1) * that.page.pageSize + 1} - ${ResData.total}`)
|
||||||
|
} else {
|
||||||
|
listData.push(`${(i - 1) * that.page.pageSize + 1} - ${i * that.page.pageSize}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.pageList = listData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getVideoList() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: "/api/video/videoinfo",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
token: that.userInfo.token,
|
||||||
|
page: that.page.currentPage,
|
||||||
|
limit: that.page.pageSize,
|
||||||
|
vid: that.videoInfo.id,
|
||||||
|
vs_id: ""
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
if (that.selectType == '1') {
|
||||||
|
that.creatFirstPaging(res)
|
||||||
|
} else {
|
||||||
|
that.creatSecondPaging(res)
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changePage(val) {
|
||||||
|
console.log(val)
|
||||||
|
if (val + 1 != this.page.currentPage) {
|
||||||
|
this.page.currentPage = val + 1;
|
||||||
|
this.getVideoList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.choiceNumPupConts {
|
||||||
|
width: 750rpx;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
padding: 36rpx 40rpx 0 40rpx;
|
||||||
|
background-color: #212122;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firstSelectHeader {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
}
|
||||||
|
.videoScroll{
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
.firstList{
|
||||||
|
padding-top: 40rpx;
|
||||||
|
}
|
||||||
|
.firstItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.videoCover {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.videoCont{
|
||||||
|
padding-left: 15rpx;
|
||||||
|
.videoNum{
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.lock {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
.videoNameBox{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoInfo {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.choiceTItle {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoNameSecond {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.36);
|
||||||
|
padding-left: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schoiceClose {
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageLine {
|
||||||
|
|
||||||
|
/* #ifdef MP-TOUTIAO || MP-WEIXIN || H5 */
|
||||||
|
display: block;
|
||||||
|
min-width: 100%;
|
||||||
|
width: auto;
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
/* #ifdef APP */
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding-left: 40rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-x: auto;
|
||||||
|
height: 60rpx;
|
||||||
|
|
||||||
|
.pageItem {
|
||||||
|
/* #ifdef MP-TOUTIAO || MP-WEIXIN || H5 */
|
||||||
|
display: inline-block;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
width: 140rpx;
|
||||||
|
/* #endif */
|
||||||
|
padding: 0 26rpx;
|
||||||
|
line-height: 48rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.36);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageItemCheck {
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
color: #09D89E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageItemCheck::before {
|
||||||
|
content: ' ';
|
||||||
|
width: 40rpx;
|
||||||
|
height: 4px;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
background: #09D89E;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10rpx;
|
||||||
|
left: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceScroll {
|
||||||
|
|
||||||
|
height: 600rpx;
|
||||||
|
padding-top: 40rpx;
|
||||||
|
|
||||||
|
.videoList {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: left;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoItem {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background: #404040;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
background: #09D89E;
|
||||||
|
width: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 0rpx 12rpx 0rpx 12rpx;
|
||||||
|
|
||||||
|
.lock {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoNumber {
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoItemCheck {
|
||||||
|
width: calc(20% - 24rpx);
|
||||||
|
height: 96rpx;
|
||||||
|
border: 2rpx solid #404040;
|
||||||
|
background: #121212;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.playGif {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<script>
|
||||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||||
|
CSS.supports('top: constant(a)'))
|
||||||
|
document.write(
|
||||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||||
|
</script>
|
||||||
|
<title></title>
|
||||||
|
<!--preload-links-->
|
||||||
|
<!--app-context-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"><!--app-html--></div>
|
||||||
|
<script type="module" src="/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App'
|
||||||
|
import {httpRequest} from "./utils/request.js"
|
||||||
|
|
||||||
|
Vue.prototype.$httpRequest = httpRequest;
|
||||||
|
|
||||||
|
import config from "@/utils/config";
|
||||||
|
Vue.prototype.$config = config;
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
|
App.mpType = 'app'
|
||||||
|
|
||||||
|
const app = new Vue({
|
||||||
|
...App
|
||||||
|
})
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import chargeDialog from 'components/charge-dialog/charge-dialog.vue'
|
||||||
|
Vue.component("charge-dialog", chargeDialog);
|
||||||
|
// #endif
|
||||||
|
app.$mount()
|
||||||
|
|
||||||
|
// #ifdef VUE3
|
||||||
|
import { createSSRApp } from 'vue'
|
||||||
|
export function createApp() {
|
||||||
|
const app = createSSRApp(App)
|
||||||
|
return {
|
||||||
|
app
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"name" : "吆喝",
|
||||||
|
"appid" : "__UNI__1235802",
|
||||||
|
"description" : "",
|
||||||
|
"versionName" : "1.0.0",
|
||||||
|
"versionCode" : "100",
|
||||||
|
"transformPx" : false,
|
||||||
|
/* 5+App特有相关 */
|
||||||
|
"app-plus" : {
|
||||||
|
"usingComponents" : true,
|
||||||
|
"nvueStyleCompiler" : "uni-app",
|
||||||
|
"compilerVersion" : 3,
|
||||||
|
"splashscreen" : {
|
||||||
|
"alwaysShowBeforeRender" : true,
|
||||||
|
"waiting" : true,
|
||||||
|
"autoclose" : true,
|
||||||
|
"delay" : 0
|
||||||
|
},
|
||||||
|
/* 模块配置 */
|
||||||
|
"modules" : {
|
||||||
|
"OAuth" : {}
|
||||||
|
},
|
||||||
|
/* 应用发布信息 */
|
||||||
|
"distribute" : {
|
||||||
|
/* android打包配置 */
|
||||||
|
"android" : {
|
||||||
|
"permissions" : [
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
|
],
|
||||||
|
"minSdkVersion" : ""
|
||||||
|
},
|
||||||
|
/* ios打包配置 */
|
||||||
|
"ios" : {},
|
||||||
|
/* SDK配置 */
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"oauth" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wx0663114d527513ac",
|
||||||
|
"UniversalLinks" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 快应用特有相关 */
|
||||||
|
"quickapp" : {},
|
||||||
|
/* 小程序特有相关 */
|
||||||
|
"mp-weixin" : {
|
||||||
|
"appid" : "wx6de5fc276420b278",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false,
|
||||||
|
"postcss" : true,
|
||||||
|
"minified" : true,
|
||||||
|
"es6" : true
|
||||||
|
},
|
||||||
|
"optimization" : {
|
||||||
|
"subPackages" : true
|
||||||
|
},
|
||||||
|
"usingComponents" : true,
|
||||||
|
"requiredBackgroundModes" : [ "audio" ],
|
||||||
|
"permission" : {},
|
||||||
|
"plugins" : {
|
||||||
|
"playlet-plugin" : {
|
||||||
|
"version" : "latest",
|
||||||
|
"provider" : "wx94a6522b1d640c3b",
|
||||||
|
"genericsImplementation" : {
|
||||||
|
"playlet" : {
|
||||||
|
"charge-dialog" : "/components/charge-dialog/charge-dialog"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"h5" : {
|
||||||
|
"devServer" : {
|
||||||
|
"disableHostCheck" : true,
|
||||||
|
"proxy" : {
|
||||||
|
"/api" : {
|
||||||
|
"target" : "https://wx.yaohe.hnjrdzkj.xyz/",
|
||||||
|
//数据请求的接口网址
|
||||||
|
"changeOrigin" : true,
|
||||||
|
//是否开启跨域
|
||||||
|
"pathRewrite" : {
|
||||||
|
"^/api" : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"router" : {
|
||||||
|
"base" : "/h5/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mp-alipay" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-baidu" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-toutiao" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : false
|
||||||
|
},
|
||||||
|
"vueVersion" : "2"
|
||||||
|
}
|
||||||
@@ -0,0 +1,340 @@
|
|||||||
|
{
|
||||||
|
"pages": [
|
||||||
|
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
|
{
|
||||||
|
"path": "pages/tabs/home",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationBarBackgroundColor": "#000000",
|
||||||
|
"navigationBarTextStyle": "black",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/tabs/recommend",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"usingComponents": {
|
||||||
|
"drama-feed-list": "plugin://playlet-plugin/drama-feed-list"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/tabs/bingeWatch",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "追剧",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/tabs/my",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/client/tuan/detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/client/tuan/search",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "搜索",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"subpackages": [{
|
||||||
|
"root": "pagesA",
|
||||||
|
"pages": [{
|
||||||
|
"path": "player/detailPlayer",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agreement/agreement",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "协议",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/recharge",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/wallet/bill",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "金豆明细",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/wallet/earning",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/watchHistory",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "观看历史",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/bingeWatch",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的追剧",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/myLike",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的喜欢",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "servers/callServer",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "联系客服",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "servers/servesQR",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "客服二维码",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/settings/set",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "编辑资料",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/settings/userName",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "修改昵称",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/settings/mobile",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "修改手机号",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/register",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "注册",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/forget",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "找回密码",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "player/ranking",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "player/free",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "player/news",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "myCenter/wallet/webPay",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/integralShop",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/Exclusive",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/ItemDetails",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/commodityOrder",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/completeorder",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/address",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "地址管理",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/pointsdetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/Order",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "integral/newaddress",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#F7F8F9"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "VIP/VIP",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
"globalStyle": {
|
||||||
|
"navigationBarTextStyle": "black",
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"backgroundColor": "#F5F6FA"
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"color": "#B3BBBF",
|
||||||
|
"selectedColor": "#333333",
|
||||||
|
"borderStyle": "black",
|
||||||
|
"backgroundColor": "#ffffff",
|
||||||
|
"list": [
|
||||||
|
// {
|
||||||
|
// "pagePath": "pages/client/video",
|
||||||
|
// "iconPath": "static/tabImg/yzy_sc.png",
|
||||||
|
// "selectedIconPath": "static/tabImg/yzy_scs.png",
|
||||||
|
// "text": "视频"
|
||||||
|
// },
|
||||||
|
|
||||||
|
// {
|
||||||
|
// "pagePath": "pages/client/video/video",
|
||||||
|
// "iconPath": "static/tabImg/yzy_sc.png",
|
||||||
|
// "selectedIconPath": "static/tabImg/yzy_scs.png",
|
||||||
|
// "text": "追剧"
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
"pagePath": "pages/tabs/home",
|
||||||
|
"iconPath": "static/tabbar/home.png",
|
||||||
|
"selectedIconPath": "static/tabbar/home_active.png",
|
||||||
|
"text": "小剧场"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/tabs/recommend",
|
||||||
|
"iconPath": "static/tabbar/message.png",
|
||||||
|
"selectedIconPath": "static/tabbar/message_active.png",
|
||||||
|
"text": "推荐"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/tabs/bingeWatch",
|
||||||
|
"iconPath": "static/tabbar/history.png",
|
||||||
|
"selectedIconPath": "static/tabbar/history_active.png",
|
||||||
|
"text": "追剧"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/tabs/my",
|
||||||
|
"iconPath": "static/tabbar/my.png",
|
||||||
|
"selectedIconPath": "static/tabbar/my_active.png",
|
||||||
|
"text": "我的"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"easycom": {
|
||||||
|
"autoscan": true,
|
||||||
|
"custom": {
|
||||||
|
// "com-(.*)": "@/components/common/$1.vue",
|
||||||
|
// "show-(.*)": "@/components/show/$1.vue",
|
||||||
|
// "countdown-(.*)": "@/components/countdown/$1.vue",
|
||||||
|
// "sub-(.*)": "@/components/sub/$1.vue",
|
||||||
|
// "dialog-(.*)": "@/components/dialog/$1.vue",
|
||||||
|
// "select-(.*)": "@/components/select/$1.vue",
|
||||||
|
"home-(.*)": "@/components/home/$1.vue"
|
||||||
|
// "order-(.*)": "@/pages/client/components/order/$1.vue"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pages">
|
||||||
|
<!--<view>此页面用于兼容老项目 后期会删除</view>-->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import login from "@/utils/login";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: {}
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log('detail page data')
|
||||||
|
console.log(e);
|
||||||
|
let userInfo = uni.getStorageSync("userinfo");
|
||||||
|
if (userInfo.id) {
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e)
|
||||||
|
} else {
|
||||||
|
this.goPlayer(e)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
login.wxLogin().then(res => {
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e)
|
||||||
|
} else {
|
||||||
|
this.goPlayer(e)
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
bindUser(data) {
|
||||||
|
let that = this;
|
||||||
|
let upData = {
|
||||||
|
ad_id: data.code || '',
|
||||||
|
advertiser_id: data.advertiser_id || '',
|
||||||
|
clue_id: data.clue_id || '',
|
||||||
|
clue_token: data.clue_token || '',
|
||||||
|
click_id: data.clickid || '',
|
||||||
|
vid: data.vid || '',
|
||||||
|
mid: data.mid || '',
|
||||||
|
type: data.inventory || '',
|
||||||
|
vs_id: data.vs_id || '',
|
||||||
|
}
|
||||||
|
console.log('bind user data')
|
||||||
|
console.log(upData)
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/user/callbackBinding',
|
||||||
|
data: upData,
|
||||||
|
methods: "GET",
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res => {
|
||||||
|
uni.setStorageSync('get_ad_code', res.data.code);
|
||||||
|
that.getVideoNum(data)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getVideoNum(data){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/getPushDataInfo',
|
||||||
|
data: {
|
||||||
|
vs_id: data.vs_id || '',
|
||||||
|
},
|
||||||
|
methods: "GET",
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res => {
|
||||||
|
data.num = res.data.weigh?res.data.weigh: 0
|
||||||
|
that.goPlayer(data)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
goPlayer(e) {
|
||||||
|
let freeData = '';
|
||||||
|
if (e.start_free) {
|
||||||
|
freeData = `&start_free=${e.start_free}&end_free=${e.end_free}`
|
||||||
|
}
|
||||||
|
let link = `vid= ${e.vid}&mid=${e.mid}&fxpid=${e.fxpid}&num=${e.num}${freeData}`
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pagesA/player/detailPlayer?'+link,
|
||||||
|
success: (res)=>{
|
||||||
|
console.log(res)
|
||||||
|
},fail:(err)=>{
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- <sub-tabnav :tabs="tabs" @change="changeIndex" :selectIndex="selectIndex" :scrollTop="scrollTop"></sub-tabnav> -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<view class="searchBox">
|
||||||
|
<uni-search-bar @confirm="search"
|
||||||
|
:focus="false"
|
||||||
|
placeholder="请输入搜索内容"
|
||||||
|
v-model="searchValue"
|
||||||
|
@focus="focus"
|
||||||
|
@cancel="cancel">
|
||||||
|
</uni-search-bar>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<view class="bannerBox">
|
||||||
|
<home-banner :banners="banners"></home-banner>
|
||||||
|
</view>
|
||||||
|
<view class="flex space videoList">
|
||||||
|
<block v-for="(value,key) in listData" :key="key">
|
||||||
|
<view class="box pb10 mb15" style="width:47%; border-radius:20rpx;" @click="detail(value.id,0)">
|
||||||
|
<image class="integral-mall-goods" mode="aspectFill" :src="value.img"></image>
|
||||||
|
<view class="mt8 plr10 ft14 ftw400 text-center text-over cl-main">{{ value.name }}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status"/>
|
||||||
|
<view style="width: 100%; height: 30upx;"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
banners: [],
|
||||||
|
isLogin: true,
|
||||||
|
showLogin: false,
|
||||||
|
datasa: [],
|
||||||
|
dataconfig: [],
|
||||||
|
searchValue: '',
|
||||||
|
pages:{
|
||||||
|
currentPage:1,
|
||||||
|
pageSize: 20,
|
||||||
|
isNextPage: true,
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
|
||||||
|
type: '',
|
||||||
|
keytext: '',
|
||||||
|
listData: [],
|
||||||
|
last_id: 0,
|
||||||
|
reload: true,
|
||||||
|
status: 'more',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
//console.log(111)
|
||||||
|
if (e.selectIndex) {
|
||||||
|
this.selectIndex = e.selectIndex
|
||||||
|
}
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
this.banners = uni.getStorageSync("config").banner
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.scrollTop = e.scrollTop;
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
//监听搜索框文本变化
|
||||||
|
onNavigationBarSearchInputChanged(e) {
|
||||||
|
let text = e.text;
|
||||||
|
if (text) {
|
||||||
|
this.keytext = text;
|
||||||
|
}
|
||||||
|
console.log(text)
|
||||||
|
},
|
||||||
|
//监听点击搜索按钮事件
|
||||||
|
onNavigationBarSearchInputConfirmed(e) {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.key.hideSoftKeybord();
|
||||||
|
// #endif
|
||||||
|
var this_ = this
|
||||||
|
let text = e.text;
|
||||||
|
if (!text) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: "请输入搜索内容",
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: "确定",
|
||||||
|
confirmColor: "#e19503",
|
||||||
|
success: function (res) {
|
||||||
|
this_.keytext = '';
|
||||||
|
this_.getList(0)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.keytext = text;
|
||||||
|
this.listData = [];
|
||||||
|
this.pages.currentPage = 1;
|
||||||
|
this.pages.isNextPage = true;
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
detail(vid, mid) {
|
||||||
|
var fxpid = 1
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
fxpid = uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/player/detailPlayer?vid=' + vid + '&mid=' + mid + '&fxpid=' + fxpid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
let that= this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/wdxh",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage,
|
||||||
|
lx:that.selectIndex,
|
||||||
|
keytext:that.keytext
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if (that.pages.pageSize == 1) {
|
||||||
|
that.listData = res;
|
||||||
|
} else if (res.rows.length > 0) {
|
||||||
|
that.listData = that.listData.concat(res.rows);
|
||||||
|
} else {
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
search(res) {
|
||||||
|
this.listData = [];
|
||||||
|
this.pages.currentPage = 1;
|
||||||
|
this.pages.isNextPage = true;
|
||||||
|
this.keytext = res.value;
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel(res) {
|
||||||
|
this.keytext = '';
|
||||||
|
this.pages.currentPage = 1;
|
||||||
|
this.pages.isNextPage = true;
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.searchBox {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bannerBox {
|
||||||
|
margin: 10upx 30upx 0 30upx;
|
||||||
|
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
.videoList{
|
||||||
|
display:flex; flex-wrap:wrap; padding: 30upx 30upx 0px 30upx;
|
||||||
|
}
|
||||||
|
.integral-mall-goods {
|
||||||
|
width: 100%;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-not-vip {
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FDF6EC;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
border: 2rpx solid #EFC381;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 76rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tuan-product-l {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-r {
|
||||||
|
width: calc(100% - 320rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-body {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: block;
|
||||||
|
/* #endif */
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-mt-10 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,335 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pageHeader">
|
||||||
|
<!-- 标题栏和状态栏占位符 -->
|
||||||
|
<!-- <view class="titleNview-placing"> </view> -->
|
||||||
|
<image class="pageBg" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/zhuiju_bg.png"></image>
|
||||||
|
<siginIn :sign_list="sign_list" :qdjl="qdjl" :tdsy="tdsy" @cksigin="cksigin" @click="getsigin"></siginIn>
|
||||||
|
<view class="pd16_15 mt16" style="position: relative;">
|
||||||
|
<view class="pd16_15 videoListBox">
|
||||||
|
<view>
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<view
|
||||||
|
class="videoListHeader"></view>
|
||||||
|
<text class="ft16 ftw600 cl-main">最近观看</text>
|
||||||
|
</view>
|
||||||
|
<navigator url="/pagesA/myCenter/watchHistory">
|
||||||
|
<view class="ft14 cl-notice">更多</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
<view class="mt16 flex space" style="justify-content: start;">
|
||||||
|
<block v-for="(value,key) in newsa" :key="key" v-if="key<3">
|
||||||
|
<view class="box pb10 listItem"
|
||||||
|
@click="detail(value.vid,value.mid)">
|
||||||
|
<image class="integral-mall-goods" mode="aspectFill" :src="value.img"></image>
|
||||||
|
<view class="mt8 plr10 ft14 ftw400 text-center text-over cl-main">{{ value.vname }}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mt24">
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<!-- <image style="width: 40rpx;height: 40rpx;" :src="statics.zhuico[0]"></image> -->
|
||||||
|
<view class="videoListHeader"></view>
|
||||||
|
<text class="ft16 ftw600 cl-main">我的追剧</text>
|
||||||
|
</view>
|
||||||
|
<navigator url="/pagesA/myCenter/bingeWatch">
|
||||||
|
<view class="ft14 cl-notice">更多</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
<view class="mt16">
|
||||||
|
<block v-for="(value,key) in record" :key="key" v-if="key<3">
|
||||||
|
<view @click="detail(value.vid,value.mid)" style="position: relative;" class="flex alcenter mb16">
|
||||||
|
<image mode="aspectFill" class="tuan-product-l" :src="value.img"></image>
|
||||||
|
<!-- <view class="btn-mini" style="position: absolute; top: 40upx; left: 280upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
||||||
|
<view class="tuan-product-r pl15">
|
||||||
|
<view class="ft16 ftw600 cl-main text-over2">{{ value.vname }}</view>
|
||||||
|
<view class="mt16">
|
||||||
|
<text class="ft14 cl-orange" style="color: #31CA02;">{{ value.dqname }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="mt16 flex space alcenter">
|
||||||
|
<view class="ft14 cl-notice">{{ value.mname }}</view>
|
||||||
|
<view class="btn-vip-adviser_bg">
|
||||||
|
<view class="btn-vip-adviser ml15">继续观看</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import siginIn from '@/components/fanxiao-sign/sigin-in.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
siginIn
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
qdjl: 0,
|
||||||
|
tdsy: 0,
|
||||||
|
banners: [],
|
||||||
|
newsa: [],
|
||||||
|
record: [],
|
||||||
|
sign_list: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cksigin() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/zuiju",
|
||||||
|
method: "GET",
|
||||||
|
data: {}
|
||||||
|
}).then(res => {
|
||||||
|
that.newsa = res.new
|
||||||
|
that.record = res.record
|
||||||
|
that.sign_list = res.getweek
|
||||||
|
that.qdjl = res.qdjl
|
||||||
|
that.tdsy = res.tdsy
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
detail(vid, mid) {
|
||||||
|
var fxpid = 1
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
fxpid = uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/player/detailPlayer?vid=' + vid + '&mid=' + mid + '&fxpid=' + fxpid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
linkTo(e) {
|
||||||
|
if (this.isLogin == false) {
|
||||||
|
this.showLogin = true;
|
||||||
|
} else {
|
||||||
|
let link = e.currentTarget.dataset.link;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: link
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
exchange(e) {
|
||||||
|
if (this.isLogin == false) {
|
||||||
|
this.showLogin = true;
|
||||||
|
} else {
|
||||||
|
let id = e.currentTarget.dataset.id;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/client/integral/exchange?id=' + id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pageHeader {
|
||||||
|
padding-top: 80rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageBg {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 1472rpx;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #ffffff;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoListBox {
|
||||||
|
box-shadow: 0px 0px 20upx 0px rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 20upx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoListHeader {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
background-image: linear-gradient(#B4FF23, #09D89E);
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
.listItem{
|
||||||
|
width:31%; position: relative; border-radius:20rpx;margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-header {
|
||||||
|
height: 300rpx;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 0rpx 0rpx 48rpx 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-main {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -156rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-mendian {
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header {
|
||||||
|
position: relative;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header .bg {
|
||||||
|
width: 100%;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header .main {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-integral {
|
||||||
|
height: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-main {
|
||||||
|
position: relative;
|
||||||
|
/* margin-top: -104rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.integal-mall-menu {
|
||||||
|
width: 100%;
|
||||||
|
height: 190rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-tuan-l {
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #f2f2f2;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.integral-mall-coupon {
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .top {
|
||||||
|
padding: 0rpx 0rpx 24rpx 0rpx;
|
||||||
|
border-bottom: 2rpx dashed #FEC675;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-l, .integral-mall-coupon .y-r {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background: #F5F6FA;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
top: 284rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-l {
|
||||||
|
left: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-r {
|
||||||
|
right: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value .num {
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-goods {
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleNview-placing {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
padding-top: 44px;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-l {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-r {
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-vip-adviser_bg {
|
||||||
|
width: 155rpx;
|
||||||
|
height: 65rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background-image: linear-gradient(#ACFD28, #0AD89D);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #09D89E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-vip-adviser {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
/* font-weight: 600; */
|
||||||
|
background: #FFF;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,520 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="titleNview-placing"></view>
|
||||||
|
<view class="homeTab">
|
||||||
|
<view class="homeTabBox">
|
||||||
|
<view class="homeTabContent">
|
||||||
|
<view :class="tabIndex === item.id ? 'homeTabItem active' : 'homeTabItem'"
|
||||||
|
v-for="(item, index) in tabData" :key="index" @click="tabIndex = item.id">{{ item.name }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view v-if="tabIndex==1" style="margin-top: 20rpx;">
|
||||||
|
<view class="home-header pd0_15 mt10">
|
||||||
|
<view class="home-mendian flex alcenter space plr15 cl-w9" style="display: none;">
|
||||||
|
<navigator style="width: calc(100% - 80rpx);" url="/pages/client/tuan/ss">
|
||||||
|
<view class="flex alcenter" style="width: calc(100% - 80rpx);">
|
||||||
|
<text class="iconfont iconsousuo ft14 mr10"></text>
|
||||||
|
<text class="text-over ft14" style="width: calc(100% - 60rpx);">请输入搜索内容</text>
|
||||||
|
</view>
|
||||||
|
</navigator>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<home-banner :banners="banners"></home-banner>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="integral-mall-main plr15" style="margin-top: 30rpx;">
|
||||||
|
<view class="integal-mall-menu flex pt10 pb10">
|
||||||
|
<view v-if="config.site.shop_type == 1" class="col2 text-center" @click="linkTo"
|
||||||
|
data-link="/pagesA/integral/integralShop">
|
||||||
|
<view>
|
||||||
|
<image style="width: 72rpx; height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/integral.png">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="ft12 ftw500">积分商城</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="col2 text-center" @click="linkTo" data-link="/pagesA/player/ranking">
|
||||||
|
<view>
|
||||||
|
<image style="width: 72rpx; height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Ranking.png">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="ft12 ftw500">排行</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="col2 text-center" @click="linkTo" data-link="/pagesA/myCenter/bingeWatch">
|
||||||
|
<view>
|
||||||
|
<image style="width: 72rpx; height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/chase.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="ft12 ftw500">追剧</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="col2 text-center" @click="linkTo" data-link="/pagesA/player/news">
|
||||||
|
<view>
|
||||||
|
<image style="width: 72rpx; height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Latest.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="ft12 ftw500">最新</view>
|
||||||
|
</view>
|
||||||
|
<!-- /pages/client/integral/role -->
|
||||||
|
|
||||||
|
<!-- <view class="col2 text-center" @click="linkTo" data-link="/pagesA/player/free">-->
|
||||||
|
<!-- <view>-->
|
||||||
|
<!-- <image style="width: 72rpx; height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Free.png"></image>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="ft12 ftw500">免费</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="mt24" v-if="hotdata[1]">
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="ft16 ftw600 cl-main ml15" style="margin-left: 0;margin-right: 8rpx;">热门短剧
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view @click="huanyihuan()" class="ft14 cl-notice flex alcenter">
|
||||||
|
<image style="width: 28rpx;height: 28rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/swapwith.png">
|
||||||
|
</image>
|
||||||
|
换一换
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt16 flex space" style="justify-content: start;">
|
||||||
|
<block v-for="(value,key) in hotdata" :key="key" v-if="key>=hyh && key<hyh+3">
|
||||||
|
<view class=" pb10"
|
||||||
|
style="width:30%; position: relative; border-radius:20rpx;margin-right: 30rpx;"
|
||||||
|
@click="detail(value)">
|
||||||
|
<image class="integral-mall-goods" mode="scaleToFill" :src="value.img"></image>
|
||||||
|
<view class=" ft14 ftw500 text-over cl-main">{{ value.name }}</view>
|
||||||
|
<view class=" ft10 cl-999 ftw500 text-over cl-main">{{ value.text }}</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt24" v-if="givedata[3]">
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<image style="width: 28rpx;height: 28rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/paihang.png">
|
||||||
|
</image>
|
||||||
|
<text class="ft16 ftw600 cl-main">排行榜</text>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 cl-notice">每周热剧TOP3</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="mt16 flex space">
|
||||||
|
|
||||||
|
<block v-for="(value,key) in givedata" :key="key" v-if="key<3">
|
||||||
|
<view class="integral-mall-coupon" style="width: 30%; margin-right: 30rpx;"
|
||||||
|
@click="detail(value)">
|
||||||
|
<view class="top">
|
||||||
|
<view class="flex center">
|
||||||
|
<view class="coupon-value">
|
||||||
|
<image class="integral-tuan-l" style="height: 280upx;" mode="scaleToFill"
|
||||||
|
:src="value.img"></image>
|
||||||
|
<view class=" ft14 ftw500 text-over cl-main">{{ value.name }}</view>
|
||||||
|
<view class=" ft10 cl-999 ftw500 text-over cl-main">{{ value.text }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="mt24" v-if="freedata[1]">
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="ft16 ftw600 cl-main" style="margin-left: 20rpx;margin-right: 8rpx;">最新热播</text>
|
||||||
|
</view>
|
||||||
|
<view @click="huanyihuan()" class="ft14 cl-notice">大家都在看的热播好剧</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt16 scrollView">
|
||||||
|
<block v-for="(value,key) in freedata" :key="key">
|
||||||
|
<view class=" pb10"
|
||||||
|
style="width:207rpx; display: inline-block; border-radius:20rpx;margin-right: 30rpx;"
|
||||||
|
@click="detail(value)">
|
||||||
|
<image class="integral-mall-goods" mode="scaleToFill" :src="value.img"></image>
|
||||||
|
<view class=" ft14 ftw500 text-over cl-main">{{ value.name }}</view>
|
||||||
|
<view class=" ft10 ftw500 cl-999 text-over cl-main">{{ value.text }}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<home-default :datasa="datasa"></home-default>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view v-if="tabIndex==2">
|
||||||
|
<home-jqjs :datasa="listjq"></home-jqjs>
|
||||||
|
</view>
|
||||||
|
<view v-if="tabIndex==3" class="flex space pd10_15" style="display:flex; flex-wrap:wrap;">
|
||||||
|
<block v-for="(value,key) in listbz" :key="key">
|
||||||
|
<view style="width: 49%; margin-bottom: 20upx;">
|
||||||
|
<image style="height: 500upx; width: 100%; border-radius: 18upx;" mode="aspectFill"
|
||||||
|
:src="value.img"></image>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import login from "@/utils/login";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config: null,
|
||||||
|
tabData: [{
|
||||||
|
name: '推荐短剧',
|
||||||
|
id: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '剧情介绍',
|
||||||
|
id: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '剧情壁纸',
|
||||||
|
id: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
banners: [],
|
||||||
|
tabIndex: 1,
|
||||||
|
listbz: [],
|
||||||
|
listjq: [],
|
||||||
|
datasa: [],
|
||||||
|
hotdata: [],
|
||||||
|
givedata: [],
|
||||||
|
freedata: [],
|
||||||
|
hyh: 0,
|
||||||
|
pages: {
|
||||||
|
allPages: 1,
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 15
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
if (!uni.getStorageSync("userinfo").token) {
|
||||||
|
login.wxLogin()
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.pages.allPages = 1;
|
||||||
|
this.pages.currentPage = 1;
|
||||||
|
this.getPageData();
|
||||||
|
this.getVideoList();
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pages.allPages >= this.pages.currentPage) {
|
||||||
|
this.getVideoList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
huanyihuan() {
|
||||||
|
if (this.hyh < 12) {
|
||||||
|
this.hyh = this.hyh + 3
|
||||||
|
}
|
||||||
|
if (this.hyh >= 12) {
|
||||||
|
this.hyh = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPageData() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/indexdata',
|
||||||
|
method: 'GET',
|
||||||
|
data: {},
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.config.name) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res.config.name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
uni.setStorageSync("config", res.config)
|
||||||
|
this.config = res.config;
|
||||||
|
this.banners = res.config.banner
|
||||||
|
this.listbz = res.listbz
|
||||||
|
this.listjq = res.listjq
|
||||||
|
// this.datasa = res.new
|
||||||
|
this.hotdata = res.hotdata
|
||||||
|
this.givedata = res.givedata
|
||||||
|
this.freedata = res.freedata;
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getVideoList() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/lists',
|
||||||
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
page: that.pages.currentPage,
|
||||||
|
limit: that.pages.pageSize
|
||||||
|
},
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
if (that.pages.currentPage === 1) {
|
||||||
|
that.datasa = res.rows;
|
||||||
|
that.pages.allPages = Math.ceil(res.total / that.pages.pageSize)
|
||||||
|
} else {
|
||||||
|
that.datasa = that.datasa.concat(res.rows);
|
||||||
|
}
|
||||||
|
this.pages.currentPage += 1;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
detail(item) {
|
||||||
|
console.log('go item detail')
|
||||||
|
console.log(item);
|
||||||
|
var fxpid = 1
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
fxpid = uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/player/detailPlayer?vid=' + item.id + '&mid=0' + '&fxpid=' + fxpid +
|
||||||
|
"&start_free=" + item.wechat_start + "&end_free=" + item.wechat_end
|
||||||
|
})
|
||||||
|
},
|
||||||
|
linkTo(e) {
|
||||||
|
let link = e.currentTarget.dataset.link;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: link
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
def() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "",
|
||||||
|
method: "GET",
|
||||||
|
data: {}
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onShareAppMessage() {},
|
||||||
|
// onShareTimeline(){},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.pagesContent {
|
||||||
|
// background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/index_bg.png);
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/home_bg.png);
|
||||||
|
background-size: 750rpx 642rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-color: #F2F5F8;
|
||||||
|
min-height: 100vh;
|
||||||
|
min-width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleNview-placing {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
padding-top: 68rpx;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.homeTab {
|
||||||
|
height: 80rpx;
|
||||||
|
padding: 14rpx 30rpx 0rpx 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.homeTabBox {
|
||||||
|
height: 60rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.homeTabContent {
|
||||||
|
height: 70rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
.homeTabItem {
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-right: 60rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: #FF6600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-header {
|
||||||
|
/* height: 300rpx; */
|
||||||
|
width: 100%;
|
||||||
|
// position: relative;
|
||||||
|
border-radius: 0rpx 0rpx 48rpx 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-main {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -156rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.home-mendian {
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header {
|
||||||
|
position: relative;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header .bg {
|
||||||
|
width: 100%;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-header .main {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 320rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-integral {
|
||||||
|
height: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-main {
|
||||||
|
position: relative;
|
||||||
|
/* margin-top: -104rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.integal-mall-menu {
|
||||||
|
width: 100%;
|
||||||
|
// height: 190rpx;
|
||||||
|
// background: #FFFFFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-tuan-l {
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #f2f2f2;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.integral-mall-coupon {
|
||||||
|
// background: #FFFFFF;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .top {
|
||||||
|
padding: 0rpx 0rpx 24rpx 0rpx;
|
||||||
|
// border-bottom: 2rpx dashed #FEC675;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-l,
|
||||||
|
.integral-mall-coupon .y-r {
|
||||||
|
width: 20rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background: #F5F6FA;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
top: 284rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-l {
|
||||||
|
left: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .y-r {
|
||||||
|
right: -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-coupon .coupon-value .num {
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral-mall-goods {
|
||||||
|
min-width: 206rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleNview-placing {
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
padding-top: 68rpx;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollView {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
min-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,640 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="pageBg">
|
||||||
|
<view class="userHeader" @click="goUsers">
|
||||||
|
<view class="userCont">
|
||||||
|
<image class="userImg" :src="userInfo.avatar" mode="aspectFit" ></image>
|
||||||
|
<view class="userDel">
|
||||||
|
<view class="userName"><text>{{ userInfo.nickname || '暂未登录' }}</text></view>
|
||||||
|
<view class="userId"><text
|
||||||
|
v-if="userInfo.id">ID:</text><text>{{ userInfo.id || '点击登录 享受更多会员特惠' }}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-icons type="right" size="16px" color="#999999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <view class="moneyBanner">
|
||||||
|
<view>
|
||||||
|
<view class="moneyLeft">
|
||||||
|
<view>
|
||||||
|
<image class="beansIcon" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/jindou1.png">
|
||||||
|
</image>
|
||||||
|
<text class="beansNum" @click="goBill">我的金豆:{{ userInfo.beans || '0' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="unlock">获得金豆可解锁更多剧情</view>
|
||||||
|
</view>
|
||||||
|
<view class="moneyRight" @click="rechargeapi"> 去充值</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<!--
|
||||||
|
<view class="vipbox">
|
||||||
|
<view class="vipimg">
|
||||||
|
<image style="height: 156rpx;width: 678rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/vip_bg.png" mode=""></image>
|
||||||
|
<view class="viptext">
|
||||||
|
<view class="title" >开通VIP</view>
|
||||||
|
<view class="text">开通后解锁更多剧情</view>
|
||||||
|
</view>
|
||||||
|
<view class="vipgo" @click="liberalvip()">
|
||||||
|
<image style="width: 196rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/vip_go.png" mode="">
|
||||||
|
<view class="liberal">立即开通</view>
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
|
<view class="tabBarList" style="margin-top: 40rpx;">
|
||||||
|
<view class="barBox">
|
||||||
|
<view class="barItem" @click="rechargeapi">
|
||||||
|
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/qianbao.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="barName">金豆充值</view>
|
||||||
|
</view>
|
||||||
|
<view class="barItem" @click="goEarning" v-if="config.site.shop_type == 1">
|
||||||
|
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/qianbao.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="barName">积分商城</view>
|
||||||
|
</view>
|
||||||
|
<view class="barItem" @click="shareapi">
|
||||||
|
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/erweima.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="barName">客服二维码</view>
|
||||||
|
</view>
|
||||||
|
<!-- #ifdef APP-PLUS || H5 -->
|
||||||
|
<view class="barItem" @click="shareapp">
|
||||||
|
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fenx.png" mode="scaleToFill"></image>
|
||||||
|
<view class="barName"> 分享</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<view class="barItem wxShareBtn">
|
||||||
|
<button open-type="share" class="wxShareBtn">
|
||||||
|
<image class="barIcon" style="width: 72rpx;height: 72rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fenx.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="barName"> 分享</view>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- <view class="barItem" @click="showVip">-->
|
||||||
|
<!-- <view class="vipBox">-->
|
||||||
|
<!-- <image class="VIPIcon" src="@/static/VIP.png" mode="scaleToFill"></image>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="barName"> VIP兑换</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view style="width: 100%; height: 30upx;"></view>
|
||||||
|
<home-vipcard :userinfo="userinfo" @loginAct="showLoginAct" @qrcode="showQrcode = true"></home-vipcard> -->
|
||||||
|
<view class="mt24" style="padding: 0 30rpx;">
|
||||||
|
<home-banner :banners="banners"></home-banner>
|
||||||
|
</view>
|
||||||
|
<view class="userFooterList">
|
||||||
|
<view class="userFooterItem" v-for="(item,index) in getMenus" :key="index" @click="memberLinkTo(item.link)">
|
||||||
|
<image class="fimg" :src="item.icon" mode="scaleToFill"></image>
|
||||||
|
<text class="fname">{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <com-footer model="member"></com-footer> -->
|
||||||
|
<redeem ref="vipPup"></redeem>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import redeem from "@/components/redeemVIP.vue"; //vip卡密兑换
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
redeem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config:uni.getStorageSync('config'),
|
||||||
|
isLogin: false,
|
||||||
|
showLogin: false,
|
||||||
|
isBirthday: true,
|
||||||
|
showBirthday: false,
|
||||||
|
showQrcode: false,
|
||||||
|
userInfo: {},
|
||||||
|
banners: [],
|
||||||
|
vipLevel: 0,
|
||||||
|
configUrl: this.$config.webUrl,
|
||||||
|
memberMenus: [{
|
||||||
|
name: '观看历史',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pagesA/myCenter/watchHistory',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',
|
||||||
|
show: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '我的追剧',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pagesA/myCenter/bingeWatch',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',
|
||||||
|
show: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '我的喜欢',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pagesA/myCenter/myLike',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_love.png?v=1',
|
||||||
|
show: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '收货地址',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pages/client/member/address',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_icon_my_address@2x.png',
|
||||||
|
show: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '官方商城',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pages/client/shop',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',
|
||||||
|
show: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '联系客服',
|
||||||
|
type: 'link',
|
||||||
|
model: '',
|
||||||
|
link: '/pagesA/servers/callServer',
|
||||||
|
icon: this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',
|
||||||
|
show: 1
|
||||||
|
},
|
||||||
|
{name:'我的团队',type:'link',model:'',link:'/pages/client/member/myTeam',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
|
||||||
|
//{name:'我的邀请码',type:'link',model:'',link:'/pages/client/member/qrshare',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
|
||||||
|
// {name:'分销订单',type:'link',model:'',link:'/pages/client/vipcard/fxlog',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:3},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
getMenus() {
|
||||||
|
let arr = new Array;
|
||||||
|
for (var a in this.memberMenus) {
|
||||||
|
if (this.memberMenus[a].show == 1 || (this.iskq == 1 && this.memberMenus[a].show == 3)) {
|
||||||
|
arr.push(this.memberMenus[a]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.userInfo = uni.getStorageSync("userinfo")
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.config=uni.getStorageSync('config');
|
||||||
|
if (uni.getStorageSync("userinfo").token) {
|
||||||
|
this.ongrzlTap();
|
||||||
|
}
|
||||||
|
this.banners = uni.getStorageSync("config").banner
|
||||||
|
},
|
||||||
|
onShareAppMessage: function(res) {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
var href = `/pages/tabs/my?fxpid=${this.uid}&invite=${this.userInfo.invite}`
|
||||||
|
let that = this;
|
||||||
|
const obj = {
|
||||||
|
title: "发送给好友",
|
||||||
|
imageUrl: '',
|
||||||
|
path: href,
|
||||||
|
success: function(res) {
|
||||||
|
console.log(res, "转发成功")
|
||||||
|
},
|
||||||
|
fail: function(res) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '发送失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: this.$config.webUrl + `/h5/?fxpid=${this.uid}&invite=${this.userInfo.invite}`,
|
||||||
|
complete() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "分享连接已复制到剪贴板"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
goBill() { //消费明细
|
||||||
|
uni.navigateTo({ //钱包
|
||||||
|
url: 'pagesA/myCenter/recharge'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goEarning() { //收益
|
||||||
|
uni.navigateTo({
|
||||||
|
// url: '/pagesA/myCenter/wallet/earning',
|
||||||
|
url: '/pagesA/integral/integralShop'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
shareapp() {
|
||||||
|
console.log('2222', this.userInfo.invite)
|
||||||
|
// #ifdef H5
|
||||||
|
let invite = this.userInfo.invite ? this.userInfo.invite : "";
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: this.configs.webUrl + `/h5/#/?fxpid=${this.uid}&invite=${invite}`,
|
||||||
|
complete() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "分享连接已复制到剪贴板"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
uni.share({
|
||||||
|
provider: 'weixin',
|
||||||
|
type: 0,
|
||||||
|
title: '玛薇剧场',
|
||||||
|
imageUrl: 'https://wx.yaohe.hnjrdzkj.xyz/h5/img/share.png',
|
||||||
|
path: `pages/tabs/my?invite=${this.userInfo.invite}`,
|
||||||
|
success(res) {
|
||||||
|
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
rechargeapi() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/myCenter/recharge'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
shareapi() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/servers/servesQR'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goUsers() {
|
||||||
|
if (this.userInfo.token) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/myCenter/settings/set'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
ongrzlTap() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/index",
|
||||||
|
method: "GET",
|
||||||
|
data: {}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
that.userInfo = res.data;
|
||||||
|
uni.setStorageSync("userinfo", res.data);
|
||||||
|
uni.setStorageSync("config", res.data.config);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
memberLinkTo(e) {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: e
|
||||||
|
// })
|
||||||
|
if (this.userInfo.token) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: e
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// let index = parseInt(e.currentTarget.dataset.index);
|
||||||
|
// if (!this.userInfo.token && this.getMenus[index].model != 'integral') {
|
||||||
|
// this.showLogin = true;
|
||||||
|
// } else {
|
||||||
|
// if (this.getMenus[index].link != '') {
|
||||||
|
// if (this.getMenus[index].model == 'integral') {
|
||||||
|
// uni.redirectTo({
|
||||||
|
// url: this.getMenus[index].link
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: this.getMenus[index].link
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
birthdayAct() {
|
||||||
|
if (this.isBirthday) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/client/member/birthday'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/client/member/info'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showLoginAct() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showVip() {
|
||||||
|
this.$refs.vipPup.showRedeem()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
liberalvip(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/VIP/VIP'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pageBg {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/mybgc.png');
|
||||||
|
/* background-image: url(@/static/my/my_bg.png); */
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 440rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
/* height: 705rpx; */
|
||||||
|
padding-top: 120rpx;
|
||||||
|
padding-left: 32rpx;
|
||||||
|
padding-right: 32rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.userHeader {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.userCont {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userDel {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userImg {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 80rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 6rpx solid #FFFFFF;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 24rpx 48rpx 0rpx rgba(197, 202, 219, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.userName {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #2E2F33;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userId {
|
||||||
|
color: #AEB2C1;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.vipIcon {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
width: 82rpx;
|
||||||
|
height: 33rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyBanner {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/myjian.png');
|
||||||
|
background-size: 686rpx 188rpx;
|
||||||
|
width: 686rpx;
|
||||||
|
height: 188rpx;
|
||||||
|
margin-top: 44rpx;
|
||||||
|
padding: 50rpx 56rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyLeft,
|
||||||
|
.moneyRight {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansIcon {
|
||||||
|
width: 44rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansNum {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unlock {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .moneyRight {
|
||||||
|
display: inline-block;
|
||||||
|
width: 172rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
background: linear-gradient(180deg, #FFFB25 0%, #00CB92 100%);
|
||||||
|
border-radius: 38rpx;
|
||||||
|
border-image: linear-gradient(180deg, rgba(251, 250, 38, 1), rgba(178, 255, 194, 1)) 2 2;
|
||||||
|
float: right;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 72rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.tabBarList {
|
||||||
|
height: 180rpx;
|
||||||
|
width: 678rpx;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.barBox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.barItem {
|
||||||
|
/* flex: 1; */
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipBox {
|
||||||
|
width: 86rpx;
|
||||||
|
height: 86rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: linear-gradient(to bottom, #fa6f02, #FFFFFF);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.VIPIcon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wxShareBtn {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wxShareBtn .barName {
|
||||||
|
line-height: 30rpx;
|
||||||
|
margin-top: -20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.barIcon {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.barName {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userFooterList {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userFooterItem {
|
||||||
|
width: calc(50% - 76rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fimg {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fname {
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.vipbox {
|
||||||
|
margin-top: 46rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viptext {
|
||||||
|
position: absolute;
|
||||||
|
top: 38rpx;
|
||||||
|
left: 128rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 44rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-family: PingFang-SC, PingFang-SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #9EA9CD;
|
||||||
|
line-height: 32rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.vipgo {
|
||||||
|
position: absolute;
|
||||||
|
top: 50rpx;
|
||||||
|
left: 428rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.liberal {
|
||||||
|
position: absolute;
|
||||||
|
top: 16rpx;
|
||||||
|
left: 40rpx;
|
||||||
|
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: left;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,356 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pages">
|
||||||
|
|
||||||
|
<!-- <swiper class="swiper" :current="swiperCurrent" :indicator-dots="false" :autoplay="false" :vertical="true"-->
|
||||||
|
<!-- :duration="50" @change="currentChange" :style="{height:winHeight} ">-->
|
||||||
|
<!-- <swiper-item class="swiperItem" v-for="(videoItem,videoIndex) in videoListData" :key="videoItem._id">-->
|
||||||
|
|
||||||
|
<!-- <view class="swiperItemContent">-->
|
||||||
|
<!-- <view class="payVideo" v-if="videoIndex == swiperCurrent">-->
|
||||||
|
<!-- <!– #ifdef APP || H5 –>-->
|
||||||
|
<!-- <video class="video"-->
|
||||||
|
<!-- v-if="videoItem.src"-->
|
||||||
|
<!-- :id="videoItem._id"-->
|
||||||
|
<!-- :poster="videoItem.img"-->
|
||||||
|
<!-- :autoplay="true"-->
|
||||||
|
<!-- object-fit="contain"-->
|
||||||
|
<!-- @ended="videoPlayerEnded"-->
|
||||||
|
<!-- @loadedmetadata="loadedmetadata"-->
|
||||||
|
<!-- :src="videoItem.src"></video>-->
|
||||||
|
<!-- <!– #endif –>-->
|
||||||
|
<!-- <!– #ifdef MP-WEIXIN –>-->
|
||||||
|
<!-- <video class="video"-->
|
||||||
|
<!-- v-if="videoItem.media_link"-->
|
||||||
|
<!-- :id="videoItem._id"-->
|
||||||
|
<!-- :poster="videoItem.img"-->
|
||||||
|
<!-- :autoplay="true"-->
|
||||||
|
<!-- object-fit="contain"-->
|
||||||
|
<!-- @ended="videoPlayerEnded"-->
|
||||||
|
<!-- @loadedmetadata="loadedmetadata"-->
|
||||||
|
<!-- :src="videoItem.media_link"></video>-->
|
||||||
|
<!-- <!– #endif –>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="rightBtnList" v-if="videoIndex == swiperCurrent && videoItem.pays == 2">-->
|
||||||
|
<!-- <view class="btnItem" @click="userChangeLike(videoItem)" v-if="userInfo.id">-->
|
||||||
|
<!-- <image class="videoBtnImg" v-if="videoItem.like=='2'" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/aixinRed.png"-->
|
||||||
|
<!-- mode="scaleToFill"></image>-->
|
||||||
|
<!-- <image class="videoBtnImg" v-else src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/aixin.png"-->
|
||||||
|
<!-- mode="scaleToFill"></image>-->
|
||||||
|
<!-- <view class="btnText">{{videoItem.like_n>0?videoItem.like_n:'0'}}</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="btnItem" @click="userChangeStar(videoItem)" v-if="userInfo.id">-->
|
||||||
|
<!-- <image class="videoBtnImg" v-if="playVideoDetail.iszj=='2'" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/scRed.png"-->
|
||||||
|
<!-- mode="scaleToFill"></image>-->
|
||||||
|
<!-- <image class="videoBtnImg" v-else src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/sc.png"-->
|
||||||
|
<!-- mode="scaleToFill"></image>-->
|
||||||
|
<!-- <view class="btnTextRed" v-if="playVideoDetail.iszj=='2'">已追</view>-->
|
||||||
|
<!-- <view class="btnText" v-else>追剧</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <!– #ifdef H5 –>-->
|
||||||
|
<!-- <view class="btnItem" @click="copyShareLink(videoItem)" v-if="userInfo.id">-->
|
||||||
|
<!-- <image class="videoBtnImg" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/icon/video_share_icon.png" mode=""></image>-->
|
||||||
|
<!-- <view class="btnText">分享</view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <!– #endif –>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="videoFooter" v-if="videoIndex == swiperCurrent && playVideoDetail.id" @click="showChoice">-->
|
||||||
|
<!-- <view class="videoName">-->
|
||||||
|
<!-- <image class="footerTv" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/video.png" mode="scaleToFill"></image>-->
|
||||||
|
<!-- <text class="footerTvText">{{playVideoDetail.name}} · 当前第1集/全{{playVideoDetail.sum}}集</text>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- <view class="choiceVideo">-->
|
||||||
|
<!-- <text class="choiceVideoTexts">选集</text>-->
|
||||||
|
<!-- <uni-icons size="12" type="right" color="#ffffff"></uni-icons>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
<!-- </swiper-item>-->
|
||||||
|
|
||||||
|
<!-- </swiper>-->
|
||||||
|
|
||||||
|
<drama-feed-list
|
||||||
|
id="drama-feed-list"
|
||||||
|
autoplay
|
||||||
|
@watchFullDrama="goPlayer"
|
||||||
|
></drama-feed-list>
|
||||||
|
<!-- <selectVideo ref="choiceVideoPup" @choiceVideoItem="changePlaying" :play-video-info="playVideoDetail"-->
|
||||||
|
<!-- :video-info="videoInfo">-->
|
||||||
|
<!-- </selectVideo>-->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import selectVideo from "@/components/select/video.vue"
|
||||||
|
import {httpRequest} from "@/utils/request";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
selectVideo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: {
|
||||||
|
pageSize: 50,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
},
|
||||||
|
userInfo: {},
|
||||||
|
swiperCurrent: 0,
|
||||||
|
playVideoDetail: {}, //
|
||||||
|
videoListData: [], //剧集列表
|
||||||
|
videoInfo: {},
|
||||||
|
swiperData: [], //
|
||||||
|
videoId: '',
|
||||||
|
imageUrl: "",
|
||||||
|
searchBarTop:0,
|
||||||
|
searchBarHeight:0,
|
||||||
|
winHeight: '800px',
|
||||||
|
pupHeight: "400px",
|
||||||
|
onPlayVideo: null,
|
||||||
|
appid:""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad(e) {
|
||||||
|
this.appid = this.$config.mini_appid;
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo");
|
||||||
|
this.getPageDefault();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.page={
|
||||||
|
pageSize: 50,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
}
|
||||||
|
this.videoListData=[];
|
||||||
|
// this.getVideoList()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取页面宽高数据& 系统信息
|
||||||
|
getPageDefault() {
|
||||||
|
console.log(this.system, uni.getSystemInfoSync())
|
||||||
|
// #ifdef MP-WEIXIN || MP-TOUTIAO
|
||||||
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
this.searchBarTop = menuButtonInfo.top;
|
||||||
|
this.searchBarHeight = menuButtonInfo.height;
|
||||||
|
// #endif
|
||||||
|
this.winHeight = uni.getWindowInfo().windowHeight+"px";
|
||||||
|
console.log(uni.getWindowInfo().windowHeight+"px")
|
||||||
|
this.pupHeight =( uni.getWindowInfo().windowHeight - 40 )+ "px";
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: res => {
|
||||||
|
this.safeArea = res.safeAreaInsets.bottom;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goPlayer(item) {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/dramaIdToVideoId",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
drama_id: item.detail.dramaId,
|
||||||
|
no: 1
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
// uni.navigateTo({url: "/pages/video/videoDetail?id="+res.data.data.drama_vid})
|
||||||
|
uni.navigateTo({url:'/pagesA/player/detailPlayer?vid='+res.data.drama_vid+'&mid='+res.data.id})
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// uni.navigateTo({url:'/pagesA/player/detailPlayer?vid='+this.videoInfo.id+'&fxpid='+val.fxpid+'&mid='+val.mid+'&num='+val.weigh})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pages {
|
||||||
|
background: #000000;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 750rpx;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.swiperItem{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.swiperItemContent {
|
||||||
|
position: relative;
|
||||||
|
width: 750rpx;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payVideo {
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
.video {
|
||||||
|
width: 750rpx;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.rightBtnList {
|
||||||
|
position: absolute;
|
||||||
|
right: 34rpx;
|
||||||
|
top: 600rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 99;
|
||||||
|
.btnItem {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
/* #ifdef MP-WEIXIN || H5 */
|
||||||
|
background: none;
|
||||||
|
/* #endif */
|
||||||
|
text-align: center;
|
||||||
|
.videoBtnImg {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnText {
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnTextRed {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wxClickBtn {
|
||||||
|
/* #ifdef MP-WEIXIN || H5 */
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
/* #endif */
|
||||||
|
width: 100rpx;
|
||||||
|
opacity: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
top: -100rpx;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.choiceTitleLine {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
|
||||||
|
.appText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schoiceClose {
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoFooter {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-left: 40rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
/* #ifdef MP-WEIXIN */
|
||||||
|
height: 80rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: 90px;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
height: 50px;
|
||||||
|
/* #endif */
|
||||||
|
.videoName {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.footerTv {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerTvText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 32rpx;
|
||||||
|
border-bottom: 2rpx solid #ffffff;
|
||||||
|
max-width: 600rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceVideo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
|
||||||
|
.choiceVideoTexts {
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerChoice {
|
||||||
|
width: 34rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,925 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="tab_box">
|
||||||
|
<view class="tab_icon" @click="back">
|
||||||
|
<uni-icons type="back" color="#fff" size="30"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="tab_name">
|
||||||
|
会员中心
|
||||||
|
</view>
|
||||||
|
<view style="width: 30px;">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="vip_tabber">
|
||||||
|
|
||||||
|
<swiper class="swiper" previous-margin="60rpx" next-margin="40rpx" :autoplay="false"
|
||||||
|
@change="swiper_change">
|
||||||
|
<swiper-item v-for="(item, index) in tabber_vip" :key="index">
|
||||||
|
<view class="vip_image" :style="'background-image: url(' + item.imgurl.image + ');'">
|
||||||
|
<view class="vip_top_left"
|
||||||
|
:style="'background-image: url(' + item.imgurl.imagelft + ');color:' + item.imgurl.color + ';'">
|
||||||
|
{{
|
||||||
|
item.pay_name }}
|
||||||
|
</view>
|
||||||
|
<view class="price">
|
||||||
|
<text class="text1" :style="'color:' + item.imgurl.txt_color + ';'">¥</text>
|
||||||
|
<text class="text2"
|
||||||
|
:style="'color:' + item.imgurl.txt_color + ';'">{{ item.pay_money }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="vip_text" :style="'color:' + item.imgurl.color + ';'">{{ item.pay_tab }}</text>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tabber_box">
|
||||||
|
<view class="vip_tag_tabber">
|
||||||
|
<view class="tag_list" v-for="(item, index) in tag_tabList" :key="index">
|
||||||
|
<!-- <transition name="fade"> -->
|
||||||
|
<image :src="item.images" v-if="tag_index == index"
|
||||||
|
:class="tag_index == 0 || tag_index == 3 ? 'tag0' : 'tag'"></image>
|
||||||
|
|
||||||
|
<view class="item" v-else>
|
||||||
|
|
||||||
|
<view class="item_tag"></view>
|
||||||
|
</view>
|
||||||
|
<!-- </transition> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tag_tab_text">
|
||||||
|
<text v-for="(item, index) in tag_tabList" :key="index"
|
||||||
|
:class="tag_index == index ? 'text1' : 'text2'">{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="main">
|
||||||
|
<view class="main_box">
|
||||||
|
<view class="main_title">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/left_vip.png"></image>
|
||||||
|
<text>会员特权</text>
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/right_vip.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="privilege_box">
|
||||||
|
<view class="privilege_list" v-for="(item, index) in equitylist" :key="index">
|
||||||
|
<view class="privilege_image">
|
||||||
|
<image :src="item.image"></image>
|
||||||
|
</view>
|
||||||
|
<view class="privilege_name">
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="main_content">
|
||||||
|
<scroll-view scroll-y="true" style="height: 340rpx;">
|
||||||
|
<view class="privilege">
|
||||||
|
<view class="privilege_title">
|
||||||
|
<view class="title_left"></view>
|
||||||
|
<view class="title_name">会员特权</view>
|
||||||
|
<view class="title_right"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-group_3 flex-col">
|
||||||
|
<text class="text_5">购买会员有什么优势?</text>
|
||||||
|
<view class="paragraph_1">1、全剧无广告:免除广告的激励视频</view>
|
||||||
|
<view class="paragraph_1">2、新剧抢先看:最新免费短剧抢先看!</view>
|
||||||
|
<view class="paragraph_1">3、新剧抢先看:最新免费短剧抢先看!</view>
|
||||||
|
<view class="paragraph_1">4、新剧抢先看:最新免费短剧抢先看!</view>
|
||||||
|
<view class="paragraph_1">5、新剧抢先看:最新免费短剧抢先看!</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="btn_box">
|
||||||
|
<view class="pay_text" @click="huiyuanxieyi">
|
||||||
|
<text class="text1">支付即表示同意:</text>
|
||||||
|
<text class="text2">《会员服务协议》</text>
|
||||||
|
</view>
|
||||||
|
<!-- @click="payment" -->
|
||||||
|
<view class="btn_class" @click="changeClick">
|
||||||
|
<view class="btn_text">
|
||||||
|
<text class="text1">¥{{ present.pay_money }}</text>
|
||||||
|
<text class="text2">开通会员</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-popup ref="popup" type="bottom" border-radius="10px 10px 0 0">
|
||||||
|
<scroll-view scroll-y="true" class="scroll-Y">
|
||||||
|
<!-- @scrolltolower="lower" @scroll="scroll":scroll-top="scrollTop" @scrolltoupper="upper"-->
|
||||||
|
<view style="padding: 34rpx 24rpx;border-radius: 12rpx 12rpx 0 0; background: #fff;">
|
||||||
|
<view v-html="tishi"></view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<uni-popup ref="payselect" type="bottom" :safe-area="false">
|
||||||
|
<view class="popupbox">
|
||||||
|
<view class="popuptop">
|
||||||
|
<view class="popuptop_lft">支付</view>
|
||||||
|
<view class="popuptop_right" @click="paymentCancel">取消</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="methodsList">
|
||||||
|
<view class="methodItem" v-for="method in payMethodList" :key="method.type"
|
||||||
|
@click="changeMethod(method)">
|
||||||
|
<view class="payCont">
|
||||||
|
<image class="payIcon" :src="method.img" mode="heightFix"></image>
|
||||||
|
<view class="payText">{{method.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="payCheck">
|
||||||
|
<image class="checkRadio" v-if="payMethodCheck.type == method.type"
|
||||||
|
src="/static/icon/radio_check_icon.png" mode="scaleToFill"></image>
|
||||||
|
<view class="defaultDom" v-else></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<radio-group @change="changeType">
|
||||||
|
<view class="pt16 pb16 flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="iconfont iconicon_pay_balance ft32 cl-green"></text>
|
||||||
|
<text class="ml15 ft14 ftw500 " style="color: #fff;">微信支付</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<radio value="weixin" :checked="payType == 'weixin'" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bd-line"></view>
|
||||||
|
</radio-group>
|
||||||
|
|
||||||
|
<view class="paymoney">{{present.pay_money}}</view>
|
||||||
|
<view class="paysFooter">
|
||||||
|
<view class="payBtn" @click="okTap">去支付</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PAY from "@/utils/pay";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabber_vip: [],
|
||||||
|
present: {},
|
||||||
|
tag_tabList: [{
|
||||||
|
name: '周卡会员',
|
||||||
|
imgdata: {
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/weeks_vip.png',
|
||||||
|
imagelft: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/weeks_lefttop.png',
|
||||||
|
color: "#3B3761",
|
||||||
|
txt_color: "#3B3761",
|
||||||
|
},
|
||||||
|
images: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/tag_tab0.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '月卡会员',
|
||||||
|
imgdata: {
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/month_vip.png',
|
||||||
|
imagelft: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/month_lefttop.png',
|
||||||
|
color: "#E6A058",
|
||||||
|
txt_color: "#240A00",
|
||||||
|
},
|
||||||
|
images: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/tag_tab.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '季卡会员',
|
||||||
|
imgdata: {
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/season_vip.png',
|
||||||
|
imagelft: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/season_lefttop.png',
|
||||||
|
color: "#30597A",
|
||||||
|
txt_color: "#30597A",
|
||||||
|
},
|
||||||
|
images: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/tag_tab.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '年卡会员',
|
||||||
|
imgdata: {
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/years_vip.png',
|
||||||
|
imagelft: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/years_lefttop.png',
|
||||||
|
color: "#FFFFFF",
|
||||||
|
txt_color: "#FFDB8A",
|
||||||
|
},
|
||||||
|
images: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/tag_tab1.png'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tag_index: 0,
|
||||||
|
tishi: '',
|
||||||
|
equitylist: [],
|
||||||
|
privilegeList: [{
|
||||||
|
name: '新剧抢先看',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Fast.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '会员免广告',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/exempt.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '全站免费看',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/video.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '专属客服',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/artificial.png'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
weeksprivilegeList: [{
|
||||||
|
name: '全站免费看',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/video.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '会员免广告',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/exempt.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '7*18H客服',
|
||||||
|
image: 'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/artificial.png'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
osName: "",
|
||||||
|
language: "en",
|
||||||
|
payMethodList: [],
|
||||||
|
payMethodCheck: {},
|
||||||
|
payType: 'weixin',
|
||||||
|
|
||||||
|
//支付
|
||||||
|
buyType: '微信',
|
||||||
|
wxlx: 'wxh5',
|
||||||
|
openid: "",
|
||||||
|
userInfo: "",
|
||||||
|
system: ""
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.vipList()
|
||||||
|
this.equitylist = this.weeksprivilegeList
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.system = uni.getSystemInfoSync().osName
|
||||||
|
//#ifdef MP-WEIXIN
|
||||||
|
this.wxlx = 'wxxcx'
|
||||||
|
this.openid = uni.getStorageSync("openid")
|
||||||
|
console.log(this.openid);
|
||||||
|
this.userInfo = uni.getStorageSync("userinfo");
|
||||||
|
//#endif
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
back() {
|
||||||
|
uni.navigateBack(1)
|
||||||
|
},
|
||||||
|
changeMethod(item) {
|
||||||
|
console.log(item)
|
||||||
|
this.payMethodCheck = item;
|
||||||
|
},
|
||||||
|
//取消支付
|
||||||
|
paymentCancel() {
|
||||||
|
this.$refs.payselect.close()
|
||||||
|
},
|
||||||
|
|
||||||
|
vipList() {
|
||||||
|
this.$httpRequest({
|
||||||
|
isLoading: true,
|
||||||
|
url: '/api/beans/vipList',
|
||||||
|
method: "GET",
|
||||||
|
data: {}
|
||||||
|
}).then(res => {
|
||||||
|
res.data.forEach(item => {
|
||||||
|
if (item.pay_type == 1) {
|
||||||
|
this.tabber_vip.push(item)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tabber_vip[0].imgurl = this.tag_tabList[0].imgdata
|
||||||
|
this.tabber_vip[1].imgurl = this.tag_tabList[1].imgdata
|
||||||
|
this.tabber_vip[2].imgurl = this.tag_tabList[2].imgdata
|
||||||
|
this.tabber_vip[3].imgurl = this.tag_tabList[3].imgdata
|
||||||
|
console.log(this.tabber_vip);
|
||||||
|
|
||||||
|
this.present = this.tabber_vip[0]
|
||||||
|
this.payCheckItem = this.tabber_vip[0]
|
||||||
|
}).catch(eer => {
|
||||||
|
console.log('fail' + JSON.stringify(eer));
|
||||||
|
})
|
||||||
|
},
|
||||||
|
huiyuanxieyi() {
|
||||||
|
console.log('000000')
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/index/noticeInfo',
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
id: 7
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
this.tishi = res.data.data.content
|
||||||
|
this.$refs.popup.open()
|
||||||
|
}).catch(eer => {
|
||||||
|
console.log('fail' + JSON.stringify(data));
|
||||||
|
})
|
||||||
|
},
|
||||||
|
swiper_change(e) {
|
||||||
|
this.payCheckItem = this.tabber_vip[e.target.current]
|
||||||
|
this.present = this.tabber_vip[e.target.current]
|
||||||
|
if (this.present.pay_name == "周卡会员") {
|
||||||
|
this.equitylist = this.weeksprivilegeList
|
||||||
|
} else {
|
||||||
|
this.equitylist = this.privilegeList
|
||||||
|
}
|
||||||
|
this.tag_index = e.target.current;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
okTap() {
|
||||||
|
var that = this
|
||||||
|
let defaultData = {
|
||||||
|
sum: 1,
|
||||||
|
buyType: that.buyType,
|
||||||
|
pricebuy: that.present.pay_money,
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
wxlx: that.wxlx,
|
||||||
|
id: that.id,
|
||||||
|
openid: that.openid,
|
||||||
|
info: [],
|
||||||
|
};
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.weiChartPay(defaultData)
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
this.H5Pay();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
weiChartPay(defaultData) {
|
||||||
|
|
||||||
|
var that = this
|
||||||
|
if (this.system == 'android') {
|
||||||
|
uni.login({
|
||||||
|
timeout: 10000,
|
||||||
|
provider: 'weixin', //如果是uniapp,在这里需要标明平台的类型,支持的参数请查阅uniapp官网的uni.login()文档
|
||||||
|
success: (res) => {
|
||||||
|
PAY.pays.serverCreatOrder({
|
||||||
|
id: that.payCheckItem.id,
|
||||||
|
pay_type: 1,
|
||||||
|
code: res.code,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code'),
|
||||||
|
openid: that.openid,
|
||||||
|
}).then(creatRes => {
|
||||||
|
console.log('creat order success', creatRes)
|
||||||
|
return
|
||||||
|
PAY.pays.wxAppletAndroidPay(creatRes.data).then(payRes => {
|
||||||
|
console.log('pay order success', payRes)
|
||||||
|
that.getUserDel()
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
PAY.pays.wxIosCreatOrder({
|
||||||
|
sum: defaultData.sum,
|
||||||
|
buytype: defaultData.buyType,
|
||||||
|
pricebuy: defaultData.pricebuy,
|
||||||
|
token: defaultData.token,
|
||||||
|
uid: defaultData.uid,
|
||||||
|
wxlx: defaultData.wxlx,
|
||||||
|
id: defaultData.id,
|
||||||
|
openid: defaultData.openid,
|
||||||
|
info: defaultData.info,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
PAY.pays.wxAppletIosPay(res.data).then(payRes => {
|
||||||
|
console.log('pay order success', payRes)
|
||||||
|
that.getUserDel()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
H5Pay() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/pay/payInfo",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
id: that.id,
|
||||||
|
pay_type: 21,
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
// #ifdef H5
|
||||||
|
window.open(res.data.return_url, "_self")
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesA/myCenter/wallet/webPay?url=" + encodeURIComponent(res.data
|
||||||
|
.return_url)
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
getPayList() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/beans/payList",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
let lists = [];
|
||||||
|
res.data.forEach((item) => {
|
||||||
|
if (item.pay_type != 3) {
|
||||||
|
lists.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.list = lists
|
||||||
|
}
|
||||||
|
} else if (res.data.code == 50) {
|
||||||
|
this.is_check = true;
|
||||||
|
} else {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
changeClick(item) {
|
||||||
|
this.$refs.payselect.open()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #272733;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab_box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 40px 32rpx 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab_icon {}
|
||||||
|
|
||||||
|
.tab_name {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 100vw;
|
||||||
|
height: 304rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip_tabber {
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip_image {
|
||||||
|
width: 630rpx;
|
||||||
|
height: 304rpx;
|
||||||
|
background-size: 630rpx 304rpx;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.vip_top_left {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-size: 120rpx 40rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
position: absolute;
|
||||||
|
top: 76rpx;
|
||||||
|
left: 42rpx;
|
||||||
|
|
||||||
|
.text1 {
|
||||||
|
font-size: 56rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text2 {
|
||||||
|
font-size: 80rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip_text {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 22rpx;
|
||||||
|
left: 50rpx;
|
||||||
|
top: 242rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_tab_text {
|
||||||
|
width: 450rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
|
||||||
|
.text1 {
|
||||||
|
color: #e7e6ec;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text2 {
|
||||||
|
color: #a2a0aa;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip_tag_tabber {
|
||||||
|
width: 418rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
background-image: linear-gradient(to right, #3c3c43, #3c3c43);
|
||||||
|
background-size: 400rpx 8rpx;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 38rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.tag_list {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
// justify-content: space-between;
|
||||||
|
.tag0 {
|
||||||
|
width: 58rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
width: 96rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_list:nth-child(2) {
|
||||||
|
width: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.item_tag {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-color: #a2a0aa;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_list:nth-child(3) {
|
||||||
|
width: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.item_tag {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-color: #a2a0aa;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_list:first-child {
|
||||||
|
/* Your styles here */
|
||||||
|
width: 58rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.item_tag {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-color: #a2a0aa;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_list:last-child {
|
||||||
|
/* Your styles here */
|
||||||
|
width: 58rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.item_tag {
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-color: #a2a0aa;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
margin-top: 28rpx;
|
||||||
|
|
||||||
|
.main_box {
|
||||||
|
width: 702rpx;
|
||||||
|
padding: 32rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #34343b;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.main_title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #f5cfbd;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_content {
|
||||||
|
padding: 28rpx 24rpx 0 24rpx;
|
||||||
|
|
||||||
|
view {
|
||||||
|
color: #a2a0aa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main_list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
/* 创建三列 */
|
||||||
|
grid-gap: 10px;
|
||||||
|
/* 设置列之间的间距 */
|
||||||
|
padding: 0 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.main_item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 26rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 76rpx;
|
||||||
|
height: 76rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-bottom: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #a2a0aa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_box {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 190rpx;
|
||||||
|
background: #3c3c43;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
.pay_text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 14rpx;
|
||||||
|
|
||||||
|
.text1 {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text2 {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: rgba(255, 200, 160, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_class {
|
||||||
|
width: 664rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: linear-gradient(90deg, #ffe1c5 0%, #ffc69c 100%);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
|
||||||
|
.btn_text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.text1 {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(236, 23, 56, 1);
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text2 {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(39, 39, 51, 1);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-Y {
|
||||||
|
max-height: 1200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privilege_box {
|
||||||
|
display: flex;
|
||||||
|
padding-bottom: 34rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
|
||||||
|
.privilege_list {
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
|
||||||
|
.privilege_image {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 76rpx;
|
||||||
|
height: 76rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.privilege_name {
|
||||||
|
color: #A2A0AA;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #A2A0AA;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privilege_txt {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #898995;
|
||||||
|
margin-top: 4rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.popupbox {
|
||||||
|
background-color: #1C1C1D;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
|
||||||
|
.methodsList {
|
||||||
|
border-radius: 12rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.methodItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 140rpx;
|
||||||
|
padding: 0 36rpx;
|
||||||
|
border-bottom: 2rpx solid #363636;
|
||||||
|
|
||||||
|
.payCont {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payIcon {
|
||||||
|
width: 138rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
padding-left: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.defaultDom {
|
||||||
|
border: 2rpx solid #77777C;
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkRadio {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymoney {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #DDAF8F;
|
||||||
|
text-align: center;
|
||||||
|
margin: 40rpx 0 46rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuptop {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 22rpx;
|
||||||
|
padding-bottom: 40rpx;
|
||||||
|
|
||||||
|
.popuptop_lft {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popuptop_right {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.paysFooter {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
padding-bottom: 60rpx;
|
||||||
|
|
||||||
|
.payBtn {
|
||||||
|
width: 440rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
background: #E83A57;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<view class="content" v-html="agreementText"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
agreementId:"",
|
||||||
|
agreementText:""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
//1:充值规则 2:会员服务协议
|
||||||
|
this.agreementId = e.id
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDetail();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getDetail(){
|
||||||
|
this.$httpRequest({
|
||||||
|
url:"/api/common/articleInfo",
|
||||||
|
methods:"GET",
|
||||||
|
data:{
|
||||||
|
id:this.agreementId,
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.code ==1){
|
||||||
|
this.agreementText = res.data.msg
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content{
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup ref="address" type="bottom" :safe-area="fales">
|
||||||
|
<view class="content">
|
||||||
|
<view class="ml20 ft16 ftw500 flex" style="height: 80rpx; line-height: 80rpx;">
|
||||||
|
<view>更换地址</view>
|
||||||
|
<view @click="quxiao" style="margin-left: auto;padding-right: 30rpx; " class="ft14 ftw500 cl-999">取消</view>
|
||||||
|
</view>
|
||||||
|
<view class="ml20 mr15">
|
||||||
|
<scroll-view scroll-y class="" style="height: 240px;margin-bottom: 4rpx;">
|
||||||
|
<view class="pt10 pb10 item" style="padding-left: 10rpx;" :class="{'itemtype':quantity.id == item.id}" v-for="(item,index) in datalist" :key="index" @click="selectdata(item)">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="ft14 ftw500 cl-333">{{item.accept_name}}</text>
|
||||||
|
<text class="ft14 ftw500 cl-333 pl20">{{item.show_mobile}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 ftw500 cl-999" style="margin-top: 12rpx;">
|
||||||
|
{{item.accept_province}}{{item.accept_city}}{{item.accept_exp_area}}{{item.accept_address}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<view class="button" style="padding: 20rpx 0;" @click="determine">确定</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
quantity: "",
|
||||||
|
datalist: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addressshop(data) {
|
||||||
|
this.getlist()
|
||||||
|
console.log(data);
|
||||||
|
this.quantity = data
|
||||||
|
},
|
||||||
|
quxiao() {
|
||||||
|
this.$refs.address.close()
|
||||||
|
},
|
||||||
|
getlist() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/list',
|
||||||
|
data: this.data,
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.datalist = res.data.list
|
||||||
|
this.$refs.address.open()
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectdata(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.quantity = item
|
||||||
|
},
|
||||||
|
determine(){
|
||||||
|
this.quxiao()
|
||||||
|
this.$emit("replacement",this.quantity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.content {
|
||||||
|
background-color: #fff;
|
||||||
|
height: 680rpx;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
margin: 0 30rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
/* width: 312rpx; */
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.item{
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
}
|
||||||
|
.itemtype{
|
||||||
|
border: 2rpx solid #09d89e;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup type="center" ref="pointsyes">
|
||||||
|
<view class="Content">
|
||||||
|
<image style="width: 44rpx;height: 44rpx; margin-left: auto; margin-bottom: 28rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Shutdown.png" mode="" @click="quxiao"></image>
|
||||||
|
<view class="advertisingbg">
|
||||||
|
<!-- <image style="width: 620rpx;height: 728rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/advertising_bg.png" mode=""> -->
|
||||||
|
</image>
|
||||||
|
<view class="boxs">
|
||||||
|
<view class="watch">观看广告可解锁本剧集</view>
|
||||||
|
<view class="buyvip" @click="liberalvip">买VIP会员全场免广告</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
quantity: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
pointsyesshop() {
|
||||||
|
this.$refs.pointsyes.open()
|
||||||
|
},
|
||||||
|
quxiao() {
|
||||||
|
this.$refs.pointsyes.close()
|
||||||
|
},
|
||||||
|
liberalvip(){
|
||||||
|
this.quxiao()
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/VIP/VIP'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.Content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 620rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointsyesbox {
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
/* text-align: center; */
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-input {
|
||||||
|
width: 680rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
padding-left: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.advertisingbg {
|
||||||
|
position: relative;
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/advertising_bg.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 728rpx;
|
||||||
|
width: 620rpx;
|
||||||
|
height: 728rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxs {
|
||||||
|
margin: 488rpx 42rpx;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.watch {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.buyvip {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
border: 3rpx solid #09D89E;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #09D89E;
|
||||||
|
margin-top: 28rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<uni-popup ref="share" type="bottom">
|
||||||
|
<view class="shareCont">
|
||||||
|
<view class="shareHeader">
|
||||||
|
<text class="shareTitle">倍速</text>
|
||||||
|
<text class="shareClose" @click="closeShare">取消</text>
|
||||||
|
</view>
|
||||||
|
<view class="speedList">
|
||||||
|
<text :class="['speedItem',{'speedItemCheck': item.num==checkSpeedNum}]"
|
||||||
|
v-for="(item,index) in speedList"
|
||||||
|
:key="index"
|
||||||
|
@click="changeSpeed(item.num)"
|
||||||
|
>{{item.text}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "changeSpeed",
|
||||||
|
props:{
|
||||||
|
speedNum:{
|
||||||
|
type:Number,
|
||||||
|
default:1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.checkSpeedNum = this.speedNum
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
checkSpeedNum:1,
|
||||||
|
speedList:[
|
||||||
|
{num:0.5,text:'0.5倍速'},
|
||||||
|
{num:0.8,text:'0.8倍速'},
|
||||||
|
{num:1,text:'1倍速'},
|
||||||
|
{num:1.25,text:'1.25倍速'},
|
||||||
|
{num:1.5,text:'1.5倍速'},
|
||||||
|
{num:2,text:'2.0倍速'},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
closeChangeSpeed() {
|
||||||
|
this.$refs.share.close();
|
||||||
|
},
|
||||||
|
showChangeSpeed() {
|
||||||
|
this.$refs.share.open();
|
||||||
|
},
|
||||||
|
changeSpeed(num) {
|
||||||
|
if(this.checkSpeedNum!==num){
|
||||||
|
this.checkSpeedNum = num
|
||||||
|
this.$emit('changeSpeed',num);
|
||||||
|
this.closeChangeSpeed();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.shareCont{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
width: 750rpx;
|
||||||
|
padding: 34rpx;
|
||||||
|
border-radius: 34rpx 34rpx 0 0;
|
||||||
|
}
|
||||||
|
.shareHeader{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.shareTitle{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
.shareClose{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
.speedList{
|
||||||
|
padding: 60rpx 0 130rpx 0 ;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.shareIcon{
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
.speedItem{
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: #F7F8F9;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
.speedItemCheck{
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: #f44813;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content" style="margin: 0 25rpx;">
|
||||||
|
<view class="contenttop flex center pb16" style="background-color: #fff;">
|
||||||
|
<image style="width: 60rpx; height: 60rpx;margin-right: 22rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/left.png" mode=""></image>
|
||||||
|
<view class="">积分好礼</view>
|
||||||
|
<image style="width: 60rpx; height: 60rpx; margin-left: 22rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/right.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class=" flex wrap" style="justify-content: space-around;">
|
||||||
|
|
||||||
|
<view style="margin-bottom: 32rpx;" @click="navdetails(item)" v-for="(item,index) in Commodity"
|
||||||
|
:key="index">
|
||||||
|
<image style="width: 292rpx;height: 292rpx; border-radius: 24rpx;" :src="item.cimage" mode="">
|
||||||
|
</image>
|
||||||
|
<view class="">
|
||||||
|
<view class="ft14 ftw500" style="color: #333;">{{item.name}}</view>
|
||||||
|
<view class="flex alcenter space" style="margin-top: 6rpx;">
|
||||||
|
<view class="ft14 ftw600 flex alcenter" style="color: #FFA100;">{{item.price}}
|
||||||
|
<image style="width: 32rpx;height: 32rpx; margin-left: 10rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/code.png"
|
||||||
|
mode=""></image>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="ft10 ftw500 cl-999">已兑:{{item.sale_num}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="width: 292rpx;"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "integralArticles",
|
||||||
|
props: {
|
||||||
|
Commodity: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
navdetails(item) {
|
||||||
|
uni.navigateTo({ //专享
|
||||||
|
url: '/pagesA/integral/ItemDetails?id=' + item.goods_id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.content {
|
||||||
|
width: 700rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
margin: 0 25rpx;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup type="bottom" ref="pointsyes" @maskClick="quxiao" :safe-area="false">
|
||||||
|
<view class="pointsyesbox">
|
||||||
|
<view class="flex" style="margin-bottom: 24rpx;justify-content: space-between;">
|
||||||
|
<view class="ft16 ftw500 cl-333">积分兑换金豆</view>
|
||||||
|
<view class="ft14 ftw500 cl-999" @click="quxiao">取消</view>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 ftw500 cl-333">当前积分:<text style="color: #FFA100;">{{score}}</text></view>
|
||||||
|
<view class="uni-input" style="margin-top: 32rpx; margin-bottom: 12rpx;">
|
||||||
|
<input type="number" class="input" adjust-position @input="listeninginput" v-model="quantity"
|
||||||
|
placeholder="请输入积分数量" />
|
||||||
|
</view>
|
||||||
|
<view class="ft12 ftw500 cl-999" style="margin-bottom: 56rpx;">{{datas.jfdhsm}}</view>
|
||||||
|
<view class="ftw500 mb16" style="text-align: center; color: #FFA100;"> <text
|
||||||
|
style="font-size: 48rpx;">{{exchange || 0}}</text> <text style="font-size: 28rpx;">金豆</text> </view>
|
||||||
|
<view class="practices" @click="tijiao">提交</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
quantity: "",
|
||||||
|
score: "",
|
||||||
|
datas: "",
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
exchange(){
|
||||||
|
return Math.floor((this.quantity * this.datas.jfdh) * 100) / 100 || 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
pointsyesshop() {
|
||||||
|
this.getuser()
|
||||||
|
this.$refs.pointsyes.open()
|
||||||
|
},
|
||||||
|
quxiao() {
|
||||||
|
this.quantity = ""
|
||||||
|
this.$refs.pointsyes.close()
|
||||||
|
|
||||||
|
},
|
||||||
|
//获取 用户积分
|
||||||
|
getuser() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/index',
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.data.score);
|
||||||
|
this.score = res.data.score
|
||||||
|
this.datas = res.data.config.site
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
listeninginput(e) {
|
||||||
|
console.log(e);
|
||||||
|
if (e.detail.value >= this.score) {
|
||||||
|
e.detail.value = this.score
|
||||||
|
console.log(123);
|
||||||
|
|
||||||
|
console.log(this.quantity);
|
||||||
|
console.log(this.score);
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
listeninginput(e) {
|
||||||
|
const o = e.detail.value
|
||||||
|
const inputRule = /[^\d]/g
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.cargoNo = o.replace(inputRule, '');
|
||||||
|
if (this.cargoNo == '') {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
//执行对应代码
|
||||||
|
if (e.detail.value >= this.score) {
|
||||||
|
this.quantity = this.score
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tijiao() {
|
||||||
|
// this.quantity = parseInt(this.exchange) / this.datas.jfdh
|
||||||
|
// this.exchange = (this.quantity * this.datas.jfdh).toFixed(2)
|
||||||
|
if (this.quantity <= this.score) {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/duihuan',
|
||||||
|
data: {
|
||||||
|
sum: this.quantity
|
||||||
|
},
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
this.$emit('success');
|
||||||
|
this.getuser();
|
||||||
|
}).catch(err => {})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '兑换积分大于拥有积分',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.pointsyesbox {
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
/* text-align: center; */
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-input {
|
||||||
|
width: 680rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
padding-left: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<picker mode="multiSelector"
|
||||||
|
:value="multiIndex"
|
||||||
|
:range="multiArray"
|
||||||
|
@change="handleValueChange"
|
||||||
|
@columnchange="handleColumnChange">
|
||||||
|
<slot></slot>
|
||||||
|
</picker>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const CHINA_REGIONS = require('./regions.json')
|
||||||
|
export default {
|
||||||
|
props:{
|
||||||
|
defaultRegions:{
|
||||||
|
type:Array,
|
||||||
|
default(){
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
defaultRegionCode:{
|
||||||
|
type:String
|
||||||
|
},
|
||||||
|
defaultRegion:[String,Array]
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
cityArr:CHINA_REGIONS[0].childs,
|
||||||
|
districtArr:CHINA_REGIONS[0].childs[0].childs,
|
||||||
|
multiIndex: [0, 0, 0],
|
||||||
|
isInitMultiArray:true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
defaultRegion:{
|
||||||
|
handler(region,oldRegion){
|
||||||
|
if(Array.isArray(region)){
|
||||||
|
// 避免传的是字面量的时候重复触发
|
||||||
|
oldRegion = oldRegion || []
|
||||||
|
if(region.join('')!==oldRegion.join('')){
|
||||||
|
this.handleDefaultRegion(region)
|
||||||
|
}
|
||||||
|
}else if(region&®ion.length == 6){
|
||||||
|
this.handleDefaultRegion(region)
|
||||||
|
}else{
|
||||||
|
console.warn('defaultRegion非有效格式')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate:true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
multiArray(){
|
||||||
|
return this.pickedArr.map(arr=>arr.map(item=>item.name))
|
||||||
|
},
|
||||||
|
pickedArr(){
|
||||||
|
// 进行初始化
|
||||||
|
if(this.isInitMultiArray){
|
||||||
|
return [
|
||||||
|
CHINA_REGIONS,
|
||||||
|
CHINA_REGIONS[0].childs,
|
||||||
|
CHINA_REGIONS[0].childs[0].childs
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return [CHINA_REGIONS,this.cityArr,this.districtArr];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleColumnChange(e){
|
||||||
|
// console.log(e);
|
||||||
|
this.isInitMultiArray = false;
|
||||||
|
const that = this;
|
||||||
|
let col = e.detail.column;
|
||||||
|
let row = e.detail.value;
|
||||||
|
that.multiIndex[col] = row;
|
||||||
|
try{
|
||||||
|
switch(col){
|
||||||
|
case 0:
|
||||||
|
if(CHINA_REGIONS[that.multiIndex[0]].childs.length==0){
|
||||||
|
that.cityArr = that.districtArr = [CHINA_REGIONS[that.multiIndex[0]]]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
that.cityArr = CHINA_REGIONS[that.multiIndex[0]].childs
|
||||||
|
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}catch(e){
|
||||||
|
// console.log(e);
|
||||||
|
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[0].childs
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handleValueChange(e){
|
||||||
|
// 结构赋值
|
||||||
|
let [index0,index1,index2] = e.detail.value;
|
||||||
|
let [arr0,arr1,arr2] = this.pickedArr;
|
||||||
|
let address = [arr0[index0],arr1[index1],arr2[index2]];
|
||||||
|
// console.log(address);
|
||||||
|
this.$emit('getRegion',address)
|
||||||
|
},
|
||||||
|
handleDefaultRegion(region){
|
||||||
|
const isCode = !Array.isArray(region)
|
||||||
|
this.isInitMultiArray = false;
|
||||||
|
let children = CHINA_REGIONS
|
||||||
|
for(let i=0;i<3;i++){
|
||||||
|
for(let j=0;j<children.length;j++){
|
||||||
|
let condition = isCode?children[j].code==region.slice(0,(i+1)*2):children[j].name.includes(region[i]);
|
||||||
|
if(condition){
|
||||||
|
// 匹配成功进行赋值
|
||||||
|
// console.log(i,j,children.length-1);
|
||||||
|
children = children[j].childs;
|
||||||
|
if(i==0){
|
||||||
|
this.cityArr = children
|
||||||
|
}else if(i==1){
|
||||||
|
this.districtArr = children
|
||||||
|
}
|
||||||
|
this.$set(this.multiIndex,i,j)
|
||||||
|
// console.log(this.multiIndex);
|
||||||
|
break;
|
||||||
|
}else{
|
||||||
|
// 首次匹配失败就用默认的初始化
|
||||||
|
// console.log(i,j,children.length-1);
|
||||||
|
if(i==0 && j==(children.length-1)){
|
||||||
|
this.isInitMultiArray = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,449 @@
|
|||||||
|
<template>
|
||||||
|
<uni-popup type="bottom" ref="videoRecharge" :mask-click='false'>
|
||||||
|
<view class="pay_box">
|
||||||
|
<view class="header_top">
|
||||||
|
<text style="font-size: 32rpx;">购买解锁后可继续观看</text>
|
||||||
|
<uni-icons type='closeempty' size="18" @tap="hideRechargePup" color="#bababa"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="vider_juji">
|
||||||
|
<text style="font-size: 24rpx;">{{ videoInfo.name }} · 第{{ playVideoInfo.weigh }}集</text>
|
||||||
|
<text style="font-size: 24rpx;color: #333333;">已更新至{{ videoInfo.sum }}集</text>
|
||||||
|
</view>
|
||||||
|
<view class="vider_juji">
|
||||||
|
<text style="font-size: 24rpx;">购买本集需要: {{ playVideoInfo.beans }}金豆</text>
|
||||||
|
</view>
|
||||||
|
<view class="other_recharge">
|
||||||
|
<text style="font-size: 28rpx;">金豆充值</text>
|
||||||
|
<text style="font-size: 28rpx;color: #333333;font-weight: bold;">我的金豆:{{ userBeans }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="vipCarBox" v-if="payListGroupId==1">
|
||||||
|
<view :class="[
|
||||||
|
'vipCarItem',
|
||||||
|
{'vipCarThird':item.pay_type == 1},
|
||||||
|
{'vipCarFirst': item.pay_type == 2},
|
||||||
|
{'vipCarFourth':item.pay_type == 3},
|
||||||
|
] " v-for="item in list_pay" :key="item.id" @click="purchase(item)">
|
||||||
|
|
||||||
|
|
||||||
|
<text class="icon" v-if="item.pay_tab">{{ item.pay_tab }}</text>
|
||||||
|
<view class="moneyLine">
|
||||||
|
<text class="money">¥{{ item.pay_money }}</text>
|
||||||
|
<text class="beanBtn" v-if="item.pay_give_num && item.pay_type == 2">赠{{ item.pay_num }}金豆 </text>
|
||||||
|
</view>
|
||||||
|
<text class="depict" v-if="item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{item.pay_num}}金豆+{{item.pay_give_num}}豆
|
||||||
|
</text>
|
||||||
|
<text class="depict" v-if="!item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{item.pay_num}}金豆
|
||||||
|
</text>
|
||||||
|
<view class="explainText" v-if="item.pay_type != 2">
|
||||||
|
<text class="explainTextt" v-if="item.pay_type == 1" style="color: #333333;">全部影片免费观看</text>
|
||||||
|
<text class="explainTextt" v-if="item.pay_type == 1 && item.remark" style="color: #333333;">{{ item.remark }}</text>
|
||||||
|
<text class="explainTextt" v-if="item.pay_type == 3" style="color: #FF6900;">本剧订阅全集</text>
|
||||||
|
</view>
|
||||||
|
<view class="choiceNum" v-if="item.menber_sel">{{ item.menber_sel }}%用户选择</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="vipCarBox vipCarBoxSecond" v-else>
|
||||||
|
<view
|
||||||
|
:class="['vipCarItem',{'border':item.is_red==1}]"
|
||||||
|
v-for="item in list_pay" :key="item.id" @click="purchase(item)">
|
||||||
|
|
||||||
|
<text class="rightIcon" v-if="item.pay_tab">{{ item.pay_tab }}</text>
|
||||||
|
<view class="VipCardContent">
|
||||||
|
<view :class="['carMoney',{'redColor':item.is_red==1}]">
|
||||||
|
<text class="cardMoneyText">{{ item.pay_money }}</text>
|
||||||
|
元
|
||||||
|
</view>
|
||||||
|
<text class="carMoneyExplain" v-if="item.pay_give_money>0">多送{{ item.pay_give_money }}元</text>
|
||||||
|
<text v-else class="carMoneyExplain"></text>
|
||||||
|
</view>
|
||||||
|
<view :class="['vipCarFooter',{'footerRedColor':item.is_red!=1}]">{{ item.remark ? item.remark : '' }}
|
||||||
|
</view>
|
||||||
|
<image v-if="item.is_finger" class="hands"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/hands.gif"
|
||||||
|
mode=""></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import configs from "@/utils/config";
|
||||||
|
import PAY from '@/utils/pay'
|
||||||
|
export default {
|
||||||
|
name: "rechargePup",
|
||||||
|
props: {
|
||||||
|
userBeans: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
playVideoInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
videoInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
payListGroupId: 1,
|
||||||
|
list_pay: [],
|
||||||
|
checkItem:{},
|
||||||
|
oid:"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showRechargePup() {
|
||||||
|
let that = this;
|
||||||
|
uni.request({
|
||||||
|
url: configs.webUrl + '/api/beans/payList',
|
||||||
|
data: {
|
||||||
|
vs_id: uni.getStorageSync('vs_id_code'),
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
video_list_id: this.videoInfo.id || 0
|
||||||
|
},
|
||||||
|
success: listRes => {
|
||||||
|
console.log(listRes.data.data)
|
||||||
|
that.list_pay = listRes.data.data
|
||||||
|
that.$refs.videoRecharge.open()
|
||||||
|
}, fail: (err) => {
|
||||||
|
uni.showToast({title: err.msg, icon: "none", duration: 2000})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
hideRechargePup() {
|
||||||
|
this.$refs.videoRecharge.close()
|
||||||
|
},
|
||||||
|
purchase(item){
|
||||||
|
let that = this;
|
||||||
|
PAY.pays.lakalaPay({
|
||||||
|
id:item.id,
|
||||||
|
vid: that.playVideoInfo.id,
|
||||||
|
pay_type: 21,
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
if(res.code ==1){
|
||||||
|
// #ifdef H5
|
||||||
|
console.log('h5 open')
|
||||||
|
window.open(res.data.return_url, "_self")
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pagesA/myCenter/wallet/webPay?url="+encodeURIComponent(res.data.return_url)
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pay_box {
|
||||||
|
background: #ffffff;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
border-radius: 30rpx 30rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header_top {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx 24rpx 20rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imBtn {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
right: 100rpx;
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vider_juji {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other_recharge {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.vipCarBox {
|
||||||
|
padding: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarItem {
|
||||||
|
width: 336rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFirst {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarSecond {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/taoc2.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/dingyue_a.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 35rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 0rpx 0rpx 16rpx 0rpx;
|
||||||
|
background: linear-gradient(180deg, #FFFFFF 0%, #FFC833 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .icon {
|
||||||
|
background: linear-gradient(180deg, #FF8F8F 0%, #FF3333 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .icon {
|
||||||
|
background: linear-gradient(90deg, #FFBC48 0%, #FF5D41 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyLine {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 45rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .moneyLine {
|
||||||
|
color: #FF300A;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.money {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .money {
|
||||||
|
color: #FF300A;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .money {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beanBtn {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 48rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background: linear-gradient(180deg, #FFF2D1 0%, #FFC323 100%);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.depict {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 44rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText {
|
||||||
|
margin-top: 26rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText .explainTextt {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceNum {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFCA3A;
|
||||||
|
line-height: 32rpx;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新版
|
||||||
|
.vipCarBoxSecond {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.VipCardContent {
|
||||||
|
padding: 30rpx 0 20rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .vipCarItem {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .border {
|
||||||
|
// border: 6rpx solid #dc3a35;
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/dingyue_a.png);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .one {
|
||||||
|
|
||||||
|
.vipCarFooter {
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney {
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/pay1.png);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: -10rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
border-radius: 0 16rpx 0 16rpx;
|
||||||
|
background: rgb(253, 172, 18);
|
||||||
|
max-width: 336rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney .cardMoneyText {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoneyExplain {
|
||||||
|
color: red;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
//底部信息
|
||||||
|
.vipCarFooter {
|
||||||
|
line-height: 45rpx;
|
||||||
|
// background-color: #dc3a35;
|
||||||
|
color: #000000;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redColor {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
//普通底部
|
||||||
|
.footerRedColor {
|
||||||
|
line-height: 50rpx;
|
||||||
|
// background-color: #fde6e6;
|
||||||
|
color: #000000;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
border-radius: 0 0 12rpx 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hands {
|
||||||
|
position: absolute;
|
||||||
|
right: -10px;
|
||||||
|
bottom: 0rpx;
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
z-index: 300;
|
||||||
|
transform: rotate(-15deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.explain {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText {
|
||||||
|
line-height: 35rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<uni-popup ref="share" type="bottom">
|
||||||
|
<view class="shareCont">
|
||||||
|
<view class="shareHeader">
|
||||||
|
<text class="shareTitle">分享到</text>
|
||||||
|
<text class="shareClose" @click="closeShare">取消</text>
|
||||||
|
</view>
|
||||||
|
<view class="shareList">
|
||||||
|
<view class="shareItem" @click="shareApp('WXSceneTimeline')">
|
||||||
|
<image src="../../../static/wechart.png" mode="widthFix" class="shareIcon" />
|
||||||
|
<text class="shareText">朋友圈</text>
|
||||||
|
</view>
|
||||||
|
<view class="shareItem" @click="shareApp('WXSceneSession')">
|
||||||
|
<image src="../../../static/wechart.png" mode="widthFix" class="shareIcon" />
|
||||||
|
<text class="shareText">微信好友</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "share",
|
||||||
|
props:{
|
||||||
|
videoInfo:{
|
||||||
|
type:Object,
|
||||||
|
default:function(){
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo:{},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.userInfo = uni.getStorageSync('userInfo')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
closeShare() {
|
||||||
|
this.$refs.share.close();
|
||||||
|
},
|
||||||
|
showSharePup() {
|
||||||
|
this.$refs.share.open();
|
||||||
|
},
|
||||||
|
shareApp(type) {
|
||||||
|
let that = this;
|
||||||
|
uni.share({
|
||||||
|
provider: 'weixin',
|
||||||
|
scene: type,
|
||||||
|
type: 0,
|
||||||
|
imageUrl:that.videoInfo.coverImg, //此处图片可以更换
|
||||||
|
title: "柠檬短剧",
|
||||||
|
summary:`我正在看 ${this.videoInfo.name} 超好看,一起来看看吧`,
|
||||||
|
href:"https://baogu.hnjrdzkj.xyz/h5/#/pages/promotion/promotion?id="+this.userInfo.id,
|
||||||
|
success: res => {
|
||||||
|
console.log(JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.shareCont{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
width: 750rpx;
|
||||||
|
padding: 34rpx;
|
||||||
|
border-radius: 34rpx 34rpx 0 0;
|
||||||
|
}
|
||||||
|
.shareHeader{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.shareTitle{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
.shareClose{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
.shareList{
|
||||||
|
padding: 60rpx 0 130rpx 0 ;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
.shareIcon{
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
.shareText{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 34rpx;
|
||||||
|
padding-top: 12rpx;
|
||||||
|
}
|
||||||
|
.shareItem{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="czmain">
|
||||||
|
<view class="cztop">
|
||||||
|
<view class="czxx">提现方式:{{ type }}</view>
|
||||||
|
<view class="czyebox">
|
||||||
|
<!-- <view style="font-size: 36upx; text-align: center;">当前余额 ¥{{urerdata.money}}</view> -->
|
||||||
|
<view>提现金额</view>
|
||||||
|
<input type="digit" focus class="czye" v-model="money" placeholder="请输入提现金额"/>
|
||||||
|
<view>提现姓名</view>
|
||||||
|
<input type="text" class="czye1" v-model="name" placeholder="请输入提现姓名"/>
|
||||||
|
<view>提现账号</view>
|
||||||
|
<input type="text" class="czye1" v-model="cord" placeholder="请输入提现账号"/>
|
||||||
|
<!-- <view style="margin-top: 10upx; font-size: 28upx; color: #ff0000;">备注:{{configsa.txbz}}</view> -->
|
||||||
|
<view class="uni-btn-v uni-common-mt">
|
||||||
|
<button class="onstep" @click="submit">提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
money: '',
|
||||||
|
name: '',
|
||||||
|
cord: '',
|
||||||
|
type: '支付宝',
|
||||||
|
dbled: true,
|
||||||
|
urerdata: [],
|
||||||
|
configsa: [],
|
||||||
|
providerList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submit(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/user/tx',
|
||||||
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
money: this.money,
|
||||||
|
name: this.name,
|
||||||
|
cord: this.cord,
|
||||||
|
type: this.type,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.$emit("successClose")
|
||||||
|
uni.showToast({title:res.msg,icon:'none',duration:2000})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cztop {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czxx {
|
||||||
|
top: 10px;
|
||||||
|
font-size: 32upx;
|
||||||
|
margin-left: 50upx;
|
||||||
|
color: #3a3a3a;
|
||||||
|
font-family: iconfont;
|
||||||
|
line-height: 80upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czyebox {
|
||||||
|
padding: 20upx 50upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czyebox > view:first-child {
|
||||||
|
font-size: 32upx;
|
||||||
|
color: #3a3a3a;
|
||||||
|
line-height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czye {
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1upx solid #e5e5e5;
|
||||||
|
font-size: 36upx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #3a3a3a;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 20px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czye:after {
|
||||||
|
position: absolute;
|
||||||
|
top: -2px;
|
||||||
|
left: 0;
|
||||||
|
content: '¥';
|
||||||
|
color: #3a3a3a;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czye1 {
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1upx solid #e5e5e5;
|
||||||
|
font-size: 32upx;
|
||||||
|
color: #3a3a3a;
|
||||||
|
position: relative;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onstep {
|
||||||
|
margin-top: 40upx;
|
||||||
|
background: #007AFF !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.czmain {
|
||||||
|
width: 94%;
|
||||||
|
margin: 10px auto;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16upx;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-alipay {
|
||||||
|
background: #fbfbfb;
|
||||||
|
padding-bottom: 20upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-alipay > view:first-child {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 32upx;
|
||||||
|
padding-left: 0upx;
|
||||||
|
color: #3a3a3a;
|
||||||
|
font-family: iconfont;
|
||||||
|
position: relative;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-alipay:before {
|
||||||
|
content: "\e636";
|
||||||
|
margin-top: 25upx;
|
||||||
|
margin-right: 10upx;
|
||||||
|
color: #007AFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cztype > view:first-child:after {
|
||||||
|
position: absolute;
|
||||||
|
content: "\e66c";
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #05c160;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.rmbLogo {
|
||||||
|
font-size: 40upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-color: #007aff;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-h1.uni-center {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ipaPayBtn {
|
||||||
|
margin-top: 30upx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<view class="articles">
|
||||||
|
<integral-articles :Commodity="listData"></integral-articles>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import integralArticles from "@/pagesA/components/integralArticles.vue"
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
integralArticles
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
listData: [],
|
||||||
|
pages: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
allPage: 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: options.name
|
||||||
|
})
|
||||||
|
this.Commodity = this.list
|
||||||
|
this.getgoods()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取 商品
|
||||||
|
getgoods() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/delivery/goods/list',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
page: that.pages.currentPage,
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.data.list;
|
||||||
|
that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||||
|
} else {
|
||||||
|
that.listData.push(...res.data.list)
|
||||||
|
}
|
||||||
|
this.pages.currentPage++;
|
||||||
|
}
|
||||||
|
// this.score = res.data.score
|
||||||
|
// that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pages.currentPage <= this.pages.allPage) {
|
||||||
|
this.getgoods();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.articles {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,236 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333" @click="navBack"></uni-icons>
|
||||||
|
商品详情
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="Content">
|
||||||
|
<!-- 轮播图 -->
|
||||||
|
<view>
|
||||||
|
<swiper class="home-swiper-banner" style="height: 750rpx;" indicator-color="rgba(255, 255, 255, 0.3)"
|
||||||
|
indicator-active-color="#FFFFFF" :indicator-dots="true" :autoplay="true" :interval="3000"
|
||||||
|
:duration="500">
|
||||||
|
<swiper-item v-for="(item,index) in detailsdata.cimages" :key="index" @tap="detail(item.link,0)">
|
||||||
|
<image style="width: 100%;height: 750rpx;" :src="item" mode="aspectFill">
|
||||||
|
</image>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<!-- 商品信息 -->
|
||||||
|
<view class="commodity flex alcenter">
|
||||||
|
<view class="flex ml15 alcenter">
|
||||||
|
<view class="mr20">
|
||||||
|
<text class="ft24 ftw500">{{detailsdata.price}}</text>
|
||||||
|
<text class="ft14 ftw500">积分</text>
|
||||||
|
</view>
|
||||||
|
<text class="ftw500"
|
||||||
|
style="padding: 4rpx 28rpx; color: #FFC4CF; font-size: 22rpx;background-color: #FF3E62; border-radius: 20rpx;">兑换{{detailsdata.sale_num}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="ftw500" style="margin-right: 56rpx;font-size: 52rpx;text-align: center;">
|
||||||
|
<view class="">{{score}}</view>
|
||||||
|
<view class="ft12 ftw500" style="color: #969CD7;">当前积分</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="informationbox">
|
||||||
|
<view class="name text-over">{{detailsdata.name}}</view>
|
||||||
|
|
||||||
|
<!-- <view class="specifications ">
|
||||||
|
<view class="">规格:12354</view>
|
||||||
|
<uni-icons type="right" size="12" color="#333" style="margin-right: 24rpx;"></uni-icons>
|
||||||
|
</view> -->
|
||||||
|
<view class="specifications ">
|
||||||
|
<view class="">库存:{{detailsdata.stock_num}}</view>
|
||||||
|
<uni-icons type="right" size="12" color="#333" style="margin-right: 24rpx;"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部 照片 -->
|
||||||
|
<view class="imgsbxo">
|
||||||
|
<view class="imgtop flex alcenter center">
|
||||||
|
<view class="imgtop_left"></view>
|
||||||
|
<text>商品详情</text>
|
||||||
|
<view class="imgtop_right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="font-size: 0;" v-for="(item,index) in detailsdata.cimages">
|
||||||
|
<image style="width: 100%;" :src="item" mode="aspectFill">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bottom_button">
|
||||||
|
<view class="exchange" @click="clickexchange(detailsdata.id)">立即兑换</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
banners: [{}, {}, {}, {}, {}],
|
||||||
|
|
||||||
|
score:"",
|
||||||
|
detailsdata:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log('e', e.id)
|
||||||
|
// this.shanchu(7)
|
||||||
|
this.getuser()
|
||||||
|
//实际
|
||||||
|
this.shanchu(e.id)
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
shanchu(id) {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/goods/info',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
goods_id: id
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if(res.code == 1){
|
||||||
|
this.detailsdata = res.data
|
||||||
|
console.log(this.detailsdata);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取 用户积分
|
||||||
|
getuser() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/index',
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.data.score);
|
||||||
|
this.score = res.data.score
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
clickexchange(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/integral/commodityOrder?id=' + id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
/* position: relative; */
|
||||||
|
background-color: #F7F8F9;
|
||||||
|
padding-top: 58rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 160rpx;
|
||||||
|
line-height: 160rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Content {
|
||||||
|
position: absolute;
|
||||||
|
left: 0rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.commodity {
|
||||||
|
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/commodity_bg.png);
|
||||||
|
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 136rpx;
|
||||||
|
height: 136rpx;
|
||||||
|
margin-top: -16rpx;
|
||||||
|
z-index: 1;
|
||||||
|
position: relative;
|
||||||
|
color: #ffffff;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.informationbox {
|
||||||
|
margin-bottom: 160rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-left: 34rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specifications {
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-left: 34rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgsbxo {}
|
||||||
|
|
||||||
|
.imgtop {
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgtop_left {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
background: linear-gradient(90deg, rgba(28, 28, 29, 0) 0%, #D8D8D8 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.imgtop_right {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
background: linear-gradient(270deg, rgba(28, 28, 29, 0) 0%, #D8D8D8 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
z-index: 1;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exchange {
|
||||||
|
margin: 16rpx 28rpx 0 28rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background-color: #FFD8A9;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,356 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||||
|
我的订单
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content">
|
||||||
|
<view class="typeTab">
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==-1}]" @click="changeType(-1)">全部</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==0}]" @click="changeType(0)">待付款</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==1}]" @click="changeType(1)">待发货</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==2}]" @click="changeType(2)">待收货</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==3}]" @click="changeType(3)">已完成</view>
|
||||||
|
<!-- <view :class="['typeItem',{'typeCheck':typeCheck==4}]" @click="changeType(4)">已取消</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==5}]" @click="changeType(5)">已退款</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="myList">
|
||||||
|
<view class="lineItem" v-for="(item,index) in listData" :key="item.id">
|
||||||
|
<view class="lineInfo box">
|
||||||
|
<view class="lineName">
|
||||||
|
<view class="ft12 ftw500 cl-999">下单时间:{{item.addtime}}</view>
|
||||||
|
<view class="ft12 ftw500 " style="color: #EF1857;" v-if="item.status == 0">待付款</view>
|
||||||
|
<view class="ft12 ftw500 cl-333" v-else-if="item.status == 1">待发货</view>
|
||||||
|
<view class="ft12 ftw500 cl-333" v-else-if="item.status == 2">待收货</view>
|
||||||
|
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 3">已完成</view>
|
||||||
|
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 4">已取消</view>
|
||||||
|
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 5">已退款</view>
|
||||||
|
</view>
|
||||||
|
<view class="lineDescribe flex">
|
||||||
|
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="item.cimage"
|
||||||
|
mode="">
|
||||||
|
</image>
|
||||||
|
<view class="ml10 flex"
|
||||||
|
style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||||
|
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{item.goods_name}}
|
||||||
|
</view>
|
||||||
|
<view class="flex alcenter" style="justify-content: space-between">
|
||||||
|
<view class="" style="color: #EF1857;">
|
||||||
|
<text class="ftw500 cl-333" style="font-size: 24rpx;">实付款:</text>
|
||||||
|
<text class="ft20 ftw500">{{item.total_price}}</text>
|
||||||
|
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||||
|
</view>
|
||||||
|
<view class="clE075" @click="goOrder(item,index)" v-if="item.status == 0">去付款</view>
|
||||||
|
<view class="clfff" @click="clickexchange" v-else-if="item.status == 1">联系客服</view>
|
||||||
|
<view class="clfff" @click="goOrder(item,index)" v-else-if="item.status == 2">查看订单
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
</view>
|
||||||
|
<uni-popup type="center" ref="pointsyes">
|
||||||
|
<view class="pointsyesbox">
|
||||||
|
<view class="ft16" style="margin-top: 30rpx;">
|
||||||
|
<text>客服电话:</text>
|
||||||
|
<text>{{serviceInfo.service_mobile}}</text>
|
||||||
|
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(serviceInfo.service_mobile)">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
remark: "",
|
||||||
|
typeCheck: -1,
|
||||||
|
listData: [],
|
||||||
|
pages: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
allPage: 1,
|
||||||
|
},
|
||||||
|
status: 'more',
|
||||||
|
contentText: {
|
||||||
|
contentdown: "上拉显示更多",
|
||||||
|
contentrefresh: "正在加载...",
|
||||||
|
contentnomore: "没有更多数据了"
|
||||||
|
},
|
||||||
|
serviceInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.changeType(-1)
|
||||||
|
this.getserviceInfo()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pages.currentPage <= this.pages.allPage) {
|
||||||
|
this.getorder()
|
||||||
|
this.status = 'more';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
//切换
|
||||||
|
changeType(item) {
|
||||||
|
this.pages.currentPage = 1
|
||||||
|
this.pages.allPage = 1
|
||||||
|
this.typeCheck = item
|
||||||
|
this.getorder()
|
||||||
|
},
|
||||||
|
getorder() {
|
||||||
|
this.status = 'loading';
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/order/list',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
page: this.pages.currentPage,
|
||||||
|
limit: this.pages.pageSize,
|
||||||
|
status: this.typeCheck
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.status = ''
|
||||||
|
if (this.pages.currentPage == 1) {
|
||||||
|
this.listData = res.data.list;
|
||||||
|
this.pages.allPage = Math.ceil(res.data.total / this.pages.pageSize);
|
||||||
|
} else if (res.data.list.length > 0) {
|
||||||
|
this.listData.push(...res.data.list)
|
||||||
|
console.log(this.listData);
|
||||||
|
} else {
|
||||||
|
this.status = 'noMore';
|
||||||
|
this.pages.isNextPage = 1;
|
||||||
|
}
|
||||||
|
this.pages.currentPage++;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
this.status = '';
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getserviceInfo() { //app信息拿取电话
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/user/serviceInfo",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
this.serviceInfo = res.data;
|
||||||
|
console.log(this.serviceInfo);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
goOrder(item, index) {
|
||||||
|
console.log(item, index);
|
||||||
|
uni.navigateTo({ //订单
|
||||||
|
url: '/pagesA/integral/completeorder?id=' + this.listData[index].order_id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
clickexchange() {
|
||||||
|
this.$refs.pointsyes.open()
|
||||||
|
},
|
||||||
|
copy(value) {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: value, //要被复制的内容
|
||||||
|
});
|
||||||
|
},
|
||||||
|
navorder() {
|
||||||
|
this.$refs.pointsyes.close()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||||
|
padding-top: 58rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 356rpx;
|
||||||
|
background-color: #Ffffff;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 0 26rpx;
|
||||||
|
/* background-color: #Ffffff; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeTab {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeItem {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeCheck {
|
||||||
|
color: #333333;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeCheck:before {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 4rpx;
|
||||||
|
background-color: #333333;
|
||||||
|
bottom: -8rpx;
|
||||||
|
left: calc(50% - 30rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.lineImg {
|
||||||
|
width: 192rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineName {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 2rpx solid #F7F8F9;
|
||||||
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineDescribe {
|
||||||
|
padding: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineNum {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #EF1857;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineItem {
|
||||||
|
display: flex;
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noListData {
|
||||||
|
position: absolute;
|
||||||
|
top: 40vh;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noImg {
|
||||||
|
width: 314rpx;
|
||||||
|
height: 228rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.24);
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineInfo {
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clE075 {
|
||||||
|
width: 148rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
border-radius: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clfff {
|
||||||
|
width: 148rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointsyesbox {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 312rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="content">
|
||||||
|
<view class="ml20 mr15 pt15">
|
||||||
|
<view class="mb20" v-for="(item,index) in datalist" :key="index" >
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="ft14 ftw500 cl-333">{{item.accept_name}}</text>
|
||||||
|
<text class="ft14 ftw500 cl-333 pl20">{{item.show_mobile}}</text>
|
||||||
|
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;" @click="clicknewaddress(2,item)"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 ftw500 cl-999" style="margin-top: 12rpx;">{{item.accept_province}}{{item.accept_city}}{{item.accept_exp_area}}{{item.accept_address}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom_button ">
|
||||||
|
<view class="practices button" @click="clicknewaddress(1,'')">新增地址</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
datalist: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clicknewaddress(index, item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/integral/newaddress?type=' + index + "&data=" + JSON.stringify(item)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getlist() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/list',
|
||||||
|
data: this.data,
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.datalist = res.data.list
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background-color: #fff;
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
background-color: #fff;
|
||||||
|
padding-bottom: 160rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
z-index: 1;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin: 14rpx 80rpx 0 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,286 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||||
|
填写订单
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content">
|
||||||
|
<!-- 地址 -->
|
||||||
|
<view class="addressbox box pt16 pb16" >
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<image style="width: 40rpx; height: 40rpx;margin-left: 12rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/address.png"
|
||||||
|
mode="" @tap.stop="shopaddress"></image>
|
||||||
|
<text class="ft14 ftw500 cl-333" style="padding-left: 18rpx;" @tap.stop="shopaddress">{{address.accept_name}}</text>
|
||||||
|
<text class="ft14 ftw500 cl-333 pl20" @tap.stop="shopaddress">{{address.accept_mobile}}</text>
|
||||||
|
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;" @tap="navaddress"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view v-if="address.accept_province || address.accept_city || address.accept_exp_area || address.accept_address" class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;" @tap.stop="shopaddress">
|
||||||
|
{{address.accept_province}}{{address.accept_city}}{{address.accept_exp_area}}{{address.accept_address}}
|
||||||
|
</view>
|
||||||
|
<view v-else class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;" @tap.stop="shopaddress">
|
||||||
|
<text>请填写收货地址</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 商品信息 -->
|
||||||
|
<view class="messagebox box flex">
|
||||||
|
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="detailsdata.cimage" mode="">
|
||||||
|
</image>
|
||||||
|
<view class="ml10 flex" style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||||
|
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{detailsdata.name}}</view>
|
||||||
|
<view class="" style="color: #EF1857;">
|
||||||
|
<text class="ft20 ftw500">{{detailsdata.price}}</text>
|
||||||
|
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 商品信息选择 -->
|
||||||
|
<view class="message_select box ">
|
||||||
|
<view class="flex ml15 mr15" style="justify-content: space-between">
|
||||||
|
<view class="ft14 ftw5000 cl-333">商品总价</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333">{{detailsdata.price}}积分</view>
|
||||||
|
</view>
|
||||||
|
<view class=" " style="width: 100%;height: 2rpx; background-color: #F7F8F9;margin: 36rpx 0;"></view>
|
||||||
|
<view class="flex ml15 mr15" style="justify-content: space-between">
|
||||||
|
<view class="ft14 ftw5000 cl-333">总运费</view>
|
||||||
|
<view class="ft14 ftw5000 " style="color: #EF1857;">免运费</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class=" box " style="height: 100rpx;line-height: 100rpx;">
|
||||||
|
<view class="flex ml15 mr15 alcenter" style="justify-content: space-between">
|
||||||
|
<view class="ft14 ftw5000 cl-333">使用积分</view>
|
||||||
|
<image style="width: 28rpx;height: 28rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/select_icon.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="box " style="height: 100rpx;line-height: 100rpx;width: 100%;">
|
||||||
|
<view class="flex ml15 mr15 alcenter" style="justify-content: space-between">
|
||||||
|
<view class="ft14 ftw5000 cl-333" style="width: 50%;">备注</view>
|
||||||
|
<input class="uni-input" v-model="remark" placeholder="请输入内容" style="text-align: right;" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bottom_button ">
|
||||||
|
<view style="height: 88rpx;display: flex;justify-content: space-between;width: 100%;align-items: baseline">
|
||||||
|
<view class="" style="height: 80rpx;">
|
||||||
|
<text class="ftw5000 ft14 cl-999" style="margin-left: 34rpx;margin-right: 20rpx;">共1件</text>
|
||||||
|
<text class="ftw5000 ft14 cl-999">合计:</text>
|
||||||
|
<text class="ftw5000 ft16 " style="color: #EF1857;">{{detailsdata.price}}</text>
|
||||||
|
<text class="ftw5000 ft14 " style="color: #EF1857;">积分</text>
|
||||||
|
</view>
|
||||||
|
<view class="exchange button" @click="clickexchange">提交订单</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <uni-popup type="center" ref="pointsyes">
|
||||||
|
<view class="pointsyesbox">
|
||||||
|
<view class="ft24">积分扣除成功</view>
|
||||||
|
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup> -->
|
||||||
|
<addresspopup ref="addresspopup" @replacement="replacement"></addresspopup>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import addresspopup from "@/pagesA/components/addresspopup.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addresspopup
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
remark: "",
|
||||||
|
detailsdata: {},
|
||||||
|
address: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.shanchu(e.id)
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
shanchu(id) {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/goods/info',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
goods_id: id
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.detailsdata = res.data
|
||||||
|
console.log(this.detailsdata);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取快递地址
|
||||||
|
getlist() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/list',
|
||||||
|
data: this.data,
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
for (var i = 0; i < res.data.list.length; i++) {
|
||||||
|
res.data.list[i].is_default = 0
|
||||||
|
if (res.data.list[i].is_default == 1) {
|
||||||
|
this.address = res.data.list[i]
|
||||||
|
return
|
||||||
|
} else if (i + 1 == res.data.list.length) {
|
||||||
|
this.address = res.data.list[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
shopaddress(){
|
||||||
|
if(!this.address.accept_province || !this.address.accept_city || !this.address.accept_exp_area || !this.address.accept_address){
|
||||||
|
this.navaddress();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$refs.addresspopup.addressshop(this.address)
|
||||||
|
},
|
||||||
|
|
||||||
|
clickexchange() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/order/create',
|
||||||
|
data: {
|
||||||
|
goods_id: this.detailsdata.id,
|
||||||
|
address_id: this.address.id,
|
||||||
|
buy_num: 1,
|
||||||
|
remark: this.remark
|
||||||
|
},
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
uni.navigateTo({ //订单
|
||||||
|
url: '/pagesA/integral/completeorder?id=' + res.data.order_id
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
return
|
||||||
|
this.$refs.pointsyes.open()
|
||||||
|
},
|
||||||
|
|
||||||
|
navaddress() {
|
||||||
|
uni.navigateTo({ //地址
|
||||||
|
url: '/pagesA/integral/address'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
replacement(data){
|
||||||
|
this.address = data
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||||
|
padding-top: 54rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 356rpx;
|
||||||
|
height: 356rpx;
|
||||||
|
background-color: #F7F8F9;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 0 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.addressbox {
|
||||||
|
height: 160rpx;
|
||||||
|
padding-right: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.messagebox {
|
||||||
|
padding: 22rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message_select {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
z-index: 1;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exchange {
|
||||||
|
margin: 16rpx 28rpx 0 28rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 312rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointsyesbox {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.box {
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,394 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||||
|
订单详情
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="flex alcenter ml15 mb10" v-if="orderdata.status == 0">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/payment_.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">待付款</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 1">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/distribution.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">待发货</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10 " v-else-if="orderdata.status == 2">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/deliver_goods.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">已发货</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 3">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">已完成</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 4">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">已取消</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 5">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">已退款</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 26">
|
||||||
|
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||||
|
</image>
|
||||||
|
<text class="ml10 ft22 ftw600 cl-333">兑换成功</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content">
|
||||||
|
<!-- 地址 -->
|
||||||
|
<view class="addressbox box pt16 pb16">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<image style="width: 40rpx; height: 40rpx;margin-left: 12rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/address.png" mode=""></image>
|
||||||
|
<text class="ft14 ftw500 cl-333" style="padding-left: 18rpx;">{{orderdata.accept_name}}</text>
|
||||||
|
<text class="ft14 ftw500 cl-333 pl20">{{orderdata.accept_mobile}}</text>
|
||||||
|
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;">
|
||||||
|
{{orderdata.accept_province}}{{orderdata.accept_city}}{{orderdata.accept_exp_area}}{{orderdata.accept_address}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 商品信息 -->
|
||||||
|
<view class="messagebox box flex">
|
||||||
|
<view class=""></view>
|
||||||
|
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="orderdata.cimage" mode="">
|
||||||
|
</image>
|
||||||
|
<view class="ml10 flex" style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||||
|
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{orderdata.goods_name}}</view>
|
||||||
|
<view class="" style="color: #EF1857;">
|
||||||
|
<text class="ft20 ftw500">{{orderdata.total_amount}}</text>
|
||||||
|
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 商品信息选择 -->
|
||||||
|
<view class="message_select box ">
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">商品总价</view>
|
||||||
|
<view class="ft14 ftw5000 " style="color: #EF1857;">{{orderdata.total_amount}}积分</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">总运费</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333">{{orderdata.delivery_fee == 0.00 ? '免费': orderdata.delivery_fee }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="boxitem " v-if="orderdata.express_no !==''">
|
||||||
|
<view class="ft14 ftw5000 cl-333">物流单号</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333 alcenter flex" style="line-height: 30rpx;">
|
||||||
|
<view class="" style="width: 380rpx; word-wrap:break-word;text-align: right;">
|
||||||
|
{{orderdata.express_no}}
|
||||||
|
</view>
|
||||||
|
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.express_no)">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="boxitem" v-if="orderdata.order_no !==''">
|
||||||
|
<view class="ft14 ftw5000 cl-333">订单编号</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333 alcenter">{{orderdata.order_no}}
|
||||||
|
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.order_no)"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">支付方式</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333">积分</view>
|
||||||
|
</view>
|
||||||
|
<view class="boxitem" v-if="orderdata.addtime !==''">
|
||||||
|
<view class="ft14 ftw5000 cl-333">下单时间</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333">{{orderdata.addtime}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="boxitem" v-if="orderdata.addtime !==''">
|
||||||
|
<view class="ft14 ftw5000 cl-333">备注</view>
|
||||||
|
<view class="ft14 ftw5000 cl-333">{{orderdata.remark}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bottom_button ">
|
||||||
|
|
||||||
|
<view class="bottom_button" v-if="orderdata.is_pay == 1 && orderdata.status == 2">
|
||||||
|
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
|
||||||
|
<view class="exchange button" @click="queren">确认收货</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="bottom_button" v-else-if="orderdata.is_pay == 0">
|
||||||
|
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
|
||||||
|
<view class="exchange button" @click="getdeliveryOrder">立即兑换</view>
|
||||||
|
</view>
|
||||||
|
<view class="practices" @click="clickexchange" v-else-if="orderdata.is_pay == 1">联系客服</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<uni-popup type="center" ref="pointsyes">
|
||||||
|
<view class="pointsyesbox">
|
||||||
|
<view class="ft16" style="margin-top: 30rpx;">
|
||||||
|
<text>客服电话:</text>
|
||||||
|
<text>{{serviceInfo.service_mobile}}</text>
|
||||||
|
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(serviceInfo.service_mobile)">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
remark: "",
|
||||||
|
id: "",
|
||||||
|
orderdata: {},
|
||||||
|
serviceInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.id = e.id
|
||||||
|
this.getorderinfo()
|
||||||
|
this.getserviceInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
//获取订单详情
|
||||||
|
getorderinfo() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/order/info',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
order_id: this.id,
|
||||||
|
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
console.log(res);
|
||||||
|
this.orderdata = res.data.info
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//支付订单
|
||||||
|
getdeliveryOrder() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/pay/deliveryOrder',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
order_id: this.id,
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "商品兑换成功",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
this.getorderinfo()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getserviceInfo() { //app信息拿取电话
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/user/serviceInfo",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
this.serviceInfo = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queren() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/delivery/order/receive",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
order_id: this.id,
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "已确认收货",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
this.getorderinfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
clickexchange() {
|
||||||
|
this.$refs.pointsyes.open()
|
||||||
|
},
|
||||||
|
|
||||||
|
navorder() {
|
||||||
|
this.$refs.pointsyes.close()
|
||||||
|
},
|
||||||
|
|
||||||
|
navaddress() {
|
||||||
|
uni.navigateTo({ //订单
|
||||||
|
url: '/pagesA/integral/address'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
copy(value) {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: value, //要被复制的内容
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||||
|
padding-top: 58rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 356rpx;
|
||||||
|
/* height: 356rpx; */
|
||||||
|
background-color: #F7F8F9;
|
||||||
|
padding-bottom: 160rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 0 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.addressbox {
|
||||||
|
height: 160rpx;
|
||||||
|
padding-right: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.messagebox {
|
||||||
|
padding: 22rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message_select {}
|
||||||
|
|
||||||
|
.bottom_button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
z-index: 1;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exchange {
|
||||||
|
margin: 16rpx 28rpx 0 28rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 312rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointsyesbox {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 24rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practice {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 312rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #000000;
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin: 14rpx 80rpx 0 80rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxitem {
|
||||||
|
display: flex;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-bottom: 2rpx solid #F7F8F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.box {
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#ffffff" @click="navBack"></uni-icons>
|
||||||
|
积分商城
|
||||||
|
</view>
|
||||||
|
<view class="integralbox">
|
||||||
|
<view class="integral_top">
|
||||||
|
<view class="ftw500" style="font-size: 72rpx;color: #333;">{{score}}</view>
|
||||||
|
<view class="ftw500 ft12" style="color: #846666;">当前积分</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="integral_bottom">
|
||||||
|
<view class="flex wrap">
|
||||||
|
<view class="integral_itme flex alcenter plr15" style="flex-direction: column"
|
||||||
|
@click="navpointsdetail">
|
||||||
|
<image class="barIcon" style="width: 64rpx;height: 64rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/js.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="">积分明细</view>
|
||||||
|
</view>
|
||||||
|
<view class="integral_itme flex alcenter plr15" style="flex-direction: column" @click="navOrder">
|
||||||
|
<image class="barIcon" style="width: 64rpx;height: 64rpx;"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jsdd.png" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<view class="">订单记录</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="exchange" @click="shopjing">
|
||||||
|
<view class="">兑换金豆</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="exclusive mt12 mb16" @click="exclusive">
|
||||||
|
<view class="exclusiveitem flex alcenter space">
|
||||||
|
<view class="">恒泰业主专享</view>
|
||||||
|
<image style="width: 20rpx;height: 20rpx;" src="https://yaohe666.com/static/jf/right_ionc.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="articles">
|
||||||
|
<integral-articles :Commodity="listData"></integral-articles>
|
||||||
|
</view>
|
||||||
|
<integralTrade ref="integral" @success="getuser"> </integralTrade>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import integralArticles from "@/pagesA/components/integralArticles.vue"
|
||||||
|
import integralTrade from "@/pagesA/components/integralTrade.vue"
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
integralArticles,
|
||||||
|
integralTrade
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listData: [],
|
||||||
|
Commodity: [],
|
||||||
|
score:"",
|
||||||
|
pages: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
allPage: 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.Commodity = this.list
|
||||||
|
this.getgoods()
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
this.getuser()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
exclusive() {
|
||||||
|
uni.navigateTo({ //专享
|
||||||
|
url: '/pagesA/integral/Exclusive?name=' + "恒泰业主专享"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
navpointsdetail() { //明细
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/integral/pointsdetail'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
navOrder() { //订单
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/integral/Order'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
shopjing() {
|
||||||
|
this.$refs.integral.pointsyesshop()
|
||||||
|
},
|
||||||
|
//获取 用户积分
|
||||||
|
getuser() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/index',
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.data.score);
|
||||||
|
this.score = res.data.score
|
||||||
|
}).catch(err => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取 商品
|
||||||
|
getgoods(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/delivery/goods/list',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
page: that.pages.currentPage,
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
if(res.code == 1){
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.data.list;
|
||||||
|
that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||||
|
} else {
|
||||||
|
that.listData.push(...res.data.list)
|
||||||
|
}
|
||||||
|
this.pages.currentPage++;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pages.currentPage <= this.pages.allPage) {
|
||||||
|
this.getgoods();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page {
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jf_bg.png);
|
||||||
|
background-size: 100% 389rpx;
|
||||||
|
height: 389rpx;
|
||||||
|
padding-top: 44rpx;
|
||||||
|
background-color: #F7F8F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 128rpx;
|
||||||
|
line-height: 128rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integralbox {
|
||||||
|
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jb_bg1.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 700rpx 392rpx;
|
||||||
|
margin: 0 25rpx;
|
||||||
|
height: 389rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral_top {
|
||||||
|
margin-top: 36rpx;
|
||||||
|
margin-left: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.integral_bottom {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exchange {
|
||||||
|
width: 240rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: linear-gradient(90deg, #FFA100 0%, #FFD11E 100%);
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-right: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exclusiveitem {
|
||||||
|
margin: 0 25rpx;
|
||||||
|
width: 700rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
padding: 0 24rpx 0 32rpx;
|
||||||
|
background: linear-gradient(158deg, #FFF7EA 0%, #FFFFFF 100%);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.articles {
|
||||||
|
/* margin: 0 25rpx; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="message_select box ">
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">收货人</view>
|
||||||
|
<input class="uni-input" style="width: 440rpx;" v-model="data.accept_name" placeholder="请输入收货人姓名" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">手机号</view>
|
||||||
|
<input class="uni-input" style="width: 440rpx;" type="number" maxlength="11" v-model="data.accept_mobile" placeholder="请输入手机号码" />
|
||||||
|
</view>
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">所在地区</view>
|
||||||
|
<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion">
|
||||||
|
<view class="flex alcenter" style="width: 440rpx; justify-content: space-between;color: grey;">
|
||||||
|
|
||||||
|
<text v-if="data.accept_province==''">请选择省、市、区</text>
|
||||||
|
<text v-else
|
||||||
|
style="color: #191919; line-height: 30rpx;">{{data.accept_province}},{{data.accept_city}},{{data.accept_exp_area}}</text>
|
||||||
|
|
||||||
|
<uni-icons class="backIcon" type="right" size="18" color="#333333"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</pick-regions>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">详细地址</view>
|
||||||
|
<input class="uni-input" style="width: 440rpx;" v-model="data.accept_address" placeholder="请输入详细地址" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="boxitem">
|
||||||
|
<view class="ft14 ftw5000 cl-333">设置默认地址</view>
|
||||||
|
<switch :checked="checkeddata" @change="switch1Change" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom_button " v-if="type == 1">
|
||||||
|
<view class="practices button" @click="baocun">保存</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom_button" v-else>
|
||||||
|
<view class="baocun1 button" @click="shanchu">删除</view>
|
||||||
|
<view class="baocun2 button" @click="xiugai">修改</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pickRegions from '@/pagesA/components/pick-regions/pick-regions.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
pickRegions
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
data: {
|
||||||
|
accept_name: "",
|
||||||
|
accept_mobile: "",
|
||||||
|
accept_province: "",
|
||||||
|
accept_city: "",
|
||||||
|
accept_exp_area: "",
|
||||||
|
accept_address: "",
|
||||||
|
is_default: 0,
|
||||||
|
},
|
||||||
|
defaultRegionCode: '100000',
|
||||||
|
type: 1,
|
||||||
|
ids: "",
|
||||||
|
checkeddata: true
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
let data = JSON.parse(e.data)
|
||||||
|
|
||||||
|
|
||||||
|
if (data.is_default == 1) {
|
||||||
|
this.checkeddata = true
|
||||||
|
} else {
|
||||||
|
this.checkeddata = false
|
||||||
|
}
|
||||||
|
if (e.type == 1) {
|
||||||
|
this.type == 1
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: "新增地址"
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.type = 2
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: "修改地址"
|
||||||
|
})
|
||||||
|
|
||||||
|
this.ids = data.id
|
||||||
|
this.data.accept_name = data.accept_name
|
||||||
|
this.data.accept_mobile = data.accept_mobile
|
||||||
|
this.data.accept_province = data.accept_province
|
||||||
|
this.data.accept_city = data.accept_city
|
||||||
|
this.data.accept_exp_area = data.accept_exp_area
|
||||||
|
this.data.accept_address = data.accept_address
|
||||||
|
this.data.is_default = data.is_default
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
switch1Change(e) {
|
||||||
|
if (e.detail.value) {
|
||||||
|
this.data.is_default = 1
|
||||||
|
this.checkeddata = e.detail.value
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.data.is_default = 0
|
||||||
|
this.checkeddata = e.detail.value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取选择的地区
|
||||||
|
handleGetRegion(region) {
|
||||||
|
this.data.accept_province = region[0].name
|
||||||
|
this.data.accept_city = region[1].name
|
||||||
|
this.data.accept_exp_area = region[2].name
|
||||||
|
},
|
||||||
|
baocun() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/add',
|
||||||
|
data: this.data,
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "创建成功",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
uni.navigateBack(1);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
shanchu() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/del',
|
||||||
|
data: {
|
||||||
|
id: this.ids
|
||||||
|
},
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "删除成功",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
uni.navigateBack(1)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
xiugai() {
|
||||||
|
this.data.id = this.ids
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/delivery/address/edit',
|
||||||
|
data: this.data,
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "修改成功",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user err');
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {}
|
||||||
|
|
||||||
|
.message_select {
|
||||||
|
margin: 25rpx;
|
||||||
|
width: 700rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxitem {
|
||||||
|
display: flex;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-bottom: 2rpx solid #F7F8F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 160rpx;
|
||||||
|
z-index: 1;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin: 14rpx 80rpx 0 80rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.baocun1 {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 45%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
border: 2rpx solid #D8D8D8;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin: 14rpx 40rpx 0 40rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.baocun2 {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 45%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin: 14rpx 40rpx 0 40rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||||
|
积分明细
|
||||||
|
</view>
|
||||||
|
<view class="box flex alcenter"
|
||||||
|
style="height: 120rpx; margin: 0 26rpx; width: 700rpx;justify-content: space-between">
|
||||||
|
<view class="flex alcenter" style="margin-left: 36rpx;">
|
||||||
|
<text class="ft14 ftw500" style="color: #666666;">积分余额:</text>
|
||||||
|
<text class="ft24 ftw600 cl-333">{{score}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="ft14 ftw500" style="margin-right: 36rpx; border: 2rpx solid #09D89E;width: 172rpx;
|
||||||
|
height: 60rpx; text-align: center; line-height: 60rpx; color: #09D89E;border-radius: 12rpx;" @click="shopjing">兑换金豆
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="typeTab">
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==2}]" @click="changeType(2)">收入明细</view>
|
||||||
|
<view :class="['typeItem',{'typeCheck':typeCheck==1}]" @click="changeType(1)">支出明细</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="myList">
|
||||||
|
<view class="lineItem" v-for="(item,index) in listData" :key="item.id">
|
||||||
|
<view class="lineInfo">
|
||||||
|
<view class="lineName">{{item.memo}}</view>
|
||||||
|
<view class="lineDescribe">{{item.createtime}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="lineNum">{{item.score}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
</view>
|
||||||
|
<integralTrade ref="integral"> </integralTrade>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import integralTrade from "@/pagesA/components/integralTrade.vue"
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
integralTrade
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
remark: "",
|
||||||
|
typeCheck: 2,
|
||||||
|
listData: [],
|
||||||
|
pages: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
allPage: 1,
|
||||||
|
},
|
||||||
|
status: 'more',
|
||||||
|
contentText: {
|
||||||
|
contentdown: "上拉显示更多",
|
||||||
|
contentrefresh: "正在加载...",
|
||||||
|
contentnomore: "没有更多数据了"
|
||||||
|
},
|
||||||
|
score:"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.changeType(2)
|
||||||
|
this.getuser()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pages.currentPage <= this.pages.allPage) {
|
||||||
|
this.getuserscoreinfo()
|
||||||
|
this.status = 'more';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
changeType(item) {
|
||||||
|
this.typeCheck = item
|
||||||
|
this.getuserscoreinfo()
|
||||||
|
},
|
||||||
|
getuserscoreinfo() {
|
||||||
|
this.status = 'loading';
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/userscoreinfo',
|
||||||
|
methods: "POST",
|
||||||
|
data: {
|
||||||
|
page: this.pages.currentPage,
|
||||||
|
limit: this.pages.pageSize,
|
||||||
|
type: this.typeCheck
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
this.status = ''
|
||||||
|
if (this.pages.currentPage == 1) {
|
||||||
|
this.listData = res.rows;
|
||||||
|
this.pages.allPage = Math.ceil(res.data.total / this.pages.pageSize);
|
||||||
|
} else if (res.rows.length > 0) {
|
||||||
|
this.listData.push(...res.rows)
|
||||||
|
} else {
|
||||||
|
this.status = 'noMore';
|
||||||
|
this.pages.isNextPage = 1;
|
||||||
|
}
|
||||||
|
this.pages.currentPage++;
|
||||||
|
}).catch(err => {
|
||||||
|
this.status = '';
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取 用户积分
|
||||||
|
getuser() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: '/api/user/index',
|
||||||
|
methods: "POST",
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.data.score);
|
||||||
|
this.score = res.data.score
|
||||||
|
}).catch(err => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
shopjing() {
|
||||||
|
this.$refs.integral.pointsyesshop()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||||
|
padding-top: 58rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 750rpx 356rpx;
|
||||||
|
background-color: #Ffffff;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 120rpx;
|
||||||
|
line-height: 120rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 0 26rpx;
|
||||||
|
/* background-color: #Ffffff; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeTab {
|
||||||
|
padding: 0 42rpx;
|
||||||
|
padding-top: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeItem {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-right: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeCheck {
|
||||||
|
color: #333333;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.typeCheck:before {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 4px;
|
||||||
|
background-color: #333333;
|
||||||
|
bottom: -16rpx;
|
||||||
|
left: calc(50% - 30rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.lineImg {
|
||||||
|
width: 192rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineName {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 48rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineDescribe {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineNum {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #EF1857;
|
||||||
|
line-height: 44rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineItem {
|
||||||
|
display: flex;
|
||||||
|
padding-top: 24rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 2rpx solid #F7F8F9;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.noListData {
|
||||||
|
position: absolute;
|
||||||
|
top: 40vh;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.noImg {
|
||||||
|
width: 314rpx;
|
||||||
|
height: 228rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.24);
|
||||||
|
line-height: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="list">
|
||||||
|
<view class="tishi">若您忘记了密码,可在此重新设置新密码。</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/1.png"></image>
|
||||||
|
<input class="sl-input" type="number" v-model="phone" maxlength="11" placeholder="请输入手机号" />
|
||||||
|
</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/2.png"></image>
|
||||||
|
<input class="sl-input" type="text" v-model="password" maxlength="32" placeholder="请输入新密码" :password="!showPassword" />
|
||||||
|
<image class="img" :src="showPassword?'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/op.png':'https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/cl.png'" @tap="display"></image>
|
||||||
|
</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/3.png"></image>
|
||||||
|
<input class="sl-input" type="number" v-model="code" maxlength="4" placeholder="验证码" />
|
||||||
|
<view class="yzm" :class="{ yzms: second>0 }" @tap="getcode">{{yanzhengma}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button-login" hover-class="button-hover" @tap="bindLogin()">修改密码 </view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var _this, js;
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
phone: '',
|
||||||
|
second: 0,
|
||||||
|
code: "",
|
||||||
|
showPassword: false,
|
||||||
|
password: '',
|
||||||
|
codeInterVal:null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
_this = this;
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
yanzhengma() {
|
||||||
|
if (this.second == 0) {
|
||||||
|
return '获取验证码';
|
||||||
|
} else {
|
||||||
|
if (this.second < 10) {
|
||||||
|
return '重新获取0' + this.second;
|
||||||
|
} else {
|
||||||
|
return '重新获取' + this.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.clear()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
display() {
|
||||||
|
this.showPassword = !this.showPassword
|
||||||
|
},
|
||||||
|
clear(){
|
||||||
|
clearInterval(js)
|
||||||
|
js = null
|
||||||
|
this.second = 0
|
||||||
|
},
|
||||||
|
getcode() {
|
||||||
|
let _this = this;
|
||||||
|
if (this.phone.length != 11) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '手机号不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.second > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.second = 60;
|
||||||
|
this.codeInterVal = setInterval(function () {
|
||||||
|
_this.second--;
|
||||||
|
if (_this.second == 0) {
|
||||||
|
clearInterval(_this.codeInterVal)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
_this.$httpRequest({
|
||||||
|
url:"/api/sms/index",
|
||||||
|
data:{
|
||||||
|
phone:_this.phone
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
uni.showToast({title: res.msg, icon: "none"});
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
bindLogin() {
|
||||||
|
if (this.phone.length != 11) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '手机号不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.password.length < 6) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '密码不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.code.length != 4) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '验证码不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.zc();
|
||||||
|
|
||||||
|
},
|
||||||
|
zc() {
|
||||||
|
let _this = this;
|
||||||
|
let data = {
|
||||||
|
mobile: this.phone,
|
||||||
|
newpassword: this.password,
|
||||||
|
captcha: this.code,
|
||||||
|
};
|
||||||
|
_this.$httpRequest({
|
||||||
|
url:"/api/user/resetpwd",
|
||||||
|
data:data
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.code ==1){
|
||||||
|
uni.navigateBack();
|
||||||
|
}else{
|
||||||
|
uni.showToast({title: res.msg, icon: "none"});
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tishi {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
padding-left: 70rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 100rpx;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 0.5px solid #e2e2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .img {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .sl-input {
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-login {
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 34rpx;
|
||||||
|
width: 470rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background: linear-gradient(-90deg, rgba(63, 205, 235, 1), rgba(188, 226, 158, 1));
|
||||||
|
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.2);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-hover {
|
||||||
|
background: linear-gradient(-90deg, rgba(63, 205, 235, 0.8), rgba(188, 226, 158, 0.8));
|
||||||
|
}
|
||||||
|
|
||||||
|
.yzm {
|
||||||
|
color: #FF7D13;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
width: auto;
|
||||||
|
height: 64rpx;
|
||||||
|
border: 1rpx solid rgba(255, 131, 30, 1);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yzms {
|
||||||
|
color: #999999 !important;
|
||||||
|
border: 1rpx solid #999999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content" v-if="idfd==1">
|
||||||
|
<view class="header">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/logo.png"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list">
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/1.png"></image>
|
||||||
|
<input class="sl-input" v-model="mobile" type="number" maxlength="11" placeholder="输入手机号" />
|
||||||
|
</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/2.png"></image>
|
||||||
|
<input class="sl-input" v-model="password" type="text" maxlength="32" placeholder="输入密码"
|
||||||
|
password="true" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button-login" hover-class="button-hover" @tap="bindLogin()">
|
||||||
|
<text style="font-size: 40upx;">登录</text>
|
||||||
|
</view>
|
||||||
|
<!-- #ifdef H5 || APP-->
|
||||||
|
<view class="register">
|
||||||
|
<view @click="goRegister">立即注册</view>
|
||||||
|
<view @click="goPassWord">忘记密码</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<!-- <view class="list" style="margin-top: 10px; color: #666; font-size: 14px;text-align: center;">openid:{{openid}}</view> -->
|
||||||
|
<button class="button-login" @click="getUserInfo1()"
|
||||||
|
style="margin-top: 35rpx; font-size: 26upx; color: #fff; height: 80rpx; line-height: 80rpx;">获取微信授权
|
||||||
|
</button>
|
||||||
|
<view class="agreenment">
|
||||||
|
<navigator url="reg" open-type="navigate" @click="goRegister">注册账户</navigator>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mobile: '',
|
||||||
|
password: '',
|
||||||
|
openid: '',
|
||||||
|
unionid: '',
|
||||||
|
userinfowx: '',
|
||||||
|
idfd: 1,
|
||||||
|
fxpid: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log('查看分享也=-------', e)
|
||||||
|
if (e.fxpid) {
|
||||||
|
this.fxpid = e.fxpid
|
||||||
|
uni.setStorageSync('invite_number', e.invite)
|
||||||
|
if (e.fxpid > 0) {
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'fxpid',
|
||||||
|
data: e.fxpid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
goRegister() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesA/login/register"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goPassWord() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesA/login/forget"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindLogin() {
|
||||||
|
let that = this
|
||||||
|
if (!this.mobile) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '手机号不能为空',
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
this.userfocus = true
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.password) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '密码不能为空',
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
this.paswfocus = true
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
'account': this.mobile,
|
||||||
|
'password': this.password
|
||||||
|
};
|
||||||
|
if (this.openid) {
|
||||||
|
data.openid = this.openid;
|
||||||
|
}
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/login",
|
||||||
|
method: "GET",
|
||||||
|
data: data
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.setStorageSync('userinfo', res.data.userinfo);
|
||||||
|
uni.setStorageSync('config', res.data.config);
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: res.msg,
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: "确定",
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getUserInfo() {
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: function(loginRes) {
|
||||||
|
console.log(loginRes.authResult);
|
||||||
|
// 获取用户信息
|
||||||
|
uni.getUserInfo({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: function(infoRes) {
|
||||||
|
console.log('用户昵称为:' + infoRes.userInfo.nickName);
|
||||||
|
console.log(infoRes);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width: 161rpx;
|
||||||
|
height: 161rpx;
|
||||||
|
background: rgba(63, 205, 235, 1);
|
||||||
|
box-shadow: 0rpx 12rpx 13rpx 0rpx rgba(63, 205, 235, 0.47);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header image {
|
||||||
|
width: 161rpx;
|
||||||
|
height: 161rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
padding-left: 70rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 100rpx;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 0.5px solid #e2e2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .img {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .sl-input {
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-login {
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 34rpx;
|
||||||
|
width: 470rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
background: linear-gradient(-90deg, rgba(75, 196, 93, 1), rgba(188, 226, 158, 1));
|
||||||
|
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.2);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-login1 {
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 34rpx;
|
||||||
|
width: 470rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: linear-gradient(-90deg, rgba(75, 196, 93, 1), rgba(188, 226, 158, 1));
|
||||||
|
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.2);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-hover {
|
||||||
|
background: linear-gradient(-90deg, rgba(63, 205, 235, 0.8), rgba(188, 226, 158, 0.8));
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreenment {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
color: #FFA800;
|
||||||
|
text-align: center;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreenment text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register view {
|
||||||
|
text-align: center;
|
||||||
|
color: #C79556;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
margin: 0 40rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,297 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="header">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/logo.png"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list">
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/1.png"></image>
|
||||||
|
<input class="sl-input" v-model="phone" type="number" maxlength="11" placeholder="手机号"/>
|
||||||
|
</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/2.png"></image>
|
||||||
|
<input class="sl-input" v-model="password" type="text" maxlength="32" placeholder="登录密码"
|
||||||
|
:password="!showPassword"/>
|
||||||
|
<image class="img" :src="showPassword?'/static/shilu-login/op.png':'/static/shilu-login/cl.png'"
|
||||||
|
@tap="display"></image>
|
||||||
|
</view>
|
||||||
|
<view class="list-call">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/3.png"></image>
|
||||||
|
<input class="sl-input" v-model="code" type="number" maxlength="4" placeholder="验证码"/>
|
||||||
|
<view class="yzm" :class="{ yzms: second>0 }" @tap="getcode">{{ yanzhengma }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-call" v-if="iskq==1">
|
||||||
|
<image class="img" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/shilu-login/4.png"></image>
|
||||||
|
<input class="sl-input" v-model="invitation" type="text" maxlength="12" placeholder="邀请码 没有留空"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="button-login" hover-class="button-hover" @tap="bindLogin">
|
||||||
|
<text style="font-size: 40upx;">注册</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="agreement">
|
||||||
|
<image @tap="agreementSuccess"
|
||||||
|
:src="agreement==true?'/static/shilu-login/ty1.png':'/static/shilu-login/ty0.png'"></image>
|
||||||
|
<text @tap="agreementSuccess"> 同意</text>
|
||||||
|
<navigator open-type="navigate">《软件用户协议》</navigator>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pay from "@/utils/pay";
|
||||||
|
|
||||||
|
var _this, js;
|
||||||
|
export default {
|
||||||
|
onLoad(e) {
|
||||||
|
if (e.uid) {
|
||||||
|
this.invitation = e.uid
|
||||||
|
} else {
|
||||||
|
var fxpid = uni.getStorageSync("fxpid")
|
||||||
|
if (fxpid) {
|
||||||
|
this.invitation = fxpid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
clearInterval(js)
|
||||||
|
this.second = 0;
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
phone: '',
|
||||||
|
password: '',
|
||||||
|
code: '',
|
||||||
|
invitation: '',
|
||||||
|
agreement: true,
|
||||||
|
showPassword: false,
|
||||||
|
second: 0,
|
||||||
|
iskq: 0,
|
||||||
|
codeInterVal:null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
yanzhengma() {
|
||||||
|
if (this.second == 0) {
|
||||||
|
return '获取验证码';
|
||||||
|
} else {
|
||||||
|
if (this.second < 10) {
|
||||||
|
return '重新获取0' + this.second;
|
||||||
|
} else {
|
||||||
|
return '重新获取' + this.second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
display() {
|
||||||
|
this.showPassword = !this.showPassword
|
||||||
|
},
|
||||||
|
agreementSuccess() {
|
||||||
|
this.agreement = !this.agreement;
|
||||||
|
},
|
||||||
|
getcode() {
|
||||||
|
let _this = this;
|
||||||
|
if (this.phone.length != 11) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '手机号不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.second > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.second = 60;
|
||||||
|
//请求业务
|
||||||
|
this.codeInterVal = setInterval(function () {
|
||||||
|
_this.second--;
|
||||||
|
if (_this.second == 0) {
|
||||||
|
clearInterval(_this.codeInterVal)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
_this.$httpRequest({
|
||||||
|
url:"/api/sms/index",
|
||||||
|
data:{
|
||||||
|
phone:_this.phone
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
uni.showToast({title: res.msg, icon: "none"});
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindLogin() {
|
||||||
|
if (this.agreement == false) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先阅读《软件用户协议》'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.phone.length != 11) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '手机号不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.password.length < 6) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '密码不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.code.length != 4) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '验证码不正确'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.zc();
|
||||||
|
},
|
||||||
|
zc() {
|
||||||
|
let _this = this;
|
||||||
|
_this.$httpRequest({
|
||||||
|
url:"/api/user/reg",
|
||||||
|
method:"GET",
|
||||||
|
data:{
|
||||||
|
mobile:this.phone,
|
||||||
|
username:this.phone,
|
||||||
|
password:this.password,
|
||||||
|
pid:this.invitation,
|
||||||
|
code:this.code
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.code ==1){
|
||||||
|
uni.redirectTo({
|
||||||
|
url:"/pagesA/login/login"
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.showToast({title: res.msg, icon: "none"});
|
||||||
|
}
|
||||||
|
console.log(res)
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width: 161rpx;
|
||||||
|
height: 161rpx;
|
||||||
|
background: rgba(63, 205, 235, 1);
|
||||||
|
box-shadow: 0rpx 12rpx 13rpx 0rpx rgba(63, 205, 235, 0.47);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header image {
|
||||||
|
width: 161rpx;
|
||||||
|
height: 161rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
padding-left: 70rpx;
|
||||||
|
padding-right: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 100rpx;
|
||||||
|
color: #333333;
|
||||||
|
border-bottom: 0.5px solid #e2e2e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .img {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-call .sl-input {
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yzm {
|
||||||
|
color: #FF7D13;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
width: auto;
|
||||||
|
height: 64rpx;
|
||||||
|
border: 1rpx solid #FFA800;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yzms {
|
||||||
|
color: #999999 !important;
|
||||||
|
border: 1rpx solid #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-login {
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 34rpx;
|
||||||
|
width: 470rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
background: linear-gradient(-90deg, rgba(75, 196, 93, 1), rgba(188, 226, 158, 1));
|
||||||
|
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(164, 217, 228, 0.2);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-hover {
|
||||||
|
background: linear-gradient(-90deg, rgba(63, 205, 235, 0.8), rgba(188, 226, 158, 0.8));
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
color: #FFA800;
|
||||||
|
text-align: center;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
|
<!-- <view style="margin:10upx 30upx 0 30upx;box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.04);">
|
||||||
|
<home-banner :banners="banners"></home-banner>
|
||||||
|
</view> -->
|
||||||
|
<view class="" style="padding: 30upx 30upx 0px 30upx;">
|
||||||
|
<block v-for="(value,key) in listData" :key="key">
|
||||||
|
<view @click="detail(value.vid,value.mid)" style="position: relative;" class="flex alcenter mb16">
|
||||||
|
<image mode="aspectFill" class="tuan-product-l" :src="value.img"></image>
|
||||||
|
<!-- <view class="btn-mini" style="position: absolute; top: 40upx; left: 280upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
||||||
|
<view class="tuan-product-r pl15">
|
||||||
|
<view class="ft16 ftw600 cl-main text-over2">{{value.vname}}</view>
|
||||||
|
<view class="mt16">
|
||||||
|
<text class="ft14 cl-orange" style="color: #09D89E;">{{value.dqname}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="mt16 flex space alcenter">
|
||||||
|
<view class="ft14 cl-notice">{{value.mname}}</view>
|
||||||
|
<view class="btn-vip-adviser ml15">继续观看</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" />
|
||||||
|
<view style="width: 100%; height: 30rpx;"></view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
banners:[],
|
||||||
|
searchValue:'',
|
||||||
|
pages:{
|
||||||
|
currentPage:1,
|
||||||
|
pageSize:20,
|
||||||
|
isNextPage:true
|
||||||
|
},
|
||||||
|
tabs:[
|
||||||
|
{name:'全部'},
|
||||||
|
{name:'视频'},
|
||||||
|
{name:'音频'},
|
||||||
|
{name:'小说'},
|
||||||
|
{name:'壁纸'},
|
||||||
|
],
|
||||||
|
selectIndex:0,
|
||||||
|
scrollTop:0,
|
||||||
|
type:'',
|
||||||
|
|
||||||
|
listData: [],
|
||||||
|
status: 'more',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e){
|
||||||
|
//console.log(111)
|
||||||
|
if(e.selectIndex){
|
||||||
|
this.selectIndex=e.selectIndex*1
|
||||||
|
}
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
this.banners=uni.getStorageSync("config").banner
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods:{
|
||||||
|
detail(vid,mid){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pagesA/player/detailPlayer?vid='+vid+'&mid='+mid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/recordlist",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.rows;
|
||||||
|
} else if (res.rows.length > 0) {
|
||||||
|
that.listData = that.listData.concat(res.rows);
|
||||||
|
} else {
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tuan-product-l{
|
||||||
|
width: 150rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
.tuan-product-r{
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
}
|
||||||
|
.btn-vip-adviser{
|
||||||
|
width: 150rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
/* font-weight: 600; */
|
||||||
|
border-radius: 12rpx;
|
||||||
|
border: 2rpx solid #09D89E;
|
||||||
|
color: #09D89E;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="flex" style="display:flex; flex-wrap:wrap; padding: 30upx 30upx 0px 30upx;">
|
||||||
|
<block v-for="(value,key) in listData" :key="key">
|
||||||
|
<view class="mb15" style="width:31%; border-radius:20rpx;margin-right: 14rpx;"
|
||||||
|
@click="detail(value.vid,value.mid)">
|
||||||
|
<!-- <view class="btn-mini" style="position: absolute; top: 20upx; right: 20upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx; z-index: 1;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
||||||
|
<image class="integral-mall-goods" mode="aspectFill" :src="value.img"></image>
|
||||||
|
<view class="pr10 ft14 ftw400 text-over cl-main">{{value.vname}}</view>
|
||||||
|
<view class="pr10 ft12 ftw500 text-over cl-999">观看至 {{value.mid}} 集</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
<view style="width: 100%; height: 30upx;"></view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
banners: [],
|
||||||
|
searchValue: '',
|
||||||
|
pages: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
isNextPage: true
|
||||||
|
},
|
||||||
|
tabs: [{
|
||||||
|
name: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '视频'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '音频'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '小说'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '壁纸'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
selectIndex: 0,
|
||||||
|
scrollTop: 0,
|
||||||
|
type: '',
|
||||||
|
|
||||||
|
listData: [],
|
||||||
|
status: 'more',
|
||||||
|
contentText: {
|
||||||
|
contentdown: "上拉显示更多",
|
||||||
|
contentrefresh: "正在加载...",
|
||||||
|
contentnomore: "没有更多数据了"
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
//console.log(111)
|
||||||
|
if (e.selectIndex) {
|
||||||
|
this.selectIndex = e.selectIndex * 1
|
||||||
|
}
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
this.banners = uni.getStorageSync("config").banner
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
detail(vid, mid) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/player/detailPlayer?vid=' + vid + '&mid=' + mid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/wdxh",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.rows;
|
||||||
|
} else if (res.rows.length > 0) {
|
||||||
|
that.listData = that.listData.concat(res.rows);
|
||||||
|
} else {
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.integral-mall-goods {
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-not-vip {
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FDF6EC;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
border: 2rpx solid #EFC381;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 76rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tuan-product-l {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-r {
|
||||||
|
width: calc(100% - 320rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-mt-10 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,661 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="pagesHeader">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#ffffff" @click="navBack"></uni-icons>
|
||||||
|
金豆充值
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex cl-w" style="flex-direction: column;padding-left: 58rpx;">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text style="font-weight: bold;font-size: 72rpx;color: #FFFFFF;float: left;">{{ userdata.beans }}</text>
|
||||||
|
<uni-icons style="margin-left: 80rpx;" type="right" size="24" color="#ffffff"
|
||||||
|
@click="goBill"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<text class="ft16 ftw500" style="float: left;margin-top: 22rpx;">我的金豆</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="margin-top: -36rpx;padding: 36rpx 36rpx;background-color: #fff;border-radius: 28rpx 28rpx 0rpx 0rpx;">
|
||||||
|
<view class="ftw500 ft14 cl-333" style="margin-bottom: 24rpx;">充值金额</view>
|
||||||
|
<view class="vipCarBox" v-if="payListGroupId==1">
|
||||||
|
<view :class="[
|
||||||
|
'vipCarItem',
|
||||||
|
{'vipCarThird':item.pay_type == 1},
|
||||||
|
{'vipCarFirst': item.pay_type == 2},
|
||||||
|
{'vipCarFourth':item.pay_type == 3 },
|
||||||
|
] " v-for="item in list" :key="item.id" @click="purchase(item)">
|
||||||
|
<text class="icon" v-if="item.pay_tab > 0">特惠</text>
|
||||||
|
<view class="moneyLine">
|
||||||
|
<view class="money" v-if="system=='ios' && is_check"> </view>
|
||||||
|
<view class="money" v-else>¥{{ item.pay_money }}</view>
|
||||||
|
<view class="beanBtn" v-if="item.pay_give_num && item.pay_type == 2">赠{{ item.send_integral }}积分
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="depict" v-if="item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{ item.pay_num }}金豆+{{ item.pay_give_num }}豆
|
||||||
|
</view>
|
||||||
|
<view class="depict" v-if="!item.pay_give_num && item.pay_type == 2">
|
||||||
|
{{ item.pay_num }}金豆
|
||||||
|
</view>
|
||||||
|
<view class="explainText" v-if="item.pay_type != 2">
|
||||||
|
<text v-if="item.pay_type == 1" style="color: #333333;">全部影片免费观看</text>
|
||||||
|
<text v-if="item.pay_type == 3" style="color: #FF6900;">本剧订阅全集</text>
|
||||||
|
</view>
|
||||||
|
<view class="choiceNum" v-if="item.menber_sel">{{ item.menber_sel }}%用户选择</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="system=='ios' && is_check"></view>
|
||||||
|
<view class="agreement" v-else>
|
||||||
|
<view class="ft12 ftw500 cl-999">充值说明:</view>
|
||||||
|
<view class=" ftw500 cl-999" style="font-size: 22rpx;">虚拟商品购买后不可退换,青少年请在家长的陪同下充值</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view v-if="show"
|
||||||
|
style="background-color: rgba(0,0,0, 0.5);width: 750rpx;height: 100vh;z-index: 99;position: absolute;bottom: 0;left: 0;opacity:.5;"
|
||||||
|
@click="show=false"></view>
|
||||||
|
<view v-if="show" style="width: 750rpx;background: #F8F8F9;position: absolute;bottom: 0;left: 0;z-index: 999;">
|
||||||
|
<view style="background-color: #fff;padding: 30rpx;">
|
||||||
|
<view class="flex alcenter space">
|
||||||
|
<text class="ft14 cl-info2">需支付</text>
|
||||||
|
<text class="ft16 cl-main ftw600 cl-orange">¥{{ pricebuy }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="box mt16 pd16_15">
|
||||||
|
<view class="ft16 pb16 ftw600 cl-main">支付方式</view>
|
||||||
|
<view class="bd-line mt16"></view>
|
||||||
|
<radio-group @change="changeType">
|
||||||
|
<view class="pt16 pb16 flex alcenter space">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<text class="iconfont iconicon_pay_balance ft32 cl-green"></text>
|
||||||
|
<text class="ml15 ft14 ftw500 cl-main">微信支付</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<radio value="weixin" :checked="payType == 'weixin'" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bd-line"></view>
|
||||||
|
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
<view class="form-footer-h">
|
||||||
|
<view class="form-footer form-footer-h">
|
||||||
|
<view class="form-footer-main pd10_15" v-if="system=='ios' && is_check">
|
||||||
|
<button class="btn-big">请使用android手机体验</button>
|
||||||
|
</view>
|
||||||
|
<view class="form-footer-main pd10_15" v-else>
|
||||||
|
<button v-if="mid>0" class="btn-big" @click="okTap">支付
|
||||||
|
¥{{ pricebuy }}
|
||||||
|
</button>
|
||||||
|
<button v-else class="btn-big" @click="okTap">支付 ¥{{ pricebuy }}</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PAY from "@/utils/pay";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
list: [],
|
||||||
|
userdata: {},
|
||||||
|
// payType:'微信',
|
||||||
|
payType: 'weixin',
|
||||||
|
num: 1,
|
||||||
|
coupon_id: 0,
|
||||||
|
buydata: [],
|
||||||
|
buyType: '微信',
|
||||||
|
dataList: Object,
|
||||||
|
money: 0,
|
||||||
|
mid: 0,
|
||||||
|
openid: '',
|
||||||
|
pricebuy: 0,
|
||||||
|
wxlx: 'wxh5',
|
||||||
|
coupons: [{
|
||||||
|
coupon_id: 1,
|
||||||
|
num: 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coupon_id: 2,
|
||||||
|
num: 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
coupon_id: 3,
|
||||||
|
num: 40
|
||||||
|
},
|
||||||
|
],
|
||||||
|
id: '',
|
||||||
|
jine: '',
|
||||||
|
system: '',
|
||||||
|
payListGroupId: 1,
|
||||||
|
userInfo: {},
|
||||||
|
allVideoNum: 1,
|
||||||
|
is_check: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
this.system = uni.getSystemInfoSync().osName
|
||||||
|
//#ifdef MP-WEIXIN
|
||||||
|
this.wxlx = 'wxxcx'
|
||||||
|
this.openid = uni.getStorageSync("openid")
|
||||||
|
this.userInfo = uni.getStorageSync("userinfo");
|
||||||
|
//#endif
|
||||||
|
//#ifdef H5
|
||||||
|
var ua = window.navigator.userAgent.toLowerCase();
|
||||||
|
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||||
|
this.wxlx = 'wxgzh';
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.is_check = uni.getStorageSync('config').is_check == 1 ? true : false;
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.payListGroupId = uni.getStorageSync("config").pay_tpl;
|
||||||
|
this.payListGroupId = 1
|
||||||
|
this.getAllVideoNum();
|
||||||
|
this.getPayList()
|
||||||
|
this.getUserDel()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
okTap() {
|
||||||
|
var that = this
|
||||||
|
let defaultData = {
|
||||||
|
sum: 1,
|
||||||
|
buyType: that.buyType,
|
||||||
|
pricebuy: that.pricebuy,
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
wxlx: that.wxlx,
|
||||||
|
id: that.id,
|
||||||
|
openid: that.openid,
|
||||||
|
info: [],
|
||||||
|
};
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.weiChartPay(defaultData)
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
this.H5Pay();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
weiChartPay(defaultData) {
|
||||||
|
var that = this
|
||||||
|
if (this.system == 'android') {
|
||||||
|
uni.login({
|
||||||
|
timeout: 10000,
|
||||||
|
provider: 'weixin', //如果是uniapp,在这里需要标明平台的类型,支持的参数请查阅uniapp官网的uni.login()文档
|
||||||
|
success: (res) => {
|
||||||
|
PAY.pays.serverCreatOrder({
|
||||||
|
id: that.id,
|
||||||
|
pay_type: 5,
|
||||||
|
code: res.code,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code'),
|
||||||
|
openid: that.openid,
|
||||||
|
}).then(creatRes => {
|
||||||
|
console.log('creat order success', creatRes)
|
||||||
|
PAY.pays.wxAppletAndroidPay(creatRes.data).then(payRes => {
|
||||||
|
console.log('pay order success', payRes)
|
||||||
|
that.getUserDel()
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title: '支付成功'
|
||||||
|
});
|
||||||
|
this.show = false;
|
||||||
|
uni.navigateBack();
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
PAY.pays.wxIosCreatOrder({
|
||||||
|
sum: defaultData.sum,
|
||||||
|
buytype: defaultData.buyType,
|
||||||
|
pricebuy: defaultData.pricebuy,
|
||||||
|
token: defaultData.token,
|
||||||
|
uid: defaultData.uid,
|
||||||
|
wxlx: defaultData.wxlx,
|
||||||
|
id: defaultData.id,
|
||||||
|
openid: defaultData.openid,
|
||||||
|
info: defaultData.info,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
PAY.pays.wxAppletIosPay(res.data).then(payRes => {
|
||||||
|
console.log('pay order success', payRes)
|
||||||
|
that.getUserDel()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
H5Pay() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/pay/payInfo",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
id: that.id,
|
||||||
|
pay_type: 21,
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
// #ifdef H5
|
||||||
|
window.open(res.data.return_url, "_self")
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesA/myCenter/wallet/webPay?url=" + encodeURIComponent(res.data
|
||||||
|
.return_url)
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
goBill() { //消费明细
|
||||||
|
uni.navigateTo({ //钱包
|
||||||
|
url: '/pagesA/myCenter/wallet/bill'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
changeType(e) {
|
||||||
|
this.payType = e.detail.value;
|
||||||
|
if (e.detail.value == 'money') {
|
||||||
|
this.buyType = '余额';
|
||||||
|
}
|
||||||
|
if (e.detail.value == 'weixin') {
|
||||||
|
this.buyType = '微信';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
purchase(e) {
|
||||||
|
this.id = e.id
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
if (this.system == 'ios' && this.is_check) {} else {
|
||||||
|
this.pricebuy = e.pay_money
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
this.H5Pay()
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
getUserDel() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/user/index",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
this.userdata = res.data;
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
uni.setStorageSync('config', res.data.config)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPayList() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/beans/payList",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
let lists = [];
|
||||||
|
res.data.forEach((item) => {
|
||||||
|
if (item.pay_type != 3) {
|
||||||
|
lists.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.list = lists
|
||||||
|
}
|
||||||
|
} else if (res.data.code == 50) {
|
||||||
|
this.is_check = true;
|
||||||
|
} else {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
goAgreement(e) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/agreement/agreement?id=' + e
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAllVideoNum() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/video/videoCount",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
this.allVideoNum = res.data.count
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagesHeader {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/chongz.png');
|
||||||
|
background-size: 750rpx 360rpx;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
padding-top: 58rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 16rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.explain {
|
||||||
|
padding: 0 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainTitle {
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.vipCarBox {
|
||||||
|
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarItem {
|
||||||
|
width: 336rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFirst {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarSecond {
|
||||||
|
background-image: linear-gradient(to right, #FF9A54, #FF3C3C);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/taoc2.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth {
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/dingyue_a.png');
|
||||||
|
background-size: 100% 100%;
|
||||||
|
color: ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 35rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 0rpx 0rpx 16rpx 0rpx;
|
||||||
|
background: linear-gradient(180deg, #FFFFFF 0%, #FFC833 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .icon {
|
||||||
|
background: linear-gradient(90deg, #FFBC48 0%, #FF5D41 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .icon {
|
||||||
|
background: linear-gradient(90deg, #FFBC48 0%, #FF5D41 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyLine {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 45rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .moneyLine {
|
||||||
|
color: #FF300A;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.money {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .money {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFourth .depict {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarThird .money {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beanBtn {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 48rpx;
|
||||||
|
padding: 0 16rpx;
|
||||||
|
background: linear-gradient(180deg, #FFF2D1 0%, #FFC323 100%);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.depict {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 44rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText {
|
||||||
|
margin-top: 26rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainText text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceNum {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFCA3A;
|
||||||
|
line-height: 32rpx;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*新版*/
|
||||||
|
|
||||||
|
.VipCardContent {
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .vipCarItem {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarBoxSecond .border {
|
||||||
|
border: 6rpx solid #dc3a35;
|
||||||
|
background-color: #f6e2af;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: -20rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
border-radius: 0 12rpx 0 12rpx;
|
||||||
|
background-color: #dc3a35;
|
||||||
|
max-width: 336rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoney text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carMoneyExplain {
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vipCarFooter {
|
||||||
|
line-height: 45rpx;
|
||||||
|
background-color: #dc3a35;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redColor {
|
||||||
|
color: #dc3a35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerRedColor {
|
||||||
|
line-height: 50rpx;
|
||||||
|
background-color: #fde6e6;
|
||||||
|
color: #dc3a35;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
border-radius: 0 0 12rpx 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hands {
|
||||||
|
position: absolute;
|
||||||
|
right: -10px;
|
||||||
|
bottom: 0rpx;
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
z-index: 300;
|
||||||
|
transform: rotate(-15deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 10px;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-left: 36rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreementItem {
|
||||||
|
color: #0a5ab6;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.explainItem {
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-big {
|
||||||
|
background-color: #07c160;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
<template>
|
||||||
|
<view class="form">
|
||||||
|
<view class="box">
|
||||||
|
<view class="formItem">
|
||||||
|
<view class="label">新手机号</view>
|
||||||
|
<view class="ipt">
|
||||||
|
<input class="uni-input" type="phone" @input="changePhone" placeholder="请输入手机号"
|
||||||
|
:value="inputValue" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="formItem">
|
||||||
|
<view class="label">验证码</view>
|
||||||
|
<view class="ipt">
|
||||||
|
<input class="uni-input" type="text" @input="changeCode" placeholder="请输入验证码" :value="code" />
|
||||||
|
</view>
|
||||||
|
<view class="getCodeBtn" @click="getCode">{{btnText}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="onname" :style="{'background':dbled?'#999':'#08d89b'}" :disabled="dbled" type="primary"
|
||||||
|
@click="upPhone()">确认修改</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inputValue: "",
|
||||||
|
isUp: false,
|
||||||
|
btnText: "获取验证码",
|
||||||
|
interV: null,
|
||||||
|
time: 60,
|
||||||
|
isGetCode: false,
|
||||||
|
code: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.inputValue = options.mobile
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changePhone(e) {
|
||||||
|
this.inputValue = e.detail.value
|
||||||
|
},
|
||||||
|
changeCode(e) {
|
||||||
|
this.code = e.detail.value;
|
||||||
|
},
|
||||||
|
|
||||||
|
upPhone() {
|
||||||
|
let that = this;
|
||||||
|
if (!/^1[3456789]\d{9}$/.test(that.inputValue)) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "手机号有误"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!that.isUp) {
|
||||||
|
that.isUp = true;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/changemobile",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
mobile: that.inputValue,
|
||||||
|
captcha: this.captcha
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "修改成功",
|
||||||
|
icon: "none",
|
||||||
|
duration: 1500
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请勿频繁提交"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getCode() {
|
||||||
|
if (!this.isGetCode) {
|
||||||
|
this.isGetCode = true;
|
||||||
|
console.log(this.inputValue);
|
||||||
|
|
||||||
|
if (/^1[3456789]\d{9}$/.test(this.inputValue)) {
|
||||||
|
this.interV = setInterval(() => {
|
||||||
|
this.time--;
|
||||||
|
this.btnText = this.time + '秒后重新获取'
|
||||||
|
if (this.time <= 0) {
|
||||||
|
this.isGetCode = false;
|
||||||
|
this.btnText == "获取验证码";
|
||||||
|
this.time = 60;
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
|
uni.request({
|
||||||
|
url: this.configs.webUrl + '/api/sms/index',
|
||||||
|
data: {
|
||||||
|
phone: this.inputValue
|
||||||
|
},
|
||||||
|
success() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "发送成功",
|
||||||
|
icon: "none",
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: "手机号有误",
|
||||||
|
icon: "none",
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
this.isGetCode = false;
|
||||||
|
}
|
||||||
|
} else {}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.interV)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.form {
|
||||||
|
margin: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.formItem {
|
||||||
|
display: flex;
|
||||||
|
height: 120rpx;
|
||||||
|
align-items: center;
|
||||||
|
border: 2rpx solid #F8F8F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
width: 260rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin-left: 36rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ipt {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ipt input {
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.getCodeBtn {
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
min-width: 220rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
border-radius: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onname {
|
||||||
|
margin-top: 50rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,361 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
|
||||||
|
<view class="list-cell b-b avatar" style="border-radius: 16rpx 16rpx 0 0;" @click="clk(0)">
|
||||||
|
<text class="cell-tit">头像</text>
|
||||||
|
<image :src="imgUrl+ userInfo.avatar" mode=""></image>
|
||||||
|
<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="list-cell" hover-class="cell-hover" :hover-stay-time="50">
|
||||||
|
<text class="cell-tit">昵称</text>
|
||||||
|
<input class="uni-input" style="width: 440rpx; text-align: right;" v-model="userInfo.nickname"
|
||||||
|
placeholder="请输入昵称" />
|
||||||
|
<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list-cell" @tap="sex" hover-class="cell-hover" :hover-stay-time="50">
|
||||||
|
<text class="cell-tit">性别</text>
|
||||||
|
<text class="cell-tip">{{ userInfo.gender ? '女':'男'}}</text>
|
||||||
|
<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list-cell" style="border-radius: 0 0 16rpx 16rpx;" @tap="onTime" hover-class="cell-hover"
|
||||||
|
:hover-stay-time="50">
|
||||||
|
<text class="cell-tit">生日</text>
|
||||||
|
<text class="cell-tip">{{userInfo.dtime}}</text>
|
||||||
|
<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list-cell m-t b-b" style="border-radius: 16rpx;"
|
||||||
|
@click="navTo('/pagesA/myCenter/settings/mobile?mobile='+userInfo.mobile)" hover-class="cell-hover"
|
||||||
|
:hover-stay-time="50">
|
||||||
|
<text class="cell-tit">手机号</text>
|
||||||
|
<text class="cell-tip">{{userInfo.mobile}}</text>
|
||||||
|
<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="practices button" @click="sexgender">保存</view>
|
||||||
|
|
||||||
|
<!--生日-->
|
||||||
|
<uv-datetime-picker ref="datetimePicker" :formatter="formatter" mode="date" @confirm="dialogTime">
|
||||||
|
</uv-datetime-picker>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let sex = ['男', '女'];
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urls: '',
|
||||||
|
sexsi: '',
|
||||||
|
array: [],
|
||||||
|
ageid: 0,
|
||||||
|
listgrzl: [],
|
||||||
|
msg: false,
|
||||||
|
imgUrl: this.$config.webUrl,
|
||||||
|
userInfo: {},
|
||||||
|
configUrl: this.$config.webUrl,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
sexType() {
|
||||||
|
return sex[this.sexsi];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUsers();
|
||||||
|
if (this.msg) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
this.msg = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getUsers() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/index",
|
||||||
|
method: "GET"
|
||||||
|
}).then(res => {
|
||||||
|
that.userInfo.avatar = res.data.avatar;
|
||||||
|
that.userInfo.nickname = res.data.nickname
|
||||||
|
that.userInfo.gender = res.data.gender
|
||||||
|
that.userInfo.dtime = res.data.birthday
|
||||||
|
that.userInfo.mobile = res.data.mobile
|
||||||
|
this.$forceUpdate()
|
||||||
|
console.log(that.userInfo);
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
uni.setStorageSync('config', res.data.config)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
unlockChange(e) {
|
||||||
|
console.log(e.detail.value)
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/userAutoPlay",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
type: e.detail.value ? 1 : 0
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
that.userInfo.auto_unlock = e.detail.value ? 1 : 0;
|
||||||
|
uni.removeStorageSync('userinfo')
|
||||||
|
uni.setStorageSync('userinfo', that.userInfo)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
navTo(url) {
|
||||||
|
console.log(url)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
navsTo(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
//选择性别
|
||||||
|
sex() {
|
||||||
|
uni.showActionSheet({
|
||||||
|
itemList: sex,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.userInfo.gender = res.tapIndex
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
sexgender() {
|
||||||
|
console.log(this.userInfo.avatar);
|
||||||
|
this.$httpRequest({
|
||||||
|
url: "/api/user/edituser",
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
sex: this.userInfo.gender,
|
||||||
|
nickname: this.userInfo.nickname,
|
||||||
|
org: this.userInfo.dtime,
|
||||||
|
avatar: this.userInfo.avatar,
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: "修改成功",
|
||||||
|
duration: 2000,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
this.getUsers();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doBefore() {
|
||||||
|
console.log('doBefore');
|
||||||
|
},
|
||||||
|
clk(index) {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sizeType: ['original', 'compressed'],
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: (r) => {
|
||||||
|
this.doUpload(r)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doUpload(rsp) {
|
||||||
|
let that = this;
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
uni.uploadFile({
|
||||||
|
url: this.$config.webUrl + '/api/user/avatar?token=' + uni.getStorageSync("userinfo")
|
||||||
|
.token, //仅为示例,非真实的接口地址
|
||||||
|
file: rsp.tempFiles[0].path || rsp.tempFiles[0],
|
||||||
|
filePath: rsp.tempFiles[0].path || rsp.tempFiles[0],
|
||||||
|
name: "file",
|
||||||
|
dataType: "json",
|
||||||
|
formData: {
|
||||||
|
token: uni.getStorageSync("userinfo").token,
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
file: rsp.tempFiles[0].path || rsp.tempFiles[0]
|
||||||
|
},
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
|
||||||
|
var dataarr = JSON.parse(uploadFileRes.data);
|
||||||
|
if (dataarr.code == 1) {
|
||||||
|
console.log(dataarr.data.url)
|
||||||
|
let userinfo = uni.getStorageSync('userinfo');
|
||||||
|
this.userInfo.avatar = dataarr.data.url;
|
||||||
|
console.log(this.userInfo.avatar);
|
||||||
|
this.getUsers()
|
||||||
|
|
||||||
|
|
||||||
|
uni.removeStorage('userinfo')
|
||||||
|
uni.setStorageSync('userinfo', userinfo)
|
||||||
|
uni.showToast({
|
||||||
|
title: "修改成功"
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: dataarr.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//修改生日
|
||||||
|
onTime() {
|
||||||
|
this.$refs.datetimePicker.open();
|
||||||
|
},
|
||||||
|
formatter(type, value) {
|
||||||
|
if (type === 'year') {
|
||||||
|
return `${value}年`
|
||||||
|
}
|
||||||
|
if (type === 'month') {
|
||||||
|
return `${value}月`
|
||||||
|
}
|
||||||
|
if (type === 'day') {
|
||||||
|
return `${value}日`
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
dialogTime(e) {
|
||||||
|
this.userInfo.dtime = this.timestampToDate(e.value)
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
timestampToDate(timestamp) {
|
||||||
|
var date = new Date(timestamp); // 转换为Date对象
|
||||||
|
var year = date.getFullYear(); // 获取年份
|
||||||
|
var month = ('0' + (date.getMonth() + 1)).slice(-2); // 获取月份,转为两位数
|
||||||
|
var day = ('0' + date.getDate()).slice(-2); // 获取日,转为两位数
|
||||||
|
return year + '-' + month + '-' + day; // 拼接字符串返回
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.yyt-ellipsis {
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden; //超出的文本隐藏
|
||||||
|
text-overflow: ellipsis; //溢出用省略号显示
|
||||||
|
white-space: nowrap; //溢出不换
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #F7F8F9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
padding-top: 40upx !important;
|
||||||
|
padding-bottom: 40upx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agess {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 38px;
|
||||||
|
padding-left: 200px;
|
||||||
|
padding-right: 36px !important;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar .cell-tit {
|
||||||
|
font-weight: bold !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar image {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 36px;
|
||||||
|
width: 88upx;
|
||||||
|
height: 88upx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-top: -44upx;
|
||||||
|
z-index: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-cell {
|
||||||
|
display: flex;
|
||||||
|
padding: 20upx;
|
||||||
|
line-height: 60upx;
|
||||||
|
position: relative;
|
||||||
|
background: #fff;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1rpx solid #eeeeee;
|
||||||
|
|
||||||
|
&.log-out-btn {
|
||||||
|
margin-top: 40upx;
|
||||||
|
|
||||||
|
.cell-tit {
|
||||||
|
color: $uni-color-primary;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cell-hover {
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.b-b:after {
|
||||||
|
left: 30upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.m-t {
|
||||||
|
margin-top: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-more {
|
||||||
|
align-self: baseline;
|
||||||
|
|
||||||
|
margin-left: 10upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-tit {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
margin-right: 10upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-tip {}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
transform: translateX(16upx) scale(.84);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.practices {
|
||||||
|
height: 80rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin-top: 200rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="uni-form-item uni-column">
|
||||||
|
<view class="with-fun" style="padding: 20upx;">
|
||||||
|
<input class="uni-input" type="text" confirm-type="done" focus :placeholder="name" placeholder-style="color:#666" @input="onKeyInput" :value="inputValue" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="onname" :style="{'background':dbled?'#999':'#E17503'}" :disabled="dbled" type="primary" @tap="onOKname()">确 认</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inputValue: '',
|
||||||
|
dbled:true,
|
||||||
|
name:'',
|
||||||
|
ty:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options){
|
||||||
|
//接收传值,id里面放的是标题,因为测试数据并没写id
|
||||||
|
let ty = options.ty;
|
||||||
|
let name = options.name;
|
||||||
|
let v = options.v;
|
||||||
|
this.ty=ty;
|
||||||
|
this.name='请修改'+name;
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '修改'+name
|
||||||
|
});
|
||||||
|
if(v=='null'){
|
||||||
|
this.inputValue='';
|
||||||
|
}else{
|
||||||
|
this.inputValue=v;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onBackPress() {
|
||||||
|
console.log('ok')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onKeyInput(event){
|
||||||
|
this.inputValue = event.target.value
|
||||||
|
let lens = event.target.value
|
||||||
|
if(lens.length){
|
||||||
|
this.dbled=false
|
||||||
|
}else{
|
||||||
|
this.dbled=true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onOKname() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:"/api/user/edituser",
|
||||||
|
method:"GET",
|
||||||
|
data:{
|
||||||
|
[this.ty]: this.inputValue
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
uni.showToast({title: '修改成功',icon:"none",duration:2000})
|
||||||
|
}).catch(err=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.title {
|
||||||
|
padding: 10upx 25upx;
|
||||||
|
}
|
||||||
|
.with-fun{
|
||||||
|
background: #f8f8f8;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.with-fun:after{
|
||||||
|
position: absolute;
|
||||||
|
content: $name;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
top: 0px;
|
||||||
|
left: 20px;
|
||||||
|
font-size: 32upx;
|
||||||
|
}
|
||||||
|
.uni-input{
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 32upx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
.uni-icon-clear,
|
||||||
|
.uni-icon-eye {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.onname{
|
||||||
|
width: 94%;
|
||||||
|
margin: 20upx auto;
|
||||||
|
background: -webkit-linear-gradient(left top, #E49315 , #E17503); /* Safari 5.1 - 6.0 */
|
||||||
|
background: -o-linear-gradient(bottom right, #E49315, #E17503); /* Opera 11.1 - 12.0 */
|
||||||
|
background: -moz-linear-gradient(bottom right, #E49315,#E17503); /* Firefox 3.6 - 15 */
|
||||||
|
background: linear-gradient(to bottom right, #E49315 , #E17503); /* 标准的语法(必须放在最后) */
|
||||||
|
}
|
||||||
|
.onnames{
|
||||||
|
width: 94%;
|
||||||
|
margin: 20upx auto;
|
||||||
|
background: -webkit-linear-gradient(left top, #f1f1f1 , #f9f9f9); /* Safari 5.1 - 6.0 */
|
||||||
|
background: -o-linear-gradient(bottom right, #f1f1f1, #f9f9f9); /* Opera 11.1 - 12.0 */
|
||||||
|
background: -moz-linear-gradient(bottom right, #f1f1f1,#f9f9f9); /* Firefox 3.6 - 15 */
|
||||||
|
background: linear-gradient(to bottom right, #f1f1f1 , #f9f9f9); /* 标准的语法(必须放在最后) */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="beansList">
|
||||||
|
<view class="beansItem box" v-for="item in listData" :key="item.id">
|
||||||
|
<view class="beansLeft">
|
||||||
|
<view class="remark">{{ item.remark }}</view>
|
||||||
|
<view class="time">{{ item.createtime }}</view>
|
||||||
|
</view>
|
||||||
|
<view :class="item.jzt == '-'?'right black':'right yellow'">
|
||||||
|
{{ item.jzt }}{{ item.beans }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listData: [],
|
||||||
|
status: 'more',
|
||||||
|
userInfo: {},
|
||||||
|
pages: {
|
||||||
|
pageSize: 20,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
if (this.pages.isNextPage) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.userInfo = uni.getStorageSync('userinfo')
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/userBeansInfo",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if(res.rows.length>0 || res.data.length>0){
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.data || res.rows;
|
||||||
|
} else{
|
||||||
|
that.listData = that.listData.concat(res.data || res.rows);
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
}else{
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background-color: #F7F8F9;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageHeader {
|
||||||
|
background: linear-gradient(to right, #F1FFE9, #FFFFF4);
|
||||||
|
height: 408rpx;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
padding-top: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 160rpx;
|
||||||
|
line-height: 160rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 0rpx;
|
||||||
|
top: 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beans {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansNum {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
font-size: 80rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansCont {
|
||||||
|
padding: 40rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansListHeader {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansItem {
|
||||||
|
padding: 24rpx 34rpx;
|
||||||
|
border-bottom: 1rpx solid #F8F8F8;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.remark {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
font-size: 28rpx;font-weight: 600;
|
||||||
|
}
|
||||||
|
.black{
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.yellow{
|
||||||
|
color: #F98B1E;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pagesContent">
|
||||||
|
<view class="pageHeader">
|
||||||
|
<view class="navBack">
|
||||||
|
<uni-icons class="backIcon" type="left" size="24" color="#333" @click="navBack"></uni-icons>
|
||||||
|
我的收益
|
||||||
|
</view>
|
||||||
|
<view class="beans">余额</view>
|
||||||
|
<view class="withDraw" @click="showWithDraw" v-if="balanceBtn"> 提现 </view>
|
||||||
|
<view class="beansNum"> {{ userInfo.beans }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="beansCont">
|
||||||
|
<view class="beansListHeader"> 收益明细</view>
|
||||||
|
<view class="beansList">
|
||||||
|
<view class="beansItem" v-for="item in listData" :key="item.id">
|
||||||
|
<view class="beansLeft">
|
||||||
|
<view class="remark">{{ item.memo }} ({{ item.come_nickname }}
|
||||||
|
{{ item.come_id ? ' ID:' + item.come_id : '' }})
|
||||||
|
</view>
|
||||||
|
<view class="time">{{ item.createtime }}</view>
|
||||||
|
</view>
|
||||||
|
<view :class="item.jzt == '-'?'right black':'right yellow'">
|
||||||
|
{{ item.jzt }}{{ item.money }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<uni-popup ref="popup_ti_xian" type="bottom">
|
||||||
|
<tixianForm @success-close="hideWithDraw"></tixianForm>
|
||||||
|
</uni-popup>
|
||||||
|
<uni-load-more :status="status"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import tixianForm from '@/pagesA/components/ti_xian.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
tixianForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
listData: [],
|
||||||
|
status: 'more',
|
||||||
|
userInfo: {},
|
||||||
|
balanceBtn:true,
|
||||||
|
pages: {
|
||||||
|
pageSize: 20,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
if (this.pages.isNextPage) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.userInfo = uni.getStorageSync('userinfo')
|
||||||
|
this.balanceBtn = uni.getStorageSync("config").mini_chek =="1"?true:false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navBack() {
|
||||||
|
uni.navigateBack(1);
|
||||||
|
},
|
||||||
|
showWithDraw() {
|
||||||
|
this.$refs.popup_ti_xian.open()
|
||||||
|
},
|
||||||
|
hideWithDraw(){
|
||||||
|
console.log("close");
|
||||||
|
this.$refs.popup_ti_xian.close();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/user/userBeansInfo",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
if (that.pages.pageSize == 1) {
|
||||||
|
that.listData = res.data;
|
||||||
|
} else if (res.data.rows.length > 0) {
|
||||||
|
that.listData = that.listData.concat(res.data.rows);
|
||||||
|
} else {
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagesContent {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageHeader {
|
||||||
|
background: linear-gradient(to right, #F1FFE9, #FFFFF4);
|
||||||
|
height: 408rpx;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
padding-top: 42rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navBack {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: center;
|
||||||
|
height: 160rpx;
|
||||||
|
line-height: 160rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backIcon {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beans {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.withDraw {
|
||||||
|
width: 172rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
background-color: #85ED1C;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 68rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 200rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansNum {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
font-size: 80rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansCont {
|
||||||
|
padding: 40rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansListHeader {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beansItem {
|
||||||
|
padding: 24rpx 0;
|
||||||
|
border-bottom: 1rpx solid #F8F8F8;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.remark {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.black {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yellow {
|
||||||
|
color: #F98B1E;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pages">
|
||||||
|
<web-view :src="urls"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urls:""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log(e.url)
|
||||||
|
this.urls = decodeURIComponent( e.url);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.pages {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="flex" style="display:flex; flex-wrap:wrap; padding: 30upx 30upx 0px 30upx;">
|
||||||
|
<block v-for="(value,key) in listData" :key="key">
|
||||||
|
<view class="mb15" style="width:31%; border-radius:20rpx;margin-right: 14rpx;"
|
||||||
|
@click="detail(value.vid,value.mid)">
|
||||||
|
<!-- <view class="btn-mini" style="position: absolute; top: 20upx; right: 20upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx; z-index: 1;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
||||||
|
<image class="integral-mall-goods" mode="aspectFill" :src="value.img"></image>
|
||||||
|
<view class="pr10 ft14 ftw400 text-over cl-main">{{value.vname}}</view>
|
||||||
|
<view class="pr10 ft12 ftw500 text-over cl-999">观看至 {{value.mid}} 集</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
<view style="width: 100%; height: 30upx;"></view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
banners:[],
|
||||||
|
searchValue:'',
|
||||||
|
pages:{
|
||||||
|
currentPage:1,
|
||||||
|
pageSize:20,
|
||||||
|
isNextPage:true
|
||||||
|
},
|
||||||
|
tabs:[
|
||||||
|
{name:'全部'},
|
||||||
|
{name:'视频'},
|
||||||
|
{name:'音频'},
|
||||||
|
{name:'小说'},
|
||||||
|
{name:'壁纸'},
|
||||||
|
],
|
||||||
|
selectIndex:0,
|
||||||
|
scrollTop:0,
|
||||||
|
type:'',
|
||||||
|
|
||||||
|
listData: [],
|
||||||
|
status: 'more',
|
||||||
|
contentText: {
|
||||||
|
contentdown: "上拉显示更多",
|
||||||
|
contentrefresh: "正在加载...",
|
||||||
|
contentnomore: "没有更多数据了"
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e){
|
||||||
|
//console.log(111)
|
||||||
|
if(e.selectIndex){
|
||||||
|
this.selectIndex=e.selectIndex*1
|
||||||
|
}
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
this.banners=uni.getStorageSync("config").banner
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.status = 'more';
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods:{
|
||||||
|
detail(vid,mid){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pagesA/player/detailPlayer?vid='+vid+'&mid='+mid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
let that = this;
|
||||||
|
if (that.pages.isNextPage) {
|
||||||
|
that.status = 'loading';
|
||||||
|
that.$httpRequest({
|
||||||
|
url: "/api/video/videolog",
|
||||||
|
methods: "GET",
|
||||||
|
data: {
|
||||||
|
limit: that.pages.pageSize,
|
||||||
|
page: that.pages.currentPage
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
that.status = '';
|
||||||
|
if (that.pages.currentPage == 1) {
|
||||||
|
that.listData = res.rows;
|
||||||
|
} else if (res.rows.length > 0) {
|
||||||
|
that.listData = that.listData.concat(res.rows);
|
||||||
|
} else {
|
||||||
|
that.status = 'noMore';
|
||||||
|
that.pages.isNextPage = false;
|
||||||
|
}
|
||||||
|
that.pages.currentPage += 1;
|
||||||
|
}).catch(err => {
|
||||||
|
that.status = '';
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.integral-mall-goods {
|
||||||
|
width: 100%;
|
||||||
|
height: 280rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
border-radius: 16upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-not-vip {
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FDF6EC;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
border: 2rpx solid #EFC381;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 76rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tuan-product-l {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 240rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #F2F2F2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan-product-r {
|
||||||
|
width: calc(100% - 320rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result-text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-mt-10 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,970 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pages">
|
||||||
|
<!-- #ifdef MP-WEIXIN || MP-TOUTIAO -->
|
||||||
|
<view class="header" :style="{marginTop:searchBarTop + 'px',height:searchBarHeight + 'px'}">
|
||||||
|
<view style="height: 45px;display: flex;width: 100%;padding-left: 15rpx; " @tap.stop="back_load">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/on_back.png"
|
||||||
|
style="width: 44rpx;height: 44rpx;"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view class="header">
|
||||||
|
<view style="height: 45px;display: flex;width: 100%;padding-top: 10px; " @tap.stop="back_load">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/on_back.png"
|
||||||
|
style="width: 44rpx;height: 44rpx;"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<swiper class="swiper" :current="swiperCurrent" :indicator-dots="false" :autoplay="false" :vertical="true"
|
||||||
|
:duration="50" @change="currentChange" :style="{height:winHeight} ">
|
||||||
|
<swiper-item class="swiperItem" v-for="(videoItem,videoIndex) in videoListData" :key="videoItem._id">
|
||||||
|
|
||||||
|
<view class="swiperItemContent" style="color: #ffffff;">
|
||||||
|
<view class="payVideo" v-if="videoIndex == swiperCurrent && videoItem.pays == '2'">
|
||||||
|
|
||||||
|
<!-- #ifdef APP || H5-->
|
||||||
|
<video class="video"
|
||||||
|
:id="videoItem._id"
|
||||||
|
:src="videoItem.src"
|
||||||
|
:autoplay="true"
|
||||||
|
object-fit="contain"
|
||||||
|
@ended="videoPlayerEnded"
|
||||||
|
@loadedmetadata="loadedmetadata"
|
||||||
|
></video>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="noPayVideo" v-if="videoItem.pays == 1">
|
||||||
|
<image class="videoCove" :src="imageUrl+videoItem.img" mode="aspectFit"></image>
|
||||||
|
<view class="adBox" v-if="videoInfo.paytype=='1'">
|
||||||
|
<!-- 广告解锁-->
|
||||||
|
</view>
|
||||||
|
<view v-else-if="videoInfo.paytype=='2'" @click="goUpVip">
|
||||||
|
<button>开通会员继续观看</button>
|
||||||
|
</view>
|
||||||
|
<view v-else></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rightBtnList" v-if="videoIndex == swiperCurrent && videoItem.pays == 2">
|
||||||
|
<view class="btnItem" @click="userChangeLike(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" v-if="videoItem.like=='2'"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/aixinRed.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<image class="videoBtnImg" v-else src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/aixin.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<text class="btnText">{{videoItem.like_n>0?videoItem.like_n:'0'}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="btnItem" @click="userChangeStar(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" v-if="videoInfo.iszj=='2'"
|
||||||
|
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/scRed.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<image class="videoBtnImg" v-else src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/sc.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<!-- <text class="btnText" >{{videoItem.like_n>0?videoItem.iszj_n : '0'}}</text>-->
|
||||||
|
<text class="btnTextRed" v-if="videoInfo.iszj=='2'">已追</text>
|
||||||
|
<text class="btnText" v-else>追剧</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view class="btnItem" @click="copyShareLink(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/icon/video_share_icon.png"
|
||||||
|
mode=""></image>
|
||||||
|
<text class="btnText">分享</text>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view class="videoFooter" v-if="videoIndex == swiperCurrent && videoInfo.id" @click="showChoice">
|
||||||
|
<view class="videoName">
|
||||||
|
<image class="footerTv" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/video.png" mode="scaleToFill"></image>
|
||||||
|
<text class="footerTvText">{{videoInfo.name}} · 当前第{{videoItem.weigh}}集/全{{videoInfo.sum}}集</text>
|
||||||
|
</view>
|
||||||
|
<view class="choiceVideo">
|
||||||
|
<text class="choiceVideoTexts">选集</text>
|
||||||
|
<uni-icons size="12" type="right" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
<recharge ref="rechargePups"
|
||||||
|
:userBeans="userBeansNum"
|
||||||
|
:play-video-info="playVideoDetail"
|
||||||
|
:video-info="videoInfo"
|
||||||
|
:pageHeight="pupHeight"
|
||||||
|
@rechargeSuccess="rechargeSuccess"
|
||||||
|
></recharge>
|
||||||
|
<selectVideo ref="choiceVideoPup" @choiceVideoItem="changePlaying" :play-video-info="playVideoDetail"
|
||||||
|
:video-info="videoInfo">
|
||||||
|
</selectVideo>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import selectVideo from "@/components/select/video.vue"
|
||||||
|
import recharge from "@/pagesA/components/recharge/rechargePup.vue"
|
||||||
|
import {httpRequest} from "@/utils/request";
|
||||||
|
import PAY from "@/utils/pay"
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
import login from "@/utils/login";
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
selectVideo,
|
||||||
|
recharge
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: {
|
||||||
|
pageSize: 50,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
},
|
||||||
|
userInfo: {},
|
||||||
|
swiperCurrent: 0,
|
||||||
|
playVideoDetail: {}, //
|
||||||
|
videoInfo: {}, //短剧简介
|
||||||
|
videoListData: [{
|
||||||
|
beans: Number,
|
||||||
|
fjname: String,
|
||||||
|
href: String,
|
||||||
|
id: Number,
|
||||||
|
img: String,
|
||||||
|
isplay: Boolean,
|
||||||
|
isvip: Number,
|
||||||
|
iszj: Number,
|
||||||
|
iszj_n: Number,
|
||||||
|
like: Number,
|
||||||
|
like_n: Number,
|
||||||
|
lx: Number,
|
||||||
|
mid: Number,
|
||||||
|
name: String,
|
||||||
|
pays: Number,
|
||||||
|
pid: Number,
|
||||||
|
price: String,
|
||||||
|
src: String,
|
||||||
|
state: String,
|
||||||
|
sum: Number,
|
||||||
|
videourl: String,
|
||||||
|
vipprice: String,
|
||||||
|
weigh: Number,
|
||||||
|
}], //剧集列表
|
||||||
|
swiperData: [], //
|
||||||
|
userBeansNum: 0,
|
||||||
|
videoId: '',
|
||||||
|
imageUrl: "",
|
||||||
|
winHeight: '800px',
|
||||||
|
pupHeight: "400px",
|
||||||
|
onPlayVideo: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
onLoad(e) {
|
||||||
|
console.log(e)
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo");
|
||||||
|
this.getPageDefault();
|
||||||
|
this.checkQueryData(e);
|
||||||
|
if (this.userinfo.token) {
|
||||||
|
this.openid = uni.getStorageSync("openid");
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e).then(res => {
|
||||||
|
console.log('bind user success')
|
||||||
|
// #ifdef APP || H5
|
||||||
|
this.get_user_info()
|
||||||
|
this.getVideoList()
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user catch')
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// #ifdef APP || H5
|
||||||
|
this.get_user_info()
|
||||||
|
this.getVideoList()
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
login.wxLogin().then(res => {
|
||||||
|
this.openid = uni.getStorageSync("openid");
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e).then(res => {
|
||||||
|
console.log('bind user success')
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user catch')
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP || H5
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: "请登录后再进行操作",
|
||||||
|
confirmText: "确定",
|
||||||
|
cancelText: '取消',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let nowPage = getCurrentPages();
|
||||||
|
let pageNum = nowPage.length - 1;
|
||||||
|
console.log(nowPage)
|
||||||
|
uni.setStorageSync('loginPage', nowPage[pageNum].route)
|
||||||
|
uni.navigateTo({url: "/pagesA/login/login"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取页面宽高数据& 系统信息
|
||||||
|
getPageDefault() {
|
||||||
|
console.log(this.system, uni.getSystemInfoSync())
|
||||||
|
// #ifdef MP-WEIXIN || MP-TOUTIAO
|
||||||
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
this.searchBarTop = menuButtonInfo.top;
|
||||||
|
this.searchBarHeight = menuButtonInfo.height;
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
console.log(uni.getWindowInfo().windowHeight + "px")
|
||||||
|
this.winHeight = uni.getWindowInfo().windowHeight + "px";
|
||||||
|
this.pupHeight = (uni.getWindowInfo().windowHeight - 40) + "px";
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: res => {
|
||||||
|
this.safeArea = res.safeAreaInsets.bottom;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkQueryData(e) {
|
||||||
|
if (e.start_free) {
|
||||||
|
this.free_start = Number(e.start_free)
|
||||||
|
this.free_end = Number(e.end_free)
|
||||||
|
if (Number(e.start_free) > 0) {
|
||||||
|
this.isAttention = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.fxpid) {
|
||||||
|
if (e.fxpid > 0) {
|
||||||
|
uni.setStorageSync('fxpid', e.fxpid )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.vid) {
|
||||||
|
this.videoId = e.vid;
|
||||||
|
}
|
||||||
|
if (e.mid) {
|
||||||
|
this.mid = e.mid
|
||||||
|
}
|
||||||
|
console.log(this.free_start, this.free_end, this.isAttention)
|
||||||
|
},
|
||||||
|
// 绑定推荐
|
||||||
|
bindUser(data) {
|
||||||
|
let that = this
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.setStorageSync('vs_id_code', data.vs_id);
|
||||||
|
let upData = {
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
ad_id: data.code,
|
||||||
|
advertiser_id: data.advertiser_id,
|
||||||
|
clue_id: data.clue_id,
|
||||||
|
clue_token: data.clue_token,
|
||||||
|
click_id: data.clickid,
|
||||||
|
vid: data.vid,
|
||||||
|
mid: data.mid,
|
||||||
|
type: data.inventory,
|
||||||
|
vs_id: data.vs_id,
|
||||||
|
token: uni.getStorageSync("userinfo").token
|
||||||
|
}
|
||||||
|
console.log(upData)
|
||||||
|
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/user/callbackBinding',
|
||||||
|
data: upData,
|
||||||
|
methods: "GET"
|
||||||
|
|
||||||
|
}).then(res => {
|
||||||
|
uni.setStorageSync('get_ad_code', res.data.code);
|
||||||
|
resolve(res)
|
||||||
|
}).catch(err => {
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取播放器信息
|
||||||
|
getWechartVideoDel(data) {
|
||||||
|
let that = this
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/video/videoIdToDramaId',
|
||||||
|
data: {
|
||||||
|
vid: data.vid,
|
||||||
|
},
|
||||||
|
methods: "GET"
|
||||||
|
}).then(videoRes => {
|
||||||
|
console.log(videoRes)
|
||||||
|
let fxpid = uni.getStorageSync("userinfo").id,
|
||||||
|
invite = uni.getStorageSync("userinfo").invite || '';
|
||||||
|
let param = JSON.stringify({
|
||||||
|
vid: data.vid,
|
||||||
|
mid: data.mid || 0,
|
||||||
|
fxpid: fxpid,
|
||||||
|
invite: invite
|
||||||
|
})
|
||||||
|
if(data.vs_id){
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/video/getPushDataInfo',
|
||||||
|
data: {
|
||||||
|
vs_id: data.vs_id || '',
|
||||||
|
},
|
||||||
|
methods: "GET",
|
||||||
|
isLoading: true,
|
||||||
|
}).then(advRes => {
|
||||||
|
let nums = advRes.data.weigh?advRes.data.weigh: 0
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=${videoRes.data.drama_id}&srcAppid=${videoRes.data.appid?videoRes.data.appid:that.$config.mini_appid}&serialNo=${nums?nums:1}&extParam=${param}`
|
||||||
|
})
|
||||||
|
}).catch(advErr => {
|
||||||
|
console.log('get activity err');
|
||||||
|
console.log(advErr);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=${videoRes.data.drama_id}&srcAppid=${videoRes.data.appid?videoRes.data.appid:that.$config.mini_appid}&serialNo=${data.num?data.num:1}&extParam=${param}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(videoRes.data.appid?that.$config.mini_appid:videoRes.data.appid)
|
||||||
|
}).catch(videoErr=>{
|
||||||
|
console.log('get video id error')
|
||||||
|
console.log(videoErr)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// //获取个人信息
|
||||||
|
get_user_info() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/user/index'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.removeStorageSync("userinfo")
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
that.userInfo = res.data;
|
||||||
|
that.userBeansNum = res.data.beans;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
share() {
|
||||||
|
var href = '/pagesA/player/detailPlayer?vid=' + this.videoId + '&fxpid=' + this.userInfo.id + '&mid=0'
|
||||||
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: this.urls + '/h5/#' + href,
|
||||||
|
complete() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "分享连接已复制到剪贴板"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
uni.share({
|
||||||
|
provider: "weixin",
|
||||||
|
scene: "WXSenceTimeline",
|
||||||
|
type: 0,
|
||||||
|
href: href,
|
||||||
|
title: '分享标题',
|
||||||
|
summary: '分享总结',
|
||||||
|
imageUrl: '',
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
console.log("swiper_chanage");
|
||||||
|
let that = this;
|
||||||
|
let isNext = false;
|
||||||
|
if (val.detail.current > that.swiperCurrent) {
|
||||||
|
// 下一集s
|
||||||
|
isNext = true;
|
||||||
|
}
|
||||||
|
// 是否即将到达当前页最后两条,为最后两条时获取下一页数据
|
||||||
|
if (that.videoListData.length <= that.swiperCurrent + 3 && that.page.isNextPage) {
|
||||||
|
that.getVideoList();
|
||||||
|
}
|
||||||
|
that.swiperCurrent = val.detail.current;
|
||||||
|
that.playVideoDetail = that.videoListData[that.swiperCurrent];
|
||||||
|
// 检查当前集是否支付,未支付触发支付
|
||||||
|
that.checkIsPaying();
|
||||||
|
},
|
||||||
|
|
||||||
|
//从列表选择第几集时
|
||||||
|
changePlaying(val) {
|
||||||
|
console.log('change Playing video', val)
|
||||||
|
let that = this;
|
||||||
|
console.log(val.ranking_num)
|
||||||
|
if (that.videoListData.length - 1 < val.ranking_num) {
|
||||||
|
// 当前视频列表数据不包含选中的数据
|
||||||
|
that.getVideoList(true, val.ranking_num - 1)
|
||||||
|
} else {
|
||||||
|
that.swiperCurrent = val.ranking_num;
|
||||||
|
console.log('选集', that.videoListData)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getVideoList(isSync, num) {
|
||||||
|
let that = this
|
||||||
|
if (that.page.isNextPage) {
|
||||||
|
console.log('get video List',)
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/video/videoinfo',
|
||||||
|
data: {
|
||||||
|
page: that.page.currentPage,
|
||||||
|
limit: that.page.pageSize,
|
||||||
|
vid: that.videoId,
|
||||||
|
},
|
||||||
|
isLoading:true,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.total < that.page.pageSize * that.page.currentPage) {
|
||||||
|
that.page.isNextPage = false;
|
||||||
|
}
|
||||||
|
if (that.page.currentPage == 1) {
|
||||||
|
res.videodata.iszj = res.data[0].iszj;
|
||||||
|
that.videoInfo = res.videodata;
|
||||||
|
uni.setNavigationBarTitle({title: res.videodata.name})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
item._id = 'ks_' + item.id;
|
||||||
|
})
|
||||||
|
that.videoListData = res.data;
|
||||||
|
that.playVideoDetail = res.data[0];
|
||||||
|
that.checkIsPaying();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.videoListData = that.videoListData.concat(res.data)
|
||||||
|
}
|
||||||
|
that.page.currentPage += 1;
|
||||||
|
if (isSync && that.videoListData.length > num + 1) {
|
||||||
|
// 等页面更新完调用,否则可能swiper还未加载
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.swiperCurrent = num;
|
||||||
|
console.log(that.swiperCurrent);
|
||||||
|
// 触发 swiperCurrent改变之后会获取选中集的路径,在此获取下一集的内容
|
||||||
|
})
|
||||||
|
} else if (isSync && that.videoListData.length < num + 1) {
|
||||||
|
that.getVideoList(isSync, num);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
checkIsPaying() {
|
||||||
|
console.log('check is can paying')
|
||||||
|
// 未支付
|
||||||
|
let that = this;
|
||||||
|
if (that.playVideoDetail.pays == 1) {
|
||||||
|
// 检查金豆余额是否足够支付
|
||||||
|
if (that.userBeansNum >= that.playVideoDetail.beans) {
|
||||||
|
// 用户是否开启自动金豆支付
|
||||||
|
if (that.userInfo.type) { //1自动扣费 2手动支付
|
||||||
|
// 金豆支付
|
||||||
|
that.beansPaying();
|
||||||
|
} else {
|
||||||
|
// 弹出支付询问弹窗
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否支付' + that.playVideoDetail.beans + '金豆观看视频',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.beansPaying();
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 金豆余额不足显示充值
|
||||||
|
console.log(123);
|
||||||
|
this.$refs.rechargePups.showRechargePup();
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (!that.playVideoDetail.src) {
|
||||||
|
that.getVideoSrc()
|
||||||
|
} else {
|
||||||
|
that.$nextTick(() => {
|
||||||
|
// that.onPlayVideo = uni.createVideoContext(that.videoListData[that.swiperCurrent]._id, that);
|
||||||
|
// console.log('check end play videos ')
|
||||||
|
// that.onPlayVideo.play();
|
||||||
|
})
|
||||||
|
if (this.userInfo.id) {
|
||||||
|
that.upPlayNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beansPaying() {
|
||||||
|
let that = this;
|
||||||
|
let upData = {
|
||||||
|
buytype: "金豆",
|
||||||
|
beans: that.playVideoDetail.beans,
|
||||||
|
id: that.playVideoDetail.id,
|
||||||
|
smid: that.playVideoDetail.id,
|
||||||
|
wxlx: "wxxcx",
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
token: that.userInfo.token,
|
||||||
|
sum: 1,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code'),
|
||||||
|
pricebuy: that.playVideoDetail.isvip == 2 ? that.playVideoDetail.vippriceq : that.playVideoDetail.priceq,
|
||||||
|
openid: uni.getStorageSync('openid'),
|
||||||
|
lx: 2,//1全集购买 2单集购买
|
||||||
|
}
|
||||||
|
|
||||||
|
PAY.pays.beansPay(upData).then(res => {
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
that.videoListData[that.swiperCurrent].pays = 2;
|
||||||
|
that.userBeansNum -= that.playVideoDetail.beans;
|
||||||
|
// that.onPlayVideo = uni.createVideoContext(that.videoListData[that.swiperCurrent]._id, that);
|
||||||
|
console.log('buy success play videos')
|
||||||
|
// that.onPlayVideo.play();
|
||||||
|
// 更新播放
|
||||||
|
that.upPlayNum();
|
||||||
|
} else if (res.data.code == 0 && res.data.msg == 'msg: "金豆不足"') {
|
||||||
|
console.log(123);
|
||||||
|
this.$refs.rechargePups.showRechargePup();
|
||||||
|
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
rechargeSuccess(order) {
|
||||||
|
if (order.oid) {
|
||||||
|
this.page = {
|
||||||
|
pageSize: 80,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
};
|
||||||
|
this.getVideoList(true, this.swiperCurrent, order.oid)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取视频的src
|
||||||
|
getVideoSrc() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/video/memberUnlockVideo',
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
smid: that.playVideoDetail.id,
|
||||||
|
vid: that.videoInfo.id,
|
||||||
|
},
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.videoListData[this.swiperCurrent].src = res.data.src
|
||||||
|
this.$nextTick(() => {
|
||||||
|
that.onPlayVideo = uni.createVideoContext(that.playVideoDetail._id, that);
|
||||||
|
// that.onPlayVideo.play();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
videoPalyerErr(err) {
|
||||||
|
console.log('tou tiao player err', err)
|
||||||
|
},
|
||||||
|
|
||||||
|
videoPlayerEnded() {
|
||||||
|
if (this.swiperCurrent == this.videoListData.length - 1) {
|
||||||
|
this.swiperCurrent = 0;
|
||||||
|
} else {
|
||||||
|
this.swiperCurrent = this.swiperCurrent + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadedmetadata() {
|
||||||
|
console.log("loadedmetadata end")
|
||||||
|
// #ifdef H5
|
||||||
|
setTimeout(() => {
|
||||||
|
this.onPlayVideo.play();
|
||||||
|
uni.hideLoading()
|
||||||
|
}, 500)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
upPlayNum() { //更新播放记录
|
||||||
|
let that = this
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/video/bfjl',
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
vid: that.videoInfo.id,
|
||||||
|
mid: that.playVideoDetail.id,
|
||||||
|
uid: that.userInfo.id
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
console.log('up play end')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改
|
||||||
|
userChangeStar() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/user/videorecord',
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
vid: that.videoId,
|
||||||
|
mid: that.playVideoDetail.id,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
that.videoInfo.iszj = that.videoInfo.iszj == 1 ? 2 : 1
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
// 修改喜欢状态
|
||||||
|
userChangeLike() {
|
||||||
|
let that = this;
|
||||||
|
httpRequest({
|
||||||
|
url: '/api/user/tapLove',
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
vid: that.videoId,
|
||||||
|
mid: that.playVideoDetail.id
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
that.playVideoDetail.like = that.playVideoDetail.like == 1 ? 2 : 1
|
||||||
|
let likeNUm = that.playVideoDetail.like_n
|
||||||
|
that.playVideoDetail.like_n = that.playVideoDetail.like == 1 ? likeNUm - 1 : likeNUm + 1
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//返回
|
||||||
|
back_load() {
|
||||||
|
let that = this;
|
||||||
|
if (this.playVideoDetail.iszj == 1) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否将此剧加入追剧列表?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.userChangeStar()
|
||||||
|
} else if (res.cancel) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/tabs/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/tabs/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showChoice() {
|
||||||
|
this.$refs.choiceVideoPup.showChoicePup()
|
||||||
|
},
|
||||||
|
|
||||||
|
goUpVip(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
onShareAppMessage: function (res) {
|
||||||
|
let that = this;
|
||||||
|
// #ifdef MP-WEIXIN || MP-TOUTIAO
|
||||||
|
let invite = this.userinfo.invite ? this.userinfo.invite : "";
|
||||||
|
let video = that.originList[that.originIndex];
|
||||||
|
var href = '/pagesA/player/detailPlayer?vid=' + this.videoId + '&fxpid=' + this.userInfo.id + '&mid=0' + '&invite=' +
|
||||||
|
invite + '&tt_album_id=' + video.album_id + '&tt_episode_id=' + video.episode_id
|
||||||
|
const obj = {
|
||||||
|
title: that.title_text,
|
||||||
|
imageUrl: '',
|
||||||
|
path: href,
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res, "转发成功")
|
||||||
|
},
|
||||||
|
fail: function (res) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '发送失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pages {
|
||||||
|
background-color: #000000;
|
||||||
|
|
||||||
|
/* #ifdef MP-TOUTIAO */
|
||||||
|
//height: 100vh;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
/* #ifdef APP */
|
||||||
|
width: 750rpx;
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
width: 750rpx;
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef APP */
|
||||||
|
.swiperItem {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.swiperItemContent {
|
||||||
|
position: relative;
|
||||||
|
width: 750rpx;
|
||||||
|
/* #ifdef APP */
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
height: 100%;
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.payVideo {
|
||||||
|
width: 750rpx;
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
height: calc(100vh - 100rpx);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
.video {
|
||||||
|
width: 750rpx;
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
height: calc(100vh - 100rpx);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.noPayVideo {
|
||||||
|
width: 750rpx;
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
height: 100%;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
.videoCove {
|
||||||
|
width: 800rpx;
|
||||||
|
/* #ifdef MP-WEIXIN ||MP-TOUTIAO ||H5 */
|
||||||
|
height: calc(100% - 70rpx);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightBtnList {
|
||||||
|
position: absolute;
|
||||||
|
right: 34rpx;
|
||||||
|
bottom: 600rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 99;
|
||||||
|
|
||||||
|
.btnItem {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
/* #ifdef MP-WEIXIN || MP-TOUTIAO ||H5 */
|
||||||
|
background: none;
|
||||||
|
/* #endif */
|
||||||
|
.videoBtnImg {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
/* #ifdef MP-WEIXIN || H5 */
|
||||||
|
margin: 0 auto;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP */
|
||||||
|
margin-left: 16rpx;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnText {
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnTextRed {
|
||||||
|
color: red;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef MP-WEIXIN || MP-TOUTIAO ||H5 */
|
||||||
|
.wxClickBtn {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
width: 100rpx;
|
||||||
|
opacity: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
top: -100rpx;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.choiceTitleLine {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
|
||||||
|
.appText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schoiceClose {
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoFooter {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-left: 40rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.footerTv {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerTvText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 32rpx;
|
||||||
|
border-bottom: 2rpx solid #ffffff;
|
||||||
|
max-width: 600rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceVideo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
|
||||||
|
.choiceVideoTexts {
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerChoice {
|
||||||
|
width: 34rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,913 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pages">
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<view class="header" :style="{marginTop:searchBarTop + 'px',height:searchBarHeight + 'px'}">
|
||||||
|
<view style="height: 45px;display: flex;width: 100%;padding-left: 15rpx; " @tap.stop="back_load">
|
||||||
|
<image src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/on_back.png" style="width: 44rpx;height: 44rpx;"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view class="header">
|
||||||
|
<view style="height: 45px;display: flex;width: 100%;padding-top: 10px; " @tap.stop="back_load">
|
||||||
|
<image src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/on_back.png" style="width: 44rpx;height: 44rpx;"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<swiper class="swiper" :current="swiperCurrent" :indicator-dots="false" :autoplay="false" :vertical="true"
|
||||||
|
:duration="50" @change="currentChange" :style="{height:winHeight} ">
|
||||||
|
<swiper-item class="swiperItem" v-for="(videoItem,videoIndex) in videoListData" :key="videoItem._id">
|
||||||
|
|
||||||
|
<view class="swiperItemContent" style="color: #ffffff;">
|
||||||
|
<view class="payVideo" v-if="videoIndex == swiperCurrent && videoItem.pays == '2'">
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<video-player class="video"
|
||||||
|
:album-id="videoItem.album_id"
|
||||||
|
:cloud-type="1"
|
||||||
|
:autoplay="true"
|
||||||
|
:episode-id="videoItem.episode_id"
|
||||||
|
:controls="true"
|
||||||
|
:loop="false"
|
||||||
|
:enable-progress-gesture="false"
|
||||||
|
@ended="videoPlayerEnded"
|
||||||
|
:show-fullscreen-btn='false'
|
||||||
|
@loadedmetadata="loadedmetadata"
|
||||||
|
@error="videoPalyerErr">
|
||||||
|
</video-player>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef APP || H5-->
|
||||||
|
<video class="video"
|
||||||
|
:id="videoItem._id"
|
||||||
|
:poster="videoItem.img"
|
||||||
|
:autoplay="true"
|
||||||
|
object-fit="contain"
|
||||||
|
@ended="videoPlayerEnded"
|
||||||
|
@loadedmetadata="loadedmetadata"
|
||||||
|
:src="videoItem.src"></video>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view class="noPayVideo" v-if="videoItem.pays == 1">
|
||||||
|
<image class="videoCove" :src="imageUrl+videoItem.img" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rightBtnList" v-if="videoIndex == swiperCurrent && videoItem.pays == 2">
|
||||||
|
<view class="btnItem" @click="userChangeLike(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" v-if="videoItem.like=='2'" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/aixinRed.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<image class="videoBtnImg" v-else src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/aixin.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<view class="btnText">{{videoItem.like_n>0?videoItem.like_n:'0'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="btnItem" @click="userChangeStar(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" v-if="videoInfo.iszj=='2'" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/scRed.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<image class="videoBtnImg" v-else src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/sc.png"
|
||||||
|
mode="scaleToFill"></image>
|
||||||
|
<!-- <text class="btnText" >{{videoItem.like_n>0?videoItem.iszj_n : '0'}}</text>-->
|
||||||
|
<view class=" btnTextRed" v-if="videoInfo.iszj=='2'">已追</view>
|
||||||
|
<view class="btnText" v-else>追剧</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view class="btnItem" @click="copyShareLink(videoItem)" v-if="userInfo.id">
|
||||||
|
<image class="videoBtnImg" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/icon/share-fill.png" mode=""></image>
|
||||||
|
<view class="btnText">分享</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view class="videoFooter" v-if="videoIndex == swiperCurrent && videoInfo.id" @click="showChoice">
|
||||||
|
<view class="videoName">
|
||||||
|
<image class="footerTv" src="https://wxtietong.hnjrdzkj.xyz/static/wechat/static/video.png" mode="scaleToFill"></image>
|
||||||
|
<text class="footerTvText">{{videoInfo.name}} · 当前第{{videoItem.weigh}}集/全{{videoInfo.sum}}集</text>
|
||||||
|
</view>
|
||||||
|
<view class="choiceVideo">
|
||||||
|
<text class="choiceVideoTexts">选集</text>
|
||||||
|
<uni-icons size="12" type="right" color="#ffffff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
<recharge ref="rechargePups"
|
||||||
|
:userBeans="userBeansNum"
|
||||||
|
:play-video-info="playVideoDetail"
|
||||||
|
:video-info="videoInfo"
|
||||||
|
:pageHeight="pupHeight"
|
||||||
|
@rechargeSuccess="rechargeSuccess"
|
||||||
|
></recharge>
|
||||||
|
<selectVideo ref="choiceVideoPup" @choiceVideoItem="changePlaying" :play-video-info="playVideoDetail"
|
||||||
|
:video-info="videoInfo">
|
||||||
|
</selectVideo>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import selectVideo from "@/components/select/video.vue"
|
||||||
|
import recharge from "@/pagesA/components/recharge/rechargePup.vue"
|
||||||
|
import PAY from "@/utils/pay"
|
||||||
|
import login from "@/utils/login";
|
||||||
|
import config from "@/utils/config";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
selectVideo,
|
||||||
|
recharge
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: {
|
||||||
|
pageSize: 50,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
},
|
||||||
|
userInfo: {},
|
||||||
|
swiperCurrent: 0,
|
||||||
|
playVideoDetail: {}, //
|
||||||
|
videoInfo: {}, //短剧简介
|
||||||
|
videoListData: [{
|
||||||
|
beans: Number,
|
||||||
|
fjname: String,
|
||||||
|
href: String,
|
||||||
|
id: Number,
|
||||||
|
img: String,
|
||||||
|
isplay: Boolean,
|
||||||
|
isvip: Number,
|
||||||
|
iszj: Number,
|
||||||
|
iszj_n: Number,
|
||||||
|
like: Number,
|
||||||
|
like_n: Number,
|
||||||
|
lx: Number,
|
||||||
|
mid: Number,
|
||||||
|
name: String,
|
||||||
|
pays: Number,
|
||||||
|
pid: Number,
|
||||||
|
price: String,
|
||||||
|
src: String,
|
||||||
|
state: String,
|
||||||
|
sum: Number,
|
||||||
|
videourl: String,
|
||||||
|
vipprice: String,
|
||||||
|
weigh: Number,
|
||||||
|
}], //剧集列表
|
||||||
|
swiperData: [], //
|
||||||
|
userBeansNum: 0,
|
||||||
|
videoId: '',
|
||||||
|
imageUrl: "",
|
||||||
|
searchBarTop:0,
|
||||||
|
searchBarHeight:0,
|
||||||
|
winHeight: '800px',
|
||||||
|
pupHeight: "400px",
|
||||||
|
onPlayVideo: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
onLoad(e) {
|
||||||
|
console.log(e)
|
||||||
|
this.userinfo = uni.getStorageSync("userinfo");
|
||||||
|
this.getPageDefault();
|
||||||
|
this.checkQueryData(e);
|
||||||
|
if (this.userinfo.token) {
|
||||||
|
this.openid = uni.getStorageSync("openid");
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e).then(res => {
|
||||||
|
console.log('bind user success')
|
||||||
|
// #ifdef APP || H5
|
||||||
|
this.get_user_info()
|
||||||
|
this.getVideoList()
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user catch')
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// #ifdef APP || H5
|
||||||
|
this.get_user_info()
|
||||||
|
this.getVideoList()
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
login.wxLogin().then(res=>{
|
||||||
|
this.openid = uni.getStorageSync("openid");
|
||||||
|
if (e.adv_id && e.code) {
|
||||||
|
this.bindUser(e).then(res => {
|
||||||
|
console.log('bind user success')
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('bind user catch')
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.getWechartVideoDel(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5 ||APP
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您还未登录,请先登录',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesA/login/login'
|
||||||
|
})
|
||||||
|
} else if (res.cancel) {
|
||||||
|
uni.switchTab({url: '/pages/tabs/home'})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
// 获取页面宽高数据& 系统信息
|
||||||
|
getPageDefault() {
|
||||||
|
console.log(this.system, uni.getSystemInfoSync())
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
this.searchBarTop = menuButtonInfo.top;
|
||||||
|
this.searchBarHeight = menuButtonInfo.height;
|
||||||
|
this.wxlx = 'wxxcx'
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
//#ifdef H5
|
||||||
|
var ua = window.navigator.userAgent.toLowerCase();
|
||||||
|
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||||
|
this.wxlx = 'wxgzh';
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
|
this.winHeight = uni.getWindowInfo().windowHeight+"px";
|
||||||
|
console.log(uni.getWindowInfo().windowHeight+"px")
|
||||||
|
this.pupHeight =( uni.getWindowInfo().windowHeight - 40 )+ "px";
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'isbuy',
|
||||||
|
data: 1
|
||||||
|
})
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: res => {
|
||||||
|
this.safeArea = res.safeAreaInsets.bottom;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkQueryData(e) {
|
||||||
|
if (e.start_free) {
|
||||||
|
this.free_start = Number(e.start_free)
|
||||||
|
this.free_end = Number(e.end_free)
|
||||||
|
if (Number(e.start_free) > 0) {
|
||||||
|
this.isAttention = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.fxpid) {
|
||||||
|
if (e.fxpid > 0) {
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'fxpid',
|
||||||
|
data: e.fxpid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.vid) {
|
||||||
|
this.videoId = e.vid;
|
||||||
|
}
|
||||||
|
if (e.mid) {
|
||||||
|
this.mid = e.mid
|
||||||
|
}
|
||||||
|
console.log(this.free_start, this.free_end, this.isAttention)
|
||||||
|
},
|
||||||
|
// 绑定推荐
|
||||||
|
bindUser(data) {
|
||||||
|
let that = this
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.setStorageSync('vs_id_code', data.vs_id);
|
||||||
|
let upData = {
|
||||||
|
uid: uni.getStorageSync("userinfo").id,
|
||||||
|
ad_id: data.code,
|
||||||
|
advertiser_id: data.advertiser_id,
|
||||||
|
clue_id: data.clue_id,
|
||||||
|
clue_token: data.clue_token,
|
||||||
|
click_id: data.clickid,
|
||||||
|
vid: data.vid,
|
||||||
|
mid: data.mid,
|
||||||
|
type: data.inventory,
|
||||||
|
vs_id: data.vs_id,
|
||||||
|
token: uni.getStorageSync("userinfo").token
|
||||||
|
}
|
||||||
|
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/user/callbackBinding',
|
||||||
|
data: upData,
|
||||||
|
methods:"GET"
|
||||||
|
|
||||||
|
}).then(res=>{
|
||||||
|
uni.setStorageSync('get_ad_code', res.data.code);
|
||||||
|
resolve(res)
|
||||||
|
}).catch(err=>{
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取播放器信息
|
||||||
|
getWechartVideoDel(data) {
|
||||||
|
let that = this
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/videoIdToDramaId',
|
||||||
|
data: {
|
||||||
|
vid: data.vid,
|
||||||
|
},
|
||||||
|
methods:"GET"
|
||||||
|
}).then(videoRes=>{
|
||||||
|
console.log(videoRes)
|
||||||
|
let fxpid = uni.getStorageSync("userinfo").id,
|
||||||
|
invite = uni.getStorageSync("userinfo").invite || '';
|
||||||
|
let param = JSON.stringify({
|
||||||
|
vid: data.vid,
|
||||||
|
mid: data.mid || 0,
|
||||||
|
fxpid: fxpid,
|
||||||
|
invite: invite
|
||||||
|
})
|
||||||
|
// 获取活动指定的是那一集并跳转到指定剧集
|
||||||
|
if(data.vs_id){
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/getPushDataInfo',
|
||||||
|
data: {
|
||||||
|
vs_id: data.vs_id || '',
|
||||||
|
},
|
||||||
|
methods: "GET",
|
||||||
|
isLoading: true,
|
||||||
|
}).then(advRes => {
|
||||||
|
let nums = advRes.data.weigh?advRes.data.weigh: 0
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=${videoRes.data.drama_id}&srcAppid=${videoRes.data.appid?videoRes.data.appid:that.$config.mini_appid}&serialNo=${nums?nums:1}&extParam=${param}`
|
||||||
|
})
|
||||||
|
}).catch(advErr => {
|
||||||
|
console.log('get activity err');
|
||||||
|
console.log(advErr);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=${videoRes.data.drama_id}&srcAppid=${videoRes.data.appid?videoRes.data.appid:that.$config.mini_appid}&serialNo=${data.num?data.num:1}&extParam=${param}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(videoRes.data.appid?that.$config.mini_appid:videoRes.data.appid)
|
||||||
|
}).catch(videoErr=>{
|
||||||
|
console.log('get video id error')
|
||||||
|
console.log(videoErr)
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// //获取个人信息
|
||||||
|
get_user_info() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/user/index'
|
||||||
|
}).then(res=>{
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.removeStorageSync("userinfo")
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
|
that.userInfo = res.data;
|
||||||
|
that.userBeansNum = res.data.beans;
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copyShareLink() {
|
||||||
|
var href = '/pagesA/player/detailPlayer?vid=' + this.videoId + '&fxpid=' + this.userInfo.id + '&mid=0'
|
||||||
|
// #ifdef H5
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: config.webUrl + '/h5/#' + href,
|
||||||
|
complete() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "分享连接已复制到剪贴板"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
uni.share({
|
||||||
|
provider: "weixin",
|
||||||
|
scene: "WXSenceTimeline",
|
||||||
|
type: 0,
|
||||||
|
href: href,
|
||||||
|
title: '分享标题',
|
||||||
|
summary: '分享总结',
|
||||||
|
imageUrl: '',
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
currentChange(val) {
|
||||||
|
console.log("swiper_chanage");
|
||||||
|
let that = this;
|
||||||
|
let isNext = false;
|
||||||
|
if (val.detail.current > that.swiperCurrent) {
|
||||||
|
// 下一集s
|
||||||
|
isNext = true;
|
||||||
|
}
|
||||||
|
// 是否即将到达当前页最后两条,为最后两条时获取下一页数据
|
||||||
|
if (that.videoListData.length <= that.swiperCurrent + 3 && that.page.isNextPage) {
|
||||||
|
that.getVideoList();
|
||||||
|
}
|
||||||
|
that.swiperCurrent = val.detail.current;
|
||||||
|
that.playVideoDetail = that.videoListData[that.swiperCurrent];
|
||||||
|
// 检查当前集是否支付,未支付触发支付
|
||||||
|
that.checkIsPaying();
|
||||||
|
},
|
||||||
|
|
||||||
|
//从列表选择第几集时
|
||||||
|
changePlaying(val) {
|
||||||
|
console.log('change Playing video', val)
|
||||||
|
let that = this;
|
||||||
|
console.log(val.ranking_num)
|
||||||
|
if (that.videoListData.length - 1 < val.ranking_num) {
|
||||||
|
// 当前视频列表数据不包含选中的数据
|
||||||
|
that.getVideoList(true, val.ranking_num - 1)
|
||||||
|
} else {
|
||||||
|
that.swiperCurrent = val.ranking_num;
|
||||||
|
console.log('选集', that.videoListData)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getVideoList(isSync, num) {
|
||||||
|
let that = this
|
||||||
|
if (that.page.isNextPage) {
|
||||||
|
console.log('get video List',)
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/video/videoinfo',
|
||||||
|
data:{
|
||||||
|
page: that.page.currentPage,
|
||||||
|
limit: that.page.pageSize,
|
||||||
|
vid: that.videoId,
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
if (res.total < that.page.pageSize * that.page.currentPage) {
|
||||||
|
that.page.isNextPage = false;
|
||||||
|
}
|
||||||
|
if (that.page.currentPage == 1) {
|
||||||
|
res.videodata.iszj = res.data[0].iszj;
|
||||||
|
that.videoInfo = res.videodata;
|
||||||
|
uni.setNavigationBarTitle({title: res.videodata.name})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
item._id = 'ks_' + item.id;
|
||||||
|
})
|
||||||
|
that.videoListData = res.data;
|
||||||
|
that.playVideoDetail = res.data[0];
|
||||||
|
that.checkIsPaying();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
that.videoListData = that.videoListData.concat(res.data)
|
||||||
|
}
|
||||||
|
that.page.currentPage += 1;
|
||||||
|
if (isSync && that.videoListData.length > num + 1) {
|
||||||
|
// 等页面更新完调用,否则可能swiper还未加载
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.swiperCurrent = num;
|
||||||
|
console.log(that.swiperCurrent);
|
||||||
|
// 触发 swiperCurrent改变之后会获取选中集的路径,在此获取下一集的内容
|
||||||
|
})
|
||||||
|
} else if (isSync && that.videoListData.length < num + 1) {
|
||||||
|
that.getVideoList(isSync, num);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
checkIsPaying() {
|
||||||
|
console.log('check is can paying')
|
||||||
|
// 未支付
|
||||||
|
let that = this;
|
||||||
|
if (that.playVideoDetail.pays == 1) {
|
||||||
|
// 检查金豆余额是否足够支付
|
||||||
|
if (that.userBeansNum >= that.playVideoDetail.beans) {
|
||||||
|
// 用户是否开启自动金豆支付
|
||||||
|
if(that.userInfo.type){ //1自动扣费 2手动支付
|
||||||
|
// 金豆支付
|
||||||
|
that.beansPaying();
|
||||||
|
}else{
|
||||||
|
// 弹出支付询问弹窗
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否支付' + that.playVideoDetail.beans + '金豆观看视频',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.beansPaying();
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// 金豆余额不足显示充值
|
||||||
|
this.$refs.rechargePups.showRechargePup();
|
||||||
|
}
|
||||||
|
} else if (!that.playVideoDetail.src) {
|
||||||
|
that.getVideoSrc()
|
||||||
|
} else {
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.onPlayVideo = uni.createVideoContext(that.videoListData[that.swiperCurrent]._id, that);
|
||||||
|
console.log('check end play videos ')
|
||||||
|
that.onPlayVideo.play();
|
||||||
|
})
|
||||||
|
if (this.userInfo.id) {
|
||||||
|
that.upPlayNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beansPaying(){
|
||||||
|
let that = this;
|
||||||
|
let upData = {
|
||||||
|
buytype: "金豆",
|
||||||
|
beans: that.playVideoDetail.beans,
|
||||||
|
id: that.playVideoDetail.id,
|
||||||
|
smid: that.playVideoDetail.id,
|
||||||
|
wxlx:"wxxcx",
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
token: that.userInfo.token,
|
||||||
|
sum: 1,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code'),
|
||||||
|
pricebuy: that.playVideoDetail.isvip == 2 ? that.playVideoDetail.vippriceq : that.playVideoDetail.priceq,
|
||||||
|
openid: uni.getStorageSync('openid'),
|
||||||
|
lx: 2,//1全集购买 2单集购买
|
||||||
|
}
|
||||||
|
|
||||||
|
PAY.pays.beansPay(upData).then(res => {
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
that.videoListData[that.swiperCurrent].pays = 2;
|
||||||
|
that.userBeansNum -= that.playVideoDetail.beans;
|
||||||
|
// that.onPlayVideo = uni.createVideoContext(that.videoListData[that.swiperCurrent]._id, that);
|
||||||
|
console.log('buy success play videos')
|
||||||
|
// that.onPlayVideo.play();
|
||||||
|
// 更新播放
|
||||||
|
that.upPlayNum();
|
||||||
|
}else if(res.data.code ==0 && res.data.msg =='msg: "金豆不足"'){
|
||||||
|
this.$refs.rechargePups.showRechargePup();
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
rechargeSuccess(order) {
|
||||||
|
if (order.oid) {
|
||||||
|
this.page = {
|
||||||
|
pageSize: 80,
|
||||||
|
currentPage: 1,
|
||||||
|
isNextPage: true,
|
||||||
|
};
|
||||||
|
this.getVideoList(true, this.swiperCurrent, order.oid)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取视频的src
|
||||||
|
getVideoSrc() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/video/memberUnlockVideo',
|
||||||
|
method: "GET",
|
||||||
|
data:{
|
||||||
|
smid: that.playVideoDetail.id,
|
||||||
|
vid: that.videoInfo.id,
|
||||||
|
},
|
||||||
|
isLoading: true,
|
||||||
|
}).then(res=>{
|
||||||
|
if (res.code == 1) {
|
||||||
|
uni.showLoading()
|
||||||
|
this.videoListData[this.swiperCurrent].src = res.data.src
|
||||||
|
this.$nextTick(() => {
|
||||||
|
that.onPlayVideo = uni.createVideoContext(that.playVideoDetail._id, that);
|
||||||
|
that.onPlayVideo.play();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
videoPalyerErr(err) {
|
||||||
|
console.log('tou tiao player err', err)
|
||||||
|
},
|
||||||
|
|
||||||
|
videoPlayerEnded() {
|
||||||
|
if (this.swiperCurrent == this.videoListData.length - 1) {
|
||||||
|
this.swiperCurrent = 0;
|
||||||
|
} else {
|
||||||
|
this.swiperCurrent = this.swiperCurrent + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadedmetadata() {
|
||||||
|
console.log("loadedmetadata end")
|
||||||
|
// #ifdef H5
|
||||||
|
setTimeout(() => {
|
||||||
|
this.onPlayVideo.play();
|
||||||
|
uni.hideLoading()
|
||||||
|
}, 500)
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
upPlayNum() { //更新播放记录
|
||||||
|
let that = this
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/video/bfjl',
|
||||||
|
method: "GET",
|
||||||
|
data:{
|
||||||
|
vid: that.videoInfo.id,
|
||||||
|
mid: that.playVideoDetail.id,
|
||||||
|
uid: that.userInfo.id
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
console.log('up play end')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改
|
||||||
|
userChangeStar() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/user/videorecord',
|
||||||
|
method: "GET",
|
||||||
|
data:{
|
||||||
|
uid: that.userInfo.id,
|
||||||
|
vid: that.videoId,
|
||||||
|
mid: that.playVideoDetail.id,
|
||||||
|
ad_code: uni.getStorageSync('get_ad_code')
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
that.videoInfo.iszj = that.videoInfo.iszj == 1 ? 2 : 1
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
// 修改喜欢状态
|
||||||
|
userChangeLike() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:'/api/user/tapLove',
|
||||||
|
method: "GET",
|
||||||
|
data:{
|
||||||
|
vid: that.videoId,
|
||||||
|
mid: that.playVideoDetail.id
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
that.playVideoDetail.like = that.playVideoDetail.like == 1 ? 2 : 1
|
||||||
|
let likeNUm = that.playVideoDetail.like_n
|
||||||
|
that.playVideoDetail.like_n = that.playVideoDetail.like == 1 ? likeNUm - 1 : likeNUm + 1
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//返回
|
||||||
|
back_load() {
|
||||||
|
let that = this;
|
||||||
|
if (this.playVideoDetail.iszj == 1) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否将此剧加入追剧列表?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.userChangeStar()
|
||||||
|
} else if (res.cancel) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/tabs/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/tabs/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showChoice() {
|
||||||
|
this.$refs.choiceVideoPup.showChoicePup()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
onShareAppMessage: function (res) {
|
||||||
|
let that = this;
|
||||||
|
// #ifdef MP-WEIXIN || MP-TOUTIAO
|
||||||
|
let invite = this.userinfo.invite ? this.userinfo.invite : "";
|
||||||
|
let video = that.originList[that.originIndex];
|
||||||
|
var href = '/pagesA/player/detailPlayer?vid=' + this.videoId + '&fxpid=' + this.userinfo.id + '&mid=0' + '&invite=' +
|
||||||
|
invite + '&tt_album_id=' + video.album_id + '&tt_episode_id=' + video.episode_id
|
||||||
|
const obj = {
|
||||||
|
title: that.title_text,
|
||||||
|
imageUrl: '',
|
||||||
|
path: href,
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res, "转发成功")
|
||||||
|
},
|
||||||
|
fail: function (res) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '发送失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pages {
|
||||||
|
background-color: #000000;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiperItemContent {
|
||||||
|
position: relative;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payVideo {
|
||||||
|
width: 750rpx;
|
||||||
|
height: calc(100vh - 100rpx);
|
||||||
|
.video {
|
||||||
|
width: 750rpx;
|
||||||
|
height: calc(100vh - 100rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.noPayVideo {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 100%;
|
||||||
|
.videoCove {
|
||||||
|
width: 800rpx;
|
||||||
|
height: calc(100% - 70rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightBtnList {
|
||||||
|
position: absolute;
|
||||||
|
right: 34rpx;
|
||||||
|
top: calc(50% - 200rpx);
|
||||||
|
width: 100rpx;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 99;
|
||||||
|
|
||||||
|
.btnItem {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
background: none;
|
||||||
|
text-align: center;
|
||||||
|
.videoBtnImg {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnText {
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnTextRed {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wxClickBtn {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
width: 100rpx;
|
||||||
|
opacity: 0;
|
||||||
|
height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
top: -100rpx;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.choiceTitleLine {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
|
||||||
|
.appText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schoiceClose {
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoFooter {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-left: 40rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
.footerTv {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
|
||||||
|
.footerTvText {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 32rpx;
|
||||||
|
border-bottom: 2rpx solid #ffffff;
|
||||||
|
max-width: 600rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceVideo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-right: 20rpx;
|
||||||
|
|
||||||
|
.choiceVideoTexts {
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerChoice {
|
||||||
|
width: 34rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pageFree">
|
||||||
|
<view class="pageHeader">
|
||||||
|
<view class="native" @click="pageBack">
|
||||||
|
<!-- <image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image> -->
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="headerText">免费短剧</view>
|
||||||
|
<view class="texts">你想看的都在这里~</view>
|
||||||
|
</view>
|
||||||
|
<view class="videoBox">
|
||||||
|
<view class="videoList">
|
||||||
|
<view class="videoItem" @click="detail(item.id,0)" v-for="(item,index) in pageListData" :key="item.id">
|
||||||
|
<image class="videoImg" :src="item.img"></image>
|
||||||
|
<view class="videoName">{{item.name}}</view>
|
||||||
|
<view class="videoText">{{item.story}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
keytext: '',
|
||||||
|
pageData: {
|
||||||
|
currentPage: 1,
|
||||||
|
page: 1,
|
||||||
|
pageSize: 15,
|
||||||
|
},
|
||||||
|
contentText: {
|
||||||
|
contentdown: '上拉加载更多',
|
||||||
|
contentrefresh: '加载中',
|
||||||
|
contentnomore: '没有数据了'
|
||||||
|
},
|
||||||
|
pageListData: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.pageData.currentPage >= this.pageData.page) {
|
||||||
|
this.getListData();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
pageBack() {
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
getListData() {
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/lists',
|
||||||
|
data: {
|
||||||
|
lx: "2",
|
||||||
|
limit: this.pageData.pageSize,
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
if(this.pageData.page ==1){
|
||||||
|
if(res.rows.length>0){
|
||||||
|
this.pageListData = res.rows;
|
||||||
|
this.currentPage = Math.ceil(res.total/this.pageData.pageSize);
|
||||||
|
}else{
|
||||||
|
this.contentText.contentdown='没有数据'
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.pageListData = this.pageListData.concat(res.rows);
|
||||||
|
}
|
||||||
|
this.pageData.page += 1;
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
detail(vid, mid) {
|
||||||
|
var fxpid = 1
|
||||||
|
if (uni.getStorageSync("userinfo")) {
|
||||||
|
fxpid = uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/client/tuan/detail?vid=' + vid + '&mid=' + mid + '&fxpid=' + fxpid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
|
.pageHeader {
|
||||||
|
height: 285rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-image: url("https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/banners.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.native {
|
||||||
|
padding-top: 100rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.native image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerText {
|
||||||
|
font-family: 'MyFont';
|
||||||
|
font-size: 42rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.texts {
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoBox {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 28rpx 28rpx 0 0;
|
||||||
|
margin-top: -30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoList {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/* justify-content: space-around; */
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoItem {
|
||||||
|
width: 33.3333%;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoImg {
|
||||||
|
height: 280rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoName {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 45rpx;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoText {
|
||||||
|
color: #999999;
|
||||||
|
line-height: 35rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pageFree">
|
||||||
|
<view class="pageHeader">
|
||||||
|
<view class="native" @click="pageBack">
|
||||||
|
<!-- <image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image> -->
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="headerText">最新短剧</view>
|
||||||
|
<view class="texts">你想看的都在这里~</view>
|
||||||
|
</view>
|
||||||
|
<view class="videoBox">
|
||||||
|
<view class="videoList">
|
||||||
|
<view class="videoItem" @click="detail(item.id,0)" v-for="(item,index) in pageListData" :key="item.id">
|
||||||
|
<image class="videoImg" :src="item.img"></image>
|
||||||
|
<view class="videoName">{{item.name}}</view>
|
||||||
|
<view class="videoText">{{item.story}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script >
|
||||||
|
export default {
|
||||||
|
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
keytext:'',
|
||||||
|
pageData:{
|
||||||
|
currentPage:1,
|
||||||
|
page:1,
|
||||||
|
pageSize:15,
|
||||||
|
},
|
||||||
|
contentText: {
|
||||||
|
contentdown: '上拉加载更多',
|
||||||
|
contentrefresh: '加载中',
|
||||||
|
contentnomore: '没有数据了'
|
||||||
|
},
|
||||||
|
pageListData:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
if(this.pageData.currentPage>=this.pageData.page){
|
||||||
|
this.getListData();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
pageBack(){
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
getListData(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url: '/api/video/lists',
|
||||||
|
data: {
|
||||||
|
limit:this.pageData.pageSize,
|
||||||
|
},
|
||||||
|
}).then(res=>{
|
||||||
|
if(this.pageData.page ==1){
|
||||||
|
if(res.rows.length>0){
|
||||||
|
this.pageListData = res.rows;
|
||||||
|
this.currentPage = Math.ceil(res.total/this.pageData.pageSize);
|
||||||
|
}else{
|
||||||
|
this.contentText.contentdown='没有数据'
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.pageListData = this.pageListData.concat(res.rows);
|
||||||
|
}
|
||||||
|
this.pageData.page+=1;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
detail(vid,mid){
|
||||||
|
var fxpid=1
|
||||||
|
if(uni.getStorageSync("userinfo")){
|
||||||
|
fxpid=uni.getStorageSync("userinfo").id
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/client/tuan/detail?vid='+vid+'&mid='+mid+'&fxpid='+fxpid
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
@font-face {
|
||||||
|
font-family: "MyFont";
|
||||||
|
src: url('https://wx.yaohe.hnjrdzkj.xyz/assets/fonts/ZiTiaoZiChangGuDan-Shan-ChaoHei.ttf');
|
||||||
|
}
|
||||||
|
.pageHeader {
|
||||||
|
height: 285rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-image: url("https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/banners.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.native {
|
||||||
|
padding-top: 100rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
.native image{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.headerText{
|
||||||
|
font-family: 'MyFont';
|
||||||
|
font-size: 42rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
.texts{
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
}
|
||||||
|
.videoBox{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 28rpx 28rpx 0 0;
|
||||||
|
margin-top: -30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.videoList{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/* justify-content: space-around; */
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.videoItem{
|
||||||
|
width: 33.3333%;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
}
|
||||||
|
.videoImg{
|
||||||
|
height: 280rpx;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
.videoName{
|
||||||
|
color: #333333;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 45rpx;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.videoText{
|
||||||
|
color: #999999;
|
||||||
|
line-height: 35rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pageFree">
|
||||||
|
<view class="pageHeader">
|
||||||
|
<view class="native" @click="pageBack">
|
||||||
|
<!-- <image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image> -->
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/page_back.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="headerText">短剧排行榜</view>
|
||||||
|
<view class="texts">TOP前50部网络短剧~</view>
|
||||||
|
</view>
|
||||||
|
<view class="videoBox">
|
||||||
|
<view class="videoList">
|
||||||
|
<view class="videoItem" @click="detail(item.id,0)" v-for="(item,index) in pageListData" :key="item.id">
|
||||||
|
<view class="videoImg">
|
||||||
|
<image v-if="index =='0'" mode="scaleToFill" class="iconRank" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/first.png"></image>
|
||||||
|
<image v-if="index =='1'" mode="scaleToFill" class="iconRank" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/second.png"></image>
|
||||||
|
<image v-if="index =='2'" mode="scaleToFill" class="iconRank" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/third.png"></image>
|
||||||
|
<image v-if="index =='3'" mode="scaleToFill" class="iconRank" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fourth.png"></image>
|
||||||
|
<image v-if="index =='4'" mode="scaleToFill" class="iconRank" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/fifth.png"></image>
|
||||||
|
<image class="videoBanner" mode="scaleToFill" :src="item.img"></image>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="videoHeader">
|
||||||
|
<view class="videoName">{{item.name}}</view>
|
||||||
|
<view class="isLove">
|
||||||
|
<image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/aixinRed.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="videoText">{{item.story}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more :status="status" :content-text="contentText" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script >
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
keytext:'',
|
||||||
|
pageData:{
|
||||||
|
currentPage:1,
|
||||||
|
page:1,
|
||||||
|
pageSize:15,
|
||||||
|
},
|
||||||
|
contentText: {
|
||||||
|
contentdown: '上拉加载更多',
|
||||||
|
contentrefresh: '加载中',
|
||||||
|
contentnomore: '没有数据了'
|
||||||
|
},
|
||||||
|
pageListData:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
if(this.pageData.currentPage>=this.pageData.page){
|
||||||
|
this.getListData();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
pageBack(){
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
getListData(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:"/api/video/lists",
|
||||||
|
data:{
|
||||||
|
limit:this.pageData.pageSize,
|
||||||
|
lx:'3'
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
if(this.pageData.page ==1){
|
||||||
|
if(res.rows.length>0){
|
||||||
|
this.pageListData = res.rows;
|
||||||
|
this.currentPage = Math.ceil(res.total/this.pageData.pageSize);
|
||||||
|
}else{
|
||||||
|
this.contentText.contentdown='没有数据'
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.pageListData = this.pageListData.concat(res.rows);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
detail(vid,mid){
|
||||||
|
var fxpid=1
|
||||||
|
if(uni.getStorageSync("userinfo")){
|
||||||
|
fxpid=uni.getStorageSync("userinfo").id
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/client/tuan/detail?vid='+vid+'&mid='+mid+'&fxpid='+fxpid
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.pageHeader {
|
||||||
|
height: 285rpx;
|
||||||
|
width: 100%;
|
||||||
|
background-image: url("https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/banners.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.native {
|
||||||
|
padding-top: 100rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
.native image{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.headerText{
|
||||||
|
font-family: 'MyFont';
|
||||||
|
font-size: 42rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
.texts{
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding-left: 55rpx;
|
||||||
|
}
|
||||||
|
.videoBox{
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 28rpx 28rpx 0 0;
|
||||||
|
margin-top: -30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.videoList{
|
||||||
|
|
||||||
|
}
|
||||||
|
.videoItem{
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.videoImg{
|
||||||
|
position: relative;
|
||||||
|
height: 256rpx;
|
||||||
|
width: 216rpx;
|
||||||
|
}
|
||||||
|
.iconRank{
|
||||||
|
position: absolute;
|
||||||
|
width: 58rpx;
|
||||||
|
height: 68rpx;
|
||||||
|
left: 10rpx;
|
||||||
|
}
|
||||||
|
.videoBanner{
|
||||||
|
height: 256rpx;
|
||||||
|
width: 216rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
.videoHeader{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoName{
|
||||||
|
flex: 1;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.isLove{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
text-align: right;
|
||||||
|
line-height: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.isLove image{
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.videoText{
|
||||||
|
color: #999999;
|
||||||
|
line-height: 35rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pd16_15">
|
||||||
|
<view class="box noshadow pd16_15">
|
||||||
|
<view class="flex alcenter">
|
||||||
|
<image class="adviser-face-big" :src="serviceInfo.avatar"></image>
|
||||||
|
<view style="width: calc(100% - 160rpx);" class=" pl15">
|
||||||
|
<view class="ft16 cl-main ftw600">{{serviceInfo.service_nickname}}</view>
|
||||||
|
<view class="flex alcenter mt8">
|
||||||
|
<view class="flex alcenter cl-notice">
|
||||||
|
<text class="iconfont iconicon_weixin ft14"></text>
|
||||||
|
<text class="ft14 ml5">{{serviceInfo.service_wx}}</text>
|
||||||
|
</view>
|
||||||
|
<view @click="onddtel(weixin)" class="copy-tag ml10" >复制</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex alcenter space mt8">
|
||||||
|
<view class="flex alcenter cl-notice">
|
||||||
|
<text class="iconfont iconicon_call ft14"></text>
|
||||||
|
<text class="ft14 ml5">{{serviceInfo.service_mobile}}</text>
|
||||||
|
</view>
|
||||||
|
<uni-icons @click="ontel" color="#00C657" type="phone-filled" size="20" ></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="mt24">
|
||||||
|
<navigator url="/pages/client/vipcard/adviserchange">
|
||||||
|
<button class="btn-mid plan" style="width: 100%;" :style="getBtnPlanStyle">
|
||||||
|
<text class="iconfont iconicon_huan mr10"></text>更换顾问
|
||||||
|
</button>
|
||||||
|
</navigator>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="box noshadow pd16_15 mt16">
|
||||||
|
<textarea v-model="content" placeholder="我有问题要跟顾问反馈:" placeholder-class="cl-notice" class="ft14" style="height: 300rpx; width: 100%;" :maxlength="300"></textarea>
|
||||||
|
<view class="mt12 text-right ft12 cl-notice">
|
||||||
|
{{content.length}}/300
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mt16">
|
||||||
|
<button @tap="btn_load" class="btn-big" >立即提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
content:'',
|
||||||
|
weixin:'',
|
||||||
|
serviceInfo:'',
|
||||||
|
image_url:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.tel= uni.getStorageSync("config").tels
|
||||||
|
this.weixin= uni.getStorageSync("config").weixin
|
||||||
|
this.get_serviceInfo()
|
||||||
|
this.image_url = this.$config.webUrl
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
btn_load(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:"/api/user/userFeedback",
|
||||||
|
method:"GET",
|
||||||
|
data:{
|
||||||
|
feedback:that.content
|
||||||
|
}
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.code ==1){
|
||||||
|
this.content = ''
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: data.data.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
get_serviceInfo(){
|
||||||
|
let that = this;
|
||||||
|
that.$httpRequest({
|
||||||
|
url:"/api/user/serviceInfo",
|
||||||
|
method:"GET"
|
||||||
|
}).then(res=>{
|
||||||
|
this.serviceInfo = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ontel(){
|
||||||
|
console.log(this.serviceInfo.service_mobile)
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber: this.serviceInfo.service_mobile, //仅为示例
|
||||||
|
fail(res) {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onddtel(tel){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: tel,
|
||||||
|
success() {
|
||||||
|
uni.showToast({title:"复制成功"})
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log(res)
|
||||||
|
uni.showToast({title:"复制失败",icon:"none",duration:1500})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.adviser-face-big{
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
.copy-tag{
|
||||||
|
width: 96rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background-color: #00C657;
|
||||||
|
color:#FFFFFF;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.iconicon_bottom_call{
|
||||||
|
color: #00C657;
|
||||||
|
}
|
||||||
|
.btn-big{
|
||||||
|
background-color: #00C657;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bgc-body" style="width: 750rpx;
|
||||||
|
height: 100vh;
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/kefbgc.png');
|
||||||
|
background-size: 750rpx 100vh;
|
||||||
|
padding: 47rpx;">
|
||||||
|
<view>
|
||||||
|
<view style="width: 656rpx; display: flex;">
|
||||||
|
<view style="display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 auto;">
|
||||||
|
<image :src="touxing"
|
||||||
|
style="width: 136rpx;height: 136rpx;border-radius: 50%;border: 3rpx solid #FFFFFF;margin-right: 24rpx;">
|
||||||
|
</image>
|
||||||
|
<view>
|
||||||
|
<view style="font-size: 46rpx;color: #fff;font-weight: 600;">
|
||||||
|
扫码添加客服微信
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 30rpx;color: #fff;margin-top: 15rpx;">
|
||||||
|
有问题请联系客服
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="margin-top: 40rpx;">
|
||||||
|
<!-- <image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/erweim.png" style="width: 656rpx;height: 760rpx;"></image> -->
|
||||||
|
<view
|
||||||
|
style="background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/erweim.png');background-size: 656rpx 760rpx;width: 656rpx;height: 760rpx;">
|
||||||
|
<image :src="erweim" style="width: 372rpx;height: 372rpx;margin-left: 142rpx;margin-top: 100rpx;">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view style="position: relative;">
|
||||||
|
<!-- <image src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/ann.png" style=""></image> -->
|
||||||
|
<view style="
|
||||||
|
background-image: url('https://wx.yaohe.hnjrdzkj.xyz/static/wechat/static/ann.png');
|
||||||
|
background-size: 374rpx 142rpx;
|
||||||
|
width: 374rpx;
|
||||||
|
height: 142rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 102rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: -170rpx;
|
||||||
|
left: 127rpx;" @click="saveImg">保存二维码
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="color: #fff;font-size: 28rpx;padding-left: 136rpx;margin-top: 15rpx;">
|
||||||
|
1.保存上方二维码添加客服微信
|
||||||
|
</view>
|
||||||
|
<view style="color: #fff;font-size: 28rpx;padding-left: 136rpx;">
|
||||||
|
2.添加客服微信咨询问题
|
||||||
|
</view>
|
||||||
|
<view style="color: #fff;font-size: 28rpx;padding-left: 136rpx;">
|
||||||
|
3.工作时间:9:00-18:00
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
touxing: '',
|
||||||
|
erweim: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.ermadata()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ermadata() {
|
||||||
|
this.$httpRequest({
|
||||||
|
url:'/api/user/serviceInfo',
|
||||||
|
method:"GET",
|
||||||
|
data: {},
|
||||||
|
}).then(res=>{
|
||||||
|
this.touxing = res.data.avatar
|
||||||
|
this.erweim = res.data.qr
|
||||||
|
})
|
||||||
|
},
|
||||||
|
saveImg() {
|
||||||
|
let that = this;
|
||||||
|
// 向用户发起授权请求
|
||||||
|
uni.authorize({
|
||||||
|
scope: 'scope.writePhotosAlbum',
|
||||||
|
success: () => {
|
||||||
|
// 已授权
|
||||||
|
that.downLoadImg();
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
// 拒绝授权,获取当前设置
|
||||||
|
uni.getSetting({
|
||||||
|
success: (result) => {
|
||||||
|
if (!result.authSetting['scope.writePhotosAlbum']) {
|
||||||
|
that.isAuth()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
downLoadImg() {
|
||||||
|
//下载图片资源至本地,返回文件的本地临时路径
|
||||||
|
uni.showLoading()
|
||||||
|
uni.downloadFile({
|
||||||
|
url: this.erweim,
|
||||||
|
success: (res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
//保存图片至相册
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
success: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: "保存成功",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function () {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title: "保存失败,请稍后重试",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//引导用户开启权限
|
||||||
|
isAuth() {
|
||||||
|
uni.showModal({
|
||||||
|
content: '由于您还没有允许保存图片到您相册里,无法进行保存,请点击确定允许授权',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.openSetting({
|
||||||
|
success: (result) => {
|
||||||
|
console.log(result.authSetting);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
houtui() {
|
||||||
|
uni.navigateBack({ //返回上一个页面
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"appid": "wx0663114d527513ac",
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "3.6.1",
|
||||||
|
"miniprogramRoot": "unpackage/dist/dev/mp-weixin/",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
},
|
||||||
|
"srcMiniprogramRoot": "unpackage/dist/dev/mp-weixin/"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
|
"projectname": "jr_drama_weixin",
|
||||||
|
"setting": {
|
||||||
|
"compileHotReLoad": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 826 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 887 B |
|
After Width: | Height: | Size: 919 B |
@@ -0,0 +1,76 @@
|
|||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 颜色变量 */
|
||||||
|
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
$uni-color-primary: #007aff;
|
||||||
|
$uni-color-success: #4cd964;
|
||||||
|
$uni-color-warning: #f0ad4e;
|
||||||
|
$uni-color-error: #dd524d;
|
||||||
|
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
$uni-text-color:#333;//基本色
|
||||||
|
$uni-text-color-inverse:#fff;//反色
|
||||||
|
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
|
||||||
|
$uni-text-color-placeholder: #808080;
|
||||||
|
$uni-text-color-disable:#c0c0c0;
|
||||||
|
|
||||||
|
/* 背景颜色 */
|
||||||
|
$uni-bg-color:#ffffff;
|
||||||
|
$uni-bg-color-grey:#f8f8f8;
|
||||||
|
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
|
||||||
|
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
|
||||||
|
|
||||||
|
/* 边框颜色 */
|
||||||
|
$uni-border-color:#c8c7cc;
|
||||||
|
|
||||||
|
/* 尺寸变量 */
|
||||||
|
|
||||||
|
/* 文字尺寸 */
|
||||||
|
$uni-font-size-sm:12px;
|
||||||
|
$uni-font-size-base:14px;
|
||||||
|
$uni-font-size-lg:16px;
|
||||||
|
|
||||||
|
/* 图片尺寸 */
|
||||||
|
$uni-img-size-sm:20px;
|
||||||
|
$uni-img-size-base:26px;
|
||||||
|
$uni-img-size-lg:40px;
|
||||||
|
|
||||||
|
/* Border Radius */
|
||||||
|
$uni-border-radius-sm: 2px;
|
||||||
|
$uni-border-radius-base: 3px;
|
||||||
|
$uni-border-radius-lg: 6px;
|
||||||
|
$uni-border-radius-circle: 50%;
|
||||||
|
|
||||||
|
/* 水平间距 */
|
||||||
|
$uni-spacing-row-sm: 5px;
|
||||||
|
$uni-spacing-row-base: 10px;
|
||||||
|
$uni-spacing-row-lg: 15px;
|
||||||
|
|
||||||
|
/* 垂直间距 */
|
||||||
|
$uni-spacing-col-sm: 4px;
|
||||||
|
$uni-spacing-col-base: 8px;
|
||||||
|
$uni-spacing-col-lg: 12px;
|
||||||
|
|
||||||
|
/* 透明度 */
|
||||||
|
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
|
||||||
|
|
||||||
|
/* 文章场景相关 */
|
||||||
|
$uni-color-title: #2C405A; // 文章标题颜色
|
||||||
|
$uni-font-size-title:20px;
|
||||||
|
$uni-color-subtitle: #555555; // 二级标题颜色
|
||||||
|
$uni-font-size-subtitle:26px;
|
||||||
|
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
|
$uni-font-size-paragraph:15px;
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
## 2.0.1(2024-08-22)
|
||||||
|
- 修复 uni-app-x v-model 没有更新传入值的 bug
|
||||||
|
## 2.0.0(2023-12-11)
|
||||||
|
- 新增 支持 uni-app-x
|
||||||
|
## 1.1.2(2023-04-11)
|
||||||
|
- 修复 更改 modelValue 报错的 bug
|
||||||
|
- 修复 v-for 未使用 key 值控制台 warning
|
||||||
|
## 1.1.1(2023-02-21)
|
||||||
|
- 修复代码合并时引发 value 属性为空时不渲染数据的问题
|
||||||
|
## 1.1.0(2023-02-15)
|
||||||
|
- 修复 localdata 不支持动态更新的bug
|
||||||
|
## 1.0.9(2023-02-15)
|
||||||
|
- 修复 localdata 不支持动态更新的bug
|
||||||
|
## 1.0.8(2022-09-16)
|
||||||
|
- 可以使用 uni-scss 控制主题色
|
||||||
|
## 1.0.7(2022-07-06)
|
||||||
|
- 优化 pc端图标位置不正确的问题
|
||||||
|
## 1.0.6(2022-07-05)
|
||||||
|
- 优化 显示样式
|
||||||
|
## 1.0.5(2022-07-04)
|
||||||
|
- 修复 uni-data-picker 在 uni-forms-item 中宽度不正确的bug
|
||||||
|
## 1.0.4(2022-04-19)
|
||||||
|
- 修复 字节小程序 本地数据无法选择下一级的Bug
|
||||||
|
## 1.0.3(2022-02-25)
|
||||||
|
- 修复 nvue 不支持的 v-show 的 bug
|
||||||
|
## 1.0.2(2022-02-25)
|
||||||
|
- 修复 条件编译 nvue 不支持的 css 样式
|
||||||
|
## 1.0.1(2021-11-23)
|
||||||
|
- 修复 由上个版本引发的map、v-model等属性不生效的bug
|
||||||
|
## 1.0.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-data-picker](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
|
||||||
|
## 0.4.9(2021-10-28)
|
||||||
|
- 修复 VUE2 v-model 概率无效的 bug
|
||||||
|
## 0.4.8(2021-10-27)
|
||||||
|
- 修复 v-model 概率无效的 bug
|
||||||
|
## 0.4.7(2021-10-25)
|
||||||
|
- 新增 属性 spaceInfo 服务空间配置 HBuilderX 3.2.11+
|
||||||
|
- 修复 树型 uniCloud 数据类型为 int 时报错的 bug
|
||||||
|
## 0.4.6(2021-10-19)
|
||||||
|
- 修复 非 VUE3 v-model 为 0 时无法选中的 bug
|
||||||
|
## 0.4.5(2021-09-26)
|
||||||
|
- 新增 清除已选项的功能(通过 clearIcon 属性配置是否显示按钮),同时提供 clear 方法以供调用,二者等效
|
||||||
|
- 修复 readonly 为 true 时报错的 bug
|
||||||
|
## 0.4.4(2021-09-26)
|
||||||
|
- 修复 上一版本造成的 map 属性失效的 bug
|
||||||
|
- 新增 ellipsis 属性,支持配置 tab 选项长度过长时是否自动省略
|
||||||
|
## 0.4.3(2021-09-24)
|
||||||
|
- 修复 某些情况下级联未触发的 bug
|
||||||
|
## 0.4.2(2021-09-23)
|
||||||
|
- 新增 提供 show 和 hide 方法,开发者可以通过 ref 调用
|
||||||
|
- 新增 选项内容过长自动添加省略号
|
||||||
|
## 0.4.1(2021-09-15)
|
||||||
|
- 新增 map 属性 字段映射,将 text/value 映射到数据中的其他字段
|
||||||
|
## 0.4.0(2021-07-13)
|
||||||
|
- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||||
|
## 0.3.5(2021-06-04)
|
||||||
|
- 修复 无法加载云端数据的问题
|
||||||
|
## 0.3.4(2021-05-28)
|
||||||
|
- 修复 v-model 无效问题
|
||||||
|
- 修复 loaddata 为空数据组时加载时间过长问题
|
||||||
|
- 修复 上个版本引出的本地数据无法选择带有 children 的 2 级节点
|
||||||
|
## 0.3.3(2021-05-12)
|
||||||
|
- 新增 组件示例地址
|
||||||
|
## 0.3.2(2021-04-22)
|
||||||
|
- 修复 非树形数据有 where 属性查询报错的问题
|
||||||
|
## 0.3.1(2021-04-15)
|
||||||
|
- 修复 本地数据概率无法回显时问题
|
||||||
|
## 0.3.0(2021-04-07)
|
||||||
|
- 新增 支持云端非树形表结构数据
|
||||||
|
- 修复 根节点 parent_field 字段等于 null 时选择界面错乱问题
|
||||||
|
## 0.2.0(2021-03-15)
|
||||||
|
- 修复 nodeclick、popupopened、popupclosed 事件无法触发的问题
|
||||||
|
## 0.1.9(2021-03-09)
|
||||||
|
- 修复 微信小程序某些情况下无法选择的问题
|
||||||
|
## 0.1.8(2021-02-05)
|
||||||
|
- 优化 部分样式在 nvue 上的兼容表现
|
||||||
|
## 0.1.7(2021-02-05)
|
||||||
|
- 调整为 uni_modules 目录规范
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// #ifdef H5
|
||||||
|
export default {
|
||||||
|
name: 'Keypress',
|
||||||
|
props: {
|
||||||
|
disable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
const keyNames = {
|
||||||
|
esc: ['Esc', 'Escape'],
|
||||||
|
tab: 'Tab',
|
||||||
|
enter: 'Enter',
|
||||||
|
space: [' ', 'Spacebar'],
|
||||||
|
up: ['Up', 'ArrowUp'],
|
||||||
|
left: ['Left', 'ArrowLeft'],
|
||||||
|
right: ['Right', 'ArrowRight'],
|
||||||
|
down: ['Down', 'ArrowDown'],
|
||||||
|
delete: ['Backspace', 'Delete', 'Del']
|
||||||
|
}
|
||||||
|
const listener = ($event) => {
|
||||||
|
if (this.disable) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const keyName = Object.keys(keyNames).find(key => {
|
||||||
|
const keyName = $event.key
|
||||||
|
const value = keyNames[key]
|
||||||
|
return value === keyName || (Array.isArray(value) && value.includes(keyName))
|
||||||
|
})
|
||||||
|
if (keyName) {
|
||||||
|
// 避免和其他按键事件冲突
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit(keyName, {})
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener('keyup', listener)
|
||||||
|
this.$once('hook:beforeDestroy', () => {
|
||||||
|
document.removeEventListener('keyup', listener)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
render: () => {}
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
@@ -0,0 +1,381 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-data-tree">
|
||||||
|
<view class="uni-data-tree-input" @click="handleInput">
|
||||||
|
<slot :data="selectedPaths" :error="error">
|
||||||
|
<view class="input-value" :class="{'input-value-border': border}">
|
||||||
|
<text v-if="error!=null" class="error-text">{{error!.errMsg}}</text>
|
||||||
|
<scroll-view v-if="selectedPaths.length" class="selected-path" scroll-x="true">
|
||||||
|
<view class="selected-list">
|
||||||
|
<template v-for="(item, index) in selectedPaths">
|
||||||
|
<text class="text-color">{{item[mappingTextName]}}</text>
|
||||||
|
<text v-if="index<selectedPaths.length-1" class="input-split-line">{{split}}</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<text v-else-if="error==null&&!loading" class="placeholder">{{placeholder}}</text>
|
||||||
|
<view v-if="!readonly" class="arrow-area">
|
||||||
|
<view class="input-arrow"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</slot>
|
||||||
|
<view v-if="loading && !isOpened" class="selected-loading">
|
||||||
|
<slot name="picker-loading" :loading="loading"></slot>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
|
||||||
|
<view class="uni-data-tree-dialog" v-if="isOpened">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<view class="dialog-caption">
|
||||||
|
<view class="dialog-title-view">
|
||||||
|
<text class="dialog-title">{{popupTitle}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="dialog-close" @click="handleClose">
|
||||||
|
<view class="dialog-close-plus" data-id="close"></view>
|
||||||
|
<view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view ref="pickerView" class="uni-data-pickerview">
|
||||||
|
<view v-if="error!=null" class="error">
|
||||||
|
<text class="error-text">{{error!.errMsg}}</text>
|
||||||
|
</view>
|
||||||
|
<scroll-view v-if="!isCloudDataList" :scroll-x="true">
|
||||||
|
<view class="selected-node-list">
|
||||||
|
<template v-for="(item, index) in selectedNodes">
|
||||||
|
<text class="selected-node-item" :class="{'selected-node-item-active':index==selectedIndex}"
|
||||||
|
@click="onTabSelect(index)">
|
||||||
|
{{item[mappingTextName]}}
|
||||||
|
</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<list-view class="list-view" :scroll-y="true">
|
||||||
|
<list-item class="list-item" v-for="(item, _) in currentDataList" @click="onNodeClick(item)">
|
||||||
|
<text class="item-text" :class="{'item-text-disabled': item['disable']}">{{item[mappingTextName]}}</text>
|
||||||
|
<text class="check" v-if="item[mappingValueName] == selectedNodes[selectedIndex][mappingValueName]"></text>
|
||||||
|
</list-item>
|
||||||
|
</list-view>
|
||||||
|
<view class="loading-cover" v-if="loading">
|
||||||
|
<slot name="pickerview-loading" :loading="loading"></slot>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { dataPicker } from "../uni-data-pickerview/uni-data-picker.uts"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DataPicker 级联选择
|
||||||
|
* @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3796
|
||||||
|
* @property {String} popup-title 弹出窗口标题
|
||||||
|
* @property {Array} localdata 本地数据,参考
|
||||||
|
* @property {Boolean} border = [true|false] 是否有边框
|
||||||
|
* @property {Boolean} readonly = [true|false] 是否仅读
|
||||||
|
* @property {Boolean} preload = [true|false] 是否预加载数据
|
||||||
|
* @value true 开启预加载数据,点击弹出窗口后显示已加载数据
|
||||||
|
* @value false 关闭预加载数据,点击弹出窗口后开始加载数据
|
||||||
|
* @property {Boolean} step-searh = [true|false] 是否分布查询
|
||||||
|
* @value true 启用分布查询,仅查询当前选中节点
|
||||||
|
* @value false 关闭分布查询,一次查询出所有数据
|
||||||
|
* @property {String|DBFieldString} self-field 分布查询当前字段名称
|
||||||
|
* @property {String|DBFieldString} parent-field 分布查询父字段名称
|
||||||
|
* @property {String|DBCollectionString} collection 表名
|
||||||
|
* @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
|
||||||
|
* @property {String} orderby 排序字段及正序倒叙设置
|
||||||
|
* @property {String|JQLString} where 查询条件
|
||||||
|
* @event {Function} popupshow 弹出的选择窗口打开时触发此事件
|
||||||
|
* @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'UniDataPicker',
|
||||||
|
emits: ['popupopened', 'popupclosed', 'nodeclick', 'change', 'input', 'update:modelValue', 'inputclick'],
|
||||||
|
mixins: [dataPicker],
|
||||||
|
props: {
|
||||||
|
popupTitle: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
heightMobile: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
clearIcon: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
split: {
|
||||||
|
type: String,
|
||||||
|
default: '/'
|
||||||
|
},
|
||||||
|
ellipsis: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpened: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isShowClearIcon() : boolean {
|
||||||
|
if (this.readonly) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.clearIcon && this.selectedPaths.length > 0) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.load()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clear() {
|
||||||
|
},
|
||||||
|
load() {
|
||||||
|
if (this.isLocalData) {
|
||||||
|
this.loadLocalData()
|
||||||
|
} else if (this.isCloudDataList || this.isCloudDataTree) {
|
||||||
|
this.loadCloudDataPath()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
show() {
|
||||||
|
this.isOpened = true
|
||||||
|
this.$emit('popupopened')
|
||||||
|
if (!this.hasCloudTreeData) {
|
||||||
|
this.loadData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isOpened = false
|
||||||
|
this.$emit('popupclosed')
|
||||||
|
},
|
||||||
|
handleInput() {
|
||||||
|
if (this.readonly) {
|
||||||
|
this.$emit('inputclick')
|
||||||
|
} else {
|
||||||
|
this.show()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
|
onFinish() {
|
||||||
|
this.selectedPaths = this.getChangeNodes()
|
||||||
|
this.$emit('update:modelValue', this.selectedPaths)
|
||||||
|
this.$emit('change', this.selectedPaths)
|
||||||
|
this.hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@import url("../uni-data-pickerview/uni-data-pickerview.css");
|
||||||
|
|
||||||
|
.uni-data-tree {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-input {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-loading {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-text {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #DD524D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-value {
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
padding: 5px 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-value-border {
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-path {
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-more {
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-list {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-color {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder {
|
||||||
|
color: grey;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-split-line {
|
||||||
|
opacity: .5;
|
||||||
|
margin-left: 1px;
|
||||||
|
margin-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-area {
|
||||||
|
position: relative;
|
||||||
|
padding: 0 12px;
|
||||||
|
margin-left: auto;
|
||||||
|
justify-content: center;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
transform-origin: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-arrow {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-left: 2px solid #999;
|
||||||
|
border-bottom: 2px solid #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-cover {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-dialog {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 20%;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-top-left-radius: 10px;
|
||||||
|
border-top-right-radius: 10px;
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 102;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-caption {
|
||||||
|
position: relative;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-title-view {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-title {
|
||||||
|
align-self: center;
|
||||||
|
padding: 0 10px;
|
||||||
|
line-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close-plus {
|
||||||
|
width: 16px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #666;
|
||||||
|
border-radius: 2px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close-rotate {
|
||||||
|
position: absolute;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-pickerview {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-clear {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
@media all and (min-width: 768px) {
|
||||||
|
.uni-data-tree-cover {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-dialog {
|
||||||
|
position: absolute;
|
||||||
|
top: 55px;
|
||||||
|
height: auto;
|
||||||
|
min-height: 400px;
|
||||||
|
max-height: 50vh;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-caption {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,551 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-data-tree">
|
||||||
|
<view class="uni-data-tree-input" @click="handleInput">
|
||||||
|
<slot :options="options" :data="inputSelected" :error="errorMessage">
|
||||||
|
<view class="input-value" :class="{'input-value-border': border}">
|
||||||
|
<text v-if="errorMessage" class="selected-area error-text">{{errorMessage}}</text>
|
||||||
|
<view v-else-if="loading && !isOpened" class="selected-area">
|
||||||
|
<uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
<scroll-view v-else-if="inputSelected.length" class="selected-area" scroll-x="true">
|
||||||
|
<view class="selected-list">
|
||||||
|
<view class="selected-item" v-for="(item,index) in inputSelected" :key="index">
|
||||||
|
<text class="text-color">{{item.text}}</text><text v-if="index<inputSelected.length-1"
|
||||||
|
class="input-split-line">{{split}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<text v-else class="selected-area placeholder">{{placeholder}}</text>
|
||||||
|
<view v-if="clearIcon && !readonly && inputSelected.length" class="icon-clear" @click.stop="clear">
|
||||||
|
<uni-icons type="clear" color="#c0c4cc" size="24"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="arrow-area" v-if="(!clearIcon || !inputSelected.length) && !readonly ">
|
||||||
|
<view class="input-arrow"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</slot>
|
||||||
|
</view>
|
||||||
|
<view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
|
||||||
|
<view class="uni-data-tree-dialog" v-if="isOpened">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<view class="dialog-caption">
|
||||||
|
<view class="title-area">
|
||||||
|
<text class="dialog-title">{{popupTitle}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="dialog-close" @click="handleClose">
|
||||||
|
<view class="dialog-close-plus" data-id="close"></view>
|
||||||
|
<view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata"
|
||||||
|
:preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where"
|
||||||
|
:step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" :map="map"
|
||||||
|
:ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick">
|
||||||
|
</data-picker-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import dataPicker from "../uni-data-pickerview/uni-data-picker.js"
|
||||||
|
import DataPickerView from "../uni-data-pickerview/uni-data-pickerview.vue"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DataPicker 级联选择
|
||||||
|
* @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3796
|
||||||
|
* @property {String} popup-title 弹出窗口标题
|
||||||
|
* @property {Array} localdata 本地数据,参考
|
||||||
|
* @property {Boolean} border = [true|false] 是否有边框
|
||||||
|
* @property {Boolean} readonly = [true|false] 是否仅读
|
||||||
|
* @property {Boolean} preload = [true|false] 是否预加载数据
|
||||||
|
* @value true 开启预加载数据,点击弹出窗口后显示已加载数据
|
||||||
|
* @value false 关闭预加载数据,点击弹出窗口后开始加载数据
|
||||||
|
* @property {Boolean} step-searh = [true|false] 是否分布查询
|
||||||
|
* @value true 启用分布查询,仅查询当前选中节点
|
||||||
|
* @value false 关闭分布查询,一次查询出所有数据
|
||||||
|
* @property {String|DBFieldString} self-field 分布查询当前字段名称
|
||||||
|
* @property {String|DBFieldString} parent-field 分布查询父字段名称
|
||||||
|
* @property {String|DBCollectionString} collection 表名
|
||||||
|
* @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
|
||||||
|
* @property {String} orderby 排序字段及正序倒叙设置
|
||||||
|
* @property {String|JQLString} where 查询条件
|
||||||
|
* @event {Function} popupshow 弹出的选择窗口打开时触发此事件
|
||||||
|
* @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'UniDataPicker',
|
||||||
|
emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'],
|
||||||
|
mixins: [dataPicker],
|
||||||
|
components: {
|
||||||
|
DataPickerView
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
options: {
|
||||||
|
type: [Object, Array],
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
popupTitle: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: '请选择'
|
||||||
|
},
|
||||||
|
heightMobile: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
clearIcon: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
split: {
|
||||||
|
type: String,
|
||||||
|
default: '/'
|
||||||
|
},
|
||||||
|
ellipsis: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpened: false,
|
||||||
|
inputSelected: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.load();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localdata: {
|
||||||
|
handler() {
|
||||||
|
this.load()
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clear() {
|
||||||
|
this._dispatchEvent([]);
|
||||||
|
},
|
||||||
|
onPropsChange() {
|
||||||
|
this._treeData = [];
|
||||||
|
this.selectedIndex = 0;
|
||||||
|
|
||||||
|
this.load();
|
||||||
|
},
|
||||||
|
load() {
|
||||||
|
if (this.readonly) {
|
||||||
|
this._processReadonly(this.localdata, this.dataValue);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 回显本地数据
|
||||||
|
if (this.isLocalData) {
|
||||||
|
this.loadData();
|
||||||
|
this.inputSelected = this.selected.slice(0);
|
||||||
|
} else if (this.isCloudDataList || this.isCloudDataTree) { // 回显 Cloud 数据
|
||||||
|
this.loading = true;
|
||||||
|
this.getCloudDataValue().then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.inputSelected = res;
|
||||||
|
}).catch((err) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.errorMessage = err;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
show() {
|
||||||
|
this.isOpened = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.pickerView.updateData({
|
||||||
|
treeData: this._treeData,
|
||||||
|
selected: this.selected,
|
||||||
|
selectedIndex: this.selectedIndex
|
||||||
|
})
|
||||||
|
}, 200)
|
||||||
|
this.$emit('popupopened')
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.isOpened = false
|
||||||
|
this.$emit('popupclosed')
|
||||||
|
},
|
||||||
|
handleInput() {
|
||||||
|
if (this.readonly) {
|
||||||
|
this.$emit('inputclick')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show()
|
||||||
|
},
|
||||||
|
handleClose(e) {
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
|
onnodeclick(e) {
|
||||||
|
this.$emit('nodeclick', e)
|
||||||
|
},
|
||||||
|
ondatachange(e) {
|
||||||
|
this._treeData = this.$refs.pickerView._treeData
|
||||||
|
},
|
||||||
|
onchange(e) {
|
||||||
|
this.hide()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.inputSelected = e;
|
||||||
|
})
|
||||||
|
this._dispatchEvent(e)
|
||||||
|
},
|
||||||
|
_processReadonly(dataList, value) {
|
||||||
|
var isTree = dataList.findIndex((item) => {
|
||||||
|
return item.children
|
||||||
|
})
|
||||||
|
if (isTree > -1) {
|
||||||
|
let inputValue
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
inputValue = value[value.length - 1]
|
||||||
|
if (typeof inputValue === 'object' && inputValue.value) {
|
||||||
|
inputValue = inputValue.value
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
inputValue = value
|
||||||
|
}
|
||||||
|
this.inputSelected = this._findNodePath(inputValue, this.localdata)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.hasValue) {
|
||||||
|
this.inputSelected = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let result = []
|
||||||
|
for (let i = 0; i < value.length; i++) {
|
||||||
|
var val = value[i]
|
||||||
|
var item = dataList.find((v) => {
|
||||||
|
return v.value == val
|
||||||
|
})
|
||||||
|
if (item) {
|
||||||
|
result.push(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result.length) {
|
||||||
|
this.inputSelected = result
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_filterForArray(data, valueArray) {
|
||||||
|
var result = []
|
||||||
|
for (let i = 0; i < valueArray.length; i++) {
|
||||||
|
var value = valueArray[i]
|
||||||
|
var found = data.find((item) => {
|
||||||
|
return item.value == value
|
||||||
|
})
|
||||||
|
if (found) {
|
||||||
|
result.push(found)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
},
|
||||||
|
_dispatchEvent(selected) {
|
||||||
|
let item = {}
|
||||||
|
if (selected.length) {
|
||||||
|
var value = new Array(selected.length)
|
||||||
|
for (var i = 0; i < selected.length; i++) {
|
||||||
|
value[i] = selected[i].value
|
||||||
|
}
|
||||||
|
item = selected[selected.length - 1]
|
||||||
|
} else {
|
||||||
|
item.value = ''
|
||||||
|
}
|
||||||
|
if (this.formItem) {
|
||||||
|
this.formItem.setValue(item.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$emit('input', item.value)
|
||||||
|
this.$emit('update:modelValue', item.value)
|
||||||
|
this.$emit('change', {
|
||||||
|
detail: {
|
||||||
|
value: selected
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.uni-data-tree {
|
||||||
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-text {
|
||||||
|
color: #DD524D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-value {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
font-size: 14px;
|
||||||
|
/* line-height: 35px; */
|
||||||
|
padding: 0 10px;
|
||||||
|
padding-right: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 35px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-value-border {
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-area {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-more {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
margin-right: auto;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
width: 40px;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-list {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
/* padding: 0 5px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item {
|
||||||
|
flex-direction: row;
|
||||||
|
/* padding: 0 1px; */
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
white-space: nowrap;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-color {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder {
|
||||||
|
color: grey;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-split-line {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow-area {
|
||||||
|
position: relative;
|
||||||
|
width: 20px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
justify-content: center;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
transform-origin: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-arrow {
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-left: 1px solid #999;
|
||||||
|
border-bottom: 1px solid #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-cover {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-dialog {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
top: 20%;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
top: 200px;
|
||||||
|
/* #endif */
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-top-left-radius: 10px;
|
||||||
|
border-top-right-radius: 10px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 102;
|
||||||
|
overflow: hidden;
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
width: 750rpx;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-caption {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
/* border-bottom: 1px solid #f0f0f0; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-area {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
align-items: center;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
margin: auto;
|
||||||
|
/* #endif */
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-title {
|
||||||
|
/* font-weight: bold; */
|
||||||
|
line-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close-plus {
|
||||||
|
width: 16px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #666;
|
||||||
|
border-radius: 2px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-close-rotate {
|
||||||
|
position: absolute;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker-view {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-clear {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef H5 */
|
||||||
|
@media all and (min-width: 768px) {
|
||||||
|
.uni-data-tree-cover {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-data-tree-dialog {
|
||||||
|
position: absolute;
|
||||||
|
top: 55px;
|
||||||
|
height: auto;
|
||||||
|
min-height: 400px;
|
||||||
|
max-height: 50vh;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-caption {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-clear {
|
||||||
|
/* margin-right: 5px; */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
/* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,622 @@
|
|||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: [Array, Object],
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
spaceInfo: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
collection: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
action: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
field: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
orderby: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
type: [String, Object],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
pageData: {
|
||||||
|
type: String,
|
||||||
|
default: 'add'
|
||||||
|
},
|
||||||
|
pageCurrent: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
pageSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 500
|
||||||
|
},
|
||||||
|
getcount: {
|
||||||
|
type: [Boolean, String],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
getone: {
|
||||||
|
type: [Boolean, String],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
gettree: {
|
||||||
|
type: [Boolean, String],
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
manual: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: [Array, String, Number],
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [Array, String, Number],
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
preload: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
stepSearh: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
selfField: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
parentField: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
map: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {
|
||||||
|
text: "text",
|
||||||
|
value: "value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
errorMessage: '',
|
||||||
|
loadMore: {
|
||||||
|
contentdown: '',
|
||||||
|
contentrefresh: '',
|
||||||
|
contentnomore: ''
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
selected: [],
|
||||||
|
selectedIndex: 0,
|
||||||
|
page: {
|
||||||
|
current: this.pageCurrent,
|
||||||
|
size: this.pageSize,
|
||||||
|
count: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isLocalData() {
|
||||||
|
return !this.collection.length;
|
||||||
|
},
|
||||||
|
isCloudData() {
|
||||||
|
return this.collection.length > 0;
|
||||||
|
},
|
||||||
|
isCloudDataList() {
|
||||||
|
return (this.isCloudData && (!this.parentField && !this.selfField));
|
||||||
|
},
|
||||||
|
isCloudDataTree() {
|
||||||
|
return (this.isCloudData && this.parentField && this.selfField);
|
||||||
|
},
|
||||||
|
dataValue() {
|
||||||
|
let isModelValue = Array.isArray(this.modelValue) ? (this.modelValue.length > 0) : (this.modelValue !== null ||
|
||||||
|
this.modelValue !== undefined);
|
||||||
|
return isModelValue ? this.modelValue : this.value;
|
||||||
|
},
|
||||||
|
hasValue() {
|
||||||
|
if (typeof this.dataValue === 'number') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return (this.dataValue != null) && (this.dataValue.length > 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$watch(() => {
|
||||||
|
var al = [];
|
||||||
|
['pageCurrent',
|
||||||
|
'pageSize',
|
||||||
|
'spaceInfo',
|
||||||
|
'value',
|
||||||
|
'modelValue',
|
||||||
|
'localdata',
|
||||||
|
'collection',
|
||||||
|
'action',
|
||||||
|
'field',
|
||||||
|
'orderby',
|
||||||
|
'where',
|
||||||
|
'getont',
|
||||||
|
'getcount',
|
||||||
|
'gettree'
|
||||||
|
].forEach(key => {
|
||||||
|
al.push(this[key])
|
||||||
|
});
|
||||||
|
return al
|
||||||
|
}, (newValue, oldValue) => {
|
||||||
|
let needReset = false
|
||||||
|
for (let i = 2; i < newValue.length; i++) {
|
||||||
|
if (newValue[i] != oldValue[i]) {
|
||||||
|
needReset = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (newValue[0] != oldValue[0]) {
|
||||||
|
this.page.current = this.pageCurrent
|
||||||
|
}
|
||||||
|
this.page.size = this.pageSize
|
||||||
|
|
||||||
|
this.onPropsChange()
|
||||||
|
})
|
||||||
|
this._treeData = []
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPropsChange() {
|
||||||
|
this._treeData = [];
|
||||||
|
},
|
||||||
|
|
||||||
|
// 填充 pickview 数据
|
||||||
|
async loadData() {
|
||||||
|
if (this.isLocalData) {
|
||||||
|
this.loadLocalData();
|
||||||
|
} else if (this.isCloudDataList) {
|
||||||
|
this.loadCloudDataList();
|
||||||
|
} else if (this.isCloudDataTree) {
|
||||||
|
this.loadCloudDataTree();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载本地数据
|
||||||
|
async loadLocalData() {
|
||||||
|
this._treeData = [];
|
||||||
|
this._extractTree(this.localdata, this._treeData);
|
||||||
|
|
||||||
|
let inputValue = this.dataValue;
|
||||||
|
if (inputValue === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(inputValue)) {
|
||||||
|
inputValue = inputValue[inputValue.length - 1];
|
||||||
|
if (typeof inputValue === 'object' && inputValue[this.map.value]) {
|
||||||
|
inputValue = inputValue[this.map.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selected = this._findNodePath(inputValue, this.localdata);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (单列)
|
||||||
|
async loadCloudDataList() {
|
||||||
|
if (this.loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
let response = await this.getCommand();
|
||||||
|
let responseData = response.result.data;
|
||||||
|
|
||||||
|
this._treeData = responseData;
|
||||||
|
|
||||||
|
this._updateBindData();
|
||||||
|
this._updateSelected();
|
||||||
|
|
||||||
|
this.onDataChange();
|
||||||
|
} catch (e) {
|
||||||
|
this.errorMessage = e;
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (树形)
|
||||||
|
async loadCloudDataTree() {
|
||||||
|
if (this.loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
let commandOptions = {
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
where: this._cloudDataTreeWhere()
|
||||||
|
};
|
||||||
|
if (this.gettree) {
|
||||||
|
commandOptions.startwith = `${this.selfField}=='${this.dataValue}'`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let response = await this.getCommand(commandOptions);
|
||||||
|
let responseData = response.result.data;
|
||||||
|
|
||||||
|
this._treeData = responseData;
|
||||||
|
this._updateBindData();
|
||||||
|
this._updateSelected();
|
||||||
|
|
||||||
|
this.onDataChange();
|
||||||
|
} catch (e) {
|
||||||
|
this.errorMessage = e;
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (节点)
|
||||||
|
async loadCloudDataNode(callback) {
|
||||||
|
if (this.loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
let commandOptions = {
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
where: this._cloudDataNodeWhere()
|
||||||
|
};
|
||||||
|
|
||||||
|
let response = await this.getCommand(commandOptions);
|
||||||
|
let responseData = response.result.data;
|
||||||
|
|
||||||
|
callback(responseData);
|
||||||
|
} catch (e) {
|
||||||
|
this.errorMessage = e;
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 回显 Cloud 数据
|
||||||
|
getCloudDataValue() {
|
||||||
|
if (this.isCloudDataList) {
|
||||||
|
return this.getCloudDataListValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isCloudDataTree) {
|
||||||
|
return this.getCloudDataTreeValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 回显 Cloud 数据 (单列)
|
||||||
|
getCloudDataListValue() {
|
||||||
|
// 根据 field's as value标识匹配 where 条件
|
||||||
|
let where = [];
|
||||||
|
let whereField = this._getForeignKeyByField();
|
||||||
|
if (whereField) {
|
||||||
|
where.push(`${whereField} == '${this.dataValue}'`)
|
||||||
|
}
|
||||||
|
|
||||||
|
where = where.join(' || ');
|
||||||
|
|
||||||
|
if (this.where) {
|
||||||
|
where = `(${this.where}) && (${where})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getCommand({
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
where
|
||||||
|
}).then((res) => {
|
||||||
|
this.selected = res.result.data;
|
||||||
|
return res.result.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 回显 Cloud 数据 (树形)
|
||||||
|
getCloudDataTreeValue() {
|
||||||
|
return this.getCommand({
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
getTreePath: {
|
||||||
|
startWith: `${this.selfField}=='${this.dataValue}'`
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
let treePath = [];
|
||||||
|
this._extractTreePath(res.result.data, treePath);
|
||||||
|
this.selected = treePath;
|
||||||
|
return treePath;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getCommand(options = {}) {
|
||||||
|
/* eslint-disable no-undef */
|
||||||
|
let db = uniCloud.database(this.spaceInfo)
|
||||||
|
|
||||||
|
const action = options.action || this.action
|
||||||
|
if (action) {
|
||||||
|
db = db.action(action)
|
||||||
|
}
|
||||||
|
|
||||||
|
const collection = options.collection || this.collection
|
||||||
|
db = db.collection(collection)
|
||||||
|
|
||||||
|
const where = options.where || this.where
|
||||||
|
if (!(!where || !Object.keys(where).length)) {
|
||||||
|
db = db.where(where)
|
||||||
|
}
|
||||||
|
|
||||||
|
const field = options.field || this.field
|
||||||
|
if (field) {
|
||||||
|
db = db.field(field)
|
||||||
|
}
|
||||||
|
|
||||||
|
const orderby = options.orderby || this.orderby
|
||||||
|
if (orderby) {
|
||||||
|
db = db.orderBy(orderby)
|
||||||
|
}
|
||||||
|
|
||||||
|
const current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current
|
||||||
|
const size = options.pageSize !== undefined ? options.pageSize : this.page.size
|
||||||
|
const getCount = options.getcount !== undefined ? options.getcount : this.getcount
|
||||||
|
const getTree = options.gettree !== undefined ? options.gettree : this.gettree
|
||||||
|
|
||||||
|
const getOptions = {
|
||||||
|
getCount,
|
||||||
|
getTree
|
||||||
|
}
|
||||||
|
if (options.getTreePath) {
|
||||||
|
getOptions.getTreePath = options.getTreePath
|
||||||
|
}
|
||||||
|
|
||||||
|
db = db.skip(size * (current - 1)).limit(size).get(getOptions)
|
||||||
|
|
||||||
|
return db
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataPostField() {
|
||||||
|
let fields = [this.field];
|
||||||
|
if (this.parentField) {
|
||||||
|
fields.push(`${this.parentField} as parent_value`);
|
||||||
|
}
|
||||||
|
return fields.join(',');
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataTreeWhere() {
|
||||||
|
let result = []
|
||||||
|
let selected = this.selected
|
||||||
|
let parentField = this.parentField
|
||||||
|
if (parentField) {
|
||||||
|
result.push(`${parentField} == null || ${parentField} == ""`)
|
||||||
|
}
|
||||||
|
if (selected.length) {
|
||||||
|
for (var i = 0; i < selected.length - 1; i++) {
|
||||||
|
result.push(`${parentField} == '${selected[i].value}'`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let where = []
|
||||||
|
if (this.where) {
|
||||||
|
where.push(`(${this.where})`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.length) {
|
||||||
|
where.push(`(${result.join(' || ')})`)
|
||||||
|
}
|
||||||
|
|
||||||
|
return where.join(' && ')
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataNodeWhere() {
|
||||||
|
let where = []
|
||||||
|
let selected = this.selected;
|
||||||
|
if (selected.length) {
|
||||||
|
where.push(`${this.parentField} == '${selected[selected.length - 1].value}'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
where = where.join(' || ');
|
||||||
|
|
||||||
|
if (this.where) {
|
||||||
|
return `(${this.where}) && (${where})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return where
|
||||||
|
},
|
||||||
|
|
||||||
|
_getWhereByForeignKey() {
|
||||||
|
let result = []
|
||||||
|
let whereField = this._getForeignKeyByField();
|
||||||
|
if (whereField) {
|
||||||
|
result.push(`${whereField} == '${this.dataValue}'`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.where) {
|
||||||
|
return `(${this.where}) && (${result.join(' || ')})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.join(' || ')
|
||||||
|
},
|
||||||
|
|
||||||
|
_getForeignKeyByField() {
|
||||||
|
let fields = this.field.split(',');
|
||||||
|
let whereField = null;
|
||||||
|
for (let i = 0; i < fields.length; i++) {
|
||||||
|
const items = fields[i].split('as');
|
||||||
|
if (items.length < 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (items[1].trim() === 'value') {
|
||||||
|
whereField = items[0].trim();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return whereField;
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateBindData(node) {
|
||||||
|
const {
|
||||||
|
dataList,
|
||||||
|
hasNodes
|
||||||
|
} = this._filterData(this._treeData, this.selected)
|
||||||
|
|
||||||
|
let isleaf = this._stepSearh === false && !hasNodes
|
||||||
|
|
||||||
|
if (node) {
|
||||||
|
node.isleaf = isleaf
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dataList = dataList
|
||||||
|
this.selectedIndex = dataList.length - 1
|
||||||
|
|
||||||
|
if (!isleaf && this.selected.length < dataList.length) {
|
||||||
|
this.selected.push({
|
||||||
|
value: null,
|
||||||
|
text: "请选择"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isleaf,
|
||||||
|
hasNodes
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSelected() {
|
||||||
|
let dl = this.dataList
|
||||||
|
let sl = this.selected
|
||||||
|
let textField = this.map.text
|
||||||
|
let valueField = this.map.value
|
||||||
|
for (let i = 0; i < sl.length; i++) {
|
||||||
|
let value = sl[i].value
|
||||||
|
let dl2 = dl[i]
|
||||||
|
for (let j = 0; j < dl2.length; j++) {
|
||||||
|
let item2 = dl2[j]
|
||||||
|
if (item2[valueField] === value) {
|
||||||
|
sl[i].text = item2[textField]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_filterData(data, paths) {
|
||||||
|
let dataList = []
|
||||||
|
let hasNodes = true
|
||||||
|
|
||||||
|
dataList.push(data.filter((item) => {
|
||||||
|
return (item.parent_value === null || item.parent_value === undefined || item.parent_value === '')
|
||||||
|
}))
|
||||||
|
for (let i = 0; i < paths.length; i++) {
|
||||||
|
let value = paths[i].value
|
||||||
|
let nodes = data.filter((item) => {
|
||||||
|
return item.parent_value === value
|
||||||
|
})
|
||||||
|
|
||||||
|
if (nodes.length) {
|
||||||
|
dataList.push(nodes)
|
||||||
|
} else {
|
||||||
|
hasNodes = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
dataList,
|
||||||
|
hasNodes
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_extractTree(nodes, result, parent_value) {
|
||||||
|
let list = result || []
|
||||||
|
let valueField = this.map.value
|
||||||
|
for (let i = 0; i < nodes.length; i++) {
|
||||||
|
let node = nodes[i]
|
||||||
|
|
||||||
|
let child = {}
|
||||||
|
for (let key in node) {
|
||||||
|
if (key !== 'children') {
|
||||||
|
child[key] = node[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parent_value !== null && parent_value !== undefined && parent_value !== '') {
|
||||||
|
child.parent_value = parent_value
|
||||||
|
}
|
||||||
|
result.push(child)
|
||||||
|
|
||||||
|
let children = node.children
|
||||||
|
if (children) {
|
||||||
|
this._extractTree(children, result, node[valueField])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_extractTreePath(nodes, result) {
|
||||||
|
let list = result || []
|
||||||
|
for (let i = 0; i < nodes.length; i++) {
|
||||||
|
let node = nodes[i]
|
||||||
|
|
||||||
|
let child = {}
|
||||||
|
for (let key in node) {
|
||||||
|
if (key !== 'children') {
|
||||||
|
child[key] = node[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.push(child)
|
||||||
|
|
||||||
|
let children = node.children
|
||||||
|
if (children) {
|
||||||
|
this._extractTreePath(children, result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_findNodePath(key, nodes, path = []) {
|
||||||
|
let textField = this.map.text
|
||||||
|
let valueField = this.map.value
|
||||||
|
for (let i = 0; i < nodes.length; i++) {
|
||||||
|
let node = nodes[i]
|
||||||
|
let children = node.children
|
||||||
|
let text = node[textField]
|
||||||
|
let value = node[valueField]
|
||||||
|
|
||||||
|
path.push({
|
||||||
|
value,
|
||||||
|
text
|
||||||
|
})
|
||||||
|
|
||||||
|
if (value === key) {
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
|
||||||
|
if (children) {
|
||||||
|
const p = this._findNodePath(key, children, path)
|
||||||
|
if (p.length) {
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
path.pop()
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,692 @@
|
|||||||
|
export type PaginationType = {
|
||||||
|
current : number,
|
||||||
|
size : number,
|
||||||
|
count : number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type LoadMoreType = {
|
||||||
|
contentdown : string,
|
||||||
|
contentrefresh : string,
|
||||||
|
contentnomore : string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SelectedItemType = {
|
||||||
|
name : string,
|
||||||
|
value : string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GetCommandOptions = {
|
||||||
|
collection ?: UTSJSONObject,
|
||||||
|
field ?: string,
|
||||||
|
orderby ?: string,
|
||||||
|
where ?: any,
|
||||||
|
pageData ?: string,
|
||||||
|
pageCurrent ?: number,
|
||||||
|
pageSize ?: number,
|
||||||
|
getCount ?: boolean,
|
||||||
|
getTree ?: any,
|
||||||
|
getTreePath ?: UTSJSONObject,
|
||||||
|
startwith ?: string,
|
||||||
|
limitlevel ?: number,
|
||||||
|
groupby ?: string,
|
||||||
|
groupField ?: string,
|
||||||
|
distinct ?: boolean,
|
||||||
|
pageIndistinct ?: boolean,
|
||||||
|
foreignKey ?: string,
|
||||||
|
loadtime ?: string,
|
||||||
|
manual ?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
const DefaultSelectedNode = {
|
||||||
|
text: '请选择',
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
export const dataPicker = defineMixin({
|
||||||
|
props: {
|
||||||
|
localdata: {
|
||||||
|
type: Array as PropType<Array<UTSJSONObject>>,
|
||||||
|
default: [] as Array<UTSJSONObject>
|
||||||
|
},
|
||||||
|
collection: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
field: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
orderby: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
pageData: {
|
||||||
|
type: String,
|
||||||
|
default: 'add'
|
||||||
|
},
|
||||||
|
pageCurrent: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
},
|
||||||
|
pageSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 20
|
||||||
|
},
|
||||||
|
getcount: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
gettree: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
gettreepath: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
startwith: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
limitlevel: {
|
||||||
|
type: Number,
|
||||||
|
default: 10
|
||||||
|
},
|
||||||
|
groupby: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
groupField: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
distinct: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
pageIndistinct: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
foreignKey: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
loadtime: {
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
|
manual: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
preload: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
stepSearh: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
selfField: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
parentField: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
defaultProps: {
|
||||||
|
type: Object as PropType<UTSJSONObject>,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
error: null as UniCloudError | null,
|
||||||
|
treeData: [] as Array<UTSJSONObject>,
|
||||||
|
selectedIndex: 0,
|
||||||
|
selectedNodes: [] as Array<UTSJSONObject>,
|
||||||
|
selectedPages: [] as Array<UTSJSONObject>[],
|
||||||
|
selectedValue: '',
|
||||||
|
selectedPaths: [] as Array<UTSJSONObject>,
|
||||||
|
pagination: {
|
||||||
|
current: 1,
|
||||||
|
size: 20,
|
||||||
|
count: 0
|
||||||
|
} as PaginationType
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
mappingTextName() : string {
|
||||||
|
// TODO
|
||||||
|
return (this.defaultProps != null) ? this.defaultProps!.getString('text', 'text') : 'text'
|
||||||
|
},
|
||||||
|
mappingValueName() : string {
|
||||||
|
// TODO
|
||||||
|
return (this.defaultProps != null) ? this.defaultProps!.getString('value', 'value') : 'value'
|
||||||
|
},
|
||||||
|
currentDataList() : Array<UTSJSONObject> {
|
||||||
|
if (this.selectedIndex > this.selectedPages.length - 1) {
|
||||||
|
return [] as Array<UTSJSONObject>
|
||||||
|
}
|
||||||
|
return this.selectedPages[this.selectedIndex]
|
||||||
|
},
|
||||||
|
isLocalData() : boolean {
|
||||||
|
return this.localdata.length > 0
|
||||||
|
},
|
||||||
|
isCloudData() : boolean {
|
||||||
|
return this._checkIsNotNull(this.collection)
|
||||||
|
},
|
||||||
|
isCloudDataList() : boolean {
|
||||||
|
return (this.isCloudData && (this.parentField.length == 0 && this.selfField.length == 0))
|
||||||
|
},
|
||||||
|
isCloudDataTree() : boolean {
|
||||||
|
return (this.isCloudData && this.parentField.length > 0 && this.selfField.length > 0)
|
||||||
|
},
|
||||||
|
dataValue() : any {
|
||||||
|
return this.hasModelValue ? this.modelValue : this.value
|
||||||
|
},
|
||||||
|
hasCloudTreeData() : boolean {
|
||||||
|
return this.treeData.length > 0
|
||||||
|
},
|
||||||
|
hasModelValue() : boolean {
|
||||||
|
if (typeof this.modelValue == 'string') {
|
||||||
|
const valueString = this.modelValue as string
|
||||||
|
return (valueString.length > 0)
|
||||||
|
} else if (Array.isArray(this.modelValue)) {
|
||||||
|
const valueArray = this.modelValue as Array<string>
|
||||||
|
return (valueArray.length > 0)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
hasCloudDataValue() : boolean {
|
||||||
|
if (typeof this.dataValue == 'string') {
|
||||||
|
const valueString = this.dataValue as string
|
||||||
|
return (valueString.length > 0)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.pagination.current = this.pageCurrent
|
||||||
|
this.pagination.size = this.pageSize
|
||||||
|
|
||||||
|
this.$watch(
|
||||||
|
() : any => [
|
||||||
|
this.pageCurrent,
|
||||||
|
this.pageSize,
|
||||||
|
this.localdata,
|
||||||
|
this.value,
|
||||||
|
this.collection,
|
||||||
|
this.field,
|
||||||
|
this.getcount,
|
||||||
|
this.orderby,
|
||||||
|
this.where,
|
||||||
|
this.groupby,
|
||||||
|
this.groupField,
|
||||||
|
this.distinct
|
||||||
|
],
|
||||||
|
(newValue : Array<any>, oldValue : Array<any>) => {
|
||||||
|
this.pagination.size = this.pageSize
|
||||||
|
if (newValue[0] !== oldValue[0]) {
|
||||||
|
this.pagination.current = this.pageCurrent
|
||||||
|
}
|
||||||
|
|
||||||
|
this.onPropsChange()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPropsChange() {
|
||||||
|
this.selectedIndex = 0
|
||||||
|
this.selectedNodes.length = 0
|
||||||
|
this.selectedPages.length = 0
|
||||||
|
this.selectedPaths.length = 0
|
||||||
|
|
||||||
|
// 加载数据
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadData()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onTabSelect(index : number) {
|
||||||
|
this.selectedIndex = index
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeClick(nodeData : UTSJSONObject) {
|
||||||
|
if (nodeData.getBoolean('disable', false)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const isLeaf = this._checkIsLeafNode(nodeData)
|
||||||
|
|
||||||
|
this._trimSelectedNodes(nodeData)
|
||||||
|
|
||||||
|
this.$emit('nodeclick', nodeData)
|
||||||
|
|
||||||
|
if (this.isLocalData) {
|
||||||
|
if (isLeaf || !this._checkHasChildren(nodeData)) {
|
||||||
|
this.onFinish()
|
||||||
|
}
|
||||||
|
} else if (this.isCloudDataList) {
|
||||||
|
this.onFinish()
|
||||||
|
} else if (this.isCloudDataTree) {
|
||||||
|
if (isLeaf) {
|
||||||
|
this.onFinish()
|
||||||
|
} else if (!this._checkHasChildren(nodeData)) {
|
||||||
|
// 尝试请求一次,如果没有返回数据标记为叶子节点
|
||||||
|
this.loadCloudDataNode(nodeData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getChangeNodes(): Array<UTSJSONObject> {
|
||||||
|
const nodes: Array<UTSJSONObject> = []
|
||||||
|
this.selectedNodes.forEach((node : UTSJSONObject) => {
|
||||||
|
const newNode: UTSJSONObject = {}
|
||||||
|
newNode[this.mappingTextName] = node.getString(this.mappingTextName)
|
||||||
|
newNode[this.mappingValueName] = node.getString(this.mappingValueName)
|
||||||
|
nodes.push(newNode)
|
||||||
|
})
|
||||||
|
return nodes
|
||||||
|
},
|
||||||
|
|
||||||
|
onFinish() { },
|
||||||
|
|
||||||
|
// 加载数据(自动判定环境)
|
||||||
|
loadData() {
|
||||||
|
if (this.isLocalData) {
|
||||||
|
this.loadLocalData()
|
||||||
|
} else if (this.isCloudDataList) {
|
||||||
|
this.loadCloudDataList()
|
||||||
|
} else if (this.isCloudDataTree) {
|
||||||
|
this.loadCloudDataTree()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载本地数据
|
||||||
|
loadLocalData() {
|
||||||
|
this.treeData = this.localdata
|
||||||
|
if (Array.isArray(this.dataValue)) {
|
||||||
|
const value = this.dataValue as Array<UTSJSONObject>
|
||||||
|
this.selectedPaths = value.slice(0)
|
||||||
|
this._pushSelectedTreeNodes(value, this.localdata)
|
||||||
|
} else {
|
||||||
|
this._pushSelectedNodes(this.localdata)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (单列)
|
||||||
|
loadCloudDataList() {
|
||||||
|
this._loadCloudData(null, (data : Array<UTSJSONObject>) => {
|
||||||
|
this.treeData = data
|
||||||
|
this._pushSelectedNodes(data)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (树形)
|
||||||
|
loadCloudDataTree() {
|
||||||
|
let commandOptions = {
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
where: this._cloudDataTreeWhere(),
|
||||||
|
getTree: true
|
||||||
|
} as GetCommandOptions
|
||||||
|
if (this._checkIsNotNull(this.gettree)) {
|
||||||
|
commandOptions.startwith = `${this.selfField}=='${this.dataValue as string}'`
|
||||||
|
}
|
||||||
|
this._loadCloudData(commandOptions, (data : Array<UTSJSONObject>) => {
|
||||||
|
this.treeData = data
|
||||||
|
if (this.selectedPaths.length > 0) {
|
||||||
|
this._pushSelectedTreeNodes(this.selectedPaths, data)
|
||||||
|
} else {
|
||||||
|
this._pushSelectedNodes(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载 Cloud 数据 (节点)
|
||||||
|
loadCloudDataNode(nodeData : UTSJSONObject) {
|
||||||
|
const commandOptions = {
|
||||||
|
field: this._cloudDataPostField(),
|
||||||
|
where: this._cloudDataNodeWhere()
|
||||||
|
} as GetCommandOptions
|
||||||
|
this._loadCloudData(commandOptions, (data : Array<UTSJSONObject>) => {
|
||||||
|
nodeData['children'] = data
|
||||||
|
if (data.length == 0) {
|
||||||
|
nodeData['isleaf'] = true
|
||||||
|
this.onFinish()
|
||||||
|
} else {
|
||||||
|
this._pushSelectedNodes(data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 回显 Cloud Tree Path
|
||||||
|
loadCloudDataPath() {
|
||||||
|
if (!this.hasCloudDataValue) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const command : GetCommandOptions = {}
|
||||||
|
|
||||||
|
// 单列
|
||||||
|
if (this.isCloudDataList) {
|
||||||
|
// 根据 field's as value标识匹配 where 条件
|
||||||
|
let where : Array<string> = [];
|
||||||
|
let whereField = this._getForeignKeyByField();
|
||||||
|
if (whereField.length > 0) {
|
||||||
|
where.push(`${whereField} == '${this.dataValue as string}'`)
|
||||||
|
}
|
||||||
|
|
||||||
|
let whereString = where.join(' || ')
|
||||||
|
if (this._checkIsNotNull(this.where)) {
|
||||||
|
whereString = `(${this.where}) && (${whereString})`
|
||||||
|
}
|
||||||
|
|
||||||
|
command.field = this._cloudDataPostField()
|
||||||
|
command.where = whereString
|
||||||
|
}
|
||||||
|
|
||||||
|
// 树形
|
||||||
|
if (this.isCloudDataTree) {
|
||||||
|
command.field = this._cloudDataPostField()
|
||||||
|
command.getTreePath = {
|
||||||
|
startWith: `${this.selfField}=='${this.dataValue as string}'`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._loadCloudData(command, (data : Array<UTSJSONObject>) => {
|
||||||
|
this._extractTreePath(data, this.selectedPaths)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
_loadCloudData(options ?: GetCommandOptions, callback ?: ((data : Array<UTSJSONObject>) => void)) {
|
||||||
|
if (this.loading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
|
||||||
|
this.error = null
|
||||||
|
|
||||||
|
this._getCommand(options).then((response : UniCloudDBGetResult) => {
|
||||||
|
callback?.(response.data)
|
||||||
|
}).catch((err : any | null) => {
|
||||||
|
this.error = err as UniCloudError
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataPostField() : string {
|
||||||
|
let fields = [this.field];
|
||||||
|
if (this.parentField.length > 0) {
|
||||||
|
fields.push(`${this.parentField} as parent_value`)
|
||||||
|
}
|
||||||
|
return fields.join(',')
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataTreeWhere() : string {
|
||||||
|
let result : Array<string> = []
|
||||||
|
let selectedNodes = this.selectedNodes.length > 0 ? this.selectedNodes : this.selectedPaths
|
||||||
|
let parentField = this.parentField
|
||||||
|
if (parentField.length > 0) {
|
||||||
|
result.push(`${parentField} == null || ${parentField} == ""`)
|
||||||
|
}
|
||||||
|
if (selectedNodes.length > 0) {
|
||||||
|
for (var i = 0; i < selectedNodes.length - 1; i++) {
|
||||||
|
const parentFieldValue = selectedNodes[i].getString('value', '')
|
||||||
|
result.push(`${parentField} == '${parentFieldValue}'`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let where : Array<string> = []
|
||||||
|
if (this._checkIsNotNull(this.where)) {
|
||||||
|
where.push(`(${this.where as string})`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.length > 0) {
|
||||||
|
where.push(`(${result.join(' || ')})`)
|
||||||
|
}
|
||||||
|
|
||||||
|
return where.join(' && ')
|
||||||
|
},
|
||||||
|
|
||||||
|
_cloudDataNodeWhere() : string {
|
||||||
|
const where : Array<string> = []
|
||||||
|
if (this.selectedNodes.length > 0) {
|
||||||
|
const value = this.selectedNodes[this.selectedNodes.length - 1].getString('value', '')
|
||||||
|
where.push(`${this.parentField} == '${value}'`)
|
||||||
|
}
|
||||||
|
|
||||||
|
let whereString = where.join(' || ')
|
||||||
|
if (this._checkIsNotNull(this.where)) {
|
||||||
|
return `(${this.where as string}) && (${whereString})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return whereString
|
||||||
|
},
|
||||||
|
|
||||||
|
_getWhereByForeignKey() : string {
|
||||||
|
let result : Array<string> = []
|
||||||
|
let whereField = this._getForeignKeyByField();
|
||||||
|
if (whereField.length > 0) {
|
||||||
|
result.push(`${whereField} == '${this.dataValue as string}'`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._checkIsNotNull(this.where)) {
|
||||||
|
return `(${this.where}) && (${result.join(' || ')})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.join(' || ')
|
||||||
|
},
|
||||||
|
|
||||||
|
_getForeignKeyByField() : string {
|
||||||
|
const fields = this.field.split(',')
|
||||||
|
let whereField = ''
|
||||||
|
for (let i = 0; i < fields.length; i++) {
|
||||||
|
const items = fields[i].split('as')
|
||||||
|
if (items.length < 2) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (items[1].trim() === 'value') {
|
||||||
|
whereField = items[0].trim()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return whereField
|
||||||
|
},
|
||||||
|
|
||||||
|
_getCommand(options ?: GetCommandOptions) : Promise<UniCloudDBGetResult> {
|
||||||
|
let db = uniCloud.databaseForJQL()
|
||||||
|
|
||||||
|
let collection = Array.isArray(this.collection) ? db.collection(...(this.collection as Array<any>)) : db.collection(this.collection)
|
||||||
|
|
||||||
|
let filter : UniCloudDBFilter | null = null
|
||||||
|
if (this.foreignKey.length > 0) {
|
||||||
|
filter = collection.foreignKey(this.foreignKey)
|
||||||
|
}
|
||||||
|
|
||||||
|
const where : any = options?.where ?? this.where
|
||||||
|
if (typeof where == 'string') {
|
||||||
|
const whereString = where as string
|
||||||
|
if (whereString.length > 0) {
|
||||||
|
filter = (filter != null) ? filter.where(where) : collection.where(where)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filter = (filter != null) ? filter.where(where) : collection.where(where)
|
||||||
|
}
|
||||||
|
|
||||||
|
let query : UniCloudDBQuery | null = null
|
||||||
|
if (this.field.length > 0) {
|
||||||
|
query = (filter != null) ? filter.field(this.field) : collection.field(this.field)
|
||||||
|
}
|
||||||
|
if (this.groupby.length > 0) {
|
||||||
|
if (query != null) {
|
||||||
|
query = query.groupBy(this.groupby)
|
||||||
|
} else if (filter != null) {
|
||||||
|
query = filter.groupBy(this.groupby)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.groupField.length > 0) {
|
||||||
|
if (query != null) {
|
||||||
|
query = query.groupField(this.groupField)
|
||||||
|
} else if (filter != null) {
|
||||||
|
query = filter.groupField(this.groupField)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.distinct == true) {
|
||||||
|
if (query != null) {
|
||||||
|
query = query.distinct(this.field)
|
||||||
|
} else if (filter != null) {
|
||||||
|
query = filter.distinct(this.field)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.orderby.length > 0) {
|
||||||
|
if (query != null) {
|
||||||
|
query = query.orderBy(this.orderby)
|
||||||
|
} else if (filter != null) {
|
||||||
|
query = filter.orderBy(this.orderby)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const size = this.pagination.size
|
||||||
|
const current = this.pagination.current
|
||||||
|
if (query != null) {
|
||||||
|
query = query.skip(size * (current - 1)).limit(size)
|
||||||
|
} else if (filter != null) {
|
||||||
|
query = filter.skip(size * (current - 1)).limit(size)
|
||||||
|
} else {
|
||||||
|
query = collection.skip(size * (current - 1)).limit(size)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getOptions = {}
|
||||||
|
const treeOptions = {
|
||||||
|
limitLevel: this.limitlevel,
|
||||||
|
startWith: this.startwith
|
||||||
|
}
|
||||||
|
if (this.getcount == true) {
|
||||||
|
getOptions['getCount'] = this.getcount
|
||||||
|
}
|
||||||
|
|
||||||
|
const getTree : any = options?.getTree ?? this.gettree
|
||||||
|
if (typeof getTree == 'string') {
|
||||||
|
const getTreeString = getTree as string
|
||||||
|
if (getTreeString.length > 0) {
|
||||||
|
getOptions['getTree'] = treeOptions
|
||||||
|
}
|
||||||
|
} else if (typeof getTree == 'object') {
|
||||||
|
getOptions['getTree'] = treeOptions
|
||||||
|
} else {
|
||||||
|
getOptions['getTree'] = getTree
|
||||||
|
}
|
||||||
|
|
||||||
|
const getTreePath = options?.getTreePath ?? this.gettreepath
|
||||||
|
if (typeof getTreePath == 'string') {
|
||||||
|
const getTreePathString = getTreePath as string
|
||||||
|
if (getTreePathString.length > 0) {
|
||||||
|
getOptions['getTreePath'] = getTreePath
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
getOptions['getTreePath'] = getTreePath
|
||||||
|
}
|
||||||
|
|
||||||
|
return query.get(getOptions)
|
||||||
|
},
|
||||||
|
|
||||||
|
_checkIsNotNull(value : any) : boolean {
|
||||||
|
if (typeof value == 'string') {
|
||||||
|
const valueString = value as string
|
||||||
|
return (valueString.length > 0)
|
||||||
|
} else if (value instanceof UTSJSONObject) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
_checkIsLeafNode(nodeData : UTSJSONObject) : boolean {
|
||||||
|
if (this.selectedIndex >= this.limitlevel) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nodeData.getBoolean('isleaf', false)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
_checkHasChildren(nodeData : UTSJSONObject) : boolean {
|
||||||
|
const children = nodeData.getArray('children') ?? ([] as Array<any>)
|
||||||
|
return children.length > 0
|
||||||
|
},
|
||||||
|
|
||||||
|
_pushSelectedNodes(nodes : Array<UTSJSONObject>) {
|
||||||
|
this.selectedNodes.push(DefaultSelectedNode)
|
||||||
|
this.selectedPages.push(nodes)
|
||||||
|
this.selectedIndex = this.selectedPages.length - 1
|
||||||
|
},
|
||||||
|
|
||||||
|
_trimSelectedNodes(nodeData : UTSJSONObject) {
|
||||||
|
this.selectedNodes.splice(this.selectedIndex)
|
||||||
|
this.selectedNodes.push(nodeData)
|
||||||
|
|
||||||
|
if (this.selectedPages.length > 0) {
|
||||||
|
this.selectedPages.splice(this.selectedIndex + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const children = nodeData.getArray<UTSJSONObject>('children') ?? ([] as Array<UTSJSONObject>)
|
||||||
|
if (children.length > 0) {
|
||||||
|
this.selectedNodes.push(DefaultSelectedNode)
|
||||||
|
this.selectedPages.push(children)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selectedIndex = this.selectedPages.length - 1
|
||||||
|
},
|
||||||
|
|
||||||
|
_pushSelectedTreeNodes(paths : Array<UTSJSONObject>, nodes : Array<UTSJSONObject>) {
|
||||||
|
let children : Array<UTSJSONObject> = nodes
|
||||||
|
paths.forEach((node : UTSJSONObject) => {
|
||||||
|
const findNode = children.find((item : UTSJSONObject) : boolean => {
|
||||||
|
return (item.getString(this.mappingValueName) == node.getString(this.mappingValueName))
|
||||||
|
})
|
||||||
|
if (findNode != null) {
|
||||||
|
this.selectedPages.push(children)
|
||||||
|
this.selectedNodes.push(node)
|
||||||
|
children = findNode.getArray<UTSJSONObject>('children') ?? ([] as Array<UTSJSONObject>)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.selectedIndex = this.selectedPages.length - 1
|
||||||
|
},
|
||||||
|
|
||||||
|
_extractTreePath(nodes : Array<UTSJSONObject>, result : Array<UTSJSONObject>) {
|
||||||
|
if (nodes.length == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const node = nodes[0]
|
||||||
|
result.push(node)
|
||||||
|
|
||||||
|
const children = node.getArray<UTSJSONObject>('children')
|
||||||
|
if (Array.isArray(children) && children!.length > 0) {
|
||||||
|
this._extractTreePath(children, result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
.uni-data-pickerview {
|
||||||
|
position: relative;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-cover {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: rgba(150, 150, 150, .1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-text {
|
||||||
|
color: #DD524D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-node-list {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-node-item {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 8px 10px 8px 10px;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-node-item-active {
|
||||||
|
color: #007aff;
|
||||||
|
border-bottom-color: #007aff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-view {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text-disabled {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text-overflow {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
margin-right: 5px;
|
||||||
|
border: 2px solid #007aff;
|
||||||
|
border-left: 0;
|
||||||
|
border-top: 0;
|
||||||
|
height: 12px;
|
||||||
|
width: 6px;
|
||||||
|
transform-origin: center;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-data-pickerview">
|
||||||
|
<view v-if="error!=null" class="error">
|
||||||
|
<text class="error-text">{{error!.errMsg}}</text>
|
||||||
|
</view>
|
||||||
|
<scroll-view v-if="!isCloudDataList" :scroll-x="true">
|
||||||
|
<view class="selected-node-list">
|
||||||
|
<template v-for="(item, index) in selectedNodes">
|
||||||
|
<text class="selected-node-item" :class="{'selected-node-item-active':index==selectedIndex}"
|
||||||
|
@click="onTabSelect(index)">
|
||||||
|
{{item[mappingTextName]}}
|
||||||
|
</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<list-view class="list-view" :scroll-y="true">
|
||||||
|
<list-item class="list-item" v-for="(item, _) in currentDataList" @click="onNodeClick(item)">
|
||||||
|
<text class="item-text" :class="{'item-text-disabled': item['disable']}">{{item[mappingTextName]}}</text>
|
||||||
|
<text class="check" v-if="item[mappingValueName] == selectedNodes[selectedIndex][mappingValueName]"></text>
|
||||||
|
</list-item>
|
||||||
|
</list-view>
|
||||||
|
<view class="loading-cover" v-if="loading">
|
||||||
|
<slot name="pickerview-loading" :loading="loading"></slot>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { dataPicker } from "./uni-data-picker.uts"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DataPickerview
|
||||||
|
* @description uni-data-pickerview
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3796
|
||||||
|
* @property {Array} localdata 本地数据,参考
|
||||||
|
* @property {Boolean} step-searh = [true|false] 是否分布查询
|
||||||
|
* @value true 启用分布查询,仅查询当前选中节点
|
||||||
|
* @value false 关闭分布查询,一次查询出所有数据
|
||||||
|
* @property {String|DBFieldString} self-field 分布查询当前字段名称
|
||||||
|
* @property {String|DBFieldString} parent-field 分布查询父字段名称
|
||||||
|
* @property {String|DBCollectionString} collection 表名
|
||||||
|
* @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
|
||||||
|
* @property {String} orderby 排序字段及正序倒叙设置
|
||||||
|
* @property {String|JQLString} where 查询条件
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'UniDataPickerView',
|
||||||
|
emits: ['nodeclick', 'change', 'update:modelValue'],
|
||||||
|
mixins: [dataPicker],
|
||||||
|
props: {
|
||||||
|
ellipsis: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onFinish() {
|
||||||
|
this.$emit('change', this.getChangeNodes())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@import url("uni-data-pickerview.css");
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,323 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-data-pickerview">
|
||||||
|
<scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
|
||||||
|
<view class="selected-list">
|
||||||
|
<view
|
||||||
|
class="selected-item"
|
||||||
|
v-for="(item,index) in selected"
|
||||||
|
:key="index"
|
||||||
|
:class="{
|
||||||
|
'selected-item-active':index == selectedIndex
|
||||||
|
}"
|
||||||
|
@click="handleSelect(index)"
|
||||||
|
>
|
||||||
|
<text>{{item.text || ''}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="tab-c">
|
||||||
|
<scroll-view class="list" :scroll-y="true">
|
||||||
|
<view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
|
||||||
|
@click="handleNodeClick(item, selectedIndex, j)">
|
||||||
|
<text class="item-text">{{item[map.text]}}</text>
|
||||||
|
<view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="loading-cover" v-if="loading">
|
||||||
|
<uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
<view class="error-message" v-if="errorMessage">
|
||||||
|
<text class="error-text">{{errorMessage}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import dataPicker from "./uni-data-picker.js"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DataPickerview
|
||||||
|
* @description uni-data-pickerview
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=3796
|
||||||
|
* @property {Array} localdata 本地数据,参考
|
||||||
|
* @property {Boolean} step-searh = [true|false] 是否分布查询
|
||||||
|
* @value true 启用分布查询,仅查询当前选中节点
|
||||||
|
* @value false 关闭分布查询,一次查询出所有数据
|
||||||
|
* @property {String|DBFieldString} self-field 分布查询当前字段名称
|
||||||
|
* @property {String|DBFieldString} parent-field 分布查询父字段名称
|
||||||
|
* @property {String|DBCollectionString} collection 表名
|
||||||
|
* @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
|
||||||
|
* @property {String} orderby 排序字段及正序倒叙设置
|
||||||
|
* @property {String|JQLString} where 查询条件
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'UniDataPickerView',
|
||||||
|
emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
|
||||||
|
mixins: [dataPicker],
|
||||||
|
props: {
|
||||||
|
managedMode: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
ellipsis: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (!this.managedMode) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadData();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onPropsChange() {
|
||||||
|
this._treeData = [];
|
||||||
|
this.selectedIndex = 0;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadData();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelect(index) {
|
||||||
|
this.selectedIndex = index;
|
||||||
|
},
|
||||||
|
handleNodeClick(item, i, j) {
|
||||||
|
if (item.disable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const node = this.dataList[i][j];
|
||||||
|
const text = node[this.map.text];
|
||||||
|
const value = node[this.map.value];
|
||||||
|
|
||||||
|
if (i < this.selected.length - 1) {
|
||||||
|
this.selected.splice(i, this.selected.length - i)
|
||||||
|
this.selected.push({
|
||||||
|
text,
|
||||||
|
value
|
||||||
|
})
|
||||||
|
} else if (i === this.selected.length - 1) {
|
||||||
|
this.selected.splice(i, 1, {
|
||||||
|
text,
|
||||||
|
value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.isleaf) {
|
||||||
|
this.onSelectedChange(node, node.isleaf)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
isleaf,
|
||||||
|
hasNodes
|
||||||
|
} = this._updateBindData()
|
||||||
|
|
||||||
|
// 本地数据
|
||||||
|
if (this.isLocalData) {
|
||||||
|
this.onSelectedChange(node, (!hasNodes || isleaf))
|
||||||
|
} else if (this.isCloudDataList) { // Cloud 数据 (单列)
|
||||||
|
this.onSelectedChange(node, true)
|
||||||
|
} else if (this.isCloudDataTree) { // Cloud 数据 (树形)
|
||||||
|
if (isleaf) {
|
||||||
|
this.onSelectedChange(node, node.isleaf)
|
||||||
|
} else if (!hasNodes) { // 请求一次服务器以确定是否为叶子节点
|
||||||
|
this.loadCloudDataNode((data) => {
|
||||||
|
if (!data.length) {
|
||||||
|
node.isleaf = true
|
||||||
|
} else {
|
||||||
|
this._treeData.push(...data)
|
||||||
|
this._updateBindData(node)
|
||||||
|
}
|
||||||
|
this.onSelectedChange(node, node.isleaf)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateData(data) {
|
||||||
|
this._treeData = data.treeData
|
||||||
|
this.selected = data.selected
|
||||||
|
if (!this._treeData.length) {
|
||||||
|
this.loadData()
|
||||||
|
} else {
|
||||||
|
//this.selected = data.selected
|
||||||
|
this._updateBindData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onDataChange() {
|
||||||
|
this.$emit('datachange');
|
||||||
|
},
|
||||||
|
onSelectedChange(node, isleaf) {
|
||||||
|
if (isleaf) {
|
||||||
|
this._dispatchEvent()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node) {
|
||||||
|
this.$emit('nodeclick', node)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_dispatchEvent() {
|
||||||
|
this.$emit('change', this.selected.slice(0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$uni-primary: #007aff !default;
|
||||||
|
|
||||||
|
.uni-data-pickerview {
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-text {
|
||||||
|
color: #DD524D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-cover {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(255, 255, 255, .5);
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 1001;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-more {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
margin: auto;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
background-color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 15px;
|
||||||
|
opacity: .9;
|
||||||
|
z-index: 102;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
.selected-area {
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
.selected-list {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-bottom: 1px solid #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 12px 0;
|
||||||
|
text-align: center;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
white-space: nowrap;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item-text-overflow {
|
||||||
|
width: 168px;
|
||||||
|
/* fix nvue */
|
||||||
|
overflow: hidden;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
width: 6em;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item-active {
|
||||||
|
border-bottom: 2px solid $uni-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-item-text {
|
||||||
|
color: $uni-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-c {
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 12px 15px;
|
||||||
|
/* border-bottom: 1px solid #f0f0f0; */
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-disabled {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text {
|
||||||
|
/* flex: 1; */
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-text-overflow {
|
||||||
|
width: 280px;
|
||||||
|
/* fix nvue */
|
||||||
|
overflow: hidden;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
width: 20em;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
margin-right: 5px;
|
||||||
|
border: 2px solid $uni-primary;
|
||||||
|
border-left: 0;
|
||||||
|
border-top: 0;
|
||||||
|
height: 12px;
|
||||||
|
width: 6px;
|
||||||
|
transform-origin: center;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
transition: all 0.3s;
|
||||||
|
/* #endif */
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-data-picker",
|
||||||
|
"displayName": "uni-data-picker 数据驱动的picker选择器",
|
||||||
|
"version": "2.0.1",
|
||||||
|
"description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"picker",
|
||||||
|
"级联",
|
||||||
|
"省市区",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"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-load-more",
|
||||||
|
"uni-icons",
|
||||||
|
"uni-scss"
|
||||||
|
],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y",
|
||||||
|
"alipay": "n"
|
||||||
|
},
|
||||||
|
"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",
|
||||||
|
"京东": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
## DataPicker 级联选择
|
||||||
|
> **组件名:uni-data-picker**
|
||||||
|
> 代码块: `uDataPicker`
|
||||||
|
> 关联组件:`uni-data-pickerview`、`uni-load-more`。
|
||||||
|
|
||||||
|
|
||||||
|
`<uni-data-picker>` 是一个选择类[datacom组件](https://uniapp.dcloud.net.cn/component/datacom)。
|
||||||
|
|
||||||
|
支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
|
||||||
|
|
||||||
|
候选数据支持一次性加载完毕,也支持懒加载,比如示例图中,选择了“北京”后,动态加载北京的区县数据。
|
||||||
|
|
||||||
|
`<uni-data-picker>` 组件尤其适用于地址选择、分类选择等选择类。
|
||||||
|
|
||||||
|
`<uni-data-picker>` 支持本地数据、云端静态数据(json),uniCloud云数据库数据。
|
||||||
|
|
||||||
|
`<uni-data-picker>` 可以通过JQL直连uniCloud云数据库,配套[DB Schema](https://uniapp.dcloud.net.cn/uniCloud/schema),可在schema2code中自动生成前端页面,还支持服务器端校验。
|
||||||
|
|
||||||
|
在uniCloud数据表中新建表“uni-id-address”和“opendb-city-china”,这2个表的schema自带foreignKey关联。在“uni-id-address”表的表结构页面使用schema2code生成前端页面,会自动生成地址管理的维护页面,自动从“opendb-city-china”表包含的中国所有省市区信息里选择地址。
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
## 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目录规范
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<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>
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
<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>
|
||||||
@@ -0,0 +1,664 @@
|
|||||||
|
|
||||||
|
.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";
|
||||||
|
}
|
||||||
@@ -0,0 +1,664 @@
|
|||||||
|
|
||||||
|
export type IconsData = {
|
||||||
|
id : string
|
||||||
|
name : string
|
||||||
|
font_family : string
|
||||||
|
css_prefix_text : string
|
||||||
|
description : string
|
||||||
|
glyphs : Array<IconsDataItem>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IconsDataItem = {
|
||||||
|
font_class : string
|
||||||
|
unicode : string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const fontData = [
|
||||||
|
{
|
||||||
|
"font_class": "arrow-down",
|
||||||
|
"unicode": "\ue6be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-left",
|
||||||
|
"unicode": "\ue6bc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-right",
|
||||||
|
"unicode": "\ue6bb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-up",
|
||||||
|
"unicode": "\ue6bd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "auth",
|
||||||
|
"unicode": "\ue6ab"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "auth-filled",
|
||||||
|
"unicode": "\ue6cc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "back",
|
||||||
|
"unicode": "\ue6b9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "bars",
|
||||||
|
"unicode": "\ue627"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "calendar",
|
||||||
|
"unicode": "\ue6a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "calendar-filled",
|
||||||
|
"unicode": "\ue6c0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "camera",
|
||||||
|
"unicode": "\ue65a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "camera-filled",
|
||||||
|
"unicode": "\ue658"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cart",
|
||||||
|
"unicode": "\ue631"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cart-filled",
|
||||||
|
"unicode": "\ue6d0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chat",
|
||||||
|
"unicode": "\ue65d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chat-filled",
|
||||||
|
"unicode": "\ue659"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatboxes",
|
||||||
|
"unicode": "\ue696"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatboxes-filled",
|
||||||
|
"unicode": "\ue692"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatbubble",
|
||||||
|
"unicode": "\ue697"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatbubble-filled",
|
||||||
|
"unicode": "\ue694"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkbox",
|
||||||
|
"unicode": "\ue62b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkbox-filled",
|
||||||
|
"unicode": "\ue62c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkmarkempty",
|
||||||
|
"unicode": "\ue65c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "circle",
|
||||||
|
"unicode": "\ue65b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "circle-filled",
|
||||||
|
"unicode": "\ue65e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "clear",
|
||||||
|
"unicode": "\ue66d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "close",
|
||||||
|
"unicode": "\ue673"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "closeempty",
|
||||||
|
"unicode": "\ue66c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-download",
|
||||||
|
"unicode": "\ue647"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-download-filled",
|
||||||
|
"unicode": "\ue646"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-upload",
|
||||||
|
"unicode": "\ue645"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-upload-filled",
|
||||||
|
"unicode": "\ue648"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "color",
|
||||||
|
"unicode": "\ue6cf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "color-filled",
|
||||||
|
"unicode": "\ue6c9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "compose",
|
||||||
|
"unicode": "\ue67f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "contact",
|
||||||
|
"unicode": "\ue693"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "contact-filled",
|
||||||
|
"unicode": "\ue695"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "down",
|
||||||
|
"unicode": "\ue6b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "bottom",
|
||||||
|
"unicode": "\ue6b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "download",
|
||||||
|
"unicode": "\ue68d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "download-filled",
|
||||||
|
"unicode": "\ue681"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "email",
|
||||||
|
"unicode": "\ue69e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "email-filled",
|
||||||
|
"unicode": "\ue69a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye",
|
||||||
|
"unicode": "\ue651"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-filled",
|
||||||
|
"unicode": "\ue66a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-slash",
|
||||||
|
"unicode": "\ue6b3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-slash-filled",
|
||||||
|
"unicode": "\ue6b4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "fire",
|
||||||
|
"unicode": "\ue6a1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "fire-filled",
|
||||||
|
"unicode": "\ue6c5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "flag",
|
||||||
|
"unicode": "\ue65f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "flag-filled",
|
||||||
|
"unicode": "\ue660"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "folder-add",
|
||||||
|
"unicode": "\ue6a9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "folder-add-filled",
|
||||||
|
"unicode": "\ue6c8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "font",
|
||||||
|
"unicode": "\ue6a3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "forward",
|
||||||
|
"unicode": "\ue6ba"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gear",
|
||||||
|
"unicode": "\ue664"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gear-filled",
|
||||||
|
"unicode": "\ue661"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gift",
|
||||||
|
"unicode": "\ue6a4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gift-filled",
|
||||||
|
"unicode": "\ue6c4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-down",
|
||||||
|
"unicode": "\ue63d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-down-filled",
|
||||||
|
"unicode": "\ue63c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-up",
|
||||||
|
"unicode": "\ue63f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-up-filled",
|
||||||
|
"unicode": "\ue63e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "headphones",
|
||||||
|
"unicode": "\ue630"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "heart",
|
||||||
|
"unicode": "\ue639"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "heart-filled",
|
||||||
|
"unicode": "\ue641"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "help",
|
||||||
|
"unicode": "\ue679"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "help-filled",
|
||||||
|
"unicode": "\ue674"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "home",
|
||||||
|
"unicode": "\ue662"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "home-filled",
|
||||||
|
"unicode": "\ue663"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "image",
|
||||||
|
"unicode": "\ue670"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "image-filled",
|
||||||
|
"unicode": "\ue678"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "images",
|
||||||
|
"unicode": "\ue650"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "images-filled",
|
||||||
|
"unicode": "\ue64b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "info",
|
||||||
|
"unicode": "\ue669"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "info-filled",
|
||||||
|
"unicode": "\ue649"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "left",
|
||||||
|
"unicode": "\ue6b7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "link",
|
||||||
|
"unicode": "\ue6a5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "list",
|
||||||
|
"unicode": "\ue644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "location",
|
||||||
|
"unicode": "\ue6ae"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "location-filled",
|
||||||
|
"unicode": "\ue6af"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "locked",
|
||||||
|
"unicode": "\ue66b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "locked-filled",
|
||||||
|
"unicode": "\ue668"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "loop",
|
||||||
|
"unicode": "\ue633"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mail-open",
|
||||||
|
"unicode": "\ue643"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mail-open-filled",
|
||||||
|
"unicode": "\ue63a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map",
|
||||||
|
"unicode": "\ue667"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-filled",
|
||||||
|
"unicode": "\ue666"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-pin",
|
||||||
|
"unicode": "\ue6ad"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-pin-ellipse",
|
||||||
|
"unicode": "\ue6ac"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "medal",
|
||||||
|
"unicode": "\ue6a2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "medal-filled",
|
||||||
|
"unicode": "\ue6c3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mic",
|
||||||
|
"unicode": "\ue671"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mic-filled",
|
||||||
|
"unicode": "\ue677"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "micoff",
|
||||||
|
"unicode": "\ue67e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "micoff-filled",
|
||||||
|
"unicode": "\ue6b0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "minus",
|
||||||
|
"unicode": "\ue66f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "minus-filled",
|
||||||
|
"unicode": "\ue67d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "more",
|
||||||
|
"unicode": "\ue64d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "more-filled",
|
||||||
|
"unicode": "\ue64e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "navigate",
|
||||||
|
"unicode": "\ue66e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "navigate-filled",
|
||||||
|
"unicode": "\ue67a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "notification",
|
||||||
|
"unicode": "\ue6a6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "notification-filled",
|
||||||
|
"unicode": "\ue6c1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperclip",
|
||||||
|
"unicode": "\ue652"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperplane",
|
||||||
|
"unicode": "\ue672"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperplane-filled",
|
||||||
|
"unicode": "\ue675"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "person",
|
||||||
|
"unicode": "\ue699"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "person-filled",
|
||||||
|
"unicode": "\ue69d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd",
|
||||||
|
"unicode": "\ue69f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd-filled",
|
||||||
|
"unicode": "\ue698"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd-filled-copy",
|
||||||
|
"unicode": "\ue6d1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "phone",
|
||||||
|
"unicode": "\ue69c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "phone-filled",
|
||||||
|
"unicode": "\ue69b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plus",
|
||||||
|
"unicode": "\ue676"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plus-filled",
|
||||||
|
"unicode": "\ue6c7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plusempty",
|
||||||
|
"unicode": "\ue67b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "pulldown",
|
||||||
|
"unicode": "\ue632"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "pyq",
|
||||||
|
"unicode": "\ue682"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "qq",
|
||||||
|
"unicode": "\ue680"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "redo",
|
||||||
|
"unicode": "\ue64a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "redo-filled",
|
||||||
|
"unicode": "\ue655"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refresh",
|
||||||
|
"unicode": "\ue657"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refresh-filled",
|
||||||
|
"unicode": "\ue656"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refreshempty",
|
||||||
|
"unicode": "\ue6bf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "reload",
|
||||||
|
"unicode": "\ue6b2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "right",
|
||||||
|
"unicode": "\ue6b5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "scan",
|
||||||
|
"unicode": "\ue62a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "search",
|
||||||
|
"unicode": "\ue654"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "settings",
|
||||||
|
"unicode": "\ue653"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "settings-filled",
|
||||||
|
"unicode": "\ue6ce"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "shop",
|
||||||
|
"unicode": "\ue62f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "shop-filled",
|
||||||
|
"unicode": "\ue6cd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "smallcircle",
|
||||||
|
"unicode": "\ue67c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "smallcircle-filled",
|
||||||
|
"unicode": "\ue665"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "sound",
|
||||||
|
"unicode": "\ue684"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "sound-filled",
|
||||||
|
"unicode": "\ue686"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "spinner-cycle",
|
||||||
|
"unicode": "\ue68a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "staff",
|
||||||
|
"unicode": "\ue6a7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "staff-filled",
|
||||||
|
"unicode": "\ue6cb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "star",
|
||||||
|
"unicode": "\ue688"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "star-filled",
|
||||||
|
"unicode": "\ue68f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "starhalf",
|
||||||
|
"unicode": "\ue683"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "trash",
|
||||||
|
"unicode": "\ue687"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "trash-filled",
|
||||||
|
"unicode": "\ue685"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "tune",
|
||||||
|
"unicode": "\ue6aa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "tune-filled",
|
||||||
|
"unicode": "\ue6ca"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "undo",
|
||||||
|
"unicode": "\ue64f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "undo-filled",
|
||||||
|
"unicode": "\ue64c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "up",
|
||||||
|
"unicode": "\ue6b6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "top",
|
||||||
|
"unicode": "\ue6b6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "upload",
|
||||||
|
"unicode": "\ue690"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "upload-filled",
|
||||||
|
"unicode": "\ue68e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "videocam",
|
||||||
|
"unicode": "\ue68c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "videocam-filled",
|
||||||
|
"unicode": "\ue689"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "vip",
|
||||||
|
"unicode": "\ue6a8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "vip-filled",
|
||||||
|
"unicode": "\ue6c6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "wallet",
|
||||||
|
"unicode": "\ue6b1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "wallet-filled",
|
||||||
|
"unicode": "\ue6c2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "weibo",
|
||||||
|
"unicode": "\ue68b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "weixin",
|
||||||
|
"unicode": "\ue691"
|
||||||
|
}
|
||||||
|
] as IconsDataItem[]
|
||||||
|
|
||||||
|
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
|
||||||
@@ -0,0 +1,649 @@
|
|||||||
|
|
||||||
|
export const fontData = [
|
||||||
|
{
|
||||||
|
"font_class": "arrow-down",
|
||||||
|
"unicode": "\ue6be"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-left",
|
||||||
|
"unicode": "\ue6bc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-right",
|
||||||
|
"unicode": "\ue6bb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "arrow-up",
|
||||||
|
"unicode": "\ue6bd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "auth",
|
||||||
|
"unicode": "\ue6ab"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "auth-filled",
|
||||||
|
"unicode": "\ue6cc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "back",
|
||||||
|
"unicode": "\ue6b9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "bars",
|
||||||
|
"unicode": "\ue627"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "calendar",
|
||||||
|
"unicode": "\ue6a0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "calendar-filled",
|
||||||
|
"unicode": "\ue6c0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "camera",
|
||||||
|
"unicode": "\ue65a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "camera-filled",
|
||||||
|
"unicode": "\ue658"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cart",
|
||||||
|
"unicode": "\ue631"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cart-filled",
|
||||||
|
"unicode": "\ue6d0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chat",
|
||||||
|
"unicode": "\ue65d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chat-filled",
|
||||||
|
"unicode": "\ue659"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatboxes",
|
||||||
|
"unicode": "\ue696"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatboxes-filled",
|
||||||
|
"unicode": "\ue692"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatbubble",
|
||||||
|
"unicode": "\ue697"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "chatbubble-filled",
|
||||||
|
"unicode": "\ue694"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkbox",
|
||||||
|
"unicode": "\ue62b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkbox-filled",
|
||||||
|
"unicode": "\ue62c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "checkmarkempty",
|
||||||
|
"unicode": "\ue65c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "circle",
|
||||||
|
"unicode": "\ue65b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "circle-filled",
|
||||||
|
"unicode": "\ue65e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "clear",
|
||||||
|
"unicode": "\ue66d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "close",
|
||||||
|
"unicode": "\ue673"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "closeempty",
|
||||||
|
"unicode": "\ue66c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-download",
|
||||||
|
"unicode": "\ue647"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-download-filled",
|
||||||
|
"unicode": "\ue646"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-upload",
|
||||||
|
"unicode": "\ue645"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "cloud-upload-filled",
|
||||||
|
"unicode": "\ue648"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "color",
|
||||||
|
"unicode": "\ue6cf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "color-filled",
|
||||||
|
"unicode": "\ue6c9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "compose",
|
||||||
|
"unicode": "\ue67f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "contact",
|
||||||
|
"unicode": "\ue693"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "contact-filled",
|
||||||
|
"unicode": "\ue695"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "down",
|
||||||
|
"unicode": "\ue6b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "bottom",
|
||||||
|
"unicode": "\ue6b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "download",
|
||||||
|
"unicode": "\ue68d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "download-filled",
|
||||||
|
"unicode": "\ue681"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "email",
|
||||||
|
"unicode": "\ue69e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "email-filled",
|
||||||
|
"unicode": "\ue69a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye",
|
||||||
|
"unicode": "\ue651"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-filled",
|
||||||
|
"unicode": "\ue66a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-slash",
|
||||||
|
"unicode": "\ue6b3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "eye-slash-filled",
|
||||||
|
"unicode": "\ue6b4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "fire",
|
||||||
|
"unicode": "\ue6a1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "fire-filled",
|
||||||
|
"unicode": "\ue6c5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "flag",
|
||||||
|
"unicode": "\ue65f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "flag-filled",
|
||||||
|
"unicode": "\ue660"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "folder-add",
|
||||||
|
"unicode": "\ue6a9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "folder-add-filled",
|
||||||
|
"unicode": "\ue6c8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "font",
|
||||||
|
"unicode": "\ue6a3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "forward",
|
||||||
|
"unicode": "\ue6ba"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gear",
|
||||||
|
"unicode": "\ue664"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gear-filled",
|
||||||
|
"unicode": "\ue661"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gift",
|
||||||
|
"unicode": "\ue6a4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "gift-filled",
|
||||||
|
"unicode": "\ue6c4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-down",
|
||||||
|
"unicode": "\ue63d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-down-filled",
|
||||||
|
"unicode": "\ue63c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-up",
|
||||||
|
"unicode": "\ue63f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "hand-up-filled",
|
||||||
|
"unicode": "\ue63e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "headphones",
|
||||||
|
"unicode": "\ue630"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "heart",
|
||||||
|
"unicode": "\ue639"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "heart-filled",
|
||||||
|
"unicode": "\ue641"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "help",
|
||||||
|
"unicode": "\ue679"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "help-filled",
|
||||||
|
"unicode": "\ue674"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "home",
|
||||||
|
"unicode": "\ue662"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "home-filled",
|
||||||
|
"unicode": "\ue663"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "image",
|
||||||
|
"unicode": "\ue670"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "image-filled",
|
||||||
|
"unicode": "\ue678"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "images",
|
||||||
|
"unicode": "\ue650"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "images-filled",
|
||||||
|
"unicode": "\ue64b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "info",
|
||||||
|
"unicode": "\ue669"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "info-filled",
|
||||||
|
"unicode": "\ue649"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "left",
|
||||||
|
"unicode": "\ue6b7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "link",
|
||||||
|
"unicode": "\ue6a5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "list",
|
||||||
|
"unicode": "\ue644"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "location",
|
||||||
|
"unicode": "\ue6ae"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "location-filled",
|
||||||
|
"unicode": "\ue6af"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "locked",
|
||||||
|
"unicode": "\ue66b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "locked-filled",
|
||||||
|
"unicode": "\ue668"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "loop",
|
||||||
|
"unicode": "\ue633"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mail-open",
|
||||||
|
"unicode": "\ue643"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mail-open-filled",
|
||||||
|
"unicode": "\ue63a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map",
|
||||||
|
"unicode": "\ue667"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-filled",
|
||||||
|
"unicode": "\ue666"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-pin",
|
||||||
|
"unicode": "\ue6ad"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "map-pin-ellipse",
|
||||||
|
"unicode": "\ue6ac"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "medal",
|
||||||
|
"unicode": "\ue6a2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "medal-filled",
|
||||||
|
"unicode": "\ue6c3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mic",
|
||||||
|
"unicode": "\ue671"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "mic-filled",
|
||||||
|
"unicode": "\ue677"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "micoff",
|
||||||
|
"unicode": "\ue67e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "micoff-filled",
|
||||||
|
"unicode": "\ue6b0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "minus",
|
||||||
|
"unicode": "\ue66f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "minus-filled",
|
||||||
|
"unicode": "\ue67d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "more",
|
||||||
|
"unicode": "\ue64d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "more-filled",
|
||||||
|
"unicode": "\ue64e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "navigate",
|
||||||
|
"unicode": "\ue66e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "navigate-filled",
|
||||||
|
"unicode": "\ue67a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "notification",
|
||||||
|
"unicode": "\ue6a6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "notification-filled",
|
||||||
|
"unicode": "\ue6c1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperclip",
|
||||||
|
"unicode": "\ue652"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperplane",
|
||||||
|
"unicode": "\ue672"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "paperplane-filled",
|
||||||
|
"unicode": "\ue675"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "person",
|
||||||
|
"unicode": "\ue699"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "person-filled",
|
||||||
|
"unicode": "\ue69d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd",
|
||||||
|
"unicode": "\ue69f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd-filled",
|
||||||
|
"unicode": "\ue698"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "personadd-filled-copy",
|
||||||
|
"unicode": "\ue6d1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "phone",
|
||||||
|
"unicode": "\ue69c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "phone-filled",
|
||||||
|
"unicode": "\ue69b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plus",
|
||||||
|
"unicode": "\ue676"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plus-filled",
|
||||||
|
"unicode": "\ue6c7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "plusempty",
|
||||||
|
"unicode": "\ue67b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "pulldown",
|
||||||
|
"unicode": "\ue632"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "pyq",
|
||||||
|
"unicode": "\ue682"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "qq",
|
||||||
|
"unicode": "\ue680"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "redo",
|
||||||
|
"unicode": "\ue64a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "redo-filled",
|
||||||
|
"unicode": "\ue655"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refresh",
|
||||||
|
"unicode": "\ue657"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refresh-filled",
|
||||||
|
"unicode": "\ue656"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "refreshempty",
|
||||||
|
"unicode": "\ue6bf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "reload",
|
||||||
|
"unicode": "\ue6b2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "right",
|
||||||
|
"unicode": "\ue6b5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "scan",
|
||||||
|
"unicode": "\ue62a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "search",
|
||||||
|
"unicode": "\ue654"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "settings",
|
||||||
|
"unicode": "\ue653"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "settings-filled",
|
||||||
|
"unicode": "\ue6ce"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "shop",
|
||||||
|
"unicode": "\ue62f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "shop-filled",
|
||||||
|
"unicode": "\ue6cd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "smallcircle",
|
||||||
|
"unicode": "\ue67c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "smallcircle-filled",
|
||||||
|
"unicode": "\ue665"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "sound",
|
||||||
|
"unicode": "\ue684"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "sound-filled",
|
||||||
|
"unicode": "\ue686"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "spinner-cycle",
|
||||||
|
"unicode": "\ue68a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "staff",
|
||||||
|
"unicode": "\ue6a7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "staff-filled",
|
||||||
|
"unicode": "\ue6cb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "star",
|
||||||
|
"unicode": "\ue688"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "star-filled",
|
||||||
|
"unicode": "\ue68f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "starhalf",
|
||||||
|
"unicode": "\ue683"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "trash",
|
||||||
|
"unicode": "\ue687"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "trash-filled",
|
||||||
|
"unicode": "\ue685"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "tune",
|
||||||
|
"unicode": "\ue6aa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "tune-filled",
|
||||||
|
"unicode": "\ue6ca"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "undo",
|
||||||
|
"unicode": "\ue64f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "undo-filled",
|
||||||
|
"unicode": "\ue64c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "up",
|
||||||
|
"unicode": "\ue6b6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "top",
|
||||||
|
"unicode": "\ue6b6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "upload",
|
||||||
|
"unicode": "\ue690"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "upload-filled",
|
||||||
|
"unicode": "\ue68e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "videocam",
|
||||||
|
"unicode": "\ue68c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "videocam-filled",
|
||||||
|
"unicode": "\ue689"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "vip",
|
||||||
|
"unicode": "\ue6a8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "vip-filled",
|
||||||
|
"unicode": "\ue6c6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "wallet",
|
||||||
|
"unicode": "\ue6b1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "wallet-filled",
|
||||||
|
"unicode": "\ue6c2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "weibo",
|
||||||
|
"unicode": "\ue68b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"font_class": "weixin",
|
||||||
|
"unicode": "\ue691"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
## Icons 图标
|
||||||
|
> **组件名:uni-icons**
|
||||||
|
> 代码块: `uIcons`
|
||||||
|
|
||||||
|
用于展示 icons 图标 。
|
||||||
|
|
||||||
|
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
|
||||||
|
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
## 1.3.6(2024-10-15)
|
||||||
|
- 修复 微信小程序中的getSystemInfo警告
|
||||||
|
## 1.3.5(2024-10-12)
|
||||||
|
- 修复 微信小程序中的getSystemInfo警告
|
||||||
|
## 1.3.4(2024-10-12)
|
||||||
|
- 修复 微信小程序中的getSystemInfo警告
|
||||||
|
## 1.3.3(2022-01-20)
|
||||||
|
- 新增 showText属性 ,是否显示文本
|
||||||
|
## 1.3.2(2022-01-19)
|
||||||
|
- 修复 nvue 平台下不显示文本的bug
|
||||||
|
## 1.3.1(2022-01-19)
|
||||||
|
- 修复 微信小程序平台样式选择器报警告的问题
|
||||||
|
## 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-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
|
||||||
|
## 1.2.1(2021-08-24)
|
||||||
|
- 新增 支持国际化
|
||||||
|
## 1.2.0(2021-07-30)
|
||||||
|
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||||
|
## 1.1.8(2021-05-12)
|
||||||
|
- 新增 组件示例地址
|
||||||
|
## 1.1.7(2021-03-30)
|
||||||
|
- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
|
||||||
|
## 1.1.6(2021-02-05)
|
||||||
|
- 调整为uni_modules目录规范
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"uni-load-more.contentdown": "Pull up to show more",
|
||||||
|
"uni-load-more.contentrefresh": "loading...",
|
||||||
|
"uni-load-more.contentnomore": "No more data"
|
||||||
|
}
|
||||||