europeShop.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <view class="content">
  3. <view>
  4. <image src="../../static/img/europeShop.png" mode="" class="europeShopImg"></image>
  5. </view>
  6. <view class="box">
  7. <view class="cont">
  8. <view class="line">
  9. <view class="lineTitle">
  10. <span class="xx">*</span>
  11. <span class="title">门店名称</span>
  12. </view>
  13. <view class="lineInputBox">
  14. <image src="../../static/img/shop.png" mode="" class="lineImg"></image>
  15. <input v-model="shopName" type="text" class="lineInput" placeholder="请填写您的门店名称"/>
  16. </view>
  17. </view>
  18. <view class="line">
  19. <view class="lineTitle">
  20. <span class="xx">*</span>
  21. <span class="title">姓名</span>
  22. </view>
  23. <view class="lineInputBox">
  24. <image src="../../static/img/name.png" mode="" class="lineImg"></image>
  25. <input v-model="contactor" type="text" class="lineInput" placeholder="请填写姓名"/>
  26. </view>
  27. </view>
  28. <view class="line">
  29. <view class="lineTitle">
  30. <span class="xx">*</span>
  31. <span class="title">手机号</span>
  32. </view>
  33. <view class="lineInputBox">
  34. <image src="../../static/img/call.png" mode="" class="lineImg"></image>
  35. <input v-model="contactorPhone" type="number" maxlength="11" class="lineInput" placeholder="请填写手机号"/>
  36. </view>
  37. </view>
  38. <view class="line" @click="open">
  39. <view class="lineTitle">
  40. <span class="title">省市区</span>
  41. </view>
  42. <view class="lineInputBox">
  43. <image src="../../static/img/adress.png" mode="" class="lineImg"></image>
  44. <view v-if="!str" class="city">请选择</view>
  45. <view v-if="str" class="city2">{{str}}</view>
  46. </view>
  47. </view>
  48. <view class="line">
  49. <view class="lineTitle">
  50. <span class="title">地址</span>
  51. </view>
  52. <view class="lineInputBox">
  53. <image src="../../static/img/adress.png" mode="" class="lineImg"></image>
  54. <input v-model="address" type="text" class="lineInput" placeholder="请填写地址"/>
  55. </view>
  56. </view>
  57. <view class="BtnBox">
  58. <view class="btn" @click="submitFn">提交申请</view>
  59. </view>
  60. </view>
  61. </view>
  62. <cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm" @cancel="cancel" :visible="visible"/>
  63. <view class="tisBox" v-if="tisSHow">
  64. <view class="tisCont">
  65. <view class="tisLine">申请成功,您可登录下面的地址进行体验</view>
  66. <view class="tisline">
  67. 地址:<a href="https://edms.eurorepar.cn/login">https://edms.eurorepar.cn/login</a>
  68. </view>
  69. <view class="tisLine">账号密码均为您申请时填写的手机号,账号有效期60天。</view>
  70. <view class="btn2" @click="copy">复制文本</view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
  77. export default {
  78. components: {
  79. cityPicker
  80. },
  81. data() {
  82. return {
  83. title: '',
  84. visible: false,
  85. maskCloseAble: true,
  86. str: '',
  87. defaultValue: '',
  88. // defaultValue: ['河北省','唐山市','丰南区'],
  89. column: 3,
  90. shopName:'',
  91. contactorPhone:'',
  92. contactor:'',
  93. address:'',
  94. province:'',
  95. provinceName:'',
  96. city:'',
  97. cityName:'',
  98. area:'',
  99. areaName:'',
  100. tisSHow:false,
  101. }
  102. },
  103. onLoad() {
  104. uni.setNavigationBarTitle({
  105. title: '欧洲维修DMS系统体验申请' // 设定新标题
  106. });
  107. },
  108. methods: {
  109. open () {
  110. this.visible = true
  111. },
  112. confirm (val) {
  113. console.log(val)
  114. this.province=val.code.slice(0,1)+'0000'
  115. this.provinceName=val.provinceName
  116. this.city=val.code.slice(0,3)+'00'
  117. this.cityName=val.cityName
  118. this.area=val.code
  119. this.areaName=val.areaName
  120. this.str = val.name
  121. this.visible = false
  122. },
  123. cancel () {
  124. this.visible = false
  125. },
  126. submitFn(){
  127. let that = this
  128. if(!this.shopName){
  129. uni.showToast({
  130. title:'门店名称必填',
  131. icon: 'none',
  132. duration: 3000
  133. });
  134. return false
  135. }
  136. if(!this.contactor){
  137. uni.showToast({
  138. title:'姓名必填',
  139. icon: 'none',
  140. duration: 3000
  141. });
  142. return false
  143. }
  144. if(!this.contactorPhone){
  145. uni.showToast({
  146. title:'手机号必填',
  147. icon: 'none',
  148. duration: 3000
  149. });
  150. return false
  151. }
  152. if(this.contactorPhone.length!=11){
  153. uni.showToast({
  154. title:'请输入正确的手机号',
  155. icon: 'none',
  156. duration: 3000
  157. });
  158. return false
  159. }
  160. uni.showLoading({
  161. title: '加载中'
  162. });
  163. this.$request.europehttp('sys/addSuperShopApplicationEurope', {
  164. shopName:this.shopName,
  165. contactorPhone:this.contactorPhone,
  166. contactor:this.contactor,
  167. address:this.address,
  168. province:this.province,
  169. provinceName:this.provinceName,
  170. city:this.city,
  171. cityName:this.cityName,
  172. area:this.area,
  173. areaName:this.areaName,
  174. }, 'POST').then(res => {
  175. uni.hideLoading();
  176. if(res.code==0){
  177. this.tisSHow=true
  178. }else{
  179. /* uni.showToast({
  180. title: res.msg,
  181. icon: 'none',
  182. duration: 3000
  183. }); */
  184. uni.showModal({
  185. title: '提示',
  186. content: res.msg,
  187. success: function (res) {
  188. if (res.confirm) {
  189. console.log('用户点击确定');
  190. } else if (res.cancel) {
  191. console.log('用户点击取消');
  192. }
  193. }
  194. });
  195. }
  196. })
  197. },
  198. copy(){
  199. var txt='申请成功,您可登录下面的地址进行体验。地址:https://edms.eurorepar.cn/login,账号密码均为您申请时填写的手机号,账号有效期60天。'
  200. uni.setClipboardData({
  201. data: txt,
  202. success: function() {
  203. uni.showToast({
  204. title: '复制成功',
  205. icon: 'none',
  206. duration: 2000
  207. });
  208. }
  209. });
  210. }
  211. }
  212. }
  213. </script>
  214. <style scoped>
  215. .content{
  216. background: #F15E2A;
  217. min-height: 100vh;
  218. }
  219. .europeShopImg{
  220. width: 100%; display: block;
  221. }
  222. .box{
  223. padding: 0 24rpx;
  224. }
  225. .cont{
  226. background: #FEF8F6;
  227. padding-left: 34rpx;
  228. padding-right: 20rpx;
  229. margin-top: -2rpx;
  230. padding-top: 2rpx;
  231. }
  232. .line{
  233. padding-top: 32rpx;padding-bottom: 16rpx;
  234. }
  235. .xx{
  236. color: #FF0000;font-size: 28rpx;
  237. }
  238. .title{
  239. font-size: 28rpx;color: #222222;font-weight: 600;
  240. }
  241. .lineImg{
  242. width: 30rpx;height: 30rpx;margin-top: 22rpx;
  243. }
  244. .lineInputBox{
  245. border-radius: 10rpx;
  246. border: 2rpx solid rgba(34,34,34,0.2);
  247. display: flex;
  248. line-height: 72rpx;
  249. height: 72rpx;
  250. padding-left: 23rpx;
  251. }
  252. .lineInput{
  253. line-height: 72rpx;
  254. height: 72rpx;
  255. padding-left: 18rpx;
  256. font-size: 28rpx;
  257. width: calc(100% - 50rpx);
  258. }
  259. .lineTitle{
  260. padding-bottom: 16rpx;
  261. }
  262. .city{
  263. line-height: 72rpx;
  264. height: 72rpx;
  265. padding-left: 18rpx;
  266. font-size: 28rpx;
  267. color: #666;
  268. }
  269. .city2{
  270. line-height: 72rpx;
  271. height: 72rpx;
  272. padding-left: 18rpx;
  273. font-size: 28rpx;
  274. color: #222;
  275. }
  276. .BtnBox{
  277. padding-top: 40rpx;
  278. padding-bottom: 26rpx;
  279. }
  280. .btn{
  281. width: 100%;
  282. height: 98rpx;
  283. background: #F05E23;
  284. border-radius: 20rpx;
  285. text-align: center;
  286. line-height: 98rpx;
  287. color: #FFFFFF;
  288. font-weight: 600;
  289. font-size: 28rpx;
  290. }
  291. .tisBox{
  292. width: 100vw;
  293. height: 100vh;
  294. position: fixed;
  295. left: 0;
  296. background: rgba(0, 0, 0, 0.5);
  297. top: 0;
  298. }
  299. .tisCont{
  300. background: #FFFFFF;
  301. padding: 20rpx;
  302. margin-top: 30vh;
  303. margin-left: 5vw;
  304. width: calc(90vw - 40rpx);
  305. font-size: 28rpx;
  306. color: #222222;
  307. border-radius: 12rpx;
  308. }
  309. .btn2{
  310. width: 148rpx;
  311. height: 68rpx;
  312. background: #F05E23;
  313. border-radius: 20rpx;
  314. text-align: center;
  315. line-height: 68rpx;
  316. color: #FFFFFF;
  317. font-weight: 600;
  318. font-size: 28rpx;
  319. margin: 0 auto;
  320. margin-top: 20rpx;
  321. }
  322. </style>