create1.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="content-box">
  3. <view class="step-box">
  4. <view class="step-1">1</view>
  5. <view style="color: #d7d7d7;font-size: 54rpx;">------</view>
  6. <view class="step-1" style="background-color:#aaaaaa;">2</view>
  7. </view>
  8. <view class="info-box">
  9. <view class="info-title-box">
  10. <!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
  11. <text>所属支部</text>
  12. </view>
  13. <view class="info-value-box">
  14. <picker @change="bindPickerChange" :range="honorBranch" :range-key="'name'" class="select-box">
  15. <view class="uni-input">{{branchValue}}</view>
  16. <image src="/static/arrow_down.svg" mode="aspectFill"></image>
  17. </picker>
  18. </view>
  19. </view>
  20. <view style="margin-top: 15%;">
  21. <button type="primary" class="submit-bth" style="background-color: #169bd5;" @click="goStep()">下一步</button>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import md5 from "@/common/md5.js";
  27. // import pickerAddress from '@/components/liudx-pickerAddress/index.vue'
  28. // var graceChecker = require("../../../common/graceChecker.js");
  29. export default {
  30. components: {
  31. },
  32. data() {
  33. return {
  34. isAuthPhone:getApp().globalData.user_phone,
  35. branchValue:'',
  36. honorBranch:[],
  37. }
  38. },
  39. onLoad() {
  40. //this.getTradeRequest();
  41. this.getActivityBranch();
  42. },
  43. onShow() {
  44. },
  45. // onShareAppMessage() {
  46. // return {
  47. // title: '分销小助手',
  48. // path:'/pages/index/index?scene=' + getApp().globalData.user_id
  49. // }
  50. // },
  51. methods: {
  52. getActivityBranch() {
  53. let md5Sign = md5(
  54. "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
  55. "&secret=" +getApp().globalData.secret
  56. );
  57. let url = getApp().globalData.shareUrl +"api/api.php" +
  58. "?method=activity&action=activity_branch&timestamp=" +
  59. getApp().globalData.globalTimestamp +"&sign=" + md5Sign;
  60. uni.request({
  61. url: url,
  62. method: "POST",
  63. header: {
  64. "content-type": "application/x-www-form-urlencoded",
  65. },
  66. data: {
  67. openid:getApp().globalData.open_id,
  68. },
  69. success: (res) => {
  70. if (res.data.code === 200) {
  71. this.honorBranch = res.data.data;
  72. this.branchValue = res.data.data[0].name;
  73. }
  74. },
  75. fail: () => {
  76. console.log("连接失败");
  77. },
  78. });
  79. },
  80. goStep(){
  81. uni.navigateTo({
  82. url:'./create2'
  83. })
  84. },
  85. bindPickerChange(e) {
  86. this.branchValue = this.honorBranch[e.target.value].name
  87. },
  88. submitRequest(params){
  89. console.log(params)
  90. let that = this;
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .content {
  97. &_list{
  98. display: flex;
  99. flex-direction: row;
  100. align-items: center;
  101. justify-content:space-around;
  102. &_lable{
  103. }
  104. &_content{
  105. flex: 1;
  106. width: auto;
  107. text-align: right;
  108. }
  109. }
  110. }
  111. .content-box {
  112. width: 100%;
  113. /* height: 100%; */
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. /* justify-content: center; */
  118. }
  119. .info-box {
  120. width: 90%;
  121. margin: 3% auto;
  122. display: flex;
  123. flex-direction: column;
  124. // align-items: center;
  125. // height: 180rpx;
  126. }
  127. .info-title-box {
  128. width: 20%;
  129. display: flex;
  130. align-items: center;
  131. font-size: 26rpx;
  132. }
  133. .info-title-box image{
  134. width: 15rpx;
  135. height: 15rpx;
  136. margin-right: 2%;
  137. }
  138. .info-value-box {
  139. width: 100%;
  140. }
  141. .info-value-box input {
  142. height: 88rpx;
  143. background: #f7f7f7;
  144. font-size: 26rpx;
  145. padding-left: 4%;
  146. margin: 2% auto;
  147. }
  148. .info-value-box picker {
  149. position: relative;
  150. }
  151. .info-value-box picker image {
  152. position: absolute;
  153. width: 25rpx;
  154. height: 25rpx;
  155. right: 10px;
  156. top: 30rpx;
  157. }
  158. .select-box {
  159. height: 80rpx;
  160. background: #f7f7f7;
  161. font-size: 26rpx;
  162. padding-left: 4%;
  163. margin: 2% auto;
  164. color: #888;
  165. line-height: 88rpx;
  166. }
  167. .info-gender-box {
  168. width: 75%;
  169. font-size: 28rpx;
  170. }
  171. .form-radio {
  172. transform: scale(0.6);
  173. }
  174. .padding-left-2 {
  175. // padding-left: 2%;
  176. }
  177. .margin-right-10 {
  178. margin-right: 10%;
  179. }
  180. .border-line-box {
  181. width: 100%;
  182. height: 20rpx;
  183. background: #f7f7f7;
  184. }
  185. .picker-box{
  186. display: flex;
  187. align-items: center;
  188. justify-content: space-between;
  189. height: 60rpx;
  190. line-height: 60rpx;
  191. background: #f7f7f7;
  192. height: 88rpx;
  193. line-height: 88rpx;
  194. background: #f7f7f7;
  195. font-size: 28rpx;
  196. padding-left: 4%;
  197. }
  198. .picker-class {
  199. border-radius: 10rpx;
  200. padding: 10rpx;
  201. width: 73%;
  202. font-size: 28rpx;
  203. background: #f5f5f5;
  204. }
  205. .picker-class image {
  206. width: 26rpx;
  207. height: 26rpx;
  208. }
  209. .step-box {
  210. display: flex;
  211. justify-content: space-evenly;
  212. align-items: center;
  213. width: 90%;
  214. margin: 5% 0 5% 0;
  215. }
  216. .step-1 {
  217. width: 60rpx;
  218. height: 60rpx;
  219. border-radius: 50%;
  220. background-color:#02a7f0;
  221. text-align: center;
  222. line-height: 60rpx;
  223. color: #fff;
  224. }
  225. .submit-bth {
  226. width: 200rpx;
  227. font-size: 26rpx;
  228. margin: 0 0 5% 0;
  229. color: #fff;
  230. }
  231. </style>