index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. <template>
  2. <view :data-theme="theme" class="discover borderPad">
  3. <!-- 表单 -->
  4. <form v-if="!topicShow" @submit="formSubmit" report-submit='true'>
  5. <navigator url="/pages/address/user_address_list/index" v-if="fair">
  6. <view class="allAddress">
  7. <view class='address row-between-wrapper flex-between-center'>
  8. <view class='addressCon' v-if="addressInfo.realName">
  9. <view class='name'>{{addressInfo.realName}}
  10. <text class='phone'>{{addressInfo.phone}}</text>
  11. </view>
  12. <view class="acea-row line2">
  13. <text class='default font_color' v-if="addressInfo.isDefault">[默认]</text>
  14. <text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{ addressInfo.street}}{{addressInfo.detail}}</text>
  15. </view>
  16. </view>
  17. <view class='addressCon' v-else>
  18. <view class='setaddress'>设置收货地址</view>
  19. </view>
  20. <view class='iconfont icon-jiantou'></view>
  21. </view>
  22. <view class='line'>
  23. <image src='../../goods/static/images/line.png'></image>
  24. </view>
  25. </view>
  26. </navigator>
  27. <view class="release_content">
  28. <view class="release_item">
  29. <view class="title mb30">
  30. <input :placeholder="fair ? '填写好物名称' : dazi ? '填写标题' : '填写标题会有更多赞噢~'" name="title" placeholder-class='placeholder' v-model="formData.title" maxlength="20" />
  31. </view>
  32. <view class="textarea">
  33. <textarea :placeholder="fair ? '说说好物信息,入手渠道,转卖原因...' : dazi ? '填写简介' : formData.type == 1?'分享使用体验和心得,获得更多点赞和关注哦~(600字以内)':'分享使用体验和心得,获得更多点赞和关注哦~(200字以内)'"
  34. auto-height name="comment" placeholder-class='placeholder' v-model="formData.content" :maxlength="formData.type == 1?'600':'200'"></textarea>
  35. <view class="discoverlist acea-row mt-10">
  36. <view v-for="(item, index) in discoverTopicList" :key="item.id" class="list mr-12 font-color">
  37. <text class="icon iconfont icon-huati"></text>{{item.name}}
  38. </view>
  39. </view>
  40. </view>
  41. <view class="photo_count mt-30">
  42. <view class="input_photo acea-row row-middle">
  43. <view class="pictrue" v-if="formData.video">
  44. <image class="video-bg" mode="widthFix" src="../static/images/video_bg.png"></image>
  45. <view class="videoHover" @click="videoshow">
  46. <view>
  47. <text class="iconfont icon-24gf-play"></text>
  48. </view>
  49. </view>
  50. <text class="video-text">点击可预览视频</text>
  51. <view class="close_btn" @click="formData.video = ''"><text class="iconfont icon-guanbi4"></text></view>
  52. </view>
  53. <view class="pictrue" v-for="(item, index) in image" :key="index">
  54. <easy-loadimage mode="widthFix" :image-src="item.url"></easy-loadimage>
  55. <text class="cover_text" v-if="item.isCover">封面</text>
  56. <view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view>
  57. <view class="cover_change" v-if="!item.isCover" @click="onChangeCover(item, index)">更换封面
  58. </view>
  59. </view>
  60. <view v-if="image.length < 9 && !formData.video" class="pictrue acea-row row-center-wrapper row-column add"
  61. @click="upload('image')">
  62. <view><text class='iconfont icon-paizhao'></text></view>
  63. <view class="text">添加图片</view>
  64. </view>
  65. <view v-if="image.length === 0 && !formData.video && !dazi" class="pictrue acea-row row-center-wrapper row-column add"
  66. @click="upload('video',1)">
  67. <view><text class='iconfont icon-tianjiashipin'></text></view>
  68. <view class="text">添加视频</view>
  69. </view>
  70. <view v-if="formData.video && image.length=== 0" class="pictrue acea-row row-center-wrapper row-column add"
  71. @click="upload('video',2)">
  72. <view><text class='iconfont icon-paizhao'></text></view>
  73. <view class="text">添加封面</view>
  74. </view>
  75. </view>
  76. </view>
  77. <!-- <view @click="addTopic" class="flex flex-wrap mt-120">
  78. <view class="h-52 px-16 rd-30rpx border-eee flex-center fs-24">
  79. <span class="line-heightOne">#话题</span>
  80. </view>
  81. </view> -->
  82. </view>
  83. </view>
  84. <view class="release_content">
  85. <view class="release_item" style="padding: 0 24rpx;">
  86. <!-- <view class='item acea-row row-between-wrapper' @click.stop="addProduct">
  87. <view class='name color28'><text class="iconfont icon-tianjiabaobei"></text>添加宝贝({{productList.length}})
  88. </view>
  89. <view class="select">
  90. <view class="select_count">
  91. <text v-if="productList.length == 0" class="text">请选择</text>
  92. <view v-else class="text">
  93. <image class="image" v-for="(item,index) in productList" :key="index" :src="item.image || item.productImage"></image>
  94. </view>
  95. <text class="iconfont icon-xiangyou"></text>
  96. </view>
  97. </view>
  98. </view> -->
  99. <view class='item acea-row row-between-wrapper'>
  100. <view class='name color28'><text class="iconfont icon-neirongfenlei"></text>内容分类
  101. </view>
  102. <view class="select">
  103. <view class="select_count">
  104. <picker class="pickerIpt" @change="bindSexChange" :value="sexindex" :range="categoryList" range-key="name">
  105. <text v-if="!categoryName" class="text">请选择</text>
  106. <view class="uni-input color28 text">{{categoryName}}</view>
  107. </picker>
  108. <text @change="bindSexChange" class="iconfont icon-xiangyou"></text>
  109. </view>
  110. </view>
  111. </view>
  112. <view v-if="fair && noteId" class='item acea-row row-between-wrapper'>
  113. <view class='name color28'><text class="iconfont icon-neirongfenlei"></text>是否上架</view>
  114. <view class="select">
  115. <switch @change="switch2Change" :checked="saleStatus" :color="indicatorBg" style="transform:scale(0.7)" />
  116. </view>
  117. </view>
  118. <view class='item acea-row row-between-wrapper' v-if="fair">
  119. <view class='name color28'><text class="iconfont icon-qiandai"></text>价格
  120. </view>
  121. <view class="select">
  122. <view class="select_count">
  123. <text class="select-input">¥</text>
  124. <input class="text w-128 select-input" type="number" :maxlength="6" :placeholder="'价格'" placeholder-class="placeholder" v-model="formData.price" />
  125. <text @change="bindSexChange" class="iconfont icon-xiangyou"></text>
  126. </view>
  127. </view>
  128. </view>
  129. <template v-if="!fair && !dazi">
  130. <view v-if="!replyPlatformSwitch" class='item acea-row row-between-wrapper'>
  131. <view class='name color28'>总平台禁止评论</view>
  132. </view>
  133. <view v-else class='item acea-row row-between-wrapper'>
  134. <view class='name color28'><text class="iconfont icon-pinglun3"></text>是否禁止评论</view>
  135. <view class="select">
  136. <switch @change="switch1Change" :checked="replyStatus" :color="indicatorBg" style="transform:scale(0.7)" />
  137. </view>
  138. </view>
  139. </template>
  140. </view>
  141. </view>
  142. <button class="release_btn button" form-type="submit">发布</button>
  143. </form>
  144. <!-- 商品列表 -->
  145. <tui-bottom-popup class="topic" :zIndex="1002" :maskZIndex="1001" :show="popupShow" @close="popup">
  146. <associated-product v-if="popupShow" :checkedObj="productList" @getProduct="getProduct" @close="popup"></associated-product>
  147. </tui-bottom-popup>
  148. <!-- 话题列表 -->
  149. <tui-bottom-popup class="topic" :zIndex="1002" :maskZIndex="1001" :show="topicShow" @close="popupTopic">
  150. <discover-topic v-if="topicShow" @onClose="popupTopic"></discover-topic>
  151. </tui-bottom-popup>
  152. <!--视频预览弹窗-->
  153. <tui-bottom-popup class="topic" :zIndex="1002" :maskZIndex="1001" :show="showVideo" @close="showVideo=false">
  154. <view v-if="showVideo" class="video-count">
  155. <!--#ifndef APP-PLUS-->
  156. <video id="myVideo" class="videoLink" autoplay loop muted :src="formData.video"></video>
  157. <!--#endif-->
  158. <!--#ifdef APP-PLUS-->
  159. <view v-html="videoHtml"></view>
  160. <!--#endif-->
  161. </view>
  162. </tui-bottom-popup>
  163. </view>
  164. </template>
  165. <script>
  166. // #ifdef MP
  167. import {
  168. base64src
  169. } from '@/utils/base64src.js'
  170. // #endif
  171. import {
  172. mapGetters
  173. } from "vuex";
  174. import {
  175. setThemeColor
  176. } from '@/utils/setTheme.js'
  177. import { gameAddApi, gameUpdateApi, gameDetailApi } from '@/api/gameDazi.js';
  178. import {
  179. noteDetailApi,
  180. secondHandDetailApi,
  181. communityCategoryListApi,
  182. getSecondHandInfo,
  183. noteUpdateApi,
  184. noteAddApi,
  185. secondHandAddApi,
  186. secondHandUpdateApi,
  187. replyPlatformSwitchApi
  188. } from '@/api/discover.js';
  189. import {
  190. Debounce
  191. } from '@/utils/validate.js';
  192. import {
  193. HTTP_REQUEST_URL
  194. } from '@/config/app.js';
  195. import {
  196. getAddressDefault
  197. } from '@/api/user.js';
  198. import tuiBottomPopup from "../components/tui-bottom-popup.vue"
  199. import associatedProduct from "../components/associatedProduct.vue"
  200. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  201. import discoverTopic from '../components/discover_topic.vue';
  202. let app = getApp();
  203. export default {
  204. components: {
  205. tuiBottomPopup,
  206. associatedProduct,
  207. easyLoadimage,
  208. discoverTopic
  209. },
  210. computed: {
  211. ...mapGetters(['discoverTopic']),
  212. videoHtml: function() {
  213. return `<video autoplay loop muted controls="controls" width="100%" height="870px"><source src="${this.formData.video}" type="video/mp4"></video>`;
  214. }
  215. },
  216. data() {
  217. return {
  218. topicShow: false,
  219. popupShow: false,
  220. theme: app.globalData.theme,
  221. image: [], //图片集合
  222. cover: '', //视频第一帧作为封面
  223. filesLen: 0,
  224. exceeded_list: [],
  225. uploadMaxSize: 50, //上传图片大小限制
  226. formData: {
  227. categoryId: 0,
  228. image: "",
  229. content: "",
  230. cover: '',
  231. topicIds: "",
  232. proIds: "",
  233. video: '',
  234. id: 0,
  235. replyStatus: 1,
  236. title: "",
  237. type: 1 //1图文,2视频
  238. },
  239. productList: [], //商品
  240. topicList: [], //话题
  241. noteId: 0, //内容id
  242. sexindex: 0, //分类索引
  243. categoryName: '', //分类名称
  244. categoryList: [], //逛逛分类
  245. indicatorBg: '#e93323',
  246. discoverTopicList: [], //选中的话题列表
  247. replyStatus: false, //开关
  248. saleStatus: true, //开关
  249. showVideo: false, //预览视频弹窗
  250. replyPlatformSwitch: false, //评论总开关状态,true开启,false关闭
  251. videoContext: '',
  252. fair: false,
  253. dazi: false,
  254. addressInfo: {},
  255. }
  256. },
  257. onShow() {
  258. this.getReplyPlatformSwitch();
  259. uni.$on('addressInfo', function(res) {
  260. that.$set(that, 'addressInfo', res);
  261. })
  262. },
  263. mounted() {
  264. // #ifndef APP-PLUS
  265. this.videoContext = uni.createVideoContext('myVideo', this);
  266. // #endif
  267. },
  268. onLoad(options) {
  269. console.log(options)
  270. this.discoverTopicList = [];
  271. this.$store.commit('DiscoverTopic', this.discoverTopicList);
  272. this.indicatorBg = setThemeColor();
  273. this.fair = options.fair ? options.fair : false
  274. this.dazi = options.dazi ? options.dazi : false
  275. this.noteId = options.noteId ? Number(options.noteId) : 0;
  276. if (this.noteId > 0) this.getDetail();
  277. this.getCommunityCategoryList();
  278. this.videoContext = uni.createVideoContext("myvideo", this);
  279. if (this.fair) {
  280. getAddressDefault().then(res => {
  281. console.log('地址', res)
  282. this.addressInfo = res.data || {}
  283. })
  284. }
  285. },
  286. // 滚动监听
  287. onPageScroll(e) {
  288. // 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
  289. uni.$emit('scroll');
  290. },
  291. methods: {
  292. /*更换封面*/
  293. onChangeCover(item) {
  294. uni.showLoading({
  295. title: '加载中',
  296. mask: true
  297. })
  298. setTimeout(() => {
  299. this.image.map(items => {
  300. items.isCover = false
  301. })
  302. this.$set(item, 'isCover', true);
  303. uni.hideLoading();
  304. }, 500);
  305. },
  306. /*获取评论总开关状态*/
  307. getReplyPlatformSwitch() {
  308. replyPlatformSwitchApi().then(res => {
  309. this.replyPlatformSwitch = res.data == 1 ? true : false;
  310. })
  311. },
  312. /*查看视频*/
  313. videoshow() {
  314. this.showVideo = true
  315. this.videoContext = uni.createVideoContext('myVideo', this);
  316. this.$nextTick(() => {
  317. this.videoContext.play();
  318. })
  319. },
  320. //开关
  321. switch1Change: function(e) {
  322. this.formData.replyStatus = e.detail.value ? 2 : 1;
  323. },
  324. //开关
  325. switch2Change: function(e) {
  326. this.formData.saleStatus = e.detail.value ? 0 : 4;
  327. },
  328. //分类列表
  329. getCommunityCategoryList() {
  330. if (this.dazi) {
  331. this.categoryList = [{id: 0, name: '游戏陪玩'}, {id: 1, name: '代练'}]
  332. } else {
  333. let categoryApi = this.fair ? getSecondHandInfo() : communityCategoryListApi();
  334. categoryApi.then(res => {
  335. this.categoryList = this.fair ? res.data.navigatList : res.data;
  336. })
  337. }
  338. },
  339. //选择分类
  340. bindSexChange(e) {
  341. this.sexindex = e.detail.value;
  342. this.formData.categoryId = this.categoryList[this.sexindex].id;
  343. this.categoryName = this.categoryList[this.sexindex].name;
  344. },
  345. /*获取图文详情*/
  346. getDetail() {
  347. let api = this.fair ? secondHandDetailApi : this.dazi ? gameDetailApi : noteDetailApi;
  348. api(this.noteId).then(res => {
  349. this.formData = res.data;
  350. this.productList = res.data.productList || [];
  351. this.topicList = res.data.topicList || [];
  352. //视频2 图文1
  353. if (this.formData.type === 2) {
  354. this.image = [{
  355. url: res.data.cover,
  356. isCover: true
  357. }];
  358. } else {
  359. let images = res.data.image ? res.data.image.split(',') : [];
  360. let index = images.findIndex(item => {
  361. if (item === this.formData.cover) {
  362. return true
  363. }
  364. });
  365. images.map(item => {
  366. this.image.push({
  367. isCover: false,
  368. url: item
  369. })
  370. })
  371. this.$set(this.image[index], 'isCover', true);
  372. }
  373. this.discoverTopicList = res.data.topicList || [];
  374. this.$store.commit('DiscoverTopic', this.discoverTopicList);
  375. this.replyStatus = this.formData.replyStatus == 2 ? true : false;
  376. this.saleStatus = this.formData.saleStatus == 0 ? true : false;
  377. this.categoryName = this.formData.categoryName;
  378. this.sexindex = this.formData.categoryId;
  379. }).catch(err => {
  380. return this.$util.Tips({
  381. title: err
  382. });
  383. })
  384. },
  385. /*删除话题*/
  386. onDel(i) {
  387. this.discoverTopicList.splice(i, 1);
  388. this.$store.commit('DiscoverTopic', this.discoverTopicList);
  389. },
  390. /*参与话题*/
  391. addTopic() {
  392. this.topicShow = true;
  393. },
  394. popup() {
  395. this.popupShow = false;
  396. },
  397. popupTopic() {
  398. this.topicShow = false;
  399. this.discoverTopicList = [...this.discoverTopic]
  400. },
  401. /*添加宝贝*/
  402. addProduct() {
  403. this.popupShow = true;
  404. },
  405. // 上传
  406. upload(name, n) {
  407. if (name === 'image') {
  408. this.formData.type = 1
  409. this.getImage();
  410. } else {
  411. this.formData.type = 2
  412. n === 1 ? this.getVideo() : this.getImage();
  413. }
  414. },
  415. //传图片
  416. getImage() {
  417. this.$util.uploadImageOne({
  418. name: 'multipart',
  419. model: "product",
  420. pid: 1,
  421. count: 9
  422. }, res => {
  423. let data = []
  424. res.map(item => {
  425. data.push({
  426. isCover: false,
  427. url: item
  428. })
  429. })
  430. this.image = [...this.image, ...data];
  431. if (this.image && this.image.length) this.image[0].isCover = true;
  432. });
  433. },
  434. //传视频
  435. getVideo() {
  436. this.$util.uploadVideo({
  437. name: 'multipart',
  438. model: "product",
  439. pid: 1,
  440. }, async res => {
  441. this.formData.video = res.fils;
  442. // #ifdef H5
  443. this.image = [{
  444. url: res.coverURL,
  445. isCover: true
  446. }];
  447. // #endif
  448. });
  449. },
  450. /**删除图片*/
  451. DelPic(index) {
  452. this.image.splice(index, 1);
  453. },
  454. /*获取选中的宝贝*/
  455. getProduct(data) {
  456. this.productList = data;
  457. this.popupShow = false;
  458. },
  459. /**
  460. * 提交数据
  461. */
  462. formSubmit: Debounce(function(e) {
  463. let that = this;
  464. if (this.fair) {
  465. this.formData.addressId = this.addressInfo.id
  466. if (that.image.length == 0) return that.$util.Tips({
  467. title: '请添加内容图片'
  468. });
  469. if (that.formData.type == 2 && !that.formData.video) {
  470. return that.$util.Tips({
  471. title: '请添加内容视频'
  472. });
  473. }
  474. }
  475. if (!that.formData.categoryId && !isFinite(that.formData.categoryId)) return that.$util.Tips({
  476. title: '请选择内容分类'
  477. });
  478. if (!that.formData.price && that.fair) return that.$util.Tips({
  479. title: '请输入价格'
  480. });
  481. if (this.formData.type == 1) {
  482. let images = [];
  483. this.image.map(item => {
  484. images.push(item.url)
  485. });
  486. this.formData.image = images.join(',');
  487. let index = this.image.findIndex(item => {
  488. if (item.isCover) {
  489. return true
  490. }
  491. });
  492. if (this.image.length) this.formData.cover = this.image[index].url;
  493. } else {
  494. if (this.image.length > 0) {
  495. this.formData.cover = this.image[0].url;
  496. } else {
  497. this.formData.cover = this.cover;
  498. }
  499. }
  500. this.formData.proIds = this.productList.map(val => val.productId).join(',');
  501. this.formData.topicIds = this.discoverTopicList.map(val => val.id).join(',');
  502. this.formData.city = uni.getStorageSync('cityName')
  503. // if (!that.formData.cover) return that.$util.Tips({
  504. // title: '请上传封面图'
  505. // });
  506. this.formData.latitude = uni.getStorageSync('user_latitude');
  507. this.formData.longitude = uni.getStorageSync('user_longitude');
  508. uni.showLoading({
  509. title: '保存中',
  510. mask: true
  511. })
  512. let addApi = this.fair ? secondHandAddApi : this.dazi ? gameAddApi : noteAddApi
  513. let editApi = this.fair ? secondHandUpdateApi : this.data ? gameUpdateApi : noteUpdateApi
  514. console.log(that.noteId, this.formData, this.saleStatus)
  515. that.noteId ? editApi(that.formData).then(res => {
  516. uni.hideLoading()
  517. that.$util.Tips({
  518. title: '提交成功',
  519. icon: 'success'
  520. });
  521. setTimeout(function() {
  522. let url = that.fair ? '/pages/trade_fair/trade_fair_user/index' : '/pages/discover/discover_user/index'
  523. uni.redirectTo({
  524. url: url
  525. })
  526. }, 500);
  527. }).catch(err => {
  528. uni.hideLoading()
  529. return that.$util.Tips({
  530. title: err
  531. });
  532. }) : addApi(that.formData).then(res => {
  533. that.$util.Tips({
  534. title: '提交成功',
  535. icon: 'success'
  536. });
  537. uni.hideLoading()
  538. setTimeout(function() {
  539. let url = that.fair ? '/pages/trade_fair/trade_fair_user/index' : '/pages/discover/discover_user/index'
  540. uni.redirectTo({
  541. url: url
  542. })
  543. }, 500);
  544. }).catch(err => {
  545. uni.hideLoading()
  546. return that.$util.Tips({
  547. title: err
  548. });
  549. })
  550. })
  551. }
  552. }
  553. </script>
  554. <style lang="scss" scoped>
  555. .pickerIpt {
  556. width: 300rpx;
  557. }
  558. .icon-huati {
  559. font-size: 24rpx;
  560. }
  561. .icon-guanbi5 {
  562. font-size: 20rpx;
  563. }
  564. .discover {
  565. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/ */
  566. padding-bottom: constant(safe-area-inset-bottom) !important; ///兼容 IOS<11.2/
  567. }
  568. .topic {
  569. /deep/.tui-popup-class {
  570. height: 95% !important;
  571. }
  572. }
  573. .discoverlist {
  574. .list {
  575. // height: 62rpx;
  576. // line-height: 62rpx;
  577. // border-radius: 31rpx;
  578. @include main_color(theme);
  579. border: none;
  580. font-size: 24rpx;
  581. .icon {
  582. margin-right: 2rpx;
  583. }
  584. }
  585. }
  586. .crop_btn {
  587. line-height: 90rpx;
  588. height: 90rpx;
  589. height: calc(90rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  590. height: calc(90rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  591. }
  592. .container {
  593. position: fixed;
  594. top: 0;
  595. left: 0;
  596. z-index: 20;
  597. width: 750rpx;
  598. height: 100vh;
  599. }
  600. .release_content {
  601. margin-top: 20rpx;
  602. .release_tab {
  603. border-radius: 16rpx 16rpx 0 0;
  604. border-bottom: 1rpx solid #E4E4E4;
  605. background: #fff;
  606. align-items: center;
  607. justify-content: center;
  608. height: 86rpx;
  609. .tab_item {
  610. margin: 0 40rpx;
  611. font-size: 32rpx;
  612. color: #999;
  613. position: relative;
  614. line-height: 86rpx;
  615. cursor: pointer;
  616. &.on {
  617. color: #E93323;
  618. &::after {
  619. content: "";
  620. display: inline-block;
  621. width: 100%;
  622. height: 3rpx;
  623. background: #E93323;
  624. position: absolute;
  625. bottom: 2rpx;
  626. left: 0;
  627. }
  628. }
  629. .iconfont {
  630. margin-right: 10rpx;
  631. font-size: 32rpx;
  632. }
  633. }
  634. }
  635. .release_item {
  636. background: #ffffff;
  637. padding: 30rpx;
  638. border-radius: 10rpx;
  639. }
  640. .photo_count {}
  641. }
  642. /deep/.input_photo .easy-loadimage,
  643. /deep/.input_photo uni-image,
  644. /deep/.input_photo image {
  645. width: 200rpx;
  646. height: 200rpx;
  647. border-radius: 12rpx !important;
  648. }
  649. .input_photo .pictrue {
  650. width: 200rpx;
  651. height: 200rpx;
  652. border-radius: 12rpx !important;
  653. margin-right: 20rpx;
  654. position: relative;
  655. overflow: hidden;
  656. &:nth-child(3n) {
  657. margin-right: 0;
  658. }
  659. .close_btn {
  660. width: 30rpx;
  661. height: 30rpx;
  662. background: rgba(0, 0, 0, .6);
  663. border-radius: 0 12rpx 0 12rpx;
  664. position: absolute;
  665. top: 0;
  666. right: 0;
  667. display: flex;
  668. align-items: center;
  669. justify-content: center;
  670. z-index: 10;
  671. .iconfont {
  672. color: #ffffff;
  673. font-size: 12rpx;
  674. }
  675. }
  676. .cover_text {
  677. display: flex;
  678. width: 58rpx;
  679. height: 29rpx;
  680. background: #E93323;
  681. border-radius: 0px 12rpx 0px 12rpx;
  682. position: absolute;
  683. left: 0;
  684. bottom: 0;
  685. z-index: 10;
  686. align-items: center;
  687. justify-content: center;
  688. font-size: 18rpx;
  689. color: #fff;
  690. }
  691. .cover_change {
  692. width: 200rpx;
  693. height: 40rpx;
  694. background: rgba(0, 0, 0, 0.5);
  695. border-radius: 0px 0px 12rpx 12rpx;
  696. opacity: 1;
  697. color: #fff;
  698. text-align: center;
  699. font-size: 18rpx;
  700. position: absolute;
  701. z-index: 10;
  702. bottom: 0;
  703. line-height: 38rpx;
  704. }
  705. }
  706. /deep/.loading-img {
  707. width: 200rpx;
  708. height: 200rpx;
  709. border-radius: 12rpx;
  710. }
  711. .input_photo .pictrue {
  712. margin-bottom: 20rpx;
  713. .videoHover {
  714. width: 200rpx;
  715. height: 200rpx;
  716. display: flex;
  717. align-items: center;
  718. justify-content: center;
  719. position: absolute;
  720. top: 0;
  721. left: 0;
  722. z-index: 10;
  723. >view {
  724. width: 50rpx;
  725. height: 50rpx;
  726. background: #000000;
  727. border-radius: 50rpx;
  728. display: flex;
  729. align-items: center;
  730. justify-content: center;
  731. .iconfont {
  732. color: #ffffff;
  733. font-size: 21rpx;
  734. }
  735. }
  736. }
  737. .video-text {
  738. display: block;
  739. width: 200rpx;
  740. text-align: center;
  741. color: #ffffff;
  742. font-size: 18rpx;
  743. z-index: 13;
  744. position: absolute;
  745. bottom: 20rpx;
  746. }
  747. video {
  748. width: 200rpx;
  749. height: 200rpx;
  750. border-radius: 12rpx;
  751. }
  752. }
  753. .input_photo .add {
  754. background: #f6f6f6;
  755. color: #666666;
  756. .iconfont {
  757. font-size: 50rpx;
  758. }
  759. .text {
  760. margin-top: 20rpx;
  761. font-size: 27rpx;
  762. }
  763. }
  764. .textarea {
  765. padding-top: 30rpx;
  766. border-top: 1px solid #EEEEEE;
  767. // min-height: 120rpx;
  768. textarea {
  769. font-size: 28rpx;
  770. width: 100%;
  771. box-sizing: border-box;
  772. // overflow: hidden;
  773. }
  774. }
  775. .title {
  776. font-size: 30rpx !important;
  777. margin-top: 20rpx;
  778. .placeholder {
  779. font-size: 30rpx !important;
  780. }
  781. }
  782. .textarea .placeholder,
  783. .title .placeholder {
  784. color: #999999;
  785. overflow: auto !important;
  786. }
  787. .release_item .item {
  788. height: 106rpx;
  789. border-bottom: 1rpx solid #eee;
  790. position: relative;
  791. font-size: 30rpx;
  792. &:nth-child(3) {
  793. height: auto;
  794. padding: 30rpx 0 10rpx;
  795. }
  796. &:last-child {
  797. border-bottom: none;
  798. }
  799. .name {
  800. .iconfont {
  801. margin-right: 20rpx;
  802. font-size: 32rpx;
  803. }
  804. }
  805. .select {
  806. // width: 300rpx;
  807. color: #bbbbbb;
  808. text-align: right;
  809. .select_count {
  810. display: flex;
  811. align-items: center;
  812. justify-content: flex-end;
  813. }
  814. .select-input {
  815. color: $bg-color-primary;
  816. }
  817. .text {
  818. margin-right: 15rpx;
  819. text-align: right;
  820. .image,
  821. image,
  822. uni-image {
  823. width: 60rpx;
  824. height: 60rpx;
  825. border-radius: 6rpx;
  826. overflow: hidden;
  827. margin-right: 10rpx;
  828. }
  829. }
  830. .iconfont {
  831. font-size: 24rpx;
  832. }
  833. .text_name {
  834. color: var(--view-theme);
  835. padding: 5rpx 12rpx;
  836. background: var(--view-minorColor);
  837. border-radius: 23rpx;
  838. font-size: 24rpx;
  839. margin-right: 10rpx;
  840. .icon {
  841. color: var(--view-theme);
  842. font-weight: bold;
  843. font-size: 24rpx;
  844. }
  845. .title {
  846. margin: 0 10rpx;
  847. }
  848. .iconfont {
  849. font-size: 16rpx;
  850. }
  851. }
  852. }
  853. }
  854. .button {
  855. width: 710rpx;
  856. height: 86rpx;
  857. line-height: 84rpx;
  858. color: #ffffff;
  859. text-align: center;
  860. font-size: 32rpx;
  861. @include main_bg_color(theme);
  862. border-radius: 43rpx;
  863. }
  864. .release_btn {
  865. position: fixed;
  866. bottom: 30rpx;
  867. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  868. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  869. }
  870. .video-count {
  871. position: fixed;
  872. width: 600rpx;
  873. height: 500rpx;
  874. top: 50%;
  875. left: 50%;
  876. margin-left: -300rpx;
  877. margin-top: -250rpx;
  878. z-index: 100;
  879. display: flex;
  880. align-items: center;
  881. justify-content: center;
  882. .videoLink {
  883. width: 600rpx;
  884. height: 500rpx;
  885. }
  886. }
  887. .address {
  888. padding: 40rpx 24rpx;
  889. background-color: #fff;
  890. box-sizing: border-box;
  891. }
  892. .address .addressCon {
  893. width: 596rpx;
  894. font-size: 26rpx;
  895. color: #666;
  896. }
  897. .address .addressCon .name {
  898. font-size: 30rpx;
  899. color: #282828;
  900. font-weight: bold;
  901. // margin-bottom: 10rpx;
  902. }
  903. .address .addressCon .name .phone {
  904. margin-left: 50rpx;
  905. }
  906. .address .addressCon .default {
  907. margin-right: 12rpx;
  908. }
  909. .address .addressCon .setaddress {
  910. color: #333;
  911. font-size: 28rpx;
  912. }
  913. .address .iconfont {
  914. color: #707070;
  915. }
  916. .allAddress {
  917. width: 100%;
  918. @include index-gradient(theme);
  919. padding: 30rpx 24rpx 0 24rpx;
  920. }
  921. .allAddress .address.group {
  922. border-radius: 0;
  923. }
  924. .allAddress .address {
  925. max-height: 180rpx;
  926. margin: -2rpx auto 0 auto;
  927. border-radius: 14rpx 14rpx 0 0;
  928. }
  929. .allAddress .line {
  930. width: 100%;
  931. margin: 0 auto;
  932. }
  933. .line {
  934. width: 100%;
  935. height: 3rpx;
  936. }
  937. .line image {
  938. width: 100%;
  939. height: 100%;
  940. display: block;
  941. }
  942. .font_color {
  943. @include main_color(theme);
  944. }
  945. </style>