Commit 3e0d4cfe authored by jiaoyahui's avatar jiaoyahui

我的页面请求接口

parent 2cdd918c
...@@ -67,10 +67,25 @@ live: { ...@@ -67,10 +67,25 @@ live: {
}, },
buy_code:function(data){ buy_code:function(data){
return service.post('/wx/code', data) return service.post('/wx/code', data)
},
//我的用户反馈文本
feedback:function(data){
return service.post('/feedback/text', data)
},
deal:function(data){
return service.post('/feedback/deal', data)
},
userCenter:function(data){
return service.post('/douniu/userCenter', data)
},
sigurature:function(data){
return service.post('/upload/sigurature/'+11, data)
} }
}, },
} }
......
...@@ -9,9 +9,9 @@ const appName = "test5" ...@@ -9,9 +9,9 @@ const appName = "test5"
const IS_PROD = ["production", "prod"].includes(process.env.NODE_ENV); const IS_PROD = ["production", "prod"].includes(process.env.NODE_ENV);
// 接口路径 // 接口路径
const BASEURL_TEST = 'https://api.douniu8.com' const BASEURL_TEST = 'https://test6.douniu8.com'
// const BASEURL_TEST = 'http://39.105.193.58:8081' // const BASEURL_TEST = 'http://39.105.193.58:8081'
const BASEURL_PROD = 'https://api.douniu8.com' const BASEURL_PROD = 'https://test6.douniu8.com'
const CONTRACT_TEST = 'http://47.95.140.89:9090' const CONTRACT_TEST = 'http://47.95.140.89:9090'
const CONTRACT_PROD = 'http://ht.douniu8.com:9090' const CONTRACT_PROD = 'http://ht.douniu8.com:9090'
const baseURL = IS_PROD ? BASEURL_PROD : BASEURL_TEST; const baseURL = IS_PROD ? BASEURL_PROD : BASEURL_TEST;
......
...@@ -11,6 +11,13 @@ import VideoPlayer from 'vue-video-player' ...@@ -11,6 +11,13 @@ import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css' import 'vue-video-player/src/custom-theme.css'
import common from '../static/js/common.js' //公共方法 import common from '../static/js/common.js' //公共方法
import 'video.js/dist/video-js.css' import 'video.js/dist/video-js.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//引入 hls,视频直播(m3u8)必须引入的 //引入 hls,视频直播(m3u8)必须引入的
import 'videojs-contrib-hls' import 'videojs-contrib-hls'
//播放rtmp视频 //播放rtmp视频
...@@ -27,6 +34,8 @@ Vue.prototype.axios = axios; ...@@ -27,6 +34,8 @@ Vue.prototype.axios = axios;
Vue.prototype.router = router; Vue.prototype.router = router;
Vue.prototype.$md5 = md5; Vue.prototype.$md5 = md5;
Vue.prototype.common = common; //引入公共方法 Vue.prototype.common = common; //引入公共方法
Vue.use(ElementUI);
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router, router,
......
<template> <template>
<div class="videoPlayer"> <div class="videoPlayer">
<!-- <img src="../assets/left.png" alt="" class="Lent_p" @click="go"> -->
<!-- <LivePlayer :videoUrl="url" /> --> <!-- <LivePlayer :videoUrl="url" /> -->
<div class='demo'> <div class='demo'>
<video-player class="video-player vjs-custom-skin" <video-player class="video-player vjs-custom-skin"
ref="videoPlayer" ref="videoPlayer"
:playsinline="true" :playsinline="true"
...@@ -147,7 +148,7 @@ ...@@ -147,7 +148,7 @@
<div class="ov" :class="n==1?'active':''"> <div class="ov" :class="n==1?'active':''">
<div> <div>
<img src="../assets/niu.png" alt=""> <img src="../assets/niu.png" alt="">
<span>金牛(账户余额:20金牛)</span> <span>金牛(账户余额:{{dfNiubi}}金牛)</span>
</div> </div>
<!--未选中--> <!--未选中-->
<img src="../assets/noxuanzhong.png" alt="" class="Ig" v-show="n != 1" @click="slect_one(1)"> <img src="../assets/noxuanzhong.png" alt="" class="Ig" v-show="n != 1" @click="slect_one(1)">
...@@ -192,6 +193,7 @@ ...@@ -192,6 +193,7 @@
</div> </div>
<div class="gr"><img src="../assets/login.png" alt="" class="Pl" @click="login_t"></div> <div class="gr"><img src="../assets/login.png" alt="" class="Pl" @click="login_t"></div>
<img :src="'data:image/png;base64,'+ qrcodeSrc" alt="" > <img :src="'data:image/png;base64,'+ qrcodeSrc" alt="" >
</div> </div>
...@@ -274,11 +276,14 @@ export default { ...@@ -274,11 +276,14 @@ export default {
currentIndex:0, currentIndex:0,
isMobile: false, isMobile: false,
wechatInfo:'', wechatInfo:'',
ispay:'',
aliInfo:'',
//is_show_p:false //默认选中按钮隐藏 //is_show_p:false //默认选中按钮隐藏
// orderType : 4, //pc浏览器环境 // orderType : 4, //pc浏览器环境
// orderType : 3, //h5环境 // orderType : 3, //h5环境
wxOrderType: this.common.isMobile() && this.common.isWX() ? 2 : (this.common.isMobile() ? 3 : 4), wxOrderType: this.common.isMobile() && this.common.isWX() ? 2 : (this.common.isMobile() ? 3 : 4),
zfbOrderType: this.common.isMobile() && this.common.isWX() ? 2 : (this.common.isMobile() ? 3 : 4),
}; };
}, },
...@@ -348,6 +353,10 @@ export default { ...@@ -348,6 +353,10 @@ export default {
// clearInterval(this.setInterval); // clearInterval(this.setInterval);
}, },
methods: { methods: {
// go:function(){
// this.$router.push({name:'mine'})
// },
clickOpen(i){ clickOpen(i){
if(i==1){ if(i==1){
this.ifcli=true this.ifcli=true
...@@ -489,6 +498,7 @@ export default { ...@@ -489,6 +498,7 @@ export default {
this.server.live.payinfo(temp).then(res=>{ this.server.live.payinfo(temp).then(res=>{
this.udRealname=res.data.data.udRealname this.udRealname=res.data.data.udRealname
this.text=res.data.data.text, this.text=res.data.data.text,
this.dfNiubi = res.data.data.dfNiubi,
this.Listfor =res.data.data.fees this.Listfor =res.data.data.fees
// this.lvrStatus=res.data.data.lvrStatus // this.lvrStatus=res.data.data.lvrStatus
...@@ -527,8 +537,102 @@ export default { ...@@ -527,8 +537,102 @@ export default {
}else{ }else{
} }
if(this.n ==1 ){
this.niubi()
}
if(this.n ==2 ){
this.paybuy() this.paybuy()
} }
if(this.n == 3){
this.z_pay()
}
}
})
},
niubi(){
//判断在微信内置浏览器jsapi支付
//jsapi
let temp=this.qs.stringify({
orderId:this.pmoId,
orderNo:this.pmoOrder,
payType:0,
orderType: this.zfbOrderType,
pmoType:0,
goodsType:3,
aliOrderType:1
})
this.server.live.buy(temp).then(res=>{
if(res.data.data.businessCode == 10){
alert('支付成功')
// window.location.href="/live"
}
this.aliInfo=res.data.data.aliInfo;
// this.wechatInfo=res.data.data.wechatInfo
//微信内置jsapi
if(this.wxOrderType == 2){
this.onBridgeReady();
}
//二维码
if(this.wxOrderType == 4){
//弹窗展示二维码
this.qrcodeSrc=res.data.data.wechatInfo.base64Img;
}
//移动端外部浏览器
if(this.wxOrderType == 3){
//跳转h5支付链接00 ll
// window.location.href=res.data.data.aliInfo;
}
})
},
//支付宝
z_pay(){
//判断在微信内置浏览器jsapi支付
//jsapi
let temp=this.qs.stringify({
orderId:this.pmoId,
orderNo:this.pmoOrder,
payType:2,
orderType: this.zfbOrderType,
pmoType:0,
goodsType:3,
aliOrderType:1
})
this.server.live.buy(temp).then(res=>{
this.aliInfo=res.data.data.aliInfo;
// this.wechatInfo=res.data.data.wechatInfo
//微信内置jsapi
if(this.wxOrderType == 2){
this.onBridgeReady();
}
//二维码
if(this.wxOrderType == 4){
//弹窗展示二维码
this.qrcodeSrc=res.data.data.wechatInfo.base64Img;
}
//移动端外部浏览器
if(this.wxOrderType == 3){
//跳转h5支付链接00 ll
window.location.href=res.data.data.aliInfo;
}
}) })
}, },
...@@ -555,6 +659,7 @@ export default { ...@@ -555,6 +659,7 @@ export default {
this.qrcodeSrc=res.data.data.wechatInfo.base64Img; this.qrcodeSrc=res.data.data.wechatInfo.base64Img;
this.wechatInfo=res.data.data.wechatInfo this.wechatInfo=res.data.data.wechatInfo
//微信内置jsapi //微信内置jsapi
if(this.wxOrderType == 2){ if(this.wxOrderType == 2){
this.onBridgeReady(); this.onBridgeReady();
...@@ -568,11 +673,13 @@ export default { ...@@ -568,11 +673,13 @@ export default {
} }
//移动端外部浏览器 //移动端外部浏览器
if(this.wxOrderType == 3){ if(this.wxOrderType == 3){
//跳转h5支付链接 //跳转h5支付链接00 ll
window.location.href=res.data.data.wechatInfo.payUrl // window.location.href=res.data.data.wechatInfo.payUrl
} }
}) })
}, },
...@@ -619,6 +726,7 @@ export default { ...@@ -619,6 +726,7 @@ export default {
}, },
slect_one(val){ slect_one(val){
this.n = val this.n = val
}, },
pay_p(){ pay_p(){
this.pten = true this.pten = true
...@@ -1002,7 +1110,7 @@ display: block; ...@@ -1002,7 +1110,7 @@ display: block;
} }
.conten{ .conten{
position: fixed; position: fixed;
bottom: 0%; bottom: -210px;
left: 0%; left: 0%;
width: 100%; width: 100%;
/* background: red; */ /* background: red; */
......
<template> <template>
<div class="abont"> <div class="abont">
<div>关于我们</div> <img src="../../assets/left.png" alt="" class="Lent_p" @click="go">
<div class="abt">关于我们</div>
<img src="../../assets/about.png" alt=""> <img src="../../assets/about.png" alt="">
</div> </div>
</template> </template>
...@@ -16,6 +18,10 @@ export default { ...@@ -16,6 +18,10 @@ export default {
this.beforeCreate() this.beforeCreate()
}, },
methods: { methods: {
go:function(){
this.$router.push({name:'mine'})
},
beforeCreate () { beforeCreate () {
document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);') document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);')
}, },
...@@ -37,5 +43,18 @@ export default { ...@@ -37,5 +43,18 @@ export default {
font-weight: 600; font-weight: 600;
color: #222222; color: #222222;
line-height: 22px; line-height: 22px;
position: relative;
} }
.Lent_p{
width: 5.93333vw;
height: 5.33333vw;
position: absolute;
top: 1.06667vw;
left: 10px;
}
.abt{
margin-bottom: 20px;
}
</style> </style>
<template> <template>
<div class="cont"> <div class="cont">
<img src="../../assets/left.png" alt="" class="Lent_p" @click="go">
<div class="brow">我的浏览</div> <div class="brow">我的浏览</div>
<div class="time">一天之内</div> <div class="time">一天之内</div>
<div class="Flor"> <div class="Flor" v-for="(item,index) in lists " data-type="0" :key="index" @touchstart.capture="touchStart" @touchend.capture="touchEnd" @click="oneself">
<div><img src="../../assets/let.png" alt="" class="Pong"></div> <div><img src="../../assets/let.png" alt="" class="Pong"></div>
<div class="name"> <div class="name">
<div>行业时间</div> <div>{{item.title}}</div>
<div class="Ti">林秋平</div> <div class="Ti">{{item.name}}</div>
<div class="Ti">今天:9:30</div> <div class="Ti">{{item.time}}</div>
</div> </div>
<div class="removeBtn" @click="remove" :data-index="index">删除</div>
</div> </div>
<div class="timetwo">更早</div> <div class="timetwo">更早</div>
<div class="Flor"> <div class="Flor">
...@@ -34,13 +36,88 @@ ...@@ -34,13 +36,88 @@
export default { export default {
data () { data () {
return {} return {
startX: 0, //滑动开始
endX: 0, //滑动结束
lists:[
{
title: "行业时间",
name: "副标题2",
time: "¥58.00",
}
]
}
}, },
created () { }, created () { },
mounted () { mounted () {
this.beforeCreate() this.beforeCreate()
}, },
methods: { methods: {
// 向左滑动出现删除按钮时,点击商品信息区域取消删除
oneself() {
if (this.checkSlide()) {
this.restSlide();
} else {
// 点击商品信息弹出弹框
alert("hello Word!");
}
},
//滑动开始
touchStart(e) {
// 记录初始位置
this.startX = e.touches[0].clientX;
},
//滑动结束
touchEnd(e) {
// 当前滑动的父级元素
let parentElement = e.currentTarget.parentElement;
// 记录结束位置
this.endX = e.changedTouches[0].clientX;
// 左滑大于30距离删除出现
if (parentElement.dataset.type == 0 && this.startX - this.endX > 30) {
this.restSlide();
parentElement.dataset.type = 1;
}
// 右滑
if (parentElement.dataset.type == 1 && this.startX - this.endX < -30) {
this.restSlide();
parentElement.dataset.type = 0;
}
this.startX = 0;
this.endX = 0;
},
//判断当前是否有滑块处于滑动状态
checkSlide() {
let listItems = document.querySelectorAll(".li_vessel");
for (let i = 0; i < listItems.length; i++) {
if (listItems[i].dataset.type == 1) {
return true;
}
}
return false;
},
//复位滑动状态
restSlide() {
let listItems = document.querySelectorAll(".li_vessel");
// 复位
for (let i = 0; i < listItems.length; i++) {
listItems[i].dataset.type = 0;
}
},
//删除数据信息
remove(e) {
// 当前索引值
let index = e.currentTarget.dataset.index;
// 复位
this.restSlide();
// 删除数组lists中一个数据
this.lists.splice(index, 1);
},
go:function(){
this.$router.push({name:'mine'})
},
beforeCreate () { beforeCreate () {
document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);') document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);')
}, },
...@@ -56,12 +133,22 @@ export default { ...@@ -56,12 +133,22 @@ export default {
<style scoped> <style scoped>
body{ body{
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #9c8888; background-color: #9c8888;
position: fixed; position: fixed;
} }
.Lent_p{
width: 5.93333vw;
height: 5.33333vw;
position: absolute;
top: 3.06667vw;
left: 7px;
}
.brow{ .brow{
text-align:center; text-align:center;
...@@ -71,6 +158,7 @@ export default { ...@@ -71,6 +158,7 @@ export default {
font-weight: 600; font-weight: 600;
color: #222222; color: #222222;
line-height: 22px; line-height: 22px;
margin-bottom: 20px;
} }
.time{ .time{
font-size: 4.26667vw; font-size: 4.26667vw;
...@@ -120,4 +208,19 @@ export default { ...@@ -120,4 +208,19 @@ export default {
color: #666666; color: #666666;
line-height: 20px; line-height: 20px;
} }
.removeBtn {
width: 14.06667vw;
height: 31.46667vw;
background: #ff4949;
font-size: 4.26667vw;
color: #fff;
text-align: center;
line-height: 5.86667vw;
position: absolute;
top: 84px;
right: -14.06667vw;
line-height: 27.46667vw;
text-align: center;
border-radius: 0.53333vw;
}
</style> </style>
<template> <template>
<div class="flow">
<div class="sent">我的关注</div>
<div class="cont"> <div class="cont">
<div class="Img_p"> <img src="../../assets/left.png" alt="" class="Lent_p" @click="go">
<img src="../../assets/toux.png" alt=""> <div class="brow">我的关注</div>
<img src="../../assets/y.png" alt="" class="Y_p">
<div class="Pelo"> <div class="Flor">
<div style="display:flex">
<img src="../../assets/toux.png" alt="" class="Pong">
<div class="name">
<div>林秋平</div> <div>林秋平</div>
<div class="wen">这是一段文字</div> <div class="Ti">文字</div>
</div>
</div>
<div>
<img src="../../assets/vit.png" alt="" class="Y_two">
</div> </div>
</div> </div>
<div class="cont"> <div class="J_go">
<div class="Img_p"> <img src="../../assets/follow.png" alt="" class="Img_s" @click="fotwo" v-if="isactiveTwo">
<img src="../../assets/toux.png" alt=""> <img src="../../assets/vit.png" alt="" class="Img_s" @click="fo" v-if="isactive">
<img src="../../assets/y.png" alt="" class="Y_p">
<div class="Pelo">
<div>林秋平</div>
<div class="wen">这是一段文字</div>
</div> </div>
</div> </div>
<div>
<img src="../../assets/vit.png" alt="" class="Y_two">
</div>
</div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { shallowReactive } from 'vue'
export default { export default {
data () { data () {
return {} return {
isactive:false,
isactiveTwo:true
}
}, },
created () { }, created () { },
mounted () { mounted () {
this.beforeCreate()
// this.beforeCreate()
}, },
methods: { methods: {
fotwo:function(){
this.isactiveTwo = false;
this.isactive = true;
},
fo:function(){
this.isactiveTwo = true;
this.isactive = false;
},
go:function(){
this.$router.push({name:'mine'})
},
beforeCreate () { beforeCreate () {
document.querySelector('body').setAttribute('style', 'background-color:#F7F7F7;') document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);')
}, },
beforeDestroy () { beforeDestroy () {
document.querySelector('body').removeAttribute('style') document.querySelector('body').removeAttribute('style')
} }
}, }
components: {}
} }
</script> </script>
<style scoped> <style scoped>
.flow .sent{ body{
text-align: center; width: 100%;
margin-top: 5.33333vw; height: 100%;
font-size: 4.26667vw; background-color: #9c8888;
position: fixed;
}
.J_go{
line-height: 90px;
}
.Img_s{
width: 64px;
height: 23px;
margin-right: 15px;
}
.Lent_p{
width: 5.93333vw;
height: 5.33333vw;
position: absolute;
top: 6.06667vw;
}
.brow{
text-align:center;
margin-top: 10px;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
position: relative;
color: #222222; color: #222222;
justify-content: space-around; line-height: 22px;
} }
.cont .Img_p img{ .time{
font-size: 4.26667vw;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #2C2C2C;
line-height: 5.86667vw;
margin-left: 20px;
}
.timetwo{
font-size: 4.26667vw;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #2C2C2C;
line-height: 5.86667vw;
margin-left: 5.33333vw;
margin-top: 20px;
}
.Pong{
width: 64px; width: 64px;
padding-right: 10px;
height: 64px; height: 64px;
padding-top: 12px; }
.Flor{
}
.cont{
display: flex; display: flex;
justify-content: space-around; justify-content:space-between;
margin-top: 9.33333vw; margin-left: 8.26667vw;
margin-top: 8.26667vw;
background: #FFFFFF;
width: 90.4vw; width: 90.4vw;
height: 26.66667vw; height: 26.66667vw;
padding-top: 5.33333vw;
margin: 0 auto; margin: 0 auto;
margin-top: 5.33333vw; padding-left: 5.33333vw;
background: #ffffff; margin-top: 8.66667vw;
}
.cont .Img_p .Y_p{
width: 11.73333vw;
height: 5.6vw;
position: absolute;
left: 2.2vw;
top: 14.4vw;
} }
.name div{
.Img_p{ height: 22px;
display: flex; font-size: 16px;
position: relative; font-family: PingFangSC-Semibold, PingFang SC;
} font-weight: 600;
.cont .Y_two{ color: #2C2C2C;
width: 64px;
height: 23px;
margin-top: 9vw;
}
.Pelo{
margin-top: 5.66667vw;
margin-left: 10px;
} }
.Pelo .wen{ .name .Ti{
margin-top: 10px; font-size: 14px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #656565; color: #666666;
line-height: 17px; line-height: 20px;
} }
</style> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div> <div>
<div class="Plog"> <div class="Plog">
<div> <div>
<img class="portait-not" src="../../assets/title_logo.png" alt=""> <img class="portait-not" :src="avatar" alt="">
</div> </div>
<div class="Login"> <div class="Login">
<span>登录</span><span>/注册</span> <span>登录</span><span>/注册</span>
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
<div class="grounp_p"> <div class="grounp_p">
<div class="grounp"> <div class="grounp">
<span>*****</span> <span>{{todayJifen}}</span>
<div>今日积分</div> <div>今日积分</div>
</div> </div>
<div class="grounp"> <div class="grounp">
<span>*****</span> <span>{{totalJifen}} </span>
<div>累计积分</div> <div>累计积分</div>
</div> </div>
<div class="grounp"> <div class="grounp">
<span>*****</span> <span>{{totalNiubi}}</span>
<div>我的金牛</div> <div>我的金牛</div>
</div> </div>
...@@ -84,14 +84,51 @@ ...@@ -84,14 +84,51 @@
export default { export default {
data () { data () {
return { return {
url:'https://activity.douniu8.com/yinsizhengce/html/privacy.html' url:'https://activity.douniu8.com/yinsizhengce/html/privacy.html',
totalNiubi:'',
totalJifen:'',
todayJifen:'',
userInfo:'',
avatar:''
} }
}, },
created () { }, created () { },
mounted () { mounted () {
this.beforeCreate() this.beforeCreate()
// 调用判断ios与安卓方法
// this.appDown();
this.userCenter()
}, },
methods: { methods: {
// 判断是安卓还是ios
// appDown() {
// var u = navigator.userAgent;
// var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
// var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
// if(isiOS){
// this.isApple = true
// window.location.href="https://itunes.apple.com/cn/app/%E6%96%97%E7%89%9B%E8%B4%...8F/id1262900139?mt=8"
// }else if(isAndroid){
// this.isApple = false
// }
// },
userCenter(){
let temp=this.qs.stringify({
})
this.server.live.userCenter(temp).then(res=>{
if(res.code=200){
console.log(res.data.data.totalNiubi,'ppp')
this.totalNiubi = res.data.data.totalNiubi
// this.totalJifen = res.data.data.totalJifen
// this.todayJifen = res.data.data.todayJifen
this.avatar = res.data.data.userInfo.avatar
}
})
},
beforeCreate () { beforeCreate () {
document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);') document.querySelector('body').setAttribute('style', 'background-color:rgba(247, 247, 247, 1);')
}, },
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment