| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910 |
- <template>
- <view class="content">
- <!-- <navigation-custom :config="config" :scrollTop="scrollTopNav" @customConduct="customConduct" :scrollMaxHeight="scrollMaxHeight" /> -->
- <scroll-view id="scrollview" class='chat-box' :style="{height: style.contentViewHeight + 'px'}" scroll-y="true"
- :scroll-with-animation="false" :scroll-top="scrollTop" @scrolltoupper="lower()">
- <view class="auth" v-if="!isAuth">
- <text>对不起,您还未登录!请</text>
- <button open-type="getUserInfo" @getuserinfo="getUserInfo">授权登录</button>
- </view>
- <!-- <view class="tips-box">
- {{nowTime}}
- </view> -->
- <!-- <view class="tips-box tips-title">
- 您好,智能投顾很高兴为您服务!
- </view> -->
- <!-- <view class="talk-box">
- <view class="talk-head-box">
- <image src="../../static/rabotHead.png" mode="" class="talk-head"></image>
- </view>
- <view class="talk-content">您好,欢迎您使用阿拉灯神丁。我可以给您提供股票投资建议,快来试试吧。</view>
- </view> -->
- <view v-for="chat in talkList" :key="chat.talkType" class="m-item">
- <view class="talk-box talk-box-end" v-show="chat.content">
- <view class="talk-reply">{{chat.content}}</view>
- <view class="talk-head-box">
- <image :src='userHeadUrl' mode="" class="talk-head" @click.stop='goUserSelf'></image>
- </view>
- </view>
- <view class="talk-box">
- <view class="talk-head-box">
- <image :src='rabotHeadImg' mode="" class="talk-head"></image>
- </view>
- <view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge && !isIos' @click.stop="goRecharge">去充值</text></view>
- </view>
- </view>
- </scroll-view>
- <view class="send-box" :style="{ 'padding-bottom' : isShowKeyBoard + 'px'}">
- <image :src="[!isVoiceType ? '/static/icon/voice-icon.png' : '/static/icon/keyBoard-icon.png']" @click.stop='tabVoice()'></image>
-
- <view class="voice-mode" v-if='isVoiceType' @touchstart="voiceBegin" @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd" @touchcancel="voiceCancel">{{voiceTis}}</view>
-
- <input type="text" v-if="!isVoiceType" class="enter-box" v-model="inputInfo" :adjust-position="true" @focus="isNeedAuth()"
- :style="{'width':inputWidth}" confirm-hold='true' confirm-type='send' @confirm="sendInputInfo" />
-
- <!-- @input='isInputing' -->
- <!-- <button type="primary" class="submit-message" @click="sendInputInfo()" v-if='isShowSend'>发送</button> -->
- <image src="/static/setIcon.png" @click.stop='openModal()' v-if='isShowSetCenter'></image>
- </view>
-
- <!-- 录音UI效果 -->
- <view class="record" :class="recording?'':'hidden'">
- <view class="ing" :class="willStop?'hidden':''"><image src="../../static/icon/send-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
- <view class="cancel" :class="willStop?'':'hidden'"><image src="../../static/icon/cancel-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
- <view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
- </view>
-
- <!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="goUserSelf" /> -->
- <uni-popup ref="popup" type="bottom">
- <view class="uni-share">
- <view class="uni-share-content">
-
- <view class="uni-share-content-box" @click.stop='goUserSelf' >
- <view class="uni-share-content-image">
- <image src="/static/icon/userSetIcon.png" class="image" />
- </view>
- <view class="uni-share-content-text">个人中心</view>
- </view>
-
- <view class="uni-share-content-box" @click.stop='goSharePage' >
- <view class="uni-share-content-image">
- <image src="/static/icon/share-icon.png" class="image" />
- </view>
- <view class="uni-share-content-text">邀好友奖查询次数</view>
- </view>
-
- <!-- <view class="uni-share-content-box" @click.stop='tabVoice' >
- <view class="uni-share-content-image">
- <image src="/static/icon/userSetIcon.png" class="image" />
- </view>
- <view class="uni-share-content-text">语音输入</view>
- </view> -->
-
-
- <view class="uni-share-content-box" @click.stop='clearChat' >
- <view class="uni-share-content-image">
- <image src="/static/icon/clean-icon.png" class="image" />
- </view>
- <view class="uni-share-content-text">清空</view>
- </view>
-
-
-
-
- <!-- <view class="uni-share-content-box" @click.stop='goRecharge' v-if="!isIos">
- <view class="uni-share-content-image">
- <image src="/static/icon/recharge.png" class="image" />
- </view>
- <view class="uni-share-content-text">去充值</view>
- </view> -->
-
-
- </view>
-
- <view class="uni-share-btn" @click="cancelModal()">取消</view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import uniPopup from "@/components/uni-popup/uni-popup.vue"
- var md5 = require("../../common/md5.js");
- var page = 1;
- const recorderManager = uni.getRecorderManager();
- const innerAudioContext = uni.createInnerAudioContext();
- export default {
- data() {
- return {
- isShowSend:false,
- isShowSetModal:false,
- isShowSetCenter:true,
- isShowRecharge:false,
- inputWidth:'70%',
- title: 'RABOT',
- nowTime: '',
- nowHeight: '622px',
- inputInfo: '',
- isShowKeyBoard:0,
- rabotHeadImg: "../../static/rabotHead.png",
- userHeadUrl: getApp().globalData.user_headUrl || '../../static/userDefault.png',
- talkList: [],
- scrollTopNav: 0, // 当linear为true的时候需要通过onpagescroll传递参数
- scrollMaxHeight: 200 ,//滑动的高度限制,超过这个高度即背景全部显示
- scrollTop:0,
- scrollRequestEnable: true,
- pageSize:10,
- isIos:Boolean,
- style: {
- pageHeight: 0,
- contentViewHeight: 0,
- footViewHeight: 90,
- mitemHeight: 0
- },
- isAuth:true,
- iv:'',
- session_key:'',
- encryptedData:'',
-
- //录音相关参数
- isVoiceType:false,
- RECORDER:uni.getRecorderManager(),
- isVoice:false,
- voiceTis:'按住 说话',
- recordTis:"手指上滑 取消发送",
- recording:false,
- willStop:false,
- initPoint:{identifier:0,Y:0},
- recordTimer:null,
- recordLength:0,
-
- //播放语音相关参数
- AUDIO:uni.createInnerAudioContext(),
- playMsgid:null,
- VoiceTimer:null,
- voicePath: ''
- }
- },
- components: {
- uniPopup
- },
- onPageScroll(e) {
- this.scrollTopNav = e.scrollTop;
- },
- onShareAppMessage(){
- return {
- title: '阿拉灯神丁',
- path: '/pages/index/index'
- }
- },
-
- onLoad() {
- this.userLogin();
- this.getEquipmentHeight();
-
- this.AUDIO.onEnded((res)=>{
- this.playMsgid=null;
- });
- },
- onShow() {
- // this.getNowTime();
- console.log(getApp().globalData.isAuth)
- this.userHeadUrl = getApp().globalData.user_headUrl || '../../static/userDefault.png',
- getApp().globalData.isAuth ? this.isAuth = true : this.isAuth = false ;
- getApp().globalData.isAuth ? this.getHistory() : this.isAuth = false ;
- },
- methods: {
- userLogin(){
- uni.showLoading({})
- uni.login({
- success: (res) => {
- this.getCodeRabot(res)
- }
- });
- },
-
- // 获取用户信息
- getUserInfo(e) {
- console.log(e);
- if (e.detail.errMsg == "getUserInfo:ok") {
-
- this.iv = e.detail.iv;
- this.encryptedData = e.detail.encryptedData;
-
- this.loginUserInfo()
- } else {
- console.log("用户信息授权失败");
- this.isShowAuthBtn = true;
- }
- },
-
- loginUserInfo(){
- let that = this;
- uni.request({
- url:getApp().globalData.shareUrl, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- method: 'auth',
- timestamp: getApp().globalData.globalTimestamp, //Date.now()
- uid:getApp().globalData.user_id,
- sign: md5('auth' + getApp().globalData.globalTimestamp),
- nickname:getApp().globalData.user_name,
- headimg:getApp().globalData.user_headUrl,
- iv:that.iv,
- session_key:that.session_key,
- encryptedData:that.encryptedData
-
- },
- success: res => {
- that.isAuth = true;
- getApp().globalData.user_id = res.data.msg.id;
- getApp().globalData.open_id = res.data.msg.openid;
- getApp().globalData.isAuth = that.isAuth;
- getApp().globalData.times = res.data.msg.times;
- getApp().globalData.total_times = res.data.msg.total_times;
- getApp().globalData.user_headUrl = res.data.msg.headimg;
- getApp().globalData.user_name = res.data.msg.name;
- that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
- that.getHistory();
- }
- });
- },
-
- getCodeRabot(res){
- let that = this;
- uni.request({
- url:getApp().globalData.shareUrl, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- method: 'login',
- timestamp: getApp().globalData.globalTimestamp, //Date.now()
- code: res.code,
- sign: md5('login' + getApp().globalData.globalTimestamp),
- // invited:'invited'
- },
- success: res => {
- // 通过openid发起会员登录
- // getApp().globalData.user_id = res.data.msg.id;
- // getApp().globalData.open_id = res.data.msg.openid;
- // getApp().globalData.isAuth = res.data.msg.isauth === '0';
- // getApp().globalData.times = res.data.msg.times;
- // getApp().globalData.total_times = res.data.msg.total_times;
- // getApp().globalData.user_headUrl = res.data.msg.headimg;
- // getApp().globalData.user_name = res.data.msg.name;
- // that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
- // that.getHistory();
- var isAuth = res.data.msg.isauth === 1;
- that.session_key = res.data.msg.session_key;
- if(isAuth){
- this.isAuth = true;
- getApp().globalData.user_id = res.data.msg.id;
- getApp().globalData.open_id = res.data.msg.openid;
- getApp().globalData.isAuth = true;
- getApp().globalData.times = res.data.msg.times;
- getApp().globalData.total_times = res.data.msg.total_times;
- getApp().globalData.user_headUrl = res.data.msg.headimg;
- getApp().globalData.user_name = res.data.msg.name;
- that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
- that.getHistory();
- }else{
- getApp().globalData.session_key = res.data.msg.session_key;
- that.isAuth = isAuth;
- wx.hideLoading();
-
- }
-
- }
- });
- },
- getNowTime() {
- let time = new Date();
- let y = time.getFullYear();
- let m = time.getMonth() + 1;
- let d = time.getDate();
- let h = time.getHours();
- let i = time.getMinutes();
- i = i > 10 ? i : '0' + i;
- this.nowTime = y + "年" + m + "月" + d + "日" + " " + h + ":" + i
- },
- getEquipmentHeight() {
- const height = uni.getSystemInfoSync().windowHeight;
- this.nowHeight = height + 'px';
- getApp().globalData.glbalHeight = this.nowHeight;
- this.style.pageHeight = height;
- this.style.contentViewHeight = height - uni.getSystemInfoSync().screenWidth / 750 * (100) -7; //像素 因为给出的是像素高度 然后我们用的是upx 所以换算一下
- },
- scrollToBottom() {
- let that = this;
- let query = uni.createSelectorQuery();
- query.selectAll('.m-item').boundingClientRect();
- query.select('#scrollview').boundingClientRect();
- query.exec((res) => {
- that.style.mitemHeight = 0;
- res[0].forEach((rect) => that.style.mitemHeight = that.style.mitemHeight + rect.height + 40) //获取所有内部子元素的高度
- // 因为vue的虚拟DOM 每次生成的新消息都是之前的,所以采用异步setTimeout 主要就是添加了这红字
- that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight
- // setTimeout(() => {
- // if (that.style.mitemHeight > (that.style.contentViewHeight - 100)) { //判断子元素高度是否大于显示高度
- // that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight //用子元素的高度减去显示的高度就获益获得序言滚动的高度
- // }
- // }, 100)
- })
- },
- getHistory(isShow) {
- // if(getApp.globalData.isAuth){this.isAuth = true}
- let that = this;
- uni.request({
- url: getApp().globalData.shareUrl, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- method: 'question_list',
- timestamp: getApp().globalData.globalTimestamp, //Date.now()
- uid: getApp().globalData.user_id,
- sign: md5('question_list' + getApp().globalData.globalTimestamp),
- page: page || 1,
- pageSize: 10,
- },
- success: res => {
- uni.hideLoading()
- that.isIos = getApp().globalData.isIos;
- if(isShow){
- res.data.msg[0].isRecharge = 1
- }
- if(page === 1){
- that.scrollRequestEnable = true;
- that.talkList = ((res.data.msg).reverse());
- setTimeout(()=>{
- that.scrollToBottom()
- },100)
- }else if (page > 1 && res.data.msg.length === that.pageSize) {
- that.scrollRequestEnable = true;
- that.talkList.unshift(...((res.data.msg).reverse()));
- }else if (page > 1 && (res.data.msg.length > 0) && (res.data.msg.length < that.pageSize)){
- that.scrollRequestEnable = true;
- that.talkList.unshift(...((res.data.msg).reverse()));
- }else if (page > 1 && res.data.msg.length == 0){
- that.scrollRequestEnable = false;
- }
- }
- });
- },
- goUserSelf() {
- this.$refs.popup.close()
- uni.navigateTo({
- url: '../selfInfo/selfInfo'
- })
- },
- goRecharge() {
- this.$refs.popup.close()
- uni.navigateTo({
- url: '../selfInfo/payList/payList'
- })
- },
- sendMsgRequest(msg) {
-
- if(getApp().globalData.user_id=='') return false;
- let that = this;
- uni.request({
- url: getApp().globalData.shareUrl, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- method: 'question',
- timestamp: getApp().globalData.globalTimestamp, //Date.now()
- uid: getApp().globalData.user_id,
- sign: md5('question' + getApp().globalData.globalTimestamp),
- content: msg
- },
- success: res => {
- if(res.data.code === 100){
- that.isShowRecharge = true;
- that.inputInfo = '';
- that.getHistory('show');
- }else {
- that.inputInfo = '';
- that.getHistory();
- that.isShowRecharge = false
- }
-
- }
- });
- },
- sendInputInfo() {
- // this.inputWidth = '80%';
- // this.isShowSend = false;
- // this.isShowSetCenter = true;
- if (!this.inputInfo) {
- uni.showToast({
- title: '请输入股票代码',
- icon: 'none'
- });
- } else {
- page = 1;
- this.sendMsgRequest(this.inputInfo)
- }
- },
- isInputing(){
- if (this.inputInfo) {
- this.inputWidth = '72%';
- this.isShowSend = true;
- this.isShowSetCenter = false;
- } else {
- this.inputWidth = '80%';
- this.isShowSend = false;
- this.isShowSetCenter = true;
- }
- },
- isNeedAuth(){
- console.log(this.isAuth)
- if(!this.isAuth){
- setTimeout(()=>{
- uni.navigateTo({
- url: '../auth/index',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },500)
- }
- },
- // 滚动至底部触发的事件
- lower() {
- if (this.scrollRequestEnable) {
- // 允许滚动时,触底page加一,重新请求数据
- page++;
- this.getHistory();
- } else {
- // 不允许滚动时,只显示"到底了"提示
- // this.showBottem = true
- console.log('noData')
- }
- },
- getInputFocus(e){
- //this.isShowKeyBoard = e.detail.height
- },
- getInputBlur(){
- //this.isShowKeyBoard = 0
- },
- goSharePage(){
- uni.navigateTo({
- url: '../share/sharePage',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- tabVoice(){
- this.isVoiceType = !this.isVoiceType;
- },
- clearChat(){
-
- },
- openModal(){
- // 需要在 popup 组件,指定 ref 为 popup
- if(!this.isAuth){
- uni.navigateTo({
- url: '../auth/index',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- }else {
- this.$refs.popup.open();
- }
- },
- cancelModal(){
- // 需要在 popup 组件,指定 ref 为 popup
- this.$refs.popup.close();
- },
- // 录音开始
- voiceBegin(e){
- console.log(e)
- if(e.touches.length>1){
- return ;
- }
- this.initPoint.Y = e.touches[0].clientY;
- this.initPoint.identifier = e.touches[0].identifier;
- this.recordBegin(e)
- this.RECORDER.start({format:"mp3"});//录音开始,
-
- },
- //录音开始UI效果
- recordBegin(e){
- this.recording = true;
- this.voiceTis='松开 结束';
- this.recordLength = 0;
- this.recordTimer = setInterval(()=>{
- this.recordLength++;
- },1000)
- },
- // 录音被打断
- voiceCancel(){
- this.recording = false;
- this.voiceTis='按住 说话';
- this.recordTis = '手指上滑 取消发送'
- this.willStop = true;//不发送录音
- this.RECORDER.stop();//录音结束
- this.recordEnd()
- },
- // 录音中(判断是否触发上滑取消发送)
- voiceIng(e){
- if(!this.recording){
- return;
- }
- let touche = e.touches[0];
- //上滑一个导航栏的高度触发上滑取消发送
- if(this.initPoint.Y - touche.clientY>=uni.upx2px(100)){
- this.willStop = true;
- this.recordTis = '松开手指 取消发送'
- }else{
- this.willStop = false;
- this.recordTis = '手指上滑 取消发送'
- }
- },
- // 结束录音
- voiceEnd(e){
- if(!this.recording){
- return;
- }
- this.recording = false;
- this.voiceTis='按住 说话';
- this.recordTis = '手指上滑 取消发送'
- this.RECORDER.stop();//录音结束
- console.log(e)
- this.recordEnd(e);
- },
- //录音结束(回调文件)
- recordEnd(e){
- clearInterval(this.recordTimer);
- if(!this.willStop){
- console.log("e: " + JSON.stringify(e));
- let msg = {
- length:0,
- url:e.tempFilePath
- }
- let min = parseInt(this.recordLength/60);
- let sec = this.recordLength%60;
- min = min<10?'0'+min:min;
- sec = sec<10?'0'+sec:sec;
- msg.length = min+':'+sec;
- console.log(msg)
- //this.sendMsg(msg,'voice');
- }else{
- console.log('取消发送录音');
- }
- this.willStop = false;
- },
- },
-
- onShareAppMessage(){
-
- }
- }
- </script>
- <style>
- .content {
- text-align: center;
- }
- .chat-box {
- background: #f4f5f7;
- padding-top: 3%;
- /* padding-bottom: 100upx; */
- }
- .tips-box {
- background: #D5D5DA;
- font-size: 28upx;
- color: #fff;
- border-radius: 30upx;
- width: 50%;
- margin: 0 auto;
- height: 50rpx;
- line-height: 50rpx
- }
- .tips-title {
- width: 70%;
- margin-top: 5%;
- font-size: 30rpx;
- height: 70rpx;
- line-height: 70rpx
- }
- .send-box {
- width: 100%;
- height: 90rpx;
- position: fixed;
- bottom: 0;
- background: #F4F0ED;
- display: flex;
- align-items: center;
- padding: 2upx;
- }
- .talk-box {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-top: 3%;
- }
- .talk-box-end {
- justify-content: flex-end;
- }
- .talk-head-box {
- width: 80rpx;
- height: 80rpx;
- border-radius: 30rpx;
- margin-left: 2%;
- margin-right: 2%;
- }
- .talk-head {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- .talk-content {
- padding: 2%;
- background: #fff;
- font-size: 28rpx;
- border-top-right-radius: 20rpx;
- border-bottom-left-radius: 20rpx;
- border-bottom-right-radius: 20rpx;
- text-align: left;
- max-width: 70%;
- }
- .talk-reply{
- padding: 2%;
- background: #9EEA6A;
- font-size: 28rpx;
- border-top-left-radius: 20rpx;
- border-bottom-left-radius: 20rpx;
- border-bottom-right-radius: 20rpx;
- text-align: left;
- max-width: 70%;
- }
- .goRechargeText {
- color:#0A98D5
- }
- .enter-box {
- height: 70rpx;
- background: #fff;
- border-radius: 1%;
- text-align: left;
- margin: 8px;
- margin-bottom: 10px;
- padding-left:8px;
- }
- .send-box image {
- width: 60rpx;
- height: 60rpx;
- margin-right: 10upx;
- margin-left: 10upx;
- }
- .submit-message {
- width: 18%;
- margin-right: 20upx;
- height: 70rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- color: #fff;
- background-color: #0A98D5 !important;
- }
- .logo {
- height: 200upx;
- width: 200upx;
- margin-top: 200upx;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 50upx;
- }
- .text-area {
- display: flex;
- justify-content: center;
- }
- .title {
- font-size: 36upx;
- color: #8f8f94;
- }
-
- .uniFab{
- width:98px;
- height:36px;
- background:rgba(231,247,236,1);
- box-shadow:-6px 5px 74px 0px rgba(60,188,99,0.08);
- border-radius:100px 0px 0px 100px;
- right: 0upx;
- position: fixed;
- z-index: 9999;
- top: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .uniFab text{
- width:64px;
- font-size:16px;
- font-family:PingFangSC;
- font-weight:600;
- color:rgba(60,188,99,1);
- text-shadow:0px 1px 2px rgba(12,39,20,0.2);
- }
-
- .uni-share-content {
- display: flex;
- flex-wrap: wrap;
- padding: 15px;
- /* justify-content: center */
- }
-
- .uni-share-content-box {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 25%;
- box-sizing: border-box;
- }
-
- .uni-share-content-image {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 60upx;
- height: 60upx;
- overflow: hidden;
- border-radius: 10upx;
- }
-
- .uni-share-content-image .image {
- width: 100%;
- height: 100%;
- }
-
- .uni-share-content-text {
- font-size: 26upx;
- color: #333;
- padding-top: 5px;
- padding-bottom: 10px;
- }
-
- .uni-share-btn {
- height: 90upx;
- line-height: 90upx;
- border-top: 1px #f5f5f5 solid;
- text-align: center;
- color: #666;
- font-size: 30rpx;
- }
- /* .placeHolder {
- padding:2px
- } */
-
-
- .auth{
- display: flex;
- flex-direction: row;
- font-size: 14px;
- justify-content: center;
- align-items: center;
- background-color: #eee;
- }
-
- .auth button{
- font-size: 14px;
- padding:0px;
- margin:0px;
- color:#007AFF;
- background-color: #eee;
-
-
- }
-
- .auth button:after{
- border: 0px;
- }
-
- .voice-mode {
- width: 70%;
- height: 70rpx;
- background: #fff;
- border-radius: 1%;
- text-align: left;
- margin: 8px;
- margin-bottom: 10px;
- padding-left:8px;
- text-align: center;
- line-height: 70rpx;
- }
-
-
- .icon {
- font-family:"HMfont-home" !important;
- font-size:56upx;
- font-style:normal;
- color: #333;
- }
- .hidden{
- display: none !important;
- }
- .record{
- width: 40vw;
- height: 40vw;
- position: fixed;
- top: 55%;
- left: 30%;
- background-color: rgba(0,0,0,.6);
- border-radius: 20upx;
- }
- .ing{
- width: 100%;
- height: 30vw;
- display: flex;
- justify-content: center;
- align-items: center;
- // 模拟录音音效动画
- }
- @keyframes volatility {
- 0% {background-position: 0% 130%;}
- 20% {background-position: 0% 150%;}
- 30% {background-position: 0% 155%;}
- 40% {background-position: 0% 150%;}
- 50% {background-position: 0% 145%;}
- 70% {background-position: 0% 150%;}
- 80% {background-position: 0% 155%;}
- 90% {background-position: 0% 140%;}
- 100% {background-position: 0% 135%;}
- }
- .cancel{
- width: 100%;
- height: 30vw;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .icon{
- background-image:linear-gradient(to bottom,#f09b37,#fff 50%);
- background-size:100% 200%;
- animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
- -webkit-background-clip:text;
- -webkit-text-fill-color:transparent;
- font-size: 150upx;
- color: #f09b37;
- }
- .tis{
- width: 100%;
- height: 10vw;
- display: flex;
- justify-content: center;
- font-size: 28upx;
- color: #fff;
-
- }
- .change{
- color: #f09b37;
- }
- </style>
|