index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. <template>
  2. <view class="content">
  3. <!-- <navigation-custom :config="config" :scrollTop="scrollTopNav" @customConduct="customConduct" :scrollMaxHeight="scrollMaxHeight" /> -->
  4. <scroll-view id="scrollview" class='chat-box' :style="{height: style.contentViewHeight + 'px'}" scroll-y="true"
  5. :scroll-with-animation="false" :scroll-top="scrollTop" @scrolltoupper="lower()">
  6. <view class="auth" v-if="!isAuth">
  7. <text>对不起,您还未登录!请</text>
  8. <button open-type="getUserInfo" @getuserinfo="getUserInfo">授权登录</button>
  9. </view>
  10. <!-- <view class="tips-box">
  11. {{nowTime}}
  12. </view> -->
  13. <!-- <view class="tips-box tips-title">
  14. 您好,智能投顾很高兴为您服务!
  15. </view> -->
  16. <!-- <view class="talk-box">
  17. <view class="talk-head-box">
  18. <image src="../../static/rabotHead.png" mode="" class="talk-head"></image>
  19. </view>
  20. <view class="talk-content">您好,欢迎您使用阿拉灯神丁。我可以给您提供股票投资建议,快来试试吧。</view>
  21. </view> -->
  22. <view v-for="chat in talkList" :key="chat.talkType" class="m-item">
  23. <view class="talk-box talk-box-end" v-show="chat.content">
  24. <view class="talk-reply">{{chat.content}}</view>
  25. <view class="talk-head-box">
  26. <image :src='userHeadUrl' mode="" class="talk-head" @click.stop='goUserSelf'></image>
  27. </view>
  28. </view>
  29. <view class="talk-box">
  30. <view class="talk-head-box">
  31. <image :src='rabotHeadImg' mode="" class="talk-head"></image>
  32. </view>
  33. <view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge && !isIos' @click.stop="goRecharge">去充值</text></view>
  34. </view>
  35. </view>
  36. </scroll-view>
  37. <view class="send-box" :style="{ 'padding-bottom' : isShowKeyBoard + 'px'}">
  38. <image :src="[!isVoiceType ? '/static/icon/voice-icon.png' : '/static/icon/keyBoard-icon.png']" @click.stop='tabVoice()'></image>
  39. <view class="voice-mode" v-if='isVoiceType' @touchstart="voiceBegin" @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd" @touchcancel="voiceCancel">{{voiceTis}}</view>
  40. <input type="text" v-if="!isVoiceType" class="enter-box" v-model="inputInfo" :adjust-position="true" @focus="isNeedAuth()"
  41. :style="{'width':inputWidth}" confirm-hold='true' confirm-type='send' @confirm="sendInputInfo" />
  42. <!-- @input='isInputing' -->
  43. <!-- <button type="primary" class="submit-message" @click="sendInputInfo()" v-if='isShowSend'>发送</button> -->
  44. <image src="/static/setIcon.png" @click.stop='openModal()' v-if='isShowSetCenter'></image>
  45. </view>
  46. <!-- 录音UI效果 -->
  47. <view class="record" :class="recording?'':'hidden'">
  48. <view class="ing" :class="willStop?'hidden':''"><image src="../../static/icon/send-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
  49. <view class="cancel" :class="willStop?'':'hidden'"><image src="../../static/icon/cancel-icon.png" style="width: 64rpx;height: 64rpx;"></image></view>
  50. <view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
  51. </view>
  52. <!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="goUserSelf" /> -->
  53. <uni-popup ref="popup" type="bottom">
  54. <view class="uni-share">
  55. <view class="uni-share-content">
  56. <view class="uni-share-content-box" @click.stop='goUserSelf' >
  57. <view class="uni-share-content-image">
  58. <image src="/static/icon/userSetIcon.png" class="image" />
  59. </view>
  60. <view class="uni-share-content-text">个人中心</view>
  61. </view>
  62. <view class="uni-share-content-box" @click.stop='goSharePage' >
  63. <view class="uni-share-content-image">
  64. <image src="/static/icon/share-icon.png" class="image" />
  65. </view>
  66. <view class="uni-share-content-text">邀好友奖查询次数</view>
  67. </view>
  68. <!-- <view class="uni-share-content-box" @click.stop='tabVoice' >
  69. <view class="uni-share-content-image">
  70. <image src="/static/icon/userSetIcon.png" class="image" />
  71. </view>
  72. <view class="uni-share-content-text">语音输入</view>
  73. </view> -->
  74. <view class="uni-share-content-box" @click.stop='clearChat' >
  75. <view class="uni-share-content-image">
  76. <image src="/static/icon/clean-icon.png" class="image" />
  77. </view>
  78. <view class="uni-share-content-text">清空</view>
  79. </view>
  80. <!-- <view class="uni-share-content-box" @click.stop='goRecharge' v-if="!isIos">
  81. <view class="uni-share-content-image">
  82. <image src="/static/icon/recharge.png" class="image" />
  83. </view>
  84. <view class="uni-share-content-text">去充值</view>
  85. </view> -->
  86. </view>
  87. <view class="uni-share-btn" @click="cancelModal()">取消</view>
  88. </view>
  89. </uni-popup>
  90. </view>
  91. </template>
  92. <script>
  93. import uniPopup from "@/components/uni-popup/uni-popup.vue"
  94. var md5 = require("../../common/md5.js");
  95. var page = 1;
  96. const recorderManager = uni.getRecorderManager();
  97. const innerAudioContext = uni.createInnerAudioContext();
  98. export default {
  99. data() {
  100. return {
  101. isShowSend:false,
  102. isShowSetModal:false,
  103. isShowSetCenter:true,
  104. isShowRecharge:false,
  105. inputWidth:'70%',
  106. title: 'RABOT',
  107. nowTime: '',
  108. nowHeight: '622px',
  109. inputInfo: '',
  110. isShowKeyBoard:0,
  111. rabotHeadImg: "../../static/rabotHead.png",
  112. userHeadUrl: getApp().globalData.user_headUrl || '../../static/userDefault.png',
  113. talkList: [],
  114. scrollTopNav: 0, // 当linear为true的时候需要通过onpagescroll传递参数
  115. scrollMaxHeight: 200 ,//滑动的高度限制,超过这个高度即背景全部显示
  116. scrollTop:0,
  117. scrollRequestEnable: true,
  118. pageSize:10,
  119. isIos:Boolean,
  120. style: {
  121. pageHeight: 0,
  122. contentViewHeight: 0,
  123. footViewHeight: 90,
  124. mitemHeight: 0
  125. },
  126. isAuth:true,
  127. iv:'',
  128. session_key:'',
  129. encryptedData:'',
  130. //录音相关参数
  131. isVoiceType:false,
  132. RECORDER:uni.getRecorderManager(),
  133. isVoice:false,
  134. voiceTis:'按住 说话',
  135. recordTis:"手指上滑 取消发送",
  136. recording:false,
  137. willStop:false,
  138. initPoint:{identifier:0,Y:0},
  139. recordTimer:null,
  140. recordLength:0,
  141. //播放语音相关参数
  142. AUDIO:uni.createInnerAudioContext(),
  143. playMsgid:null,
  144. VoiceTimer:null,
  145. voicePath: ''
  146. }
  147. },
  148. components: {
  149. uniPopup
  150. },
  151. onPageScroll(e) {
  152. this.scrollTopNav = e.scrollTop;
  153. },
  154. onShareAppMessage(){
  155. return {
  156. title: '阿拉灯神丁',
  157. path: '/pages/index/index'
  158. }
  159. },
  160. onLoad() {
  161. this.userLogin();
  162. this.getEquipmentHeight();
  163. this.AUDIO.onEnded((res)=>{
  164. this.playMsgid=null;
  165. });
  166. },
  167. onShow() {
  168. // this.getNowTime();
  169. console.log(getApp().globalData.isAuth)
  170. this.userHeadUrl = getApp().globalData.user_headUrl || '../../static/userDefault.png',
  171. getApp().globalData.isAuth ? this.isAuth = true : this.isAuth = false ;
  172. getApp().globalData.isAuth ? this.getHistory() : this.isAuth = false ;
  173. },
  174. methods: {
  175. userLogin(){
  176. uni.showLoading({})
  177. uni.login({
  178. success: (res) => {
  179. this.getCodeRabot(res)
  180. }
  181. });
  182. },
  183. // 获取用户信息
  184. getUserInfo(e) {
  185. console.log(e);
  186. if (e.detail.errMsg == "getUserInfo:ok") {
  187. this.iv = e.detail.iv;
  188. this.encryptedData = e.detail.encryptedData;
  189. this.loginUserInfo()
  190. } else {
  191. console.log("用户信息授权失败");
  192. this.isShowAuthBtn = true;
  193. }
  194. },
  195. loginUserInfo(){
  196. let that = this;
  197. uni.request({
  198. url:getApp().globalData.shareUrl, //需要设置为全局
  199. method: 'POST',
  200. header: {
  201. 'content-type': 'application/x-www-form-urlencoded'
  202. },
  203. data: {
  204. method: 'auth',
  205. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  206. uid:getApp().globalData.user_id,
  207. sign: md5('auth' + getApp().globalData.globalTimestamp),
  208. nickname:getApp().globalData.user_name,
  209. headimg:getApp().globalData.user_headUrl,
  210. iv:that.iv,
  211. session_key:that.session_key,
  212. encryptedData:that.encryptedData
  213. },
  214. success: res => {
  215. that.isAuth = true;
  216. getApp().globalData.user_id = res.data.msg.id;
  217. getApp().globalData.open_id = res.data.msg.openid;
  218. getApp().globalData.isAuth = that.isAuth;
  219. getApp().globalData.times = res.data.msg.times;
  220. getApp().globalData.total_times = res.data.msg.total_times;
  221. getApp().globalData.user_headUrl = res.data.msg.headimg;
  222. getApp().globalData.user_name = res.data.msg.name;
  223. that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  224. that.getHistory();
  225. }
  226. });
  227. },
  228. getCodeRabot(res){
  229. let that = this;
  230. uni.request({
  231. url:getApp().globalData.shareUrl, //需要设置为全局
  232. method: 'POST',
  233. header: {
  234. 'content-type': 'application/x-www-form-urlencoded'
  235. },
  236. data: {
  237. method: 'login',
  238. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  239. code: res.code,
  240. sign: md5('login' + getApp().globalData.globalTimestamp),
  241. // invited:'invited'
  242. },
  243. success: res => {
  244. // 通过openid发起会员登录
  245. // getApp().globalData.user_id = res.data.msg.id;
  246. // getApp().globalData.open_id = res.data.msg.openid;
  247. // getApp().globalData.isAuth = res.data.msg.isauth === '0';
  248. // getApp().globalData.times = res.data.msg.times;
  249. // getApp().globalData.total_times = res.data.msg.total_times;
  250. // getApp().globalData.user_headUrl = res.data.msg.headimg;
  251. // getApp().globalData.user_name = res.data.msg.name;
  252. // that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  253. // that.getHistory();
  254. var isAuth = res.data.msg.isauth === 1;
  255. that.session_key = res.data.msg.session_key;
  256. if(isAuth){
  257. this.isAuth = true;
  258. getApp().globalData.user_id = res.data.msg.id;
  259. getApp().globalData.open_id = res.data.msg.openid;
  260. getApp().globalData.isAuth = true;
  261. getApp().globalData.times = res.data.msg.times;
  262. getApp().globalData.total_times = res.data.msg.total_times;
  263. getApp().globalData.user_headUrl = res.data.msg.headimg;
  264. getApp().globalData.user_name = res.data.msg.name;
  265. that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
  266. that.getHistory();
  267. }else{
  268. getApp().globalData.session_key = res.data.msg.session_key;
  269. that.isAuth = isAuth;
  270. wx.hideLoading();
  271. }
  272. }
  273. });
  274. },
  275. getNowTime() {
  276. let time = new Date();
  277. let y = time.getFullYear();
  278. let m = time.getMonth() + 1;
  279. let d = time.getDate();
  280. let h = time.getHours();
  281. let i = time.getMinutes();
  282. i = i > 10 ? i : '0' + i;
  283. this.nowTime = y + "年" + m + "月" + d + "日" + " " + h + ":" + i
  284. },
  285. getEquipmentHeight() {
  286. const height = uni.getSystemInfoSync().windowHeight;
  287. this.nowHeight = height + 'px';
  288. getApp().globalData.glbalHeight = this.nowHeight;
  289. this.style.pageHeight = height;
  290. this.style.contentViewHeight = height - uni.getSystemInfoSync().screenWidth / 750 * (100) -7; //像素 因为给出的是像素高度 然后我们用的是upx 所以换算一下
  291. },
  292. scrollToBottom() {
  293. let that = this;
  294. let query = uni.createSelectorQuery();
  295. query.selectAll('.m-item').boundingClientRect();
  296. query.select('#scrollview').boundingClientRect();
  297. query.exec((res) => {
  298. that.style.mitemHeight = 0;
  299. res[0].forEach((rect) => that.style.mitemHeight = that.style.mitemHeight + rect.height + 40) //获取所有内部子元素的高度
  300. // 因为vue的虚拟DOM 每次生成的新消息都是之前的,所以采用异步setTimeout 主要就是添加了这红字
  301. that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight
  302. // setTimeout(() => {
  303. // if (that.style.mitemHeight > (that.style.contentViewHeight - 100)) { //判断子元素高度是否大于显示高度
  304. // that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight //用子元素的高度减去显示的高度就获益获得序言滚动的高度
  305. // }
  306. // }, 100)
  307. })
  308. },
  309. getHistory(isShow) {
  310. // if(getApp.globalData.isAuth){this.isAuth = true}
  311. let that = this;
  312. uni.request({
  313. url: getApp().globalData.shareUrl, //需要设置为全局
  314. method: 'POST',
  315. header: {
  316. 'content-type': 'application/x-www-form-urlencoded'
  317. },
  318. data: {
  319. method: 'question_list',
  320. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  321. uid: getApp().globalData.user_id,
  322. sign: md5('question_list' + getApp().globalData.globalTimestamp),
  323. page: page || 1,
  324. pageSize: 10,
  325. },
  326. success: res => {
  327. uni.hideLoading()
  328. that.isIos = getApp().globalData.isIos;
  329. if(isShow){
  330. res.data.msg[0].isRecharge = 1
  331. }
  332. if(page === 1){
  333. that.scrollRequestEnable = true;
  334. that.talkList = ((res.data.msg).reverse());
  335. setTimeout(()=>{
  336. that.scrollToBottom()
  337. },100)
  338. }else if (page > 1 && res.data.msg.length === that.pageSize) {
  339. that.scrollRequestEnable = true;
  340. that.talkList.unshift(...((res.data.msg).reverse()));
  341. }else if (page > 1 && (res.data.msg.length > 0) && (res.data.msg.length < that.pageSize)){
  342. that.scrollRequestEnable = true;
  343. that.talkList.unshift(...((res.data.msg).reverse()));
  344. }else if (page > 1 && res.data.msg.length == 0){
  345. that.scrollRequestEnable = false;
  346. }
  347. }
  348. });
  349. },
  350. goUserSelf() {
  351. this.$refs.popup.close()
  352. uni.navigateTo({
  353. url: '../selfInfo/selfInfo'
  354. })
  355. },
  356. goRecharge() {
  357. this.$refs.popup.close()
  358. uni.navigateTo({
  359. url: '../selfInfo/payList/payList'
  360. })
  361. },
  362. sendMsgRequest(msg) {
  363. if(getApp().globalData.user_id=='') return false;
  364. let that = this;
  365. uni.request({
  366. url: getApp().globalData.shareUrl, //需要设置为全局
  367. method: 'POST',
  368. header: {
  369. 'content-type': 'application/x-www-form-urlencoded'
  370. },
  371. data: {
  372. method: 'question',
  373. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  374. uid: getApp().globalData.user_id,
  375. sign: md5('question' + getApp().globalData.globalTimestamp),
  376. content: msg
  377. },
  378. success: res => {
  379. if(res.data.code === 100){
  380. that.isShowRecharge = true;
  381. that.inputInfo = '';
  382. that.getHistory('show');
  383. }else {
  384. that.inputInfo = '';
  385. that.getHistory();
  386. that.isShowRecharge = false
  387. }
  388. }
  389. });
  390. },
  391. sendInputInfo() {
  392. // this.inputWidth = '80%';
  393. // this.isShowSend = false;
  394. // this.isShowSetCenter = true;
  395. if (!this.inputInfo) {
  396. uni.showToast({
  397. title: '请输入股票代码',
  398. icon: 'none'
  399. });
  400. } else {
  401. page = 1;
  402. this.sendMsgRequest(this.inputInfo)
  403. }
  404. },
  405. isInputing(){
  406. if (this.inputInfo) {
  407. this.inputWidth = '72%';
  408. this.isShowSend = true;
  409. this.isShowSetCenter = false;
  410. } else {
  411. this.inputWidth = '80%';
  412. this.isShowSend = false;
  413. this.isShowSetCenter = true;
  414. }
  415. },
  416. isNeedAuth(){
  417. console.log(this.isAuth)
  418. if(!this.isAuth){
  419. setTimeout(()=>{
  420. uni.navigateTo({
  421. url: '../auth/index',
  422. success: res => {},
  423. fail: () => {},
  424. complete: () => {}
  425. });
  426. },500)
  427. }
  428. },
  429. // 滚动至底部触发的事件
  430. lower() {
  431. if (this.scrollRequestEnable) {
  432. // 允许滚动时,触底page加一,重新请求数据
  433. page++;
  434. this.getHistory();
  435. } else {
  436. // 不允许滚动时,只显示"到底了"提示
  437. // this.showBottem = true
  438. console.log('noData')
  439. }
  440. },
  441. getInputFocus(e){
  442. //this.isShowKeyBoard = e.detail.height
  443. },
  444. getInputBlur(){
  445. //this.isShowKeyBoard = 0
  446. },
  447. goSharePage(){
  448. uni.navigateTo({
  449. url: '../share/sharePage',
  450. success: res => {},
  451. fail: () => {},
  452. complete: () => {}
  453. });
  454. },
  455. tabVoice(){
  456. this.isVoiceType = !this.isVoiceType;
  457. },
  458. clearChat(){
  459. },
  460. openModal(){
  461. // 需要在 popup 组件,指定 ref 为 popup
  462. if(!this.isAuth){
  463. uni.navigateTo({
  464. url: '../auth/index',
  465. success: res => {},
  466. fail: () => {},
  467. complete: () => {}
  468. });
  469. }else {
  470. this.$refs.popup.open();
  471. }
  472. },
  473. cancelModal(){
  474. // 需要在 popup 组件,指定 ref 为 popup
  475. this.$refs.popup.close();
  476. },
  477. // 录音开始
  478. voiceBegin(e){
  479. console.log(e)
  480. if(e.touches.length>1){
  481. return ;
  482. }
  483. this.initPoint.Y = e.touches[0].clientY;
  484. this.initPoint.identifier = e.touches[0].identifier;
  485. this.recordBegin(e)
  486. this.RECORDER.start({format:"mp3"});//录音开始,
  487. },
  488. //录音开始UI效果
  489. recordBegin(e){
  490. this.recording = true;
  491. this.voiceTis='松开 结束';
  492. this.recordLength = 0;
  493. this.recordTimer = setInterval(()=>{
  494. this.recordLength++;
  495. },1000)
  496. },
  497. // 录音被打断
  498. voiceCancel(){
  499. this.recording = false;
  500. this.voiceTis='按住 说话';
  501. this.recordTis = '手指上滑 取消发送'
  502. this.willStop = true;//不发送录音
  503. this.RECORDER.stop();//录音结束
  504. this.recordEnd()
  505. },
  506. // 录音中(判断是否触发上滑取消发送)
  507. voiceIng(e){
  508. if(!this.recording){
  509. return;
  510. }
  511. let touche = e.touches[0];
  512. //上滑一个导航栏的高度触发上滑取消发送
  513. if(this.initPoint.Y - touche.clientY>=uni.upx2px(100)){
  514. this.willStop = true;
  515. this.recordTis = '松开手指 取消发送'
  516. }else{
  517. this.willStop = false;
  518. this.recordTis = '手指上滑 取消发送'
  519. }
  520. },
  521. // 结束录音
  522. voiceEnd(e){
  523. if(!this.recording){
  524. return;
  525. }
  526. this.recording = false;
  527. this.voiceTis='按住 说话';
  528. this.recordTis = '手指上滑 取消发送'
  529. this.RECORDER.stop();//录音结束
  530. console.log(e)
  531. this.recordEnd(e);
  532. },
  533. //录音结束(回调文件)
  534. recordEnd(e){
  535. clearInterval(this.recordTimer);
  536. if(!this.willStop){
  537. console.log("e: " + JSON.stringify(e));
  538. let msg = {
  539. length:0,
  540. url:e.tempFilePath
  541. }
  542. let min = parseInt(this.recordLength/60);
  543. let sec = this.recordLength%60;
  544. min = min<10?'0'+min:min;
  545. sec = sec<10?'0'+sec:sec;
  546. msg.length = min+':'+sec;
  547. console.log(msg)
  548. //this.sendMsg(msg,'voice');
  549. }else{
  550. console.log('取消发送录音');
  551. }
  552. this.willStop = false;
  553. },
  554. },
  555. onShareAppMessage(){
  556. }
  557. }
  558. </script>
  559. <style>
  560. .content {
  561. text-align: center;
  562. }
  563. .chat-box {
  564. background: #f4f5f7;
  565. padding-top: 3%;
  566. /* padding-bottom: 100upx; */
  567. }
  568. .tips-box {
  569. background: #D5D5DA;
  570. font-size: 28upx;
  571. color: #fff;
  572. border-radius: 30upx;
  573. width: 50%;
  574. margin: 0 auto;
  575. height: 50rpx;
  576. line-height: 50rpx
  577. }
  578. .tips-title {
  579. width: 70%;
  580. margin-top: 5%;
  581. font-size: 30rpx;
  582. height: 70rpx;
  583. line-height: 70rpx
  584. }
  585. .send-box {
  586. width: 100%;
  587. height: 90rpx;
  588. position: fixed;
  589. bottom: 0;
  590. background: #F4F0ED;
  591. display: flex;
  592. align-items: center;
  593. padding: 2upx;
  594. }
  595. .talk-box {
  596. display: flex;
  597. justify-content: flex-start;
  598. align-items: center;
  599. margin-top: 3%;
  600. }
  601. .talk-box-end {
  602. justify-content: flex-end;
  603. }
  604. .talk-head-box {
  605. width: 80rpx;
  606. height: 80rpx;
  607. border-radius: 30rpx;
  608. margin-left: 2%;
  609. margin-right: 2%;
  610. }
  611. .talk-head {
  612. width: 100%;
  613. height: 100%;
  614. border-radius: 50%;
  615. }
  616. .talk-content {
  617. padding: 2%;
  618. background: #fff;
  619. font-size: 28rpx;
  620. border-top-right-radius: 20rpx;
  621. border-bottom-left-radius: 20rpx;
  622. border-bottom-right-radius: 20rpx;
  623. text-align: left;
  624. max-width: 70%;
  625. }
  626. .talk-reply{
  627. padding: 2%;
  628. background: #9EEA6A;
  629. font-size: 28rpx;
  630. border-top-left-radius: 20rpx;
  631. border-bottom-left-radius: 20rpx;
  632. border-bottom-right-radius: 20rpx;
  633. text-align: left;
  634. max-width: 70%;
  635. }
  636. .goRechargeText {
  637. color:#0A98D5
  638. }
  639. .enter-box {
  640. height: 70rpx;
  641. background: #fff;
  642. border-radius: 1%;
  643. text-align: left;
  644. margin: 8px;
  645. margin-bottom: 10px;
  646. padding-left:8px;
  647. }
  648. .send-box image {
  649. width: 60rpx;
  650. height: 60rpx;
  651. margin-right: 10upx;
  652. margin-left: 10upx;
  653. }
  654. .submit-message {
  655. width: 18%;
  656. margin-right: 20upx;
  657. height: 70rpx;
  658. font-size: 28rpx;
  659. line-height: 70rpx;
  660. color: #fff;
  661. background-color: #0A98D5 !important;
  662. }
  663. .logo {
  664. height: 200upx;
  665. width: 200upx;
  666. margin-top: 200upx;
  667. margin-left: auto;
  668. margin-right: auto;
  669. margin-bottom: 50upx;
  670. }
  671. .text-area {
  672. display: flex;
  673. justify-content: center;
  674. }
  675. .title {
  676. font-size: 36upx;
  677. color: #8f8f94;
  678. }
  679. .uniFab{
  680. width:98px;
  681. height:36px;
  682. background:rgba(231,247,236,1);
  683. box-shadow:-6px 5px 74px 0px rgba(60,188,99,0.08);
  684. border-radius:100px 0px 0px 100px;
  685. right: 0upx;
  686. position: fixed;
  687. z-index: 9999;
  688. top: 50%;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. }
  693. .uniFab text{
  694. width:64px;
  695. font-size:16px;
  696. font-family:PingFangSC;
  697. font-weight:600;
  698. color:rgba(60,188,99,1);
  699. text-shadow:0px 1px 2px rgba(12,39,20,0.2);
  700. }
  701. .uni-share-content {
  702. display: flex;
  703. flex-wrap: wrap;
  704. padding: 15px;
  705. /* justify-content: center */
  706. }
  707. .uni-share-content-box {
  708. display: flex;
  709. flex-direction: column;
  710. align-items: center;
  711. width: 25%;
  712. box-sizing: border-box;
  713. }
  714. .uni-share-content-image {
  715. display: flex;
  716. justify-content: center;
  717. align-items: center;
  718. width: 60upx;
  719. height: 60upx;
  720. overflow: hidden;
  721. border-radius: 10upx;
  722. }
  723. .uni-share-content-image .image {
  724. width: 100%;
  725. height: 100%;
  726. }
  727. .uni-share-content-text {
  728. font-size: 26upx;
  729. color: #333;
  730. padding-top: 5px;
  731. padding-bottom: 10px;
  732. }
  733. .uni-share-btn {
  734. height: 90upx;
  735. line-height: 90upx;
  736. border-top: 1px #f5f5f5 solid;
  737. text-align: center;
  738. color: #666;
  739. font-size: 30rpx;
  740. }
  741. /* .placeHolder {
  742. padding:2px
  743. } */
  744. .auth{
  745. display: flex;
  746. flex-direction: row;
  747. font-size: 14px;
  748. justify-content: center;
  749. align-items: center;
  750. background-color: #eee;
  751. }
  752. .auth button{
  753. font-size: 14px;
  754. padding:0px;
  755. margin:0px;
  756. color:#007AFF;
  757. background-color: #eee;
  758. }
  759. .auth button:after{
  760. border: 0px;
  761. }
  762. .voice-mode {
  763. width: 70%;
  764. height: 70rpx;
  765. background: #fff;
  766. border-radius: 1%;
  767. text-align: left;
  768. margin: 8px;
  769. margin-bottom: 10px;
  770. padding-left:8px;
  771. text-align: center;
  772. line-height: 70rpx;
  773. }
  774. .icon {
  775. font-family:"HMfont-home" !important;
  776. font-size:56upx;
  777. font-style:normal;
  778. color: #333;
  779. }
  780. .hidden{
  781. display: none !important;
  782. }
  783. .record{
  784. width: 40vw;
  785. height: 40vw;
  786. position: fixed;
  787. top: 55%;
  788. left: 30%;
  789. background-color: rgba(0,0,0,.6);
  790. border-radius: 20upx;
  791. }
  792. .ing{
  793. width: 100%;
  794. height: 30vw;
  795. display: flex;
  796. justify-content: center;
  797. align-items: center;
  798. // 模拟录音音效动画
  799. }
  800. @keyframes volatility {
  801. 0% {background-position: 0% 130%;}
  802. 20% {background-position: 0% 150%;}
  803. 30% {background-position: 0% 155%;}
  804. 40% {background-position: 0% 150%;}
  805. 50% {background-position: 0% 145%;}
  806. 70% {background-position: 0% 150%;}
  807. 80% {background-position: 0% 155%;}
  808. 90% {background-position: 0% 140%;}
  809. 100% {background-position: 0% 135%;}
  810. }
  811. .cancel{
  812. width: 100%;
  813. height: 30vw;
  814. display: flex;
  815. justify-content: center;
  816. align-items: center;
  817. }
  818. .icon{
  819. background-image:linear-gradient(to bottom,#f09b37,#fff 50%);
  820. background-size:100% 200%;
  821. animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
  822. -webkit-background-clip:text;
  823. -webkit-text-fill-color:transparent;
  824. font-size: 150upx;
  825. color: #f09b37;
  826. }
  827. .tis{
  828. width: 100%;
  829. height: 10vw;
  830. display: flex;
  831. justify-content: center;
  832. font-size: 28upx;
  833. color: #fff;
  834. }
  835. .change{
  836. color: #f09b37;
  837. }
  838. </style>