index.vue 24 KB

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