eadit.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. <template>
  2. <view class="content">
  3. <view class="kk"></view>
  4. <view class="box" style="padding-bottom: 0;">
  5. <view class="title">基础信息</view>
  6. <view class="line">
  7. <view class="lineLeft">
  8. <span class="linexx">*</span> <span>活动名称</span>
  9. </view>
  10. <view class="lineRight">
  11. <input type="text" v-model="activityName" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  12. </view>
  13. </view>
  14. <view class="line">
  15. <view class="lineLeft">
  16. <span class="linexx">*</span> <span>报名时间</span>
  17. </view>
  18. <view class="lineRight timelineRight">
  19. <picker mode="date" :value="startTime" @change="bindTimeChangeStart">
  20. <view class="dateViewno" v-if="!startTime">开始时间</view>
  21. <view class="dateView" v-else>{{startTime}}</view>
  22. </picker>
  23. <view class="timeHx">-</view>
  24. <picker mode="date" :value="endTime" @change="bindTimeChangeendTime" :start='startTime'>
  25. <view class="dateViewno" v-if="!endTime">结束时间</view>
  26. <view class="dateView" v-else>{{endTime}}</view>
  27. </picker>
  28. </view>
  29. </view>
  30. <view class="line" style="border: none;">
  31. <view class="lineLeft">
  32. <span class="linexx">*</span> <span>活动门店</span>
  33. </view>
  34. <view class="lineRight shopckBox">
  35. <view class="shopListNo" v-if="!shopNames">请选择活动门店,可多选</view>
  36. <view class="shopListY" v-if="shopNames">{{shopNames}}</view>
  37. <view class="addshop" @click="addShop">添加</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="kk"></view>
  42. <view class="box" style="padding-bottom: 0;">
  43. <view class="title">报名信息</view>
  44. <view class="line">
  45. <view class="lineLeft">
  46. <span class="linexx">*</span> <span>报名凭证</span>
  47. </view>
  48. <view class="lineRight clWhereBox">
  49. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(1)!=-1}">手机号</view>
  50. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(2)!=-1}" @click="clWhere(2)">车牌号</view>
  51. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(3)!=-1}" @click="clWhere(3)">姓名</view>
  52. <view class="clWhereLine" :class="{clWhereActive:clWhereString.indexOf(4)!=-1}" @click="clWhere(4)">单位</view>
  53. </view>
  54. </view>
  55. <view class="line">
  56. <view class="lineLeft">
  57. <span class="linexx">*</span> <span>最多报名人数</span>
  58. </view>
  59. <view class="lineRight">
  60. <input type="number" v-model="number" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  61. </view>
  62. </view>
  63. <view class="line" ><!-- style="border: none;" -->
  64. <view class="lineLeft">
  65. <span class="linexx">*</span> <span>支付方式</span>
  66. </view>
  67. <view class="lineRight payBox">
  68. <view class="payType" @click="payType=1">
  69. <img src="../../static/img/ckn.png" alt="" class="payTypeImg" v-if="payType!=1">
  70. <img src="../../static/img/cky.png" alt="" class="payTypeImg" v-if="payType==1">
  71. <view class="payTypeTxt">在线支付</view>
  72. </view>
  73. <view class="payType" @click="nopayCl" style="padding-left: 30rpx;">
  74. <img src="../../static/img/cky.png" alt="" class="payTypeImg" v-if="payType==2">
  75. <img src="../../static/img/ckn.png" alt="" class="payTypeImg" v-if="payType!=2">
  76. <view class="payTypeTxt">无需支付</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="line" v-if="payType==1">
  81. <view class="lineLeft">
  82. <span class="linexx">*</span> <span>支付金额</span>
  83. </view>
  84. <view class="lineRight">
  85. <input type="text" v-model="money" placeholder="请输入" class="lineRightInput" placeholder-class="inputPlace">
  86. </view>
  87. </view>
  88. <view v-if="payType==1">
  89. <view class="line line3">
  90. <view class="lineLeft">
  91. <span>拼团设置</span>
  92. </view>
  93. <view class="lineRight"><switch :checked='groupType' @change="switchgroupType" style="transform:scale(0.8)"/></view>
  94. </view>
  95. <view v-if="groupType">
  96. <view class="line" >
  97. <view class="lineLeft">
  98. <span class="linexx">*</span> <span>拼团人数</span>
  99. </view>
  100. <view class="lineRight">
  101. <input type="number" v-model="groupNumber" placeholder="可输入大于1的整数" class="lineRightInput" placeholder-class="inputPlace">
  102. </view>
  103. </view>
  104. <view class="line" >
  105. <view class="lineLeft">
  106. <span class="linexx">*</span> <span>拼团有效期</span>
  107. </view>
  108. <view class="lineRight">
  109. <input type="number" v-model="groupTime" placeholder="可输入0.5至72小时" class="linecInput" placeholder-class="inputPlace">
  110. </view>
  111. <viwe class="lineRight">小时</viwe>
  112. </view>
  113. <view class="line" >
  114. <view class="lineLeft">
  115. <span class="linexx">*</span> <span>拼团价</span>
  116. </view>
  117. <view class="lineRight">
  118. <input type="number" v-model="groupMoney" placeholder="需小于支付金额" class="linecInput" placeholder-class="inputPlace">
  119. </view>
  120. <viwe class="lineRight"></viwe>
  121. </view>
  122. <view class="line line3">
  123. <view class="lineLeft2">
  124. <span class="linexx">*</span><span>拼团超时自动成团</span>
  125. <image @click="zyct" src="../../static/img/icon_help.png" mode="" class="helpIcon"></image>
  126. </view>
  127. <view class="lineRight"><switch :checked='groupOutState' @change="switchgroupOutState" style="transform:scale(0.8)"/></view>
  128. </view>
  129. <view class="line line3">
  130. <view class="lineLeft2">
  131. <span class="linexx">*</span><span>自由参团</span>
  132. <image @click="zdct" src="../../static/img/icon_help.png" mode="" class="helpIcon"></image>
  133. </view>
  134. <view class="lineRight"><switch :checked='groupRestrictions' @change="switchgroupRestrictions" style="transform:scale(0.8)"/></view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <view class="kk"></view>
  140. <view class="box">
  141. <view class="title">活动详情</view>
  142. <view class="line">
  143. <view class="lineLeft">
  144. <span>活动说明</span>
  145. </view>
  146. <view class="lineRight">
  147. <textarea placeholder-class="inputPlace" v-model="activityContent" placeholder="请输入" class="textsr"/>
  148. </view>
  149. </view>
  150. <view class="line2">
  151. <view class="lineTitle">主图</view>
  152. <view class="lineMS">此图在活动顶部显示,建议宽度750px</view>
  153. <view class="lineImgBOx">
  154. <view class="lineimghz" v-if="img" >
  155. <img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimgzt" >
  156. <img :src="img" alt="" class="lineimg" @click="previewImage(img)">
  157. </view>
  158. <view class="lineimghz" @click="upimgzt" v-if="!img">
  159. <img src="../../static/img/scimg.png" alt="" class="lineimg">
  160. </view>
  161. </view>
  162. </view>
  163. <view class="line2">
  164. <view class="lineTitle">详情图片</view>
  165. <view class="lineMS">此图在活动底部显示,可用于显示门店照片等,建议宽度750px</view>
  166. <view class="lineImgBOx">
  167. <view class="lineimghz" v-for="(item,index) in imgListArr">
  168. <img src="../../static/img/del.png" alt="" class="lineimgdel" @click="delimg(index)" >
  169. <img :src="item" alt="" class="lineimg" @click="previewImage(item)">
  170. </view>
  171. <view class="lineimghz" @click="upimg">
  172. <img src="../../static/img/scimg.png" alt="" class="lineimg">
  173. </view>
  174. </view>
  175. </view>
  176. <view class="line lineBorderNo">
  177. <view class="lineLeft">
  178. <span>音乐</span>
  179. </view>
  180. <view class="lineRight musicRight" @click="goMusic">
  181. <view class="musicMS">选择/更换音乐</view>
  182. <img src="../../static/img/jt.png" alt="" class="musicJt">
  183. </view>
  184. </view>
  185. <view class="musicBox" v-if="ckMusic">
  186. <view class="musicLine">
  187. <view class="musicLineLeft">
  188. <img src="../../static/img/music.png" alt="" class="musicImg">
  189. <view class="musicName">{{ckMusic.name}}</view>
  190. </view>
  191. <view>
  192. <img src="../../static/img/sanchu.png" alt="" class="musicDel" @click="musicDel">
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. <view style="height: 120rpx;"></view>
  198. <view class="preview" @click="preview">预览</view>
  199. <w-compress ref='wCompress' />
  200. </view>
  201. </template>
  202. <script>
  203. import WCompress from '@/components/w-compress/w-compress.vue'
  204. export default {
  205. components: {
  206. WCompress
  207. },
  208. data() {
  209. return {
  210. id:'', //类型:String 可有字段 备注:新增无编辑有
  211. activityName:'', //类型:String 必有字段 备注:活动名称
  212. startTime:"", //类型:String 必有字段 备注:营业开始时间
  213. endTime:"", //类型:String 必有字段 备注:营业结束时间
  214. number:"", //类型:String 必有字段 备注:报名人数
  215. activityContent:"", //类型:String 必有字段 备注:活动说明
  216. //clWhere:'', //类型:String 必有字段 备注:报名凭证1,2,3,4 1手机号2车牌号3姓名4单位
  217. payType:1, //类型:String 必有字段 备注:1在线支付2无需支付
  218. music:"", //类型:String 必有字段 备注:背景音乐
  219. clState:'', //类型:String 必有字段 备注:1未启用2启用
  220. img:'', //类型:String 必有字段 备注:从首页带进来的图片
  221. imgList:'',//类型:String 必有字段 备注:详情图片多个以逗号分割
  222. datetimerange: '',
  223. shopNames:'',
  224. shopList:'',
  225. clWhereList:[1,],
  226. clWhereString:'1',
  227. imgListArr:[],
  228. money:'',
  229. ckMusic:'',
  230. id:'',
  231. groupNumber:'',
  232. groupType:false,
  233. groupTime:'',
  234. groupMoney:'',
  235. groupOutState:false,
  236. groupRestrictions:false,
  237. }
  238. },
  239. onLoad(opt) {
  240. this.img=opt.img;
  241. if(opt.id){
  242. this.id=opt.id;
  243. this.getDetails()
  244. }
  245. },
  246. onShow() {
  247. const shopckList = uni.getStorageSync("shopckList");
  248. this.ckMusic=uni.getStorageSync("ckmusic")
  249. if(this.ckMusic){
  250. this.music=this.ckMusic.id
  251. }
  252. var shopNames=[];
  253. var shopList=[];
  254. if(shopckList){
  255. shopckList.forEach(item=>{
  256. shopNames.push(item.shopName)
  257. shopList.push(item.id)
  258. })
  259. this.shopNames=shopNames.join(',')
  260. this.shopList=shopList.join(',')
  261. }
  262. },
  263. methods: {
  264. nopayCl(){
  265. this.payType=2;
  266. this.groupType=false
  267. },
  268. zdct(){
  269. uni.showModal({
  270. title: '自由参团',
  271. content: '如果开启自由参团,则用户可以在详情页直接参团;如果关闭,则用户只能通过好友分享的链接参与拼团',
  272. showCancel:false,
  273. confirmText:'我知道了',
  274. success: function (res) {
  275. }
  276. });
  277. },
  278. zyct(){
  279. uni.showModal({
  280. title: '拼团超时自动成团',
  281. content: '如果开启:过了拼团有效期或拼团活动结束后未能成团,则自动成团;如果关闭:过了拼团有效期或拼团活动结束后未能成团,则拼团失败,团内用户的支付金额将原路退回。',
  282. showCancel:false,
  283. confirmText:'我知道了',
  284. success: function (res) {
  285. }
  286. });
  287. },
  288. switchgroupType(e){
  289. console.log(e)
  290. this.groupType=e.detail.value
  291. },
  292. switchgroupOutState(e){
  293. this.groupOutState=e.detail.value
  294. },
  295. switchgroupRestrictions(e){
  296. this.groupRestrictions=e.detail.value
  297. },
  298. previewImage(img){
  299. var arr=[]
  300. arr.push(img)
  301. uni.previewImage({
  302. urls: arr,
  303. longPressActions: {
  304. itemList: ['发送给朋友', '保存图片',],
  305. success: function(data) {},
  306. fail: function(err) {}
  307. }
  308. });
  309. },
  310. getDetails(){
  311. uni.showLoading({
  312. title: '加载中'
  313. })
  314. this.$http('openH5SetTheGuest/getActivityDetails', {
  315. id:this.id
  316. },'GET').then(res => {
  317. uni.hideLoading();
  318. var jkdata=res.data.data
  319. this.activityName=jkdata.activityName;
  320. this.activityContent=jkdata.activityContent;
  321. this.money=jkdata.money;
  322. this.number=jkdata.number;
  323. this.clWhereString=jkdata.clWhere;
  324. this.clWhereList=this.clWhereString.split(',');
  325. this.startTime=jkdata.startTime.slice(0,10);
  326. this.endTime=jkdata.endTime.slice(0,10);
  327. this.payType=jkdata.payType;
  328. this.img=res.data.img.img;
  329. if(res.data.imgList){
  330. res.data.imgList.forEach(item=>{
  331. this.imgListArr.push(item.img)
  332. })
  333. }
  334. var shopNames=[];
  335. var shopList=[];
  336. if(res.data.shopList){
  337. res.data.shopList.forEach(item=>{
  338. item.id=item.shopId
  339. shopNames.push(item.shopName)
  340. shopList.push(item.shopId)
  341. })
  342. this.shopNames=shopNames.join(',')
  343. this.shopList=shopList.join(',')
  344. }
  345. var useshoplist=res.data.shopList
  346. this.ckMusic=res.data.selectedMusic;
  347. if(this.ckMusic){
  348. this.music=this.ckMusic.id;
  349. uni.setStorage({
  350. key: 'ckmusic',
  351. data: this.ckMusic,
  352. success: function () {
  353. }
  354. });
  355. }else{
  356. uni.removeStorageSync('ckmusic');
  357. }
  358. this.groupType=jkdata.groupType==1?true:false;
  359. this.groupNumber=jkdata.groupNumber;
  360. this.groupTime=jkdata.groupTime;
  361. this.groupMoney=jkdata.groupMoney;
  362. this.groupOutState=jkdata.groupOutState;
  363. this.groupRestrictions=jkdata.groupRestrictions;
  364. //console.log(this.imgListArr)
  365. uni.setStorage({
  366. key: 'shopckList',
  367. data: useshoplist,
  368. success: function () {
  369. }
  370. });
  371. //this.list=res.data
  372. })
  373. },
  374. delimgzt(){
  375. this.img=''
  376. },
  377. upimgzt(){
  378. var that = this;
  379. uni.chooseImage({
  380. sourceType: ['album','camera'],
  381. count:1,
  382. sizeType:['compressed'],
  383. success: (chooseImageRes) => {
  384. const tempFilePaths = chooseImageRes.tempFilePaths;
  385. that.file=tempFilePaths[0];
  386. that.$refs.wCompress.start(that.file, {
  387. pixels: 600000, // 最大分辨率,默认二百万
  388. quality: 0.9, // 压缩质量,默认0.8
  389. type: 'png', // 图片类型,默认jpg
  390. base64: true, // 是否返回base64,默认false,非H5有效
  391. }).then(resxx => {
  392. uni.uploadFile({
  393. url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  394. filePath: resxx,
  395. name: 'file',
  396. formData: {
  397. 'user': 'test'
  398. },
  399. success: (uploadFileRes) => {
  400. that.img=JSON.parse(uploadFileRes.data).data[0]
  401. }
  402. });
  403. }).catch(e => {
  404. })
  405. // uni.uploadFile({
  406. // url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  407. // filePath: tempFilePaths[0],
  408. // name: 'file',
  409. // formData: {
  410. // 'user': 'test'
  411. // },
  412. // success: (uploadFileRes) => {
  413. // console.log(JSON.parse(uploadFileRes.data).data );
  414. // that.img=JSON.parse(uploadFileRes.data).data[0]
  415. // }
  416. // });
  417. }
  418. });
  419. },
  420. preview(){
  421. //console.log(this.clWhere)
  422. // if(this.money==0){
  423. // this.money=0
  424. // }
  425. if(this.money==null){
  426. this.money=''
  427. }
  428. if(this.payType==2){
  429. this.money=0;
  430. }
  431. console.log(this.money)
  432. if(this.activityName==''){
  433. uni.showToast({
  434. title: '请输入活动名称',
  435. icon:'none',
  436. duration: 2000
  437. });
  438. return false;
  439. }else if(!this.startTime||!this.endTime){
  440. uni.showToast({
  441. title: '请选择报名时间',
  442. icon:'none',
  443. duration: 2000
  444. });
  445. return false;
  446. }else if(this.shopList==''){
  447. uni.showToast({
  448. title: '请选择活动门店',
  449. icon:'none',
  450. duration: 2000
  451. });
  452. return false;
  453. }else if(this.clWhereString==''){
  454. uni.showToast({
  455. title: '请选择报名凭证',
  456. icon:'none',
  457. duration: 2000
  458. });
  459. return false;
  460. }else if(this.number==''){
  461. uni.showToast({
  462. title: '请输入最多报名人数',
  463. icon:'none',
  464. duration: 2000
  465. });
  466. return false;
  467. }else if(this.money!==0&&this.money==''&&this.payType==1){
  468. uni.showToast({
  469. title: '请输入支付金额',
  470. icon:'none',
  471. duration: 2000
  472. });
  473. return false;
  474. }else if(this.groupType){
  475. if(!this.groupNumber){
  476. uni.showToast({
  477. title: '请输入拼团人数',
  478. icon:'none',
  479. duration: 2000
  480. });
  481. return false;
  482. }else if(this.groupNumber%1 != 0){
  483. uni.showToast({
  484. title: '请输入整数',
  485. icon:'none',
  486. duration: 2000
  487. });
  488. return false;
  489. }
  490. if(!this.groupTime){
  491. uni.showToast({
  492. title: '请输入拼团有效期',
  493. icon:'none',
  494. duration: 2000
  495. });
  496. return false;
  497. }else if(this.groupTime<0.5||this.groupTime>72){
  498. uni.showToast({
  499. title: '有效期为0.5小时至72小时',
  500. icon:'none',
  501. duration: 2000
  502. });
  503. return false;
  504. }
  505. if(!this.groupMoney){
  506. uni.showToast({
  507. title: '请输入价格',
  508. icon:'none',
  509. duration: 2000
  510. });
  511. return false;
  512. }else if(this.groupMoney>this.money){
  513. uni.showToast({
  514. title: '拼团价格需小于实付价格',
  515. icon:'none',
  516. duration: 2000
  517. });
  518. return false;
  519. }
  520. }
  521. //return false;
  522. var editdata={
  523. id:this.id,
  524. activityName:this.activityName,
  525. startTime:this.startTime+ ' 00:00:00',
  526. endTime:this.endTime+ ' 23:59:59',
  527. number:this.number,
  528. activityContent:this.activityContent,
  529. clWhere:this.clWhereString,
  530. payType:this.payType,
  531. music:this.music,
  532. money:this.money,
  533. shopList:this.shopList,
  534. img:this.img,
  535. imgList:this.imgListArr.join(','),
  536. clState:'',
  537. groupType:this.groupType?1:0,
  538. groupNumber:this.groupNumber,
  539. groupTime:this.groupTime,
  540. groupMoney:this.groupMoney,
  541. groupOutState:this.groupOutState?1:0,
  542. groupRestrictions:this.groupRestrictions?1:0
  543. }
  544. console.log(editdata)
  545. //return false;
  546. uni.setStorage({
  547. key: 'editdata',
  548. data: editdata,
  549. success: function () {
  550. uni.navigateTo({
  551. url:'jkDetail?type=1'
  552. })
  553. }
  554. });
  555. },
  556. addShop(){
  557. uni.navigateTo({
  558. url:'ckshop'
  559. })
  560. },
  561. goMusic(){
  562. uni.navigateTo({
  563. url:'ckmusic'
  564. })
  565. },
  566. musicDel(){
  567. this.music='';
  568. this.ckMusic=''
  569. uni.removeStorageSync('ckmusic');
  570. },
  571. bindTimeChangeStart(e){
  572. console.log(e)
  573. this.startTime=e.detail.value;
  574. },
  575. bindTimeChangeendTime(e){
  576. this.endTime=e.detail.value;
  577. },
  578. clWhere(num){
  579. console.log(this.clWhereList)
  580. this.clWhereString=this.clWhereList.join(',');
  581. if(this.clWhereString.indexOf(num)!=-1){
  582. // this.clWhereList.remove(num)
  583. let index = this.clWhereList.indexOf(num);
  584. this.clWhereList.splice(index, 1)
  585. //this.remove(num)
  586. }else{
  587. this.clWhereList.push(num)
  588. }
  589. this.clWhereString=this.clWhereList.join(',');
  590. console.log(this.clWhereString)
  591. },
  592. delimg(index){
  593. this.imgListArr.splice(index, 1)
  594. },
  595. upimg(){
  596. var that = this;
  597. uni.chooseImage({
  598. sourceType: ['album','camera'],
  599. count:9,
  600. sizeType:['compressed'],
  601. success: (chooseImageRes) => {
  602. const tempFilePaths = chooseImageRes.tempFilePaths;
  603. that.file=tempFilePaths[0]
  604. that.$refs.wCompress.start(that.file, {
  605. pixels: 600000, // 最大分辨率,默认二百万
  606. quality: 0.9, // 压缩质量,默认0.8
  607. type: 'png', // 图片类型,默认jpg
  608. base64: true, // 是否返回base64,默认false,非H5有效
  609. }).then(resxx => {
  610. uni.uploadFile({
  611. url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  612. filePath: resxx,
  613. name: 'file',
  614. formData: {
  615. 'user': 'test'
  616. },
  617. success: (uploadFileRes) => {
  618. that.imgListArr=that.imgListArr.concat(JSON.parse(uploadFileRes.data).data)
  619. }
  620. });
  621. }).catch(e => {
  622. })
  623. // uni.uploadFile({
  624. // url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
  625. // filePath: tempFilePaths[0],
  626. // name: 'file',
  627. // formData: {
  628. // 'user': 'test'
  629. // },
  630. // success: (uploadFileRes) => {
  631. // console.log(JSON.parse(uploadFileRes.data).data );
  632. // that.imgListArr=that.imgListArr.concat(JSON.parse(uploadFileRes.data).data)
  633. // //that.imgArr=that.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
  634. // //that.imgurl=JSON.parse(uploadFileRes.data).data[0];
  635. // //that.goAddzdy(that.imgurl)
  636. // }
  637. // });
  638. }
  639. });
  640. }
  641. }
  642. }
  643. </script>
  644. <style scoped>
  645. .content{
  646. min-height: 100vh;
  647. background:#F4F5F7;
  648. }
  649. .lineLeft2{
  650. width: 300rpx;color: #666666;display: flex;align-items: center;
  651. }
  652. .helpIcon{
  653. width: 26rpx;height: 26rpx;padding-left: 10rpx;padding-top: 4rpx;
  654. }
  655. .preview{
  656. width: 750rpx;
  657. height: 98rpx;
  658. background: #3F90F7;
  659. line-height: 98rpx;
  660. text-align: center;
  661. color: #ffffff;
  662. font-size: 30rpx;
  663. position: fixed;
  664. left: 0;
  665. bottom: 0;
  666. }
  667. .musicBox{
  668. padding: 0 24rpx;
  669. }
  670. .musicLine{
  671. display: flex;
  672. justify-content: space-between;
  673. margin-bottom:30rpx;
  674. padding:26rpx 24rpx;
  675. background: #F4F5F7;
  676. border-radius: 10rpx;
  677. }
  678. .musicName{
  679. color: #3C3C3C;font-size: 24rpx;
  680. padding-left: 10rpx;
  681. }
  682. .musicLineLeft{
  683. display: flex;
  684. }
  685. .musicDel{
  686. width: 30rpx;
  687. height: 30rpx;
  688. }
  689. .musicImg{
  690. width: 36rpx;
  691. height: 36rpx;
  692. }
  693. .line2{
  694. padding: 30rpx 24rpx;
  695. border-bottom: 1px solid #EEEEEE;
  696. }
  697. .musicJt{
  698. width: 28rpx;
  699. height: 28rpx;
  700. margin-top: 8rpx;
  701. }
  702. .musicRight{
  703. display: flex;
  704. justify-content: space-between;
  705. width: 500rpx;
  706. }
  707. .musicMS{
  708. color: #CCCCCC;
  709. }
  710. .lineimgdel{
  711. width: 37rpx;
  712. height: 37rpx;
  713. position: absolute;
  714. top: -18rpx;
  715. right: -18rpx;
  716. }
  717. .lineimghz{
  718. margin-right: 24rpx;
  719. position: relative;
  720. margin-top: 24rpx;
  721. }
  722. .lineimg{
  723. width: 150rpx;
  724. height: 150rpx;
  725. }
  726. .lineTitle{
  727. color: #666666;font-size: 28rpx;
  728. }
  729. .lineMS{
  730. color: #999999;font-size: 24rpx;padding-top: 10rpx;
  731. }
  732. .lineImgBOx{
  733. display: flex;
  734. flex-wrap: wrap;
  735. }
  736. .payBox{
  737. display: flex;
  738. }
  739. .payTypeImg{
  740. width: 36rpx;
  741. height: 36rpx;
  742. }
  743. .payType{
  744. display: flex;
  745. line-height: 36rpx;
  746. }
  747. .payTypeTxt{
  748. padding-left: 10rpx;
  749. color: #3C3C3C;
  750. }
  751. .line{
  752. display: flex;
  753. font-size: 28rpx;
  754. padding: 30rpx 24rpx;
  755. border-bottom: 1px solid #EEEEEE;
  756. }
  757. .linexx{
  758. color: #FF3B30;
  759. }
  760. .dateView{
  761. color:#3C3C3C ;
  762. }
  763. .lineLeft{
  764. width: 200rpx;
  765. color: #666666;
  766. }
  767. .clWhereBox{
  768. display: flex;
  769. }
  770. .clWhereLine{
  771. width: 100rpx;
  772. height: 52rpx;
  773. background: #F4F5F7;
  774. border-radius: 10rpx;
  775. text-align: center;
  776. color: #3C3C3C;
  777. line-height: 52rpx;
  778. font-size: 24rpx;
  779. margin-right: 24rpx;
  780. }
  781. .clWhereBox .clWhereActive{
  782. background: #EAF3FF;
  783. border: 2rpx solid #3F90F7;
  784. height: 48rpx;
  785. color: #3F90F7;
  786. height: 48rpx;
  787. line-height: 48rpx;
  788. width: 96rpx;
  789. }
  790. .timelineRight{
  791. display: flex;
  792. }
  793. .textsr{
  794. width: 500rpx;
  795. height: 180rpx;
  796. }
  797. .shopListNo{
  798. width: 400rpx;
  799. white-space:nowrap;
  800. overflow:hidden;
  801. text-overflow:ellipsis;
  802. color: #CCCCCC;
  803. }
  804. .shopListY{
  805. width: 400rpx;
  806. white-space:nowrap;
  807. overflow:hidden;
  808. text-overflow:ellipsis;
  809. color: #3C3C3C;
  810. }
  811. .addshop{
  812. color: #3F90F7;
  813. padding-left: 10rpx;
  814. }
  815. .shopckBox{
  816. display: flex;
  817. }
  818. .timeHx{
  819. color: #CCCCCC;
  820. padding: 0 30rpx;
  821. }
  822. .lineRightInput{
  823. font-size: 28rpx;
  824. color:#3C3C3C ;
  825. width: 500rpx;
  826. }
  827. .linecInput{
  828. font-size: 28rpx;
  829. color:#3C3C3C ;
  830. width: 400rpx;
  831. }
  832. .lineRight{
  833. color:#3C3C3C ;
  834. }
  835. .inputPlace{
  836. color: #CCCCCC;
  837. }
  838. .dateViewno{
  839. color: #CCCCCC;
  840. }
  841. .box{
  842. background: #ffffff;
  843. padding-bottom: 30rpx;
  844. }
  845. .kk{
  846. background:#F4F5F7;
  847. height: 20rpx;
  848. }
  849. .title{
  850. padding-left: 24rpx;
  851. padding-top: 30rpx;
  852. color: #333333;
  853. font-size: 32rpx;
  854. line-height: 45rpx;
  855. font-weight: 500;
  856. }
  857. .lineBorderNo{
  858. border-bottom: none !important;
  859. }
  860. .line3{
  861. display: flex;justify-content: space-between;
  862. padding: 16rpx 24rpx;
  863. }
  864. .line3 .lineLeft{
  865. display: flex;align-items: center;
  866. }
  867. </style>