getShop.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="container">
  3. <view class="step">
  4. <uni-steps active-color="#FF6A69" :options="[
  5. {title: '注册账号',url:'./getShop'},
  6. {title: '扫码授权',url:'./qrCode'},
  7. {title: '提交支付资质',url:'./addPay'},
  8. {title: '基础信息',url:'./basics'} ]" :active="0"></uni-steps>
  9. </view>
  10. <view style="height: 130rpx;"></view>
  11. <form @submit="onSubmit">
  12. <view class="content">
  13. <view class="item flex flex-y-center">
  14. <view class="title-block required">
  15. <text>微信号:</text>
  16. </view>
  17. <view class="desc">
  18. <input type="text" :value="info.wx_name" name="wx_name" class="input-box" placeholder="请输入微信号"
  19. placeholder-class="desc-placeholder">
  20. </view>
  21. </view>
  22. <view class="item flex flex-y-center">
  23. <view class="title-block required">
  24. <text>身份证姓名:</text>
  25. </view>
  26. <view class="desc">
  27. <input type="text" :value="info.id_card_name" name="id_card_name" class="input-box" placeholder="请输入身份证姓名"
  28. placeholder-class="desc-placeholder">
  29. </view>
  30. </view>
  31. <view class="item flex flex-y-center">
  32. <view class="title-block required">
  33. <text>身份证号:</text>
  34. </view>
  35. <view class="desc">
  36. <input type="text" :value="info.id_card_number" name="id_card_number"
  37. class="input-box" placeholder="请输入身份证号" placeholder-class="desc-placeholder">
  38. </view>
  39. </view>
  40. <view class="item flex flex-y-center">
  41. <view class="title-block required">
  42. <text>开通类型:</text>
  43. </view>
  44. <view class="desc ft30 flex-grow-1 box-pack-between" @click="onPrinterStatusChange">
  45. <text></text>
  46. <view class="flex-y-center">
  47. {{codeStatus}}
  48. <text class="iconfont icongengduo"></text>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <button class="sub-btn" hover-class="none" form-type="submit">
  54. 立即提交
  55. </button>
  56. </form>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. info: {},
  64. ali_arr: [
  65. '关闭', '开启'
  66. ],
  67. is_coupon: 0,
  68. setColor: "",
  69. code_type: 1,
  70. codeStatus: '整店打包(开通小商店)',
  71. }
  72. },
  73. onLoad() {
  74. this.getdata();
  75. },
  76. methods: {
  77. onPrinterStatusChange() {
  78. let statusArr = ['整店打包(开通小商店)', '组件开放(开通小程序,并且已经完整的嵌入电商功能)',]
  79. uni.showActionSheet({
  80. itemList: statusArr,
  81. success: (r) => {
  82. console.log(r.tapIndex)
  83. this.code_type = Number(r.tapIndex) + 1
  84. this.codeStatus = statusArr[r.tapIndex]
  85. }
  86. })
  87. },
  88. bindColor(e) {
  89. this.setColor = e.detail.value;
  90. },
  91. choicemenber(index) {
  92. this.is_coupon = index;
  93. },
  94. getdata(e) {
  95. this.request({
  96. url: "Wechatstore/wechat_info_list",
  97. data: {
  98. admin_id: uni.getStorageSync("admin_id")
  99. },
  100. }).then(res => {
  101. console.log(res, "res")
  102. if (res.code === '200') {
  103. this.info = res.data;
  104. this.code_type = res.data.api_openstore_type;
  105. this.codeStatus = res.data.api_openstore_type == 1 ? '整店打包(开通小商店)' : res.data.api_openstore_type == 2 ? '组件开放(开通小程序,并且已经完整的嵌入电商功能)' :
  106. '';
  107. }
  108. });
  109. },
  110. onSubmit(e) {
  111. let data = e.detail.value;
  112. data.admin_id = uni.getStorageSync("admin_id");
  113. data.api_openstore_type = this.code_type;
  114. this.request({
  115. url: "Wechatstore/register_shop",
  116. data: data,
  117. }).then(res => {
  118. if (res.code == 200) {
  119. uni.showToast({
  120. title: res.message,
  121. icon: 'none'
  122. })
  123. setTimeout(() => {
  124. uni.redirectTo({
  125. url:'./qrCode'
  126. })
  127. }, 2000)
  128. }
  129. }).catch((res) => {
  130. uni.showToast({
  131. title: res.message,
  132. icon: 'none'
  133. })
  134. })
  135. },
  136. }
  137. }
  138. </script>
  139. <style>
  140. page {
  141. background-color: #F4F5F7;
  142. }
  143. .item {
  144. background-color: #FFF;
  145. padding: 0 25rpx;
  146. }
  147. .title-block {
  148. margin-right: 20rpx;
  149. }
  150. .desc {
  151. text-align: right;
  152. flex: 1;
  153. padding: 25rpx 0;
  154. border-bottom: 1rpx solid #F1F1F1;
  155. }
  156. .rund {
  157. width: 40rpx;
  158. height: 40rpx;
  159. }
  160. .red {
  161. color: red;
  162. padding: 10rpx 25rpx;
  163. font-size: 26rpx;
  164. }
  165. .sub-btn {
  166. width: 690rpx;
  167. height: 100rpx;
  168. background: linear-gradient(315deg, #FF6A69 2%, #FF6A69 99%);
  169. border-radius: 8rpx;
  170. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  171. text-align: center;
  172. line-height: 100rpx;
  173. color: #fff;
  174. font-size: 36rpx;
  175. font-weight: bold;
  176. margin: 0 auto;
  177. margin-top: 30px;
  178. }
  179. .checklist-box {
  180. display: -webkit-box;
  181. display: -webkit-flex;
  182. display: flex;
  183. -webkit-box-orient: horizontal;
  184. -webkit-box-direction: normal;
  185. -webkit-flex-direction: row;
  186. flex-direction: row;
  187. -webkit-box-align: center;
  188. -webkit-align-items: center;
  189. align-items: center;
  190. margin: 5px 0;
  191. margin-right: 22px;
  192. }
  193. .radio__inner {
  194. -webkit-flex-shrink: 0;
  195. flex-shrink: 0;
  196. display: -webkit-box;
  197. display: -webkit-flex;
  198. display: flex;
  199. -webkit-box-pack: center;
  200. -webkit-justify-content: center;
  201. justify-content: center;
  202. -webkit-box-align: center;
  203. -webkit-align-items: center;
  204. align-items: center;
  205. position: relative;
  206. border: 1px solid #DCDFE6;
  207. border-radius: 2px;
  208. box-sizing: border-box;
  209. width: 16px;
  210. height: 16px;
  211. border-radius: 16px;
  212. background-color: #fff;
  213. z-index: 1;
  214. -webkit-transition: border-color .3s;
  215. transition: border-color .3s;
  216. }
  217. .radio__inner-icon {
  218. width: 8px;
  219. height: 8px;
  220. border-radius: 10px;
  221. opacity: 0;
  222. -webkit-transition: -webkit-transform .3s;
  223. transition: -webkit-transform .3s;
  224. transition: transform .3s;
  225. transition: transform .3s, -webkit-transform .3s;
  226. }
  227. .is-default-checked {
  228. opacity: 1;
  229. background-color: #FF6A69;
  230. -webkit-transform: rotate(45deg) scaleY(1);
  231. transform: rotate(45deg) scaleY(1);
  232. }
  233. .act_border {
  234. border: 1rpx solid #FF6A69;
  235. }
  236. .checklist-text {
  237. font-size: 28rpx;
  238. margin-left: 5px;
  239. -webkit-transition: color 0.2s;
  240. transition: color 0.2s;
  241. color: #000;
  242. }
  243. </style>