index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <template>
  2. <!-- index.wxml -->
  3. <!-- <com-header show-back="{{ showBack }}" show-header="{{ showHeader }}" page-title="{{ pageTitle }}"></com-header> -->
  4. <view class="wrap" style="padding-top: 30rpx">
  5. <!-- <view class="banner_w">
  6. <image class="banner" src="/statics/img/join/top_banner.png"></image>
  7. </view> -->
  8. <!-- <view class="swiper_w">
  9. <view class="swiper_t">
  10. <view class="title">加盟规则</view>
  11. <view class="desc">秉承公开透明互利合作原则</view>
  12. </view>
  13. <view class="swiper_b">
  14. <swiper class="swiper" autoplay="{{ true }}" circular="{{ true }}" interval="{{ interval }}" previous-margin="72rpx" next-margin="72rpx" bindchange="changeAd">
  15. <swiper-item wx:for="{{ adList }}" wx:key="index">
  16. <image class="join_tu" src="{{ item }}"></image>
  17. </swiper-item>
  18. </swiper>
  19. <view class="dots">
  20. <block wx:for="{{ adList }}" wx:key="index">
  21. <view class="{{ index == current ? 'dot active' : 'dot'}}"></view>
  22. </block>
  23. </view>
  24. </view>
  25. </view> -->
  26. <!-- 常见问题 -->
  27. <!-- <view class="question">
  28. <view class="question_t">常见问题解答</view>
  29. <view class="question_list">
  30. <view class="item">
  31. <image class="item_icon" src="/statics/img/icon_question.png"></image>
  32. <view class="item_nr">
  33. <view class="item_title">糖朝的加盟模式是什么?</view>
  34. <view class="item_desc">糖朝加盟为单店加盟,需要客户全资运营,公司在每个城市设立城市合伙人,协助该城市加盟店运营发展管理工作,公司不参与加盟店利润分成,此模式的优势在于公司管理全部市场,市场机制较为规范透明,店面便于复制,且老板管理店面也较为灵活。</view>
  35. </view>
  36. </view>
  37. <view class="item">
  38. <image class="item_icon" src="/statics/img/icon_question.png"></image>
  39. <view class="item_nr">
  40. <view class="item_title">开店需要办理哪些证件?</view>
  41. <view class="item_desc">开店涉及的相关证件需加盟商到当地相关部门办理,公司可提供办证所需的部分资料,如:生产许可证,检验报告,供货合同等。
  42. 其中门店涉及的证件有:《食品类人员健康证》《营业执照》《食品经营许可证》。</view>
  43. </view>
  44. </view>
  45. <view class="item">
  46. <image class="item_icon" src="/statics/img/icon_question.png"></image>
  47. <view class="item_nr">
  48. <view class="item_title">公司对加盟商有哪些支持?</view>
  49. <view class="item_desc">1. 产品支持:产品开发按需生产;2. 物流支持: 冷链日配到店;3. 设计支持: 门店装修设计物料设计;4. 数字化系统支持: 连锁商城系统及经营管理系统;5.经营培训支持:提供免费的门店操作手册及上门辅导;6.专业选址评估;7.新店开业指导;8.品牌营销策划</view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="view_more">展开更多<van-icon name="arrow-down" color="rgba(45,45,45,.54)" /></view>
  54. </view> -->
  55. <!-- 加盟表单 -->
  56. <view class="join_us">
  57. <!-- <view class="join_us_title">我要加盟</view> -->
  58. <view class="join_us_nr">
  59. <view class="join_us_t">留下您的个人信息</view>
  60. <image class="line" src="/static/statics/img/line_tu.png"></image>
  61. <view class="form_wrap">
  62. <view class="form_item">
  63. <view class="item_l">姓名:</view>
  64. <view class="item_r">
  65. <van-field :value="name" placeholder="请输入您的姓名" :border="false" @input="getName" />
  66. </view>
  67. </view>
  68. <view class="form_item">
  69. <view class="item_l">电话:</view>
  70. <view class="item_r">
  71. <van-field :value="phone" placeholder="请输入您的电话" :border="false" @input="getPhone" />
  72. </view>
  73. </view>
  74. <view class="form_item">
  75. <view class="item_l">城市:</view>
  76. <view class="item_r">
  77. <van-field :value="city" placeholder="请输入您所在城市" :border="false" @input="getCity" />
  78. </view>
  79. </view>
  80. <view class="form_item">
  81. <view class="item_l">备注:</view>
  82. <view class="item_r">
  83. <van-field
  84. :value="remark"
  85. placeholder="可简要描述您想咨询的问题"
  86. :border="false"
  87. type="textarea"
  88. :maxlength="50"
  89. :autosize="true"
  90. show-word-limit
  91. @input="getRemark"
  92. />
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="join_btn" @tap="tijiao">提交</view>
  98. </view>
  99. </view>
  100. <!-- loading -->
  101. <!-- <van-overlay show="{{ loading }}" z-index="100">
  102. <van-loading custom-class="custom_loading" />
  103. </van-overlay> -->
  104. </template>
  105. <script>
  106. // index.js
  107. let myPro = require('../../utils/wxRequest.js');
  108. let util = require('../../utils/util.js'); // 获取应用实例
  109. const app = getApp();
  110. export default {
  111. data() {
  112. return {
  113. current: 0,
  114. // 轮播图展示第几个
  115. interval: 3000,
  116. // 自动切换时间间隔
  117. adList: ['/static/statics/img/join/1.png', '/static/statics/img/join/2.png', '/static/statics/img/join/3.png'],
  118. name: '',
  119. phone: '',
  120. city: '',
  121. remark: '',
  122. showBack: true,
  123. pageTitle: '招商加盟',
  124. showHeader: false,
  125. // header显示状态
  126. setBgHeight: getApp().globalData.setBgHeight,
  127. loading: false // 全局loading
  128. };
  129. },
  130. onLoad: function (options) {
  131. // Do some initialize when page load.
  132. },
  133. onShow: function () {
  134. // Do something when page show.
  135. let that = this;
  136. },
  137. onReady: function () {
  138. // Do something when page ready.
  139. },
  140. onHide: function () {
  141. // Do something when page hide.
  142. },
  143. onUnload: function () {
  144. // Do something when page close.
  145. },
  146. onPullDownRefresh: function () {
  147. // Do something when pull down.
  148. },
  149. onReachBottom: function () {
  150. // Do something when page reach bottom.
  151. },
  152. onPageScroll: function (event) {
  153. // Do something when page scroll
  154. let that = this;
  155. let scrollTop = event.scrollTop;
  156. if (scrollTop >= that.setBgHeight) {
  157. that.setData({
  158. showHeader: true
  159. });
  160. } else {
  161. that.setData({
  162. showHeader: false
  163. });
  164. }
  165. },
  166. onResize: function () {
  167. // Do something when page resize
  168. },
  169. methods: {
  170. // 广告轮播图切换
  171. changeAd(event) {
  172. let that = this;
  173. that.setData({
  174. current: event.detail.current
  175. });
  176. },
  177. // 加盟人姓名
  178. getName(event) {
  179. let that = this;
  180. that.setData({
  181. name: event.detail
  182. });
  183. },
  184. // 加盟人电话
  185. getPhone(event) {
  186. let that = this;
  187. that.setData({
  188. phone: event.detail
  189. });
  190. },
  191. // 加盟人地址
  192. getCity(event) {
  193. let that = this;
  194. that.setData({
  195. city: event.detail
  196. });
  197. },
  198. // 加盟人留言
  199. getRemark(event) {
  200. let that = this;
  201. that.setData({
  202. remark: event.detail
  203. });
  204. },
  205. // 提交
  206. tijiao() {
  207. let that = this;
  208. if (!that.name) {
  209. uni.showToast({
  210. title: '请填写您的姓名',
  211. icon: 'none'
  212. });
  213. return;
  214. }
  215. if (!that.phone || !/^1[3456789]\d{9}$/.test(that.phone)) {
  216. uni.showToast({
  217. title: '手机号有误,请重新填写',
  218. icon: 'none'
  219. });
  220. return;
  221. }
  222. if (!that.city) {
  223. uni.showToast({
  224. title: '请填写您所在的城市',
  225. icon: 'none'
  226. });
  227. return;
  228. }
  229. let params = {
  230. name: that.name,
  231. phone: that.phone,
  232. city: that.city
  233. };
  234. if (that.remark) {
  235. params.remark = that.remark;
  236. }
  237. myPro
  238. .wxRequest('user/v2/joinUs', 'GET', params)
  239. .then((res) => {
  240. uni.showToast({
  241. title: res.msg,
  242. icon: 'none'
  243. });
  244. that.setData({
  245. name: '',
  246. phone: '',
  247. city: '',
  248. remark: ''
  249. });
  250. })
  251. .catch((err) => {
  252. console.log('报错信息', err);
  253. uni.showToast({
  254. title: err,
  255. icon: 'none'
  256. });
  257. });
  258. }
  259. }
  260. };
  261. </script>
  262. <style>
  263. /**index.wxss**/
  264. .wrap {
  265. min-height: 100vh;
  266. background: #f6f6f6;
  267. }
  268. .banner {
  269. width: 750rpx;
  270. height: 554rpx;
  271. }
  272. .swiper_w {
  273. padding: 48rpx 0 80rpx;
  274. border-radius: 10rpx 10rpx 0 0;
  275. background: #f9f9f9;
  276. position: relative;
  277. margin-top: -20rpx;
  278. }
  279. .swiper_t {
  280. padding-bottom: 28rpx;
  281. text-align: center;
  282. }
  283. .swiper_t .title {
  284. font-size: 40rpx;
  285. font-weight: 500;
  286. color: #000000;
  287. }
  288. .swiper_t .desc {
  289. font-size: 28rpx;
  290. color: rgba(0, 0, 0, 0.54);
  291. padding-top: 20rpx;
  292. }
  293. .swiper {
  294. height: 936rpx;
  295. }
  296. .swiper .join_tu {
  297. width: 530rpx;
  298. height: 936rpx;
  299. display: block;
  300. margin: 0 auto;
  301. border-radius: 10rpx;
  302. }
  303. .swiper_w .dots {
  304. position: absolute;
  305. bottom: 50rpx;
  306. left: 50%;
  307. transform: translateX(-50%);
  308. display: flex;
  309. align-items: center;
  310. }
  311. .swiper_w .dots .dot {
  312. width: 10rpx;
  313. height: 10rpx;
  314. background: rgba(0, 0, 0, 0.1);
  315. border-radius: 5rpx;
  316. margin-left: 10rpx;
  317. }
  318. .swiper_w .dots .dot.active {
  319. width: 60rpx;
  320. background: #e1342d;
  321. }
  322. /* 问题 */
  323. .question_t {
  324. font-size: 40rpx;
  325. font-weight: 500;
  326. color: #000000;
  327. text-align: center;
  328. padding-bottom: 38rpx;
  329. }
  330. .question_list {
  331. width: 690rpx;
  332. margin: 0 auto;
  333. padding: 0 30rpx 30rpx;
  334. background: #ffffff;
  335. border-radius: 10rpx;
  336. }
  337. .question_list .item {
  338. padding: 40rpx 0 0;
  339. display: flex;
  340. }
  341. .question_list .item .item_icon {
  342. width: 43rpx;
  343. height: 40rpx;
  344. }
  345. .question_list .item_nr {
  346. width: 560rpx;
  347. margin-left: 14rpx;
  348. }
  349. .question_list .item .item_title {
  350. font-size: 30rpx;
  351. color: #000000;
  352. }
  353. .question_list .item .item_desc {
  354. font-size: 28rpx;
  355. color: rgba(55, 54, 54, 0.7);
  356. padding-top: 30rpx;
  357. }
  358. .question .view_more {
  359. width: 690rpx;
  360. margin: 0 auto;
  361. background: #ffffff;
  362. text-align: center;
  363. font-size: 24rpx;
  364. color: rgba(0, 0, 0, 0.54);
  365. padding-bottom: 40rpx;
  366. }
  367. /* 加盟 */
  368. .join_us {
  369. width: 690rpx;
  370. margin: 0 auto;
  371. padding-bottom: 60rpx;
  372. }
  373. .join_us_title {
  374. font-size: 40rpx;
  375. font-weight: 500;
  376. color: #000000;
  377. padding: 40rpx 0;
  378. text-align: center;
  379. }
  380. .join_us_nr {
  381. display: flex;
  382. flex-direction: column;
  383. }
  384. .join_us_nr .join_us_t {
  385. padding: 30rpx 30rpx 0;
  386. font-size: 28rpx;
  387. color: #000000;
  388. background: #ffffff;
  389. }
  390. .join_us_nr .line {
  391. width: 690rpx;
  392. height: 30rpx;
  393. }
  394. .form_wrap {
  395. background: #ffffff;
  396. padding: 0 30rpx 30rpx;
  397. }
  398. .form_item {
  399. display: flex;
  400. align-items: center;
  401. padding: 0 30rpx;
  402. min-height: 80rpx;
  403. background: #f9f9f9;
  404. border-radius: 10rpx;
  405. margin-top: 10rpx;
  406. font-size: 26rpx;
  407. }
  408. .form_item .item_r {
  409. flex: 1;
  410. }
  411. .form_item .item_r van-field {
  412. width: 100%;
  413. }
  414. .form_item .van-cell {
  415. background: transparent;
  416. }
  417. .join_us .join_btn {
  418. width: 405rpx;
  419. height: 98rpx;
  420. background: #295c56;
  421. border-radius: 10rpx;
  422. margin: 40rpx auto;
  423. font-size: 28rpx;
  424. color: #fffefe;
  425. display: flex;
  426. align-items: center;
  427. justify-content: center;
  428. }
  429. </style>