circle.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <!-- <view>QQ:323392278 云站网络</view> -->
  2. <template>
  3. <view id="moments"
  4. class="page">
  5. <view v-if="showVedio" class="showVedio" :style="{height:screenHeight+'px',width:'100%'}">
  6. <!-- <video :src="videoPath"
  7. style="height: 100%;width: 100%"
  8. id="myVideo"
  9. object-fit="fill"
  10. airplay="allow" /> -->
  11. <video autoplay="true"
  12. page-gesture="true"
  13. controls="false"
  14. @fullscreenchange="fullscreenchange"
  15. :style="{height:'100%',width:'100%'}"
  16. id="myVideo"
  17. class="showVedio-video"
  18. :src="videoPath">
  19. <cover-image @tap="showVedio = false"
  20. src="/static/theme/default/my/close.png"
  21. class="cloneBut">
  22. </cover-image>
  23. <!-- </cover-view> -->
  24. </video>
  25. </view>
  26. <view class="home-pic">
  27. <avatar selWidth="600upx"
  28. selHeight="600upx"
  29. @upload="upload"
  30. :avatarSrc="circleImg"
  31. avatarStyle="width: 750upx; height: 500upx; border-radius: 0upx;" />
  32. </avatar>
  33. <view class="home-pic-base">
  34. <view class="top-pic">
  35. <image class="header"
  36. :src="myPhoto"
  37. @tap.stop="goDetails(my_data.id)"
  38. :lazy-load="true" />
  39. </view>
  40. <view class="top-name"
  41. style="color: #FFFFFF;margin-bottom: 10px;">{{ my_data.nickname }}</view>
  42. </view>
  43. </view>
  44. <view class="new_msg"
  45. @tap="goCircleChat"
  46. v-if="no_reader_msg">你有新的消息</view>
  47. <view class="moments__post"
  48. v-for="(post,index) in posts"
  49. :key="index"
  50. :id="'post-'+index" >
  51. <view class="post-left">
  52. <image class="post_header"
  53. :src="staticPhoto + post.header_image + '?_=' + imgRan"
  54. @tap="goDetails(post.uid)"
  55. :lazy-load="true" />
  56. </view>
  57. <view class="post_right">
  58. <text class="post-username"
  59. @tap="goDetails(post.uid)">{{post.username}}</text>
  60. <view>
  61. <view id="paragraph"
  62. class="paragraph"
  63. @tap="init_input()">{{post.content.text}}</view>
  64. <!-- 相册 -->
  65. <view class="thumbnails"
  66. v-if="post.type == 0"
  67. @tap="init_input()">
  68. <view :class="post.content.value.length === 1 ? 'my-gallery' : 'thumbnail' "
  69. v-for="(image, index_images) in post.content.value"
  70. :key="index_images">
  71. <image class="gallery_img"
  72. :lazy-load="true"
  73. mode="aspectFill"
  74. :src="staticPath + post.post_id +'/' + image"
  75. :data-src="image"
  76. @tap="previewImage(index,index_images)"/>
  77. <image v-if="post.content.video_path" @tap="previewImage(index,index_images)" class="bofang-button" style="width: 30px;height: 30px;position: absolute;top: 315rpx;left:220rpx" mode="aspectFill" src="/static/theme/default/my/bofang.png"></image>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="pay_view"
  82. v-if="post.can_pay == 1"> <button :disabled="post.can_pay_times == 0"
  83. :style="{'background-color':post.can_pay_times == 1?'#4591ff':'#A9A9A9'}"
  84. size="mini"
  85. @tap="open(index)"
  86. type="primary">{{post.can_pay_times == 0 ? '已售出' : '¥'+post.pay_amount + '元'}}</button></view>
  87. <!-- 资料条 -->
  88. <view class="toolbar">
  89. <view class="timestamp">{{ post.timestamp }}</view>
  90. <view class="timestamp" @tap="deletes(index)" style="margin-left: 30upx;color: #FF7600;" v-if="post.uid==my_data.id">删除</view>
  91. <view class="like" @tap="like(index)">
  92. <image :src="post.islike === 0 ? '../../static/theme/default/push/circle/islike.png' : '../../static/theme/default/push/circle/like.png'" :lazy-load="true" />
  93. </view>
  94. <view class="comment"
  95. @tap="comment(index)">
  96. <image src="../../static/theme/default/push/circle/comment.png"
  97. :lazy-load="true"></image>
  98. </view>
  99. </view>
  100. <!-- 赞/评论区 -->
  101. <view class="post-footer" v-if="post.comments.length!=0||post.like.length!=0">
  102. <view class="footer_content"
  103. v-if="post.like.length">
  104. <image class="liked"
  105. src="../../static/theme/default/push/circle/liked.png"
  106. :lazy-load="true"></image>
  107. <text class="nickname"
  108. v-for="(user,index_like) in post.like"
  109. :key="index_like"
  110. @tap="goDetails(user.uid)">
  111. {{(index_like ? ',' : '' ) + user.username}}
  112. </text>
  113. </view>
  114. <view class="footer_content"
  115. v-for="(comment,comment_index) in post.comments"
  116. :key="comment_index"
  117. @tap="reply(index,comment_index)">
  118. <text class="comment-nickname"
  119. style="word-break:break-all;">
  120. {{comment.username + comment.reply + ': '}}
  121. <text class="comment-content">
  122. {{comment.content}}
  123. </text>
  124. </text>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 结束 post -->
  129. </view>
  130. <view class="foot"
  131. v-show="showInput">
  132. <chat-input @send-message="send_comment"
  133. @blur="blur"
  134. :focus="focus"
  135. :placeholder="input_placeholder"></chat-input>
  136. <!-- <chat-input @send-message="send_comment" @blur="blur" :placeholder="input_placeholder"></chat-input> -->
  137. </view>
  138. <view class="uni-loadmore"
  139. v-if="showLoadMore">{{loadMoreText}}</view>
  140. <view :class="['action_main animated faster',(action_menu ? 'bounceInDown' : 'bounceOutUp')]"
  141. v-show="showActionMenu"
  142. @tap="actionMain">
  143. <view class="action_base">
  144. <view class="sj"></view>
  145. <view class="action_item"
  146. @tap="goAction(0)">
  147. <text class="action_item_text">发送图文</text>
  148. </view>
  149. <view class="action_item"
  150. @tap="goAction(1)">
  151. <text class="action_item_text">发送视频</text>
  152. </view>
  153. </view>
  154. </view>
  155. <uni-popup ref="popup" type="address">
  156. <uni-popup-address :userAddress="userAddress" :amount="amount" :goods_name="goods_name" :small_pic="small_pic" @confirm="goBuy"></uni-popup-address>
  157. </uni-popup>
  158. <pay-keyboard :showCose="showCose" :set_info = "set_info" :show_key="show_key" ref="payKeyboard" :set_msg="set_msg" @hideFun="hideFun" @getPassword="getPassword"></pay-keyboard>
  159. </view>
  160. </template>
  161. <script>
  162. import chatInput from './circle/chat_input.vue'; //输入消息框
  163. import _get from '../../common/_get';
  164. import _hook from '../../common/_hook';
  165. import avatar from "../../components/yq-avatar/yq-avatar.vue";
  166. import _data from '../../common/_data';
  167. import UniPopupAddress from "../../components/uni-popup/uni-popup-address";
  168. import UniPopup from "../../components/uni-popup/uni-popup";
  169. import payKeyboard from "../../components/uni-keyword/uni-keyword";
  170. export default {
  171. components: {
  172. UniPopup,
  173. UniPopupAddress,
  174. chatInput,
  175. avatar,
  176. payKeyboard
  177. },
  178. data () {
  179. return {
  180. showPage:true,
  181. my_data: {
  182. id: 0,
  183. nickname: '',
  184. photo: 'default_man/90.jpg',
  185. circle_img: 'default_circle_img.jpg',
  186. },
  187. showCose:true,
  188. set_info:'请输入交易密码,以确认身份',
  189. show_key:false,
  190. set_msg:'请输入交易密码',
  191. user_id: 0,
  192. action_menu: false,
  193. posts: [],// 模拟数据
  194. index: '',
  195. comment_index: '',
  196. input_placeholder: '评论', //占位内容
  197. focus: false, //是否自动聚焦输入框
  198. is_reply: false, //回复还是评论
  199. showInput: false, //评论输入框
  200. screenHeight: '', //屏幕高度(系统)
  201. platform: '',
  202. windowHeight: '',//可用窗口高度(不计入软键盘)
  203. loadMoreText: "加载中...",
  204. showLoadMore: false,
  205. is_more: false,
  206. no_reader_msg: 0,
  207. doubleClick: false,
  208. showVedio:false,
  209. videoPath:'',
  210. post_id:'',
  211. post_index_id:0,
  212. userAddress:{
  213. regionStr: '',
  214. username: '',
  215. mobile: '',
  216. address: '',
  217. regionCode:'440113'
  218. },
  219. small_pic:'',
  220. amount:'',
  221. goods_name: '',
  222. }
  223. },
  224. computed: {
  225. regionName(){
  226. return this.region.map(item=>item.name).join(' ')
  227. },
  228. showActionMenu () {
  229. return this.action_menu;
  230. },
  231. myPhoto () {
  232. return _data.staticPhoto() + this.my_data.photo + '?_=' + this.imgRan;
  233. },
  234. circleImg () {
  235. return _data.staticPhoto() + this.my_data.circle_img;
  236. },
  237. staticPath () {
  238. return _data.staticCircle();
  239. },
  240. staticPhoto () {
  241. return _data.staticPhoto();
  242. },
  243. imgRan () {
  244. return Math.random();
  245. },
  246. },
  247. onLoad (option) {
  248. let _this = this;
  249. uni.getSystemInfo({ //获取设备信息
  250. success: (res) => {
  251. _this.screenHeight = res.screenHeight;
  252. _this.platform = res.platform;
  253. }
  254. });
  255. },
  256. onShow () {
  257. _hook.routeSonHook();
  258. let _this = this;
  259. let circle_data = _data.localData('circle_data');
  260. console.log("22222222222",circle_data)
  261. /** 加载本地缓存数据,让页面秒速渲染出来 */
  262. if (circle_data) {
  263. _this.posts = circle_data;
  264. if (_data.data('no_reader_circle') || _data.data('no_reader_circle_chat_num')) {
  265. this.posts = [];
  266. _data.data('circle_data', []);
  267. this.pullDownRefresh();
  268. }
  269. } else {
  270. _this.pullDownRefresh();
  271. }
  272. let userAddress =_data.localData('data_user_address');
  273. if(userAddress)_this.userAddress = userAddress;
  274. this.no_reader_msg = _data.data('no_reader_circle_chat_num') ? 1 : 0;
  275. _data.data('no_reader_circle', 0);
  276. // 监听窗口尺寸变化,窗口尺寸不包括底部导航栏
  277. uni.onWindowResize((res) => {
  278. if (this.platform === 'ios') {
  279. this.windowHeight = res.size.windowHeight;
  280. this.adjust();
  281. } else {
  282. if (this.screenHeight - res.size.windowHeight > 60 && this.windowHeight <= res.size.windowHeight) {
  283. this.windowHeight = res.size.windowHeight;
  284. this.adjust();
  285. }
  286. }
  287. });
  288. uni.$off('data_circle_data');
  289. /** 监听最新数据 */
  290. uni.$on('data_circle_data', function (data) {
  291. // console.log(data)
  292. _this.posts = data;
  293. });
  294. /** 监听新的个人数据 */
  295. uni.$on('data_user_info', function (data) {
  296. _this.my_data = data;
  297. });
  298. /** 监听朋友圈动态提示 */
  299. uni.$on('data_circle_tips', function (data) {
  300. if (!isNaN(data)) {
  301. _this.no_reader_msg = 1;
  302. };
  303. });
  304. _this.my_data = _data.data('user_info');
  305. },
  306. onNavigationBarButtonTap (e) {
  307. this.action_menu = !this.action_menu;
  308. },
  309. onUnload () {
  310. uni.$off('data_circle_tips');
  311. uni.$off('data_user_info');
  312. uni.$off('data_circle_data');
  313. uni.offWindowResize(() => {
  314. });
  315. this.max = 0,
  316. this.data = [],
  317. this.loadMoreText = "加载更多",
  318. this.showLoadMore = false;
  319. },
  320. onReachBottom () { //监听上拉触底事件
  321. let _this = this;
  322. _this.showLoadMore = true;
  323. if (_this.is_more) {
  324. return;
  325. }
  326. let time = 0,
  327. is_length = _this.posts.length;
  328. if (is_length) {
  329. time = _this.posts[is_length - 1].time;
  330. }
  331. _get.getCircleList({
  332. time: time,
  333. type: 1,
  334. user_id: 0
  335. }, (data) => {
  336. _this.my_data = data.user_info;
  337. if (data.data.length < 10) {
  338. this.loadMoreText = '没有更多数据了';
  339. this.is_more = true;
  340. }
  341. });
  342. },
  343. onPullDownRefresh () { //监听下拉刷新动作
  344. if (_data.data('no_reader_circle') || _data.data('no_reader_circle_chat_num')) {
  345. this.posts = [];
  346. _data.data('circle_data', []);
  347. }
  348. this.pullDownRefresh();
  349. },
  350. onNavigationBarButtonTap (e) {//监听标题栏点击事件
  351. let _this = this;
  352. if (e.index == 0) {
  353. // this.navigateTo('./circle/send');
  354. // this.action_menu = !this.action_menu
  355. let list = [{
  356. name: "图文",
  357. key: "image"
  358. },{
  359. name: "短视频",
  360. key: "video"
  361. },{
  362. name: "取消",
  363. key: "cancle"
  364. }]
  365. uni.showActionSheet({
  366. itemList: list.map(v => v.name),
  367. success: res => {
  368. if(res.tapIndex == 2)return false;
  369. uni.navigateTo({
  370. url: './circle/send?type=' + list[res.tapIndex].key+'&user_id='+_this.user_id,
  371. });
  372. },
  373. });
  374. }
  375. },
  376. methods: {
  377. goAction (index) {
  378. if (index === 0) {
  379. this.navigateTo('./circle/send?user_id='+this.user_id);
  380. }
  381. },
  382. actionMain () {
  383. this.action_menu = !this.action_menu;
  384. },
  385. upload (e) {
  386. let _this = this;
  387. _this.$httpSendFile({
  388. local_url: e.path,
  389. type: 3,
  390. success (data) {
  391. _this.$httpSend({
  392. path: '/im/action/upCircleImg',
  393. success (data) {
  394. _get.base();
  395. uni.showToast({
  396. title: '更换成功',
  397. duration: 2000
  398. });
  399. }
  400. });
  401. },
  402. });
  403. },
  404. goCircleChat () {
  405. _data.data('no_reader_circle_chat_num', 0);
  406. console.log(_data.data('no_reader_circle_chat_num', 0))
  407. this.navigateTo('./circle_chat_details');
  408. },
  409. pullDownRefresh () {
  410. let _this = this;
  411. //初始化数据
  412. let time = 0;
  413. if (this.posts.length) {
  414. time = this.posts[0].time;
  415. }
  416. _get.getCircleList({
  417. time: time,
  418. type: 0,
  419. user_id: 0,
  420. }, (data) => {
  421. _this.my_data = data.user_info;
  422. });
  423. uni.stopPullDownRefresh(); //停止下拉刷新
  424. /** 取消好友动态提示 */
  425. _data.data('no_reader_circle', 0);
  426. },
  427. goDetails (user_id) {
  428. this.navigateTo('../details/index?user_id=' + user_id);
  429. },
  430. navigateTo (url) {
  431. uni.navigateTo({
  432. url: url
  433. });
  434. },
  435. like (index) {
  436. let _this = this,
  437. is_like = (_this.posts[index].islike ? 0 : 1);
  438. _this.$httpSend({
  439. path: '/im/circle/likeAction',
  440. data: {
  441. is_like: is_like,
  442. id: _this.posts[index].post_id,
  443. },
  444. success (data) {
  445. // _this.posts[index].islike = data.action;
  446. }
  447. });
  448. },
  449. deletes (index) {
  450. let _this = this;
  451. var circle_data = _data.localData('circle_data');
  452. uni.showModal({
  453. title: '提示',
  454. content: '是否删除此动态',
  455. success: function (res) {
  456. if (res.confirm) {
  457. _this.$httpSend({
  458. path: '/im/circle/delMsg',
  459. data: {
  460. id: _this.posts[index].post_id
  461. },
  462. success (res) {
  463. for (var i=0; i<circle_data.length;i++) {
  464. console.log("123")
  465. if (circle_data[i].post_id == _this.posts[index].post_id) {
  466. circle_data.splice(i,1);
  467. uni.setStorageSync('circle_data', circle_data);
  468. _this.posts = circle_data;
  469. uni.showToast({
  470. title: '已删除',
  471. duration: 2000
  472. });
  473. }
  474. }
  475. }
  476. });
  477. } else if (res.cancel) {
  478. console.log('用户点击取消');
  479. }
  480. }
  481. });
  482. },
  483. comment (index) {
  484. if (this.showInput) {
  485. this.showInput = false;
  486. this.focus = false;
  487. this.index = '';
  488. } else {
  489. this.showInput = true; //调起input框
  490. this.focus = true;
  491. this.index = index;
  492. }
  493. },
  494. adjust () { //当弹出软键盘发生评论动作时,调整页面位置pageScrollTo
  495. uni.createSelectorQuery().selectViewport().scrollOffset(res => {
  496. var scrollTop = res.scrollTop;
  497. let view = uni.createSelectorQuery().select("#post-" + this.index);
  498. view.boundingClientRect(data => {
  499. // console.log("data:" + JSON.stringify(data));
  500. // console.log("手机屏幕高度:" + this.screenHeight);
  501. // console.log("竖直滚动位置" + scrollTop);
  502. // console.log("节点离页面顶部的距离为" + data.top);
  503. // console.log("节点高度为" + data.height);
  504. // console.log("窗口高度为" + this.windowHeight);
  505. // uni.pageScrollTo({
  506. // scrollTop: scrollTop - (this.windowHeight - (data.height + data.top + 45)), //一顿乱算
  507. // // scrollTop: 50,
  508. // duration: 300
  509. // });
  510. }).exec();
  511. }).exec();
  512. },
  513. reply (index, comment_index) {
  514. this.is_reply = true; //回复中
  515. this.showInput = true; //调起input框
  516. let replyTo = this.posts[index].comments[comment_index].username;
  517. this.input_placeholder = '回复' + replyTo;
  518. this.index = index; //post索引
  519. this.comment_index = comment_index; //评论索引
  520. this.focus = true;
  521. },
  522. blur: function () {
  523. //this.init_input();
  524. },
  525. send_comment: function (message) {
  526. let _this = this,
  527. is_posts_obj = this.posts[this.index],
  528. chat_user_id = is_posts_obj.uid,
  529. reply = '';
  530. if (this.is_reply) {
  531. let is_reply_obj = is_posts_obj.comments[this.comment_index];
  532. chat_user_id = is_reply_obj.uid;
  533. if (is_posts_obj.uid != chat_user_id) {
  534. reply = '回复' + is_reply_obj.username;
  535. }
  536. }
  537. _this.$httpSend({
  538. path: '/im/circle/comment',
  539. data: {
  540. message,
  541. id: is_posts_obj.post_id,
  542. chat_user_id,
  543. },
  544. success (data) {
  545. is_posts_obj.comments.push({
  546. "uid": _this.my_data.id,
  547. 'reply': reply,
  548. "username": _this.my_data.nickname,
  549. "content": message
  550. });
  551. _this.init_input();
  552. }
  553. });
  554. },
  555. init_input () {
  556. this.showInput = false;
  557. this.focus = false;
  558. this.input_placeholder = '评论';
  559. this.is_reply = false;
  560. },
  561. createVideoPlayer(video_path){
  562. // #ifdef APP-PLUS
  563. let player = null;
  564. player = plus.video.createVideoPlayer('videoplayer', {
  565. src:'rtmp://'+video_path,
  566. top:'50px',
  567. left:'0px',
  568. width: '100%',
  569. height: '100%',
  570. position: 'fix'
  571. });
  572. var pages = getCurrentPages();
  573. var page = pages[pages.length - 1];
  574. var currentWebview = page.$getAppWebview();
  575. currentWebview.append(player)
  576. // #endif
  577. },
  578. previewImage (index, image_index) {
  579. let data = this.posts[index],
  580. _this = this,
  581. images_all = [];
  582. console.log(111)
  583. if(data.content.video_path){
  584. let video_path = this.staticPath + data.post_id + '/' + data.content.video_path;
  585. _this.videoPath = video_path;
  586. _this.showVedio = true;
  587. //设置屏幕高度
  588. return true;
  589. }
  590. for (let i = 0, j = data.content.value.length; i < j; i++) {
  591. images_all.push(this.staticPath + data.post_id + '/' + data.content.value[i].replace('_thumb', ''));
  592. }
  593. var current = images_all[image_index];
  594. uni.previewImage({
  595. current: current,
  596. urls: images_all
  597. });
  598. },
  599. goPublish () {
  600. uni.navigateTo({
  601. url: './circle/send',
  602. success: res => { },
  603. fail: () => { },
  604. complete: () => { }
  605. });
  606. },
  607. // 获取选择的地区
  608. goBuy(address){
  609. //弹出交易密码界面
  610. // this.show_key = true;
  611. this.userAddress = address;
  612. _data.localData('data_user_address',address);
  613. //去支付
  614. let _this = this;
  615. let params =this.userAddress;
  616. params.post_id = this.post_id;
  617. let circle_data = _data.localData('circle_data');
  618. let data = circle_data[_this.post_index_id];
  619. let small_pic = this.staticPath + data.post_id + '/' + data.content.value[0].replace('_thumb', '');
  620. params.small_pic = small_pic;
  621. _get.payCicleOrder(params,function (ret) {
  622. //更新本地朋友圈信息
  623. uni.showToast({
  624. title:'购买成功',
  625. icon:'none',
  626. });
  627. _this.$refs.popup.close();
  628. },function (ret) {
  629. uni.showToast({
  630. title:ret.msg,
  631. icon:'none',
  632. });
  633. _this.show_key = false;
  634. })
  635. },
  636. hideFun(){
  637. this.show_key = false;
  638. },
  639. getPassword(e){
  640. //去支付
  641. let _this = this;
  642. e.post_id = this.post_id;
  643. let params = Object.assign(e,this.userAddress);
  644. let circle_data = _data.localData('circle_data');
  645. let data = circle_data[_this.post_index_id];
  646. let small_pic = this.staticPath + data.post_id + '/' + data.content.value[0].replace('_thumb', '');
  647. e.small_pic = small_pic;
  648. _get.payCicleOrder(params,function (ret) {
  649. //更新本地朋友圈信息
  650. uni.showToast({
  651. title:'购买成功',
  652. icon:'none',
  653. });
  654. _this.show_key = false;
  655. _this.$refs.payKeyboard.cleanNum();
  656. _this.$refs.popup.close();
  657. },function (ret) {
  658. uni.showToast({
  659. title:ret.msg,
  660. icon:'none',
  661. });
  662. _this.show_key = false;
  663. _this.$refs.payKeyboard.cleanNum();
  664. })
  665. },
  666. open(index){
  667. let data = this.posts[index];
  668. console.log(this.userAddress)
  669. this.goods_name = data.content.text;
  670. this.small_pic = this.staticPath + data.post_id + '/' + data.content.value[0].replace('_thumb', '');
  671. this.amount = data.pay_amount;
  672. this.post_id = data.post_id;
  673. this.post_index_id = index;
  674. this.$refs.popup.open();
  675. },
  676. fullscreenchange(){
  677. console.log(1111111111111)
  678. }
  679. },
  680. watch: {
  681. },
  682. }
  683. </script>
  684. <style scoped>
  685. @import url("../../static/css/push/circle.css");
  686. .page {
  687. position: relative;
  688. }
  689. .pay_view {
  690. margin: 15upx 0;
  691. text-align: right;
  692. }
  693. .new_msg {
  694. text-align: center;
  695. color: #36648b;
  696. font-weight: bold;
  697. }
  698. .action_main {
  699. position: fixed;
  700. top: 120upx;
  701. /* #ifndef H5 */
  702. top: 15px;
  703. /* #endif */
  704. width: 750upx;
  705. height: 1080upx;
  706. z-index: 10000;
  707. }
  708. .action_base {
  709. position: absolute;
  710. right: 15upx;
  711. width: 300upx;
  712. top: 120upx;
  713. background: #36363d;
  714. border-radius: 10upx;
  715. }
  716. .sj {
  717. position: fixed;
  718. top: -28upx;
  719. right: 26upx;
  720. /* #ifdef APP-PLUS */
  721. top: 3upx;
  722. right: 20upx;
  723. /* #endif */
  724. width: 0;
  725. height: 0;
  726. border-left: 20upx solid transparent;
  727. border-right: 20upx solid transparent;
  728. border-bottom: 20upx solid #36363d;
  729. }
  730. .action_item {
  731. color: #e5e5e5;
  732. height: 100upx;
  733. line-height: 100upx;
  734. margin-left: 45upx;
  735. border-bottom: 1px solid #3e3e3e;
  736. }
  737. .action_icon {
  738. width: 45upx;
  739. height: 45upx;
  740. display: inline-block;
  741. vertical-align: middle;
  742. }
  743. .action_item:last-child {
  744. border: none;
  745. }
  746. .action_item_text {
  747. font-size: 30upx;
  748. }
  749. .showVedio {
  750. position: fixed;
  751. z-index: 999;
  752. }
  753. .cloneBut {
  754. position: relative;
  755. font-size: 24px;
  756. color: red;
  757. margin-left: 30px;
  758. margin-top: 80px;
  759. height: 30px;
  760. width: 30px;
  761. }
  762. .paragraph{
  763. word-break: break-all;
  764. }
  765. </style>