<template>
	<v-page>
		<v-header :title="$t('common.service')"></v-header>
		<view class="onsczone">
			<web-view :src="csurl" style="margin-top: 3rem;"></web-view>
		</view>
		
	</v-page>
</template>

<script>
	import Member from "@/api/member";
	export default {
		data() {
			return {
				csurl:"https://cs.btcaholic.com/chat/?toid=",
			}
		},
		mounted() {
			this.mkcslinks()
		},
		methods: {
			// build
			mkcslinks(){
				let user = uni.getStorageSync('user')
				if(user){
					console.log(user)
					let ustr = JSON.parse(user)
					console.log(ustr)
					Member.getUnameByUid({user_id:ustr.referrer}).then(rfres=>{
						// query referr uname
						this.csurl += rfres.username+"&room_id="+ustr.account+"&usid="+ustr.user_id;
					})
					console.log("user",this.csurl)
				}
			}
		}
	}
</script>

<style lang="less" scoped>
.onsczone{
	margin-top: 12rem;
	
}
</style>
