no_bussiness.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <template>
  2. <view class="wrap">
  3. <!-- 头部 -->
  4. <view class="error_class_header">
  5. <view class="error_title">请选择<view class="line"></view></view>
  6. </view>
  7. <view class="select">
  8. <view class="now_select"@tap="showSelect"><view class="iconfont header_bottom"></view>{{message}}</view>
  9. <!-- 下拉选择框 -->
  10. <view :class="['options',isShow === 1?'show':'']">
  11. <view class="now_select options1" v-for="item,index in messageList" :key="index" @tap="changeIndex(item)">{{item.title}}</view>
  12. </view>
  13. </view>
  14. <view class="back"></view>
  15. <view class="content">
  16. <view class="error_class_header">
  17. <view class="error_title">{{message}}<view class="line"></view></view>
  18. </view>
  19. <view class="address_message">
  20. <view class="chose_img_title">上传图片(选填)</view>
  21. <view class="chose_img clear">
  22. <image :src="chooseimg" @tap="chooseImage"></image>
  23. <view class="small_title">上传清晰门头图和指示牌可以加快审核哦~~</view>
  24. </view>
  25. <view class="chose_img_title">备注(选填)</view>
  26. <textarea v-model="remark" maxlength="500" class="textarea" placeholder="备注信息…" placeholder-style="font-size:26rpx;color:#999999;"></textarea>
  27. </view>
  28. <view class="footer">
  29. <button class="submit" @tap="save">提交</button>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. let app = getApp()
  36. import api from "../../api.js";
  37. export default {
  38. data() {
  39. return {
  40. messageList:[
  41. {index:0,title:'永久停业'},
  42. {index:1,title:'新店还未开业'},
  43. {index:2,title:'暂停营业'},
  44. {index:3,title:'不存在'},
  45. ],
  46. isShow:0,//是否展示下拉菜单
  47. message:'永久停业',//菜单栏展示
  48. chooseimg:'https://wx.fujinyangche.com/nvrnetwork/images/choseimg.png',//默认加载图片
  49. img:'',//上传图片信息 服务器返回
  50. remark:'',//备注信息
  51. }
  52. },
  53. props:['storeid','type'],
  54. mounted() {
  55. this.getData();
  56. },
  57. methods: {
  58. //加载数据
  59. getData(){
  60. let data = {
  61. storeId: this.storeid,
  62. token: app.globalData.token,
  63. }
  64. api.getShopError(data).then((res)=>{
  65. console.log(res);
  66. this.allData = res.data.data;
  67. })
  68. },
  69. //是否出现下拉框
  70. showSelect(){
  71. if(this.isShow == 0){
  72. this.isShow = 1;
  73. }else{
  74. this.isShow = 0;
  75. }
  76. },
  77. //下拉框选项点击切换对应组件
  78. changeIndex(item){
  79. this.message = item.title;
  80. this.chooseimg = 'https://wx.fujinyangche.com/nvrnetwork/images/choseimg.png';
  81. this.remark = '';
  82. this.showSelect();
  83. },
  84. //上传图片
  85. chooseImage(){
  86. uni.chooseImage({
  87. count: 1,
  88. sizeType: ['original', 'compressed'],
  89. sourceType: ['album', 'camera'],
  90. success: res=> {
  91. let tempFilePaths = res.tempFilePaths[0];
  92. this.chooseimg = tempFilePaths;
  93. uni.uploadFile({
  94. url: app.globalData.url + '/p_search/upload_img',
  95. filePath: tempFilePaths,
  96. name: 'img',
  97. success:(res)=>{
  98. let data = JSON.parse(res.data);
  99. this.img = data.data;
  100. }
  101. })
  102. },
  103. })
  104. },
  105. //保存按钮
  106. save(){
  107. let data = {
  108. storeId: this.storeid,
  109. subUserId: this.allData.userId,
  110. type:this.type,
  111. description: this.message,
  112. img:this.img,
  113. remark: this.remark
  114. }
  115. api.submitShopError(data).then((res)=>{
  116. if(res.data.is){
  117. uni.showToast({
  118. title:res.data.msg
  119. })
  120. }else{
  121. uni.showToast({
  122. title:res.data.msg
  123. })
  124. }
  125. })
  126. }
  127. }
  128. }
  129. </script>
  130. <style scoped>
  131. .clear:after{
  132. content: "";
  133. display: block;
  134. clear:both;
  135. }
  136. .error_class_header{
  137. padding-left: 30rpx;
  138. box-sizing: border-box;
  139. }
  140. .error_title{
  141. font-size: 32rpx;
  142. color:#222222;
  143. font-weight: bold;
  144. margin-top:32rpx;
  145. position: relative;
  146. padding-left: 14rpx;
  147. }
  148. .line{
  149. width:6rpx;
  150. height:30rpx;
  151. background-color: #E77817;
  152. position: absolute;
  153. top:6rpx;
  154. left:0rpx;
  155. }
  156. .message_top{
  157. position: relative;
  158. }
  159. .select{
  160. width:100%;
  161. padding:0 48rpx 40rpx 54rpx;
  162. box-sizing: border-box;
  163. margin-top:38rpx;
  164. position: relative;
  165. }
  166. .now_select{
  167. width:100%;
  168. height:72rpx;
  169. line-height: 72rpx;
  170. box-sizing: border-box;
  171. background:rgba(255,255,255,1);
  172. border-radius:2rpx;
  173. border:1px solid rgba(207,207,207,1);
  174. font-size: 28rpx;
  175. color:#222222;
  176. padding-left: 20rpx;
  177. position: relative;
  178. }
  179. .header_bottom{
  180. color:#999999;
  181. font-size: 16rpx;
  182. position: absolute;
  183. right:26rpx;
  184. bottom:0rpx;
  185. }
  186. .options{
  187. width:100%;
  188. overflow: hidden;
  189. display: none;
  190. }
  191. .show{
  192. display: block;
  193. }
  194. .options1{
  195. border-top:none;
  196. }
  197. .back{
  198. width:100%;
  199. height:20rpx;
  200. background-color: #f7f7f7;
  201. }
  202. .address1{
  203. font-size:28rpx;
  204. color:#666666;
  205. float:left;
  206. height:46rpx;
  207. text-align: left;
  208. line-height: 46rpx;
  209. margin-right: 20rpx;
  210. }
  211. .address_message{
  212. width:100%;
  213. overflow: hidden;
  214. padding:0 46rpx 140rpx;
  215. box-sizing: border-box;
  216. }
  217. .inp{
  218. width:60%;
  219. float:left;
  220. font-size:28rpx;
  221. color:#222222;
  222. }
  223. .reset{
  224. width:100rpx;
  225. height:40rpx;
  226. background:rgba(250,225,203,1);
  227. border-radius:36rpx;
  228. border:1px solid rgba(231,120,23,1);
  229. text-align: center;
  230. line-height: 40rpx;
  231. font-size: 24rpx;
  232. color:#E77817;
  233. position: absolute;
  234. right:0;
  235. z-index:100;
  236. }
  237. .map{
  238. width:100%;
  239. height:200rpx;
  240. border-radius: 6rpx;
  241. overflow: hidden;
  242. margin-top:20rpx;
  243. }
  244. .chose_img_title{
  245. font-size: 28rpx;
  246. color:#666666;
  247. margin-top:38rpx;
  248. }
  249. .chose_img{
  250. width:100%;
  251. margin-top:30rpx;
  252. }
  253. .chose_img image{
  254. display: block;
  255. width:148rpx;
  256. height:148rpx;
  257. float:left;
  258. }
  259. .small_title{
  260. float:left;
  261. font-size: 24rpx;
  262. color:#999999;
  263. line-height: 148rpx;
  264. margin-left: 20rpx;
  265. }
  266. .textarea{
  267. width:100%;
  268. height:200rpx;
  269. background:rgba(249,249,249,1);
  270. border-radius:6rpx;
  271. border:1px solid rgba(202,202,202,1);
  272. margin-top:12rpx;
  273. padding:14rpx 0 0 20rpx;
  274. box-sizing: border-box;
  275. position: relative;
  276. }
  277. .length{
  278. position: absolute;
  279. bottom:10rpx;
  280. right:10rpx;
  281. font-size: 24rpx;
  282. color:#999999;
  283. }
  284. .back2{
  285. width:100%;
  286. height:40rpx;
  287. background-color: #f7f7f7;
  288. }
  289. .footer{
  290. width:100%;
  291. height:100rpx;
  292. background:rgba(255,255,255,1);
  293. box-shadow:0px 4rpx 8rpx 0px rgba(0,0,0,0.5);
  294. position: fixed;
  295. bottom:0;
  296. left:0;
  297. }
  298. .submit{
  299. width:690rpx;
  300. height:80rpx;
  301. background:linear-gradient(270deg,rgba(254,107,21,1) 0%,rgba(254,163,48,1) 100%);
  302. border-radius:40rpx;
  303. text-align: center;
  304. font-size: 32rpx;
  305. color:#ffffff;
  306. position: absolute;
  307. top:10rpx;
  308. left:50%;
  309. transform: translateX(-50%)
  310. }
  311. .hidden{
  312. display: block;
  313. }
  314. .none{
  315. display: none;
  316. }
  317. .iphone_error{
  318. width:100%;
  319. overflow: hidden;
  320. }
  321. .radio{
  322. width:28rpx;
  323. height:28rpx;
  324. border-radius: 50%;
  325. position: absolute;
  326. top:8rpx;
  327. left: -40rpx;
  328. background-color: #EFEFEF;
  329. border:1px solid #D0D0D0;
  330. }
  331. .right{
  332. width:28rpx;
  333. height:28rpx;
  334. border-radius: 50%;
  335. text-align: center;
  336. line-height: 28rpx;
  337. background:#E77817;
  338. position: absolute;
  339. top:8rpx;
  340. left: -40rpx;
  341. color:#ffffff;
  342. }
  343. .message_top_right{
  344. position: absolute;
  345. right:0;
  346. top:0rpx;
  347. z-index:100;
  348. }
  349. .this_error{
  350. font-size: 28rpx;
  351. color:#222222;
  352. display: inline-block;
  353. height: 46rpx;
  354. line-height: 46rpx;
  355. vertical-align:text-top;
  356. }
  357. .tel_input{
  358. width:100%;
  359. height:72rpx;
  360. background:rgba(255,255,255,1);
  361. border-radius:2rpx;
  362. border:1px solid rgba(207,207,207,1);
  363. box-sizing: border-box;
  364. margin-top:30rpx;
  365. }
  366. .tel_input input{
  367. width:100%;
  368. height:100%;
  369. padding-left: 26rpx;
  370. box-sizing: border-box;
  371. }
  372. .tel_input_place{
  373. font-size: 28rpx;
  374. color:#999999;
  375. line-height: 72rpx;
  376. }
  377. </style>