xbx #118
@ -1024,3 +1024,7 @@ export async function interests() {
|
|||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getset() {
|
||||||
|
const res = await get('getset');
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="icons">
|
<div class="icons">
|
||||||
<img src="@/static/images/camera.png" alt="" class="icon">
|
<img src="@/static/images/camera.png" @click="sendmasg" alt="" class="icon">
|
||||||
<img src="@/static/images/vol.png" alt="" class="icon">
|
<img src="@/static/images/vol.png" alt="" class="icon">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -147,5 +147,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
export default defineComponent({});
|
export default defineComponent({
|
||||||
|
setup(prop,context){
|
||||||
|
function sendmasg(){
|
||||||
|
context.emit("sentext")
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
sendmasg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
@ -189,7 +189,6 @@ export default {
|
|||||||
xuanzezhanghu: "Select account",
|
xuanzezhanghu: "Select account",
|
||||||
tixianjine: "Withdrawal amount",
|
tixianjine: "Withdrawal amount",
|
||||||
quanbujine: "Total amount",
|
quanbujine: "Total amount",
|
||||||
tixianzhu: "Note: 0.1% service fee will be charged for each withdrawal, with a minimum of ¥ 0.1",
|
|
||||||
yueshu: "Your balance is only",
|
yueshu: "Your balance is only",
|
||||||
zuiditixian: "Minimum withdrawal amount ¥ 100",
|
zuiditixian: "Minimum withdrawal amount ¥ 100",
|
||||||
mingxichaxun: "Details inquiry",
|
mingxichaxun: "Details inquiry",
|
||||||
@ -297,5 +296,8 @@ export default {
|
|||||||
kaihuhangweikong:"Swiftcode cannot be empty",
|
kaihuhangweikong:"Swiftcode cannot be empty",
|
||||||
shensu:"Appeal",
|
shensu:"Appeal",
|
||||||
querenquxiao: "Are you sure to cancel the live broadcast?",
|
querenquxiao: "Are you sure to cancel the live broadcast?",
|
||||||
tianjiatixian: "Add a withdrawal account"
|
tianjiatixian: "Add a withdrawal account",
|
||||||
|
shichangtishi:"",
|
||||||
|
renshutishi: '',
|
||||||
|
tixianzhu: "",
|
||||||
}
|
}
|
@ -1,9 +1,19 @@
|
|||||||
import zh from "./zh"
|
import zh from "./zh"
|
||||||
import en from "./en"
|
import en from "./en"
|
||||||
|
import { getset } from '@/api';
|
||||||
|
getset().then((res: any)=>{
|
||||||
|
zh.shichangtishi = `最短${res.timeLowerLimit}min, 最长${res.timeCeiling}min`
|
||||||
|
en.shichangtishi = `The shortest is ${res.timeLowerLimit}min and the longest is ${res.timeCeiling}min`
|
||||||
|
zh.renshutishi = `最少${res.lowerLimit}人, 最多${res.numberCeiling}人`
|
||||||
|
en.shichangtishi = `Minimum ${res.lowerLimit} person, maximum ${res.numberCeiling} people`
|
||||||
|
zh.tixianzhu = `注:每笔提现收取${res.sxf}服务费,最低${ res.symbol + res.minmoney }`
|
||||||
|
en.tixianzhu = `Note: ${res.sxf} service fee will be charged for each withdrawal, with a minimum of ${ res.symbol + res.minmoney }`
|
||||||
|
})
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
locale: "zh", //默认语言
|
locale: "zh", //默认语言
|
||||||
messages: {
|
messages: {
|
||||||
zh,
|
zh: zh,
|
||||||
en
|
en: en
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -192,7 +192,6 @@ export default {
|
|||||||
xuanzezhanghu:"选择账户",
|
xuanzezhanghu:"选择账户",
|
||||||
tixianjine:"提现金额",
|
tixianjine:"提现金额",
|
||||||
quanbujine:"全部金额",
|
quanbujine:"全部金额",
|
||||||
tixianzhu:"注:每笔提现收取0.1%服务费,最低¥0.1",
|
|
||||||
yueshu:"您的余额只有",
|
yueshu:"您的余额只有",
|
||||||
zuiditixian:"最低提现金额¥100",
|
zuiditixian:"最低提现金额¥100",
|
||||||
mingxichaxun:"明细查询",
|
mingxichaxun:"明细查询",
|
||||||
@ -297,5 +296,8 @@ export default {
|
|||||||
kaihuhangweikong:"开户行不能为空",
|
kaihuhangweikong:"开户行不能为空",
|
||||||
shensu:"申诉",
|
shensu:"申诉",
|
||||||
querenquxiao: "您确认取消直播吗?",
|
querenquxiao: "您确认取消直播吗?",
|
||||||
tianjiatixian: "添加提现账户"
|
tianjiatixian: "添加提现账户",
|
||||||
|
shichangtishi:"",
|
||||||
|
renshutishi: '',
|
||||||
|
tixianzhu:"",
|
||||||
}
|
}
|
5
src/import-png.d.ts
vendored
5
src/import-png.d.ts
vendored
@ -13,4 +13,9 @@ declare module "ant-design-vue/es/locale/zh_CN" {
|
|||||||
export default value;
|
export default value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module 'tim-js-sdk'{
|
||||||
|
const value: any;
|
||||||
|
export default value;
|
||||||
|
}
|
||||||
|
|
||||||
declare var FB: any;
|
declare var FB: any;
|
@ -126,7 +126,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, onMounted, ref, toRaw } from "vue";
|
import { computed, defineComponent, onMounted, ref, toRaw } from "vue";
|
||||||
import NavBottom from "@/components/NavBottom.vue";
|
import NavBottom from "@/components/NavBottom.vue";
|
||||||
import { cashout, getwallect } from "@/api";
|
import { cashout, getwallect } from "@/api";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
@ -154,7 +154,7 @@ export default defineComponent({
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
};
|
};
|
||||||
const yue=ref<number>(store.state.userinfo.moneyValue)
|
const yue=ref<number>(store.state.userinfo.moneyValue)
|
||||||
const danwei = ref(store.state.userinfo.symbol)
|
const danwei = computed(() => store.state.userinfo.symbol)
|
||||||
// const yue = ref<number>(10000);
|
// const yue = ref<number>(10000);
|
||||||
// yue.value=store.state.userinfo.money
|
// yue.value=store.state.userinfo.money
|
||||||
const accountlist = ref<Array<any>>([]);
|
const accountlist = ref<Array<any>>([]);
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
<span class="unit">{{ lan.$t("fenzhong") }}</span>
|
<span class="unit">{{ lan.$t("fenzhong") }}</span>
|
||||||
<div style="color: red;font-size: 0.12rem;line-height: 1.3;">*最短30min, 最长120min</div>
|
<div style="color: red;font-size: 0.12rem;line-height: 1.3;">*{{ lan.$t('shichangtishi') }}</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="lan.$t('zhiborenshu')"
|
:label="lan.$t('zhiborenshu')"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<LiveingWatcher></LiveingWatcher>
|
<LiveingWatcher @sentext="sendtext"></LiveingWatcher>
|
||||||
<div class="LivePlaying">
|
<div class="LivePlaying">
|
||||||
<LivePlaying></LivePlaying>
|
<LivePlaying></LivePlaying>
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
@ -190,7 +190,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, onMounted, ref } from "vue";
|
import { defineComponent, onMounted, ref, resolveComponent } from "vue";
|
||||||
import LivePlaying from "@/components/LivePlaying.vue";
|
import LivePlaying from "@/components/LivePlaying.vue";
|
||||||
import LiveingWatcher from "@/components/LiveingWatcher.vue";
|
import LiveingWatcher from "@/components/LiveingWatcher.vue";
|
||||||
import TRTC from "trtc-js-sdk"
|
import TRTC from "trtc-js-sdk"
|
||||||
@ -199,6 +199,7 @@ import { useRoute } from 'vue-router';
|
|||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
|
import TIM from 'tim-js-sdk';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@ -217,6 +218,7 @@ export default defineComponent({
|
|||||||
const roominfo = ref<any>([]);
|
const roominfo = ref<any>([]);
|
||||||
console.log(useRoute())
|
console.log(useRoute())
|
||||||
const id = useRoute().query.id;
|
const id = useRoute().query.id;
|
||||||
|
let tim: any;
|
||||||
TRTC.checkSystemRequirements().then((result: any) => {
|
TRTC.checkSystemRequirements().then((result: any) => {
|
||||||
if(!result) {
|
if(!result) {
|
||||||
message.error(lan.$t('buzhichitonghua'))
|
message.error(lan.$t('buzhichitonghua'))
|
||||||
@ -351,6 +353,87 @@ export default defineComponent({
|
|||||||
// }
|
// }
|
||||||
fun()
|
fun()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// im 初始化
|
||||||
|
tim = TIM.create({
|
||||||
|
SDKAppID: 1400400340
|
||||||
|
}); // SDK 实例通常用 tim 表示
|
||||||
|
tim.setLogLevel(0);
|
||||||
|
tim.on(TIM.EVENT.MESSAGE_RECEIVED, function(event: any) {
|
||||||
|
// 收到推送的单聊、群聊、群提示、群系统通知的新消息,可通过遍历 event.data 获取消息列表数据并渲染到页面
|
||||||
|
// event.name - TIM.EVENT.MESSAGE_RECEIVED
|
||||||
|
// event.data - 存储 Message 对象的数组 - [Message]
|
||||||
|
for(const i in event.data){
|
||||||
|
console.log(event.data[i])
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event: any) {
|
||||||
|
// 收到群组列表更新通知,可通过遍历 event.data 获取群组列表数据并渲染到页面
|
||||||
|
// event.name - TIM.EVENT.GROUP_LIST_UPDATED
|
||||||
|
// event.data - 存储 Group 对象的数组 - [Group]
|
||||||
|
console.log(event.data)
|
||||||
|
});
|
||||||
|
tim.login({userID: store.state.userinfo.memberid.toString(), userSig: userSig}).then((res: any)=>{
|
||||||
|
console.log(res.data); // 登录成功
|
||||||
|
if (res.data.repeatLogin === true) {
|
||||||
|
// 标识账号已登录,本次登录操作为重复登录。v2.5.1 起支持
|
||||||
|
console.log(res.data.errorInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(function(imError: any) {
|
||||||
|
console.warn('login error:', imError); // 登录失败的相关信息
|
||||||
|
});
|
||||||
|
tim.on(TIM.EVENT.SDK_READY, function (){
|
||||||
|
const promise = tim.createGroup({
|
||||||
|
type: TIM.TYPES.GRP_AVCHATROOM,
|
||||||
|
name: 'live',
|
||||||
|
groupID: roominfo.value.roomid
|
||||||
|
});
|
||||||
|
promise.then(function(imResponse: any) { // 创建成功
|
||||||
|
console.log(imResponse.data.group); // 创建的群的资料
|
||||||
|
tim.joinGroup({
|
||||||
|
groupID: roominfo.value.roomid,
|
||||||
|
type: TIM.TYPES.GRP_AVCHATROOM
|
||||||
|
}).then((res: any)=>{
|
||||||
|
switch (res.data.status) {
|
||||||
|
case TIM.TYPES.JOIN_STATUS_WAIT_APPROVAL: // 等待管理员同意
|
||||||
|
break;
|
||||||
|
case TIM.TYPES.JOIN_STATUS_SUCCESS: // 加群成功
|
||||||
|
console.log(res.data.group); // 加入的群组资料
|
||||||
|
break;
|
||||||
|
case TIM.TYPES.JOIN_STATUS_ALREADY_IN_GROUP: // 已经在群中
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}).catch((err: any)=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}).catch(function(imError: any) {
|
||||||
|
console.warn('createGroup error:', imError); // 创建群组失败的相关信息
|
||||||
|
tim.joinGroup({
|
||||||
|
groupID: roominfo.value.roomid,
|
||||||
|
type: TIM.TYPES.GRP_AVCHATROOM
|
||||||
|
}).then((res: any)=>{
|
||||||
|
switch (res.data.status) {
|
||||||
|
case TIM.TYPES.JOIN_STATUS_WAIT_APPROVAL: // 等待管理员同意
|
||||||
|
break;
|
||||||
|
case TIM.TYPES.JOIN_STATUS_SUCCESS: // 加群成功
|
||||||
|
console.log(res.data.group); // 加入的群组资料
|
||||||
|
break;
|
||||||
|
case TIM.TYPES.JOIN_STATUS_ALREADY_IN_GROUP: // 已经在群中
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}).catch((err: any)=>{
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
async function fenxiang(){
|
async function fenxiang(){
|
||||||
console.log(localStream)
|
console.log(localStream)
|
||||||
@ -387,6 +470,24 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendtext(){
|
||||||
|
const message = tim.createTextMessage({
|
||||||
|
to: roominfo.value.roomid,
|
||||||
|
conversationType: TIM.TYPES.CONV_GROUP,
|
||||||
|
payload: {
|
||||||
|
text: 'Hello world!'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const promise = tim.sendMessage(message);
|
||||||
|
promise.then(function(imResponse: any) {
|
||||||
|
// 发送成功
|
||||||
|
console.log(imResponse);
|
||||||
|
}).catch(function(imError: any) {
|
||||||
|
// 发送失败
|
||||||
|
console.warn('sendMessage error:', imError);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
const si = setInterval(async ()=>{
|
const si = setInterval(async ()=>{
|
||||||
if(store.state.userinfo.memberid != 0 && store.state.userinfo.memberid){
|
if(store.state.userinfo.memberid != 0 && store.state.userinfo.memberid){
|
||||||
@ -405,7 +506,8 @@ export default defineComponent({
|
|||||||
roominfo,
|
roominfo,
|
||||||
guanbi,
|
guanbi,
|
||||||
visible,
|
visible,
|
||||||
lan
|
lan,
|
||||||
|
sendtext
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user