This commit is contained in:
蔡同学
2025-08-25 11:20:35 +08:00
parent 25df08ec69
commit 6df8112e7b
251 changed files with 34346 additions and 0 deletions
+925
View File
@@ -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>
+47
View File
@@ -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>
+92
View File
@@ -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>
+121
View File
@@ -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>
+64
View File
@@ -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>
+153
View File
@@ -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&&region.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>
File diff suppressed because one or more lines are too long
+449
View File
@@ -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>
+123
View File
@@ -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>
+192
View File
@@ -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>
+71
View File
@@ -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>
+236
View File
@@ -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>
+356
View File
@@ -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>
+102
View File
@@ -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>
+286
View File
@@ -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>
+394
View File
@@ -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>
+223
View File
@@ -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>
+253
View File
@@ -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>
+260
View File
@@ -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>
+226
View File
@@ -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>
+276
View File
@@ -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>
+297
View File
@@ -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>
+134
View File
@@ -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>
+163
View File
@@ -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>
+661
View File
@@ -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>
+180
View File
@@ -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>
+361
View File
@@ -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>
+119
View File
@@ -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>
+170
View File
@@ -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>
+217
View File
@@ -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>
+25
View File
@@ -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>
+153
View File
@@ -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>
+970
View File
@@ -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>
+913
View File
@@ -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>
+174
View File
@@ -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>
+165
View File
@@ -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>
+206
View File
@@ -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>
+139
View File
@@ -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>
+160
View File
@@ -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>