diff --git a/api/live.js b/api/live.js
new file mode 100644
index 0000000..a1d1b84
--- /dev/null
+++ b/api/live.js
@@ -0,0 +1,144 @@
+import request from "@/utils/requestc.js";
+import requesta from "@/utils/request.js";
+/**
+ * 直播列表
+ */
+export function live(data) {
+ return request.get("zhibo/live" ,data);
+}
+
+/**
+ * 直播详情
+ */
+export function liveDetail(data) {
+ return request.get("zhibo/liveDetail" ,data);
+}
+
+
+/**
+ * 获取直播详情接口
+ */
+
+
+/**
+ * 创建直播间
+ */
+export function createPushLive(data) {
+ return request.post("zhibo/createPushLive", data);
+}
+
+
+/**
+ * 关闭直播间
+ */
+export function stopPushLive(data) {
+ return request.post("zhibo/stopPushLive", data);
+}
+
+
+/**
+ * 绑定用户client客户
+ */
+export function bindUser(data) {
+ return request.post("zhibo/bindUser", data);
+}
+
+
+
+/**
+ * 加入直播间聊天室
+ */
+export function joinChatRoom(data) {
+ return request.post("zhibo/joinChatRoom", data);
+}
+
+
+/**
+ * 直播间聊天室发言
+ */
+export function sendGroupMessage(data) {
+ return request.post("zhibo/sendGroupMessage", data);
+}
+
+
+
+//商品列表
+export function good(data) {
+ return requesta.get("product/spu/lst", data);
+}
+
+/**
+ * 获取用户信息
+ *
+ */
+export function getUserInfo() {
+ return request.get('user');
+}
+
+
+//关注
+export function getfans(id,data) {
+ return requesta.post('community/fans/'+id,data);
+}
+
+//我关注的人
+export function getfocuslst(data) {
+ return requesta.post('community/focus/lst',data);
+}
+
+//关注我的人
+export function getfanslst(data) {
+ return requesta.post('community/fans/lst',data);
+}
+
+//用户送礼
+export function reward(data) {
+ return request.post('zhibo/reward',data);
+}
+//获取礼物
+export function rewardList(data) {
+ return requesta.get('zhibo/rewardList',data);
+}
+
+//获取礼物
+export function giftList(data) {
+ return request.get('zhibo/giftList',data);
+}
+
+//获取房间人数
+export function liveAudience(data) {
+ return request.get('zhibo/liveAudience',data);
+}
+
+//获取用户余额
+export function getuser(data) {
+ return requesta.get('user',data);
+}
+
+
+//送礼
+export function sendGift(data) {
+ return request.post('zhibo/sendGift',data);
+}
+
+/**
+ * 充值金额选择
+ */
+export function getRechargeApi() {
+ return requesta.get("common/recharge_quota");
+}
+
+//历史直播记录
+
+export function playbackList(data) {
+ return request.get("zhibo/playbackList",data);
+}
+
+//获取直播回放详情
+export function playbackDetail(data) {
+ return request.get("zhibo/playbackDetail",data);
+}
+//获取观众关注主播状态
+export function getAjuser(id) {
+ return requesta.get(`community/user/info/${id}`);
+}
\ No newline at end of file
diff --git a/components/gb-popup/gb-popup.vue b/components/gb-popup/gb-popup.vue
new file mode 100644
index 0000000..12dcd71
--- /dev/null
+++ b/components/gb-popup/gb-popup.vue
@@ -0,0 +1,168 @@
+
+
+
+
+ {{title}}
+
+
+
+
+ {{nName}}
+
+
+
+
+ {{lName}}
+
+
+ {{rName}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/sd-live-page/histroy.nvue b/components/sd-live-page/histroy.nvue
new file mode 100644
index 0000000..7b28924
--- /dev/null
+++ b/components/sd-live-page/histroy.nvue
@@ -0,0 +1,2085 @@
+
+
+
+
+
+
+
+
+
+ {{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}
+
+
+ 4000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 礼物
+
+
+
+ {{now_money}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{litem.gift_name}}
+
+
+
+
+ {{litem.gift_price}}
+
+
+ 赠送
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{roomDetail.live_name}}
+
+
+
+
+
+
+
+
+
+
+
+ {{litem.app_goods_name}}
+
+
+ ¥
+ {{litem.app_goods_price.split('.')[0]}}.
+ {{litem.app_goods_price.split('.')[1]}}
+
+ 去抢购
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的金币
+
+
+
+
+
+
+
+ 金币充值
+
+
+
+
+
+
+
+ 最低可充值1元
+
+
+ {{item.data.give}}金币
+ {{item.data.price}}元
+
+
+
+
+
+ 立即充值
+
+
+
+
+
+
+
+
+
+
+
+
+ {{gift.app_user_name}}
+ 送{{room.app_user_name}}{{gift.gift_name}}
+
+
+
+
+
+
+
+ {{gift.gift_num}}
+
+
+
+
+
+
+
+
+ 2
+
+
+ {{join.message}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/sd-live-page/livepage.nvue b/components/sd-live-page/livepage.nvue
new file mode 100644
index 0000000..2f26c0b
--- /dev/null
+++ b/components/sd-live-page/livepage.nvue
@@ -0,0 +1,2088 @@
+
+
+
+
+
+
+
+
+
+ {{room.live_name.length>6?room.live_name.substring(0, 6)+'...': room.live_name}}
+
+
+ 4000
+
+
+
+ 关注
+ 已关注
+
+
+
+
+
+
+
+
+
+
+ {{users.length}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发送
+
+
+
+
+
+
+ 说点什么..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 礼物
+
+
+
+ {{now_money}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{litem.gift_name}}
+
+
+
+
+ {{litem.gift_price}}
+
+
+ 赠送
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{roomDetail.live_name}}
+
+
+
+
+
+
+
+
+
+
+
+ {{litem.app_goods_name}}
+
+
+ ¥
+ {{litem.app_goods_price.split('.')[0]}}.
+ {{litem.app_goods_price.split('.')[1]}}
+
+ 去抢购
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的金币
+
+
+
+
+
+
+
+ 金币充值
+
+
+
+
+
+
+
+ 最低可充值1元
+
+
+ {{item.data.give}}金币
+ {{item.data.price}}元
+
+
+
+
+
+ 立即充值
+
+
+
+
+
+
+
+
+
+
+
+
+ {{gift.app_user_name}}
+ 送{{room.app_user_name}}{{gift.gift_name}}
+
+
+
+
+
+
+
+ {{gift.gift_num}}
+
+
+
+
+
+
+
+
+ 2
+
+
+ {{join.message}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/img/X.png b/static/img/X.png
new file mode 100644
index 0000000..74f2523
Binary files /dev/null and b/static/img/X.png differ
diff --git a/static/img/close.png b/static/img/close.png
new file mode 100644
index 0000000..74ea90c
Binary files /dev/null and b/static/img/close.png differ
diff --git a/static/img/colse1.png b/static/img/colse1.png
new file mode 100644
index 0000000..4c0e6c1
Binary files /dev/null and b/static/img/colse1.png differ
diff --git a/static/img/gn.png b/static/img/gn.png
new file mode 100644
index 0000000..c0bc715
Binary files /dev/null and b/static/img/gn.png differ
diff --git a/static/img/jb.png b/static/img/jb.png
new file mode 100644
index 0000000..2edce60
Binary files /dev/null and b/static/img/jb.png differ
diff --git a/static/img/li.png b/static/img/li.png
new file mode 100644
index 0000000..9e57558
Binary files /dev/null and b/static/img/li.png differ
diff --git a/static/img/shanpin.png b/static/img/shanpin.png
new file mode 100644
index 0000000..d4437e6
Binary files /dev/null and b/static/img/shanpin.png differ
diff --git a/static/img/zhi.png b/static/img/zhi.png
new file mode 100644
index 0000000..c9e7420
Binary files /dev/null and b/static/img/zhi.png differ
diff --git a/utils/requesta.js b/utils/requesta.js
index 8aa7a8f..92167ae 100644
--- a/utils/requesta.js
+++ b/utils/requesta.js
@@ -28,9 +28,6 @@ function baseRequest(url, method, data, {
}) {
let Url = HTTP_REQUEST_URL,
header = HEADER;
-
-
-
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
return new Promise((reslove, reject) => {
@@ -50,7 +47,10 @@ function baseRequest(url, method, data, {
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data);
- } else if (res.data.status == 501) {
+ } else if (res.data.code==0||res.data.code==1) {
+
+ reslove(res.data, res);
+ }else if (res.data.status == 501) {
uni.reLaunch({
url: '/pages/error/index'
})
diff --git a/utils/requestb.js b/utils/requestb.js
index 9e916fe..8abea1a 100644
--- a/utils/requestb.js
+++ b/utils/requestb.js
@@ -8,7 +8,7 @@
// | Author: CRMEB Team
// +----------------------------------------------------------------------
import {
- HTTP_REQUEST_URL,
+
HTTP_REQUEST_URL_FOUR,
HEADER,
TOKENNAME
@@ -44,9 +44,9 @@ function baseRequest(url, method, data, {
data: data || {},
success: (res) => {
// #ifdef APP-PLUS
- // console.log('app', Url + '/api/' + url, res.data);
+ console.log('app', Url + '/api/' + url,res);
// #endif
- // console.log(res.data.code)
+
if (noVerify)
reslove(res.data, res);
else if (res.data.status == 200)
@@ -54,7 +54,10 @@ function baseRequest(url, method, data, {
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data);
- } else if (res.data.status == 501) {
+ } else if (res.data.code==0||res.data.code==1) {
+
+ reslove(res.data, res);
+ }else if (res.data.status == 501) {
uni.reLaunch({
url: '/pages/error/index'
})
diff --git a/utils/requestc.js b/utils/requestc.js
new file mode 100644
index 0000000..303b763
--- /dev/null
+++ b/utils/requestc.js
@@ -0,0 +1,75 @@
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team
+// +----------------------------------------------------------------------
+import {
+ HTTP_REQUEST_URL,
+ HEADER,
+ TOKENNAME
+} from '@/config/live.js';
+
+import store from '../store';
+/**
+ * 发送请求
+ */
+function baseRequest(url, method, data, {
+ noAuth = false,
+ noVerify = false
+}) {
+ let Url = HTTP_REQUEST_URL,
+ header = HEADER;
+
+
+
+ if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
+
+ return new Promise((reslove, reject) => {
+ uni.request({
+ url: Url + '/api/' + url,
+ method: method || 'GET',
+ header: header,
+ data: data || {},
+ success: (res) => {
+ // #ifdef APP-PLUS
+ // console.log('app', Url + '/api/' + url, method);
+ // #endif
+ if (noVerify)
+ reslove(res.data, res);
+ else if (res.data.status == 200)
+ reslove(res.data, res);
+ else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
+
+ reject(res.data);
+ } else if (res.data.code==0||res.data.code==1) {
+
+ reslove(res.data, res);
+ }else if (res.data.status == 501) {
+ uni.reLaunch({
+ url: '/pages/error/index'
+ })
+ reject(res.data);
+ } else
+ reject(res.data.message || '系统错误');
+ },
+ fail: (message) => {
+ console.log(url, method, data)
+ reject('请求失败',message);
+ }
+ })
+ });
+}
+
+const request = {};
+
+['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
+ request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
+});
+
+
+
+export default request;
\ No newline at end of file