ShareSetting.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <template>
  2. <div class="share">
  3. <div class="preview">
  4. <div class="phone-top"></div>
  5. <div class="phone-center"></div>
  6. <div class="content">
  7. <div class="phone-status"></div>
  8. <div class="preview-area"></div>
  9. </div>
  10. <div class="phone-bottom"></div>
  11. </div>
  12. <div class="setting">
  13. <img class="share-close" src="../assets/images/share-close.png" alt="" @click="closeBtn">
  14. <div class="share-title">分享设置</div>
  15. <div class="share-titleBox">
  16. <div class="top">
  17. <el-input type="text" placeholder="h5测试分享标题" v-model="text" maxlength="30" show-word-limit>
  18. </el-input>
  19. </div>
  20. <div class="content">
  21. <el-input class="input" type="textarea" :rows="3" placeholder="请输入内容" v-model="textarea" maxlength="30"
  22. show-word-limit>
  23. </el-input>
  24. <img class="cover" src="" alt="" @click="closeBtn">
  25. <div class="cover-title">更换封面</div>
  26. </div>
  27. </div>
  28. <div class="qrcode-title">渠道二维码
  29. <div class="qrcode-copy" @click="save">
  30. <img class="qrcode-copy-img" src="../assets/images/qrcode-copy.png" alt="">
  31. 复制链接
  32. </div>
  33. </div>
  34. <!-- <div class="qrcode">
  35. <el-input v-model="input" placeholder="请输入内容"></el-input>
  36. <img class="qrcode-img" src="" alt="">
  37. <div class="qrcode-btn">
  38. <div class="qrcode-download" @click="save">下载二维码</div>
  39. <div class="qrcode-copy" @click="save">
  40. <img class="qrcode-copy-img" src="../assets/images/qrcode-copy.png" alt="">
  41. 复制链接</div>
  42. </div>
  43. </div>
  44. <div class="qrcode-add">添加渠道</div> -->
  45. <div class="share-save" @click="save">确定</div>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. text: "",
  54. textarea: ""
  55. };
  56. },
  57. props: {
  58. close: {
  59. type: Function,
  60. default: null
  61. },
  62. currItem: ""
  63. },
  64. methods: {
  65. closeBtn() {
  66. this.close();
  67. },
  68. save() {
  69. console.log("XXXX", this.currItem);
  70. }
  71. }
  72. };
  73. </script>
  74. <style lang="less" scoped>
  75. .share {
  76. z-index: 1000;
  77. position: fixed;
  78. top: 0;
  79. right: 0;
  80. bottom: 0;
  81. left: 0;
  82. background: rgba(0, 0, 0, 0.6);
  83. display: flex;
  84. flex-direction: row;
  85. .preview {
  86. flex-grow: 2;
  87. display: flex;
  88. flex-direction: column;
  89. justify-content: center;
  90. align-items: center;
  91. .phone-top {
  92. width: 341px;
  93. height: 83px;
  94. background: url(../assets/images/phone-model-top.png) center no-repeat;
  95. background-size: cover;
  96. }
  97. .phone-center {
  98. position: relative;
  99. width: 346px;
  100. height: 530px;
  101. background: url(../assets/images/phone-model-center.png) repeat-y;
  102. background-size: cover;
  103. }
  104. .content {
  105. position: absolute;
  106. width: 298px;
  107. height: 530px;
  108. .phone-status {
  109. margin-left: -2px;
  110. margin-top: -2px;
  111. width: 300px;
  112. height: 50px;
  113. background: url(../assets/images/phone-model-status.png) repeat-y;
  114. background-size: cover;
  115. }
  116. .preview-area {
  117. position: relative;
  118. margin-left: -1px;
  119. width: 298px;
  120. height: 480px;
  121. border: 1px solid #000;
  122. border-top: 0px;
  123. }
  124. }
  125. .phone-bottom {
  126. width: 342px;
  127. height: 87px;
  128. background: url(../assets/images/phone-model-bottom.png) center no-repeat;
  129. background-size: cover;
  130. }
  131. }
  132. .setting {
  133. overflow: auto;
  134. width: 446px;
  135. height: 100%;
  136. background: #fff;
  137. .share-close {
  138. z-index: 1001;
  139. position: absolute;
  140. top: 0px;
  141. right: 0px;
  142. width: 63px;
  143. height: 57px;
  144. cursor: pointer;
  145. }
  146. .share-title {
  147. margin: 80px 0px 10px 18px;
  148. font-size: 16px;
  149. font-family: PingFangSC-Regular;
  150. font-weight: 400;
  151. color: rgba(0, 0, 0, 1);
  152. line-height: 22px;
  153. }
  154. .share-titleBox {
  155. margin: 0px 12px;
  156. height: 150px;
  157. border-radius: 4px;
  158. border: 1px solid rgba(204, 204, 204, 1);
  159. .top {
  160. display: flex;
  161. flex-direction: row;
  162. justify-content: space-between;
  163. margin: 10px;
  164. }
  165. .content {
  166. display: flex;
  167. position: relative;
  168. .input {
  169. width: 326px;
  170. margin-left: 10px;
  171. }
  172. .cover {
  173. width: 70px;
  174. height: 70px;
  175. background: rgba(239, 239, 239, 1);
  176. margin: 0px 10px;
  177. cursor: pointer;
  178. }
  179. .cover-title {
  180. position: absolute;
  181. bottom: 0px;
  182. right: 10px;
  183. width: 70px;
  184. height: 20px;
  185. background: rgba(0, 0, 0, 0.8);
  186. color: #fff;
  187. font-size: 12px;
  188. line-height: 20px;
  189. text-align: center;
  190. }
  191. }
  192. }
  193. .qrcode-title {
  194. margin: 28px 0px 10px 18px;
  195. font-size: 16px;
  196. font-family: PingFangSC-Regular;
  197. font-weight: 400;
  198. color: rgba(0, 0, 0, 1);
  199. line-height: 22px;
  200. position: relative;
  201. .qrcode-copy {
  202. position: absolute;
  203. top: -5px;
  204. left: 100px;
  205. font-size: 14px;
  206. font-family: PingFangSC-Regular;
  207. font-weight: 400;
  208. color: rgba(78, 93, 255, 1);
  209. line-height: 30px;
  210. text-align: center;
  211. width: 125px;
  212. height: 30px;
  213. background: rgba(230, 237, 255, 1);
  214. border-radius: 15px;
  215. cursor: pointer;
  216. .qrcode-copy-img {
  217. width: 16px;
  218. height: 16px;
  219. vertical-align: middle;
  220. }
  221. }
  222. }
  223. .qrcode {
  224. margin-left: 18px;
  225. margin-bottom: 10px;
  226. width: 408px;
  227. height: 283px;
  228. border: 1px solid rgba(204, 204, 204, 1);
  229. display: flex;
  230. flex-direction: column;
  231. align-items: center;
  232. .el-input {
  233. margin-top: 16px;
  234. width: 265px;
  235. }
  236. .qrcode-img {
  237. margin-top: 16px;
  238. width: 140px;
  239. height: 140px;
  240. background: rgba(239, 239, 239, 1);
  241. }
  242. .qrcode-btn {
  243. display: flex;
  244. justify-content: space-between;
  245. width: 250px;
  246. height: 31px;
  247. margin-top: 20px;
  248. font-size: 14px;
  249. font-family: PingFangSC-Regular;
  250. font-weight: 400;
  251. color: rgba(78, 93, 255, 1);
  252. line-height: 30px;
  253. text-align: center;
  254. .qrcode-download {
  255. width: 91px;
  256. height: 30px;
  257. background: rgba(230, 237, 255, 1);
  258. border-radius: 15px;
  259. cursor: pointer;
  260. }
  261. .qrcode-copy {
  262. width: 125px;
  263. height: 30px;
  264. background: rgba(230, 237, 255, 1);
  265. border-radius: 15px;
  266. cursor: pointer;
  267. .qrcode-copy-img {
  268. width: 16px;
  269. height: 16px;
  270. vertical-align: middle;
  271. }
  272. }
  273. }
  274. }
  275. .qrcode-add {
  276. margin-left: 18px;
  277. margin-top: 20px;
  278. width: 408px;
  279. height: 44px;
  280. background: rgba(241, 241, 241, 1);
  281. border: 1px dotted rgba(192, 192, 192, 1);
  282. line-height: 44px;
  283. text-align: center;
  284. font-size: 14px;
  285. font-weight: 400;
  286. color: rgba(78, 93, 255, 1);
  287. cursor: pointer;
  288. }
  289. .share-save {
  290. text-align: center;
  291. width: 105px;
  292. height: 34px;
  293. background: rgba(78, 93, 255, 1);
  294. border-radius: 19px;
  295. margin-top: 167px;
  296. margin-bottom: 94px;
  297. margin-left: 174px;
  298. font-weight: 500;
  299. color: rgba(255, 255, 255, 1);
  300. line-height: 34px;
  301. font-size: 14px;
  302. cursor: pointer;
  303. }
  304. }
  305. }
  306. </style>