create_account.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <template>
  2. <div class="app-container">
  3. <div v-show="step == 1">
  4. <div class="setting_title">开通账号</div>
  5. <el-divider></el-divider>
  6. <div class="tips">说明:开通商户账号是指开通商城后台管理系统的总登录账号。</div>
  7. <el-card shadow="never" class="my-card">
  8. <el-form class="my-form" ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="100px" label-position="right">
  9. <el-form-item label="商户账号" prop="account">
  10. <el-input v-model="step1Form.account" autocomplete="off" placeholder="请输入商户账号"></el-input>
  11. <el-popover
  12. class="question"
  13. placement="right-start"
  14. title="账号设置"
  15. width="260"
  16. trigger="hover"
  17. content="账号设置需按数字、字母组合设置至少12位账号">
  18. <svg-icon icon-class="question" slot="reference" />
  19. </el-popover>
  20. </el-form-item>
  21. <el-form-item label="账户昵称" prop="nickName">
  22. <el-input v-model="step1Form.nickName" autocomplete="off" placeholder="请输入账户昵称"></el-input>
  23. </el-form-item>
  24. <el-form-item label="小程序名称" prop="appName">
  25. <el-input v-model="step1Form.appName" autocomplete="off" placeholder="请输入小程序名称"></el-input>
  26. </el-form-item>
  27. <el-form-item label="负责人" prop="chargePerson">
  28. <el-input v-model="step1Form.chargePerson" autocomplete="off" placeholder="请输入负责人"></el-input>
  29. </el-form-item>
  30. <el-form-item label="联系电话" prop="phone">
  31. <el-input v-model="step1Form.phone" autocomplete="off" placeholder="请输入联系电话"></el-input>
  32. </el-form-item>
  33. <el-form-item label="电子邮箱" prop="email">
  34. <el-input v-model="step1Form.email" autocomplete="off" placeholder="请输入电子邮箱"></el-input>
  35. </el-form-item>
  36. <el-form-item label="地址" prop="address">
  37. <el-input v-model="step1Form.address" autocomplete="off" placeholder="请输入地址"></el-input>
  38. </el-form-item>
  39. <el-form-item label="登录密码" prop="newPassword">
  40. <el-input v-model="step1Form.newPassword" ref="password1" autocomplete="off" placeholder="请输入登录密码" :type="passwordType1"></el-input>
  41. <span class="show-pwd" @click="showPwd(1)">
  42. <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
  43. </span>
  44. <el-popover
  45. class="question"
  46. placement="right-start"
  47. title="密码设置"
  48. width="260"
  49. trigger="hover"
  50. content="密码设置需按数字、字母组合设置至少12位密码">
  51. <svg-icon icon-class="question" slot="reference" />
  52. </el-popover>
  53. </el-form-item>
  54. <el-form-item label="确认密码" prop="confirmPassword">
  55. <el-input v-model="step1Form.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码" :type="passwordType2"></el-input>
  56. <span class="show-pwd" @click="showPwd(2)">
  57. <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
  58. </span>
  59. <el-popover
  60. class="question"
  61. placement="right-start"
  62. title="密码设置"
  63. width="260"
  64. trigger="hover"
  65. content="确认密码需要和登录密码保持一致">
  66. <svg-icon icon-class="question" slot="reference" />
  67. </el-popover>
  68. </el-form-item>
  69. </el-form>
  70. </el-card>
  71. </div>
  72. <div v-show="step == 2">
  73. <div class="setting_title">商城配置</div>
  74. <el-divider></el-divider>
  75. <el-form label-width="100px" label-position="right">
  76. <el-upload
  77. class="avatar-uploader"
  78. :action="baseURL + 'common/upload'"
  79. :headers="myHeaders"
  80. :show-file-list="false"
  81. :on-success="uploadSuccess"
  82. :before-upload="beforeUpload">
  83. </el-upload>
  84. <el-form-item label="主logo:" prop="imgUrl">
  85. <div class="images">
  86. <div class="main-img">
  87. <div class="img" v-if="img1_url" @mouseover="img1_hover = true;" @mouseout="img1_hover = false;">
  88. <el-image ref="img1" :src="img1_url" :preview-src-list="[img1_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
  89. <div class="mask" v-show="img1_hover">
  90. <i class="el-icon-zoom-in" @click="previewImage('img1')"></i>
  91. <i class="el-icon-upload2" @click="uploadImage('img1')"></i>
  92. </div>
  93. </div>
  94. <div class="add" v-else @click="uploadImage('img1')">
  95. <i class="el-icon-plus avatar-uploader-icon"></i>
  96. </div>
  97. </div>
  98. <div class="tmp-img">
  99. <el-image :src="require('@/assets/template/template_1.png')" :preview-src-list="[require('@/assets/template/template_1.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
  100. <div class="tmp">示例图</div>
  101. </div>
  102. </div>
  103. <div class="tips">
  104. <span>建议尺寸:400*400</span>
  105. </div>
  106. </el-form-item>
  107. <el-form-item label="通用logo:" prop="imgUrl">
  108. <div class="images">
  109. <div class="main-img">
  110. <div class="img" v-if="img2_url" @mouseover="img2_hover = true;" @mouseout="img2_hover = false;">
  111. <el-image ref="img2" :src="img2_url" :preview-src-list="[img2_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
  112. <div class="mask" v-show="img2_hover">
  113. <i class="el-icon-zoom-in" @click="previewImage('img2')"></i>
  114. <i class="el-icon-upload2" @click="uploadImage('img2')"></i>
  115. </div>
  116. </div>
  117. <div class="add" v-else @click="uploadImage('img2')">
  118. <i class="el-icon-plus avatar-uploader-icon"></i>
  119. </div>
  120. </div>
  121. <div class="tmp-img">
  122. <el-image :src="require('@/assets/template/template_2.png')" :preview-src-list="[require('@/assets/template/template_2.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
  123. <div class="tmp">示例图</div>
  124. </div>
  125. </div>
  126. <div class="tips">
  127. <span>建议尺寸:280*60</span>
  128. </div>
  129. </el-form-item>
  130. <el-form-item label="头像logo:" prop="imgUrl">
  131. <div class="images">
  132. <div class="main-img">
  133. <div class="img" v-if="img3_url" @mouseover="img3_hover = true;" @mouseout="img3_hover = false;">
  134. <el-image ref="img3" :src="img3_url" :preview-src-list="[img3_url]" style="width: 120px; height: 120px" fit="contain"></el-image>
  135. <div class="mask" v-show="img3_hover">
  136. <i class="el-icon-zoom-in" @click="previewImage('img3')"></i>
  137. <i class="el-icon-upload2" @click="uploadImage('img3')"></i>
  138. </div>
  139. </div>
  140. <div class="add" v-else @click="uploadImage('img3')">
  141. <i class="el-icon-plus avatar-uploader-icon"></i>
  142. </div>
  143. </div>
  144. <div class="tmp-img">
  145. <el-image :src="require('@/assets/template/template_3.png')" :preview-src-list="[require('@/assets/template/template_3.png')]" style="width: 120px; height: 120px; display: block" fit="contain"></el-image>
  146. <div class="tmp">示例图</div>
  147. </div>
  148. </div>
  149. <div class="tips">
  150. <span>建议尺寸:400*400</span>
  151. </div>
  152. </el-form-item>
  153. </el-form>
  154. </div>
  155. <div v-show="step == 3">
  156. <div class="setting_title">企微配置</div>
  157. <el-divider></el-divider>
  158. <div class="tips">说明:企微配置是指通过配置企业微信将企微用户和系统打通,实现企业微信用户信息同平台互通,聊天会话信息同步</div>
  159. <div class="tips" style="margin-top: 20px">商户名称:{{step1Form.nickName}}</div>
  160. <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="200px" label-position="right">
  161. <el-card shadow="never" class="my-card">
  162. <div class="title">1.配置企业ID</div>
  163. <div class="box">指引:进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【我的企业】,将企业ID分别复制并填写到下方输入框中</div>
  164. <el-form-item label="企业ID" prop="enterpriseId">
  165. <el-input v-model="step3Form.enterpriseId" autocomplete="off" placeholder="请输入企业ID"></el-input>
  166. </el-form-item>
  167. </el-card>
  168. <el-card shadow="never" class="my-card">
  169. <div class="title">2.配置通讯录密钥(Secret)</div>
  170. <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【客户联系】-选择【客户】-展开右侧【API】。将外部联系人Secret复制并填写到下方输入框中。如果外部联系人Secret不更新,请将更新后的外部联系人Secret更新复制更新到下方输入框中。</div>
  171. <el-form-item label="通讯录密钥(Secret)" prop="listSecret">
  172. <el-input v-model="step3Form.listSecret" autocomplete="off" placeholder="请输入通讯录密钥(Secret)"></el-input>
  173. </el-form-item>
  174. <el-divider></el-divider>
  175. <div class="title">配置通讯录同步密钥(Secret)</div>
  176. <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【管理工具】-选择【通讯录同步】-获取通讯录同步Secret。将通讯录同步Secret复制并填写到下方输入框中。如果通讯录同步Secret不更新,请将更新后的通讯录同步Secret更新复制更新到下方输入框中。</div>
  177. <el-form-item label="通讯录同步密钥(Secret)" prop="listSyncSecret">
  178. <el-input v-model="step3Form.listSyncSecret" autocomplete="off" placeholder="请输入通讯录同步密钥(Secret)"></el-input>
  179. </el-form-item>
  180. </el-card>
  181. <el-card shadow="never" class="my-card">
  182. <div class="title">3.配置小程序</div>
  183. <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【应用管理】-选择【应用】-选择【小程序】-获取小程序AgentiD、小程序Secret。将小程序AgentiD、小程序Secret复制并填写到下方输入框中。</div>
  184. <el-form-item label="小程序(AgentiD)" prop="appAgentId">
  185. <el-input v-model="step3Form.appAgentId" autocomplete="off" placeholder="请输入小程序(AgentiD)"></el-input>
  186. </el-form-item>
  187. <el-form-item label="小程序(Secret)" prop="appSecret">
  188. <el-input v-model="step3Form.appSecret" autocomplete="off" placeholder="请输入小程序(Secret)"></el-input>
  189. </el-form-item>
  190. </el-card>
  191. <el-card shadow="never" class="my-card">
  192. <div class="title" style="margin-bottom: 20px;">4.其他基础配置</div>
  193. <el-form-item label="小程序appId" prop="appId">
  194. <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入小程序appId"></el-input>
  195. </el-form-item>
  196. <el-form-item label="商户号Id" prop="merchantId">
  197. <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入商户号Id"></el-input>
  198. </el-form-item>
  199. <el-form-item label="商户号Key" prop="merchantKey">
  200. <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入商户号Key"></el-input>
  201. </el-form-item>
  202. <el-form-item label="子appId" prop="childAppId">
  203. <el-input v-model="step3Form.childAppId" autocomplete="off" placeholder="请输入子appId"></el-input>
  204. </el-form-item>
  205. <el-form-item label="子密钥" prop="childKey">
  206. <el-input v-model="step3Form.childKey" autocomplete="off" placeholder="请输入子密钥"></el-input>
  207. </el-form-item>
  208. <el-form-item label="子商户号Id" prop="childMerchantId">
  209. <el-input v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
  210. </el-form-item>
  211. <el-form-item label="微信订阅模版" prop="templateId">
  212. <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
  213. </el-form-item>
  214. </el-card>
  215. </el-form>
  216. </div>
  217. <div class="page-footer">
  218. <div class="footer" :class="classObj">
  219. <el-button @click="changeStep(0)" v-show="step > 1">上一步</el-button>
  220. <el-button @click="changeStep(1)" v-show="step < 3">下一步</el-button>
  221. <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
  222. <el-popconfirm
  223. title="确定关闭吗?"
  224. @onConfirm="goBack"
  225. style="margin-left: 10px;"
  226. >
  227. <el-button slot="reference">关 闭</el-button>
  228. </el-popconfirm>
  229. </div>
  230. </div>
  231. </div>
  232. </template>
  233. <script>
  234. import { getToken } from '@/utils/auth'
  235. import { addAccount } from "@/api/merchant";
  236. export default {
  237. data() {
  238. var validateAccount = (rule, value, callback) => {
  239. if (value === '') {
  240. callback(new Error('请输入商户账号'));
  241. } else if (value.length < 12) {
  242. callback(new Error('账号长度至少12位'));
  243. } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
  244. callback(new Error('账号必须包含数字和字母'));
  245. } else {
  246. callback();
  247. }
  248. };
  249. var validatePass3 = (rule, value, callback) => {
  250. if (value === '') {
  251. callback(new Error('请输入登录密码'));
  252. } else if (value.length < 12) {
  253. callback(new Error('密码长度至少12位'));
  254. } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
  255. callback(new Error('密码必须包含数字和字母'));
  256. } else {
  257. if (this.step1Form.confirmPassword !== '') {
  258. this.$refs.step1Form.validateField('confirmPassword');
  259. }
  260. callback();
  261. }
  262. };
  263. var validatePass4 = (rule, value, callback) => {
  264. if (value === '') {
  265. callback(new Error('请再次输入密码'));
  266. } else if (value !== this.step1Form.newPassword) {
  267. callback(new Error('两次输入密码不一致'));
  268. } else {
  269. callback();
  270. }
  271. };
  272. return {
  273. baseURL: process.env.VUE_APP_BASE_API,
  274. myHeaders: {'x-token': getToken()},
  275. step: 1,
  276. step1Form: {
  277. account: '', // 账号
  278. nickName: '', // 用户名
  279. appName: '', // 小程序名称
  280. chargePerson: '', // 负责人
  281. phone: '', // 联系电话
  282. email: '', // 电子邮箱
  283. address: '', // 地址
  284. newPassword: '', // 登录密码
  285. confirmPassword: '', // 确认密码
  286. },
  287. step1FormRules: {
  288. account: [
  289. { required: true, validator: validateAccount, trigger: 'blur' }
  290. ],
  291. nickName: [
  292. { required: true, message: '请输入用户名', trigger: 'blur' }
  293. ],
  294. appName: [
  295. { required: true, message: '请输入用户名', trigger: 'blur' }
  296. ],
  297. chargePerson: [
  298. { required: true, message: '请输入负责人', trigger: 'blur' }
  299. ],
  300. phone: [
  301. { required: true, message: '请输入联系电话', trigger: 'blur' }
  302. ],
  303. newPassword: [
  304. { required: true, validator: validatePass3, trigger: 'blur' }
  305. ],
  306. confirmPassword: [
  307. { required: true, validator: validatePass4, trigger: 'blur' }
  308. ],
  309. },
  310. passwordType1: 'password',
  311. passwordType2: 'password',
  312. uploadImageType: null,
  313. img1_url: '',
  314. img1_hover: false,
  315. img2_url: '',
  316. img2_hover: false,
  317. img3_url: '',
  318. img3_hover: false,
  319. step3Form: {
  320. enterpriseId: '',
  321. listSecret: '',
  322. listSyncSecret: '',
  323. appAgentId: '',
  324. appSecret: '',
  325. appId: '',
  326. merchantId: '',
  327. merchantKey: '',
  328. childAppId: '',
  329. childKey: '',
  330. childMerchantId: '',
  331. templateId: '',
  332. },
  333. step3FormRules: {
  334. enterpriseId: [
  335. { required: true, message: '请输入企业ID', trigger: 'blur' }
  336. ],
  337. listSecret: [
  338. { required: true, message: '请输入通讯录密钥(Secret)', trigger: 'blur' }
  339. ],
  340. listSyncSecret: [
  341. { required: true, message: '请输入通讯录同步密钥(Secret)', trigger: 'blur' }
  342. ],
  343. appAgentId: [
  344. { required: true, message: '请输入小程序(AgentiD)', trigger: 'blur' }
  345. ],
  346. appSecret: [
  347. { required: true, message: '请输入小程序(Secret)', trigger: 'blur' }
  348. ],
  349. },
  350. formLoading: false,
  351. }
  352. },
  353. computed: {
  354. sidebar() {
  355. return this.$store.state.app.sidebar
  356. },
  357. classObj() {
  358. return {
  359. hideSidebar: !this.sidebar.opened,
  360. openSidebar: this.sidebar.opened
  361. }
  362. },
  363. },
  364. methods: {
  365. goBack() {
  366. this.$router.go(-1);
  367. },
  368. // 显示隐藏密码
  369. showPwd(num) {
  370. if(num == 1) {
  371. if (this.passwordType1 === 'password') {
  372. this.passwordType1 = ''
  373. } else {
  374. this.passwordType1 = 'password'
  375. }
  376. this.$nextTick(() => {
  377. this.$refs.password1.focus()
  378. })
  379. }
  380. if(num == 2) {
  381. if (this.passwordType2 === 'password') {
  382. this.passwordType2 = ''
  383. } else {
  384. this.passwordType2 = 'password'
  385. }
  386. this.$nextTick(() => {
  387. this.$refs.password2.focus()
  388. })
  389. }
  390. },
  391. // 下一步
  392. nextStep() {
  393. this.$refs.step1Form.validate((valid) => {
  394. if (valid) {
  395. this.step = 2;
  396. }
  397. })
  398. },
  399. uploadImage(type) {
  400. this.uploadImageType = type;
  401. document.querySelector('.avatar-uploader input').click();
  402. },
  403. // 上传图片
  404. uploadSuccess(res, file) {
  405. this[this.uploadImageType + '_url'] = res.data.url;
  406. },
  407. beforeUpload(file) {
  408. const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
  409. const whiteList = ['jpg', 'jpeg', 'png'];
  410. if (whiteList.indexOf(fileSuffix) === -1) {
  411. this.$errorMsg('只支持上传jpg/jpeg/png文件!');
  412. return false;
  413. }
  414. },
  415. // 预览图片
  416. previewImage(type) {
  417. this.$refs[type].showViewer = true;
  418. },
  419. // 切换步骤
  420. changeStep(type) {
  421. if(type == 1) {
  422. this.step ++;
  423. }else {
  424. this.step --;
  425. }
  426. },
  427. // 点击 提交表单
  428. clickSubmitForm() {
  429. // 验证第一步
  430. this.$refs.step1Form.validate((valid) => {
  431. if (valid) {
  432. // 验证第二步
  433. if(this.img1_url && this.img2_url && this.img3_url) {
  434. // 验证第三步
  435. this.$refs.step3Form.validate((valid) => {
  436. if (valid) {
  437. this.submitForm();
  438. }else {
  439. this.step = 3;
  440. }
  441. })
  442. }else {
  443. this.$errorMsg('请完善商城配置');
  444. this.step = 2;
  445. }
  446. }else {
  447. this.step = 1;
  448. }
  449. })
  450. },
  451. // 提交表单
  452. submitForm() {
  453. this.$refs.step3Form.validate((valid) => {
  454. if (valid) {
  455. this.formLoading = true;
  456. let params = {
  457. type: 1,
  458. userName: this.step1Form.account,
  459. nickName: this.step1Form.nickName,
  460. minAppName: this.step1Form.appName,
  461. linkName: this.step1Form.chargePerson,
  462. linkPhone: this.step1Form.phone,
  463. email: this.step1Form.email,
  464. address: this.step1Form.address,
  465. password: this.step1Form.confirmPassword,
  466. minLogo1: this.img1_url,
  467. minLogo2: this.img2_url,
  468. minLogo3: this.img3_url,
  469. corpId: this.step3Form.enterpriseId,
  470. secret2: this.step3Form.listSecret,
  471. secret3: this.step3Form.listSyncSecret,
  472. agentId1: this.step3Form.appAgentId,
  473. secret1: this.step3Form.appSecret,
  474. appId: this.step3Form.appId,
  475. mchId: this.step3Form.merchantId,
  476. mchKey: this.step3Form.merchantKey,
  477. subAppId: this.step3Form.childAppId,
  478. subSecret: this.step3Form.childKey,
  479. subMchId: this.step3Form.childMerchantId,
  480. template: this.step3Form.templateId,
  481. }
  482. addAccount(params).then(res => {
  483. this.$successMsg('开通成功');
  484. setTimeout(() => {
  485. this.goBack();
  486. }, 1500)
  487. }).finally(res => {
  488. this.formLoading = false;
  489. })
  490. }
  491. })
  492. }
  493. }
  494. }
  495. </script>
  496. <style lang="scss" scoped>
  497. .setting_title {
  498. padding-left: 0;
  499. }
  500. .tips {
  501. font-size: 14px;
  502. }
  503. .my-card {
  504. margin-top: 20px;
  505. .box {
  506. background: rgb(235, 240, 249);
  507. padding: 10px;
  508. font-size: 14px;
  509. margin: 20px 0;
  510. line-height: 18px;
  511. ::v-deep .el-link {
  512. vertical-align: unset;
  513. }
  514. }
  515. }
  516. .my-form {
  517. width: 450px;
  518. margin: 0 auto;
  519. }
  520. .show-pwd {
  521. position: absolute;
  522. right: 15px;
  523. top: 0;
  524. font-size: 16px;
  525. cursor: pointer;
  526. user-select: none;
  527. }
  528. .question {
  529. position: absolute;
  530. right: -30px;
  531. top: 0;
  532. font-size: 20px;
  533. cursor: pointer;
  534. user-select: none;
  535. }
  536. .my-form2 {
  537. ::v-deep input {
  538. width: 400px;
  539. }
  540. }
  541. .tips {
  542. margin-top: 10px;
  543. span {
  544. display: inline-block;
  545. width: 300px;
  546. text-align: center;
  547. line-height: 32px;
  548. background: #ffefef;
  549. font-size: 14px;
  550. color: #f66460;
  551. }
  552. }
  553. .images {
  554. display: flex;
  555. flex-wrap: wrap;
  556. .main-img {
  557. display: flex;
  558. flex-direction: column;
  559. justify-content: center;
  560. align-items: center;
  561. width: 120px;
  562. margin-right: 20px;
  563. .img {
  564. border: 1px dashed #eaeaea;
  565. border-radius: 5px;
  566. overflow: hidden;
  567. position: relative;
  568. .el-image {
  569. display: block;
  570. }
  571. .mask {
  572. position: absolute;
  573. left: 0;
  574. top: 0;
  575. width: 120px;
  576. height: 120px;
  577. background: rgba($color: #000000, $alpha: 0.3);
  578. display: flex;
  579. align-items: center;
  580. justify-content: center;
  581. i {
  582. font-size: 20px;
  583. color: #ffffff;
  584. cursor: pointer;
  585. margin: 0 8px;
  586. }
  587. }
  588. }
  589. .text {
  590. font-size: 14px;
  591. color: #666666;
  592. }
  593. }
  594. .add {
  595. width: 120px;
  596. height: 120px;
  597. border: 1px dashed #eaeaea;
  598. border-radius: 5px;
  599. cursor: pointer;
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. i {
  604. font-size: 30px;
  605. color: #999;
  606. }
  607. }
  608. .tmp-img {
  609. position: relative;
  610. .tmp {
  611. position: absolute;
  612. left: 0;
  613. top: 0;
  614. line-height: 20px;
  615. padding: 0 8px;
  616. background: #f66460;
  617. border-radius: 0 0 10px 0;
  618. font-size: 12px;
  619. color: #ffffff;
  620. }
  621. }
  622. }
  623. </style>