addStaff.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <view class="headers dis a-c j-start " :style="headerStyle">
  6. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  7. <text style="margin: auto;">闪电增员</text>
  8. </view>
  9. <view class="Personnel dis a-c j-s">
  10. <view class="addMe">
  11. <image src="../../../static/image/addStaff/f1.png" mode="" @click="getStaffList(1)"></image>
  12. </view>
  13. <view class="addMe">
  14. <image src="../../../static/image/addStaff/f2.png" mode="" @click="getStaffList(2)"></image>
  15. </view>
  16. <view class="addMe">
  17. <image src="../../../static/image/addStaff/f3.png" mode="" @click="getStaffList(3)"></image>
  18. </view>
  19. </view>
  20. <view class="" style="padding: 16px;">
  21. <view class="promotion " v-if="sources==1">
  22. <view style="width: 100%;border-bottom: 1px solid #f2f2f2;">
  23. <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  24. </view>
  25. <view class="dis a-c j-c f-c mt-5" v-if="current==0">
  26. <image :src="recommendImg" mode="widthFix" lazy-load style="width: 110px;"></image>
  27. <text class="mt-1" style="color: rgba(51, 51, 51, 0.8);">面对面推荐</text>
  28. <text style="color: rgba(51, 51, 51, 0.8);">更安全更方便的加入方式</text>
  29. <view class="invitation dis j-c a-c">
  30. <image src="../../../static/image/addStaff/f4.png" mode=""></image>
  31. <text @click="invitation">邀请函</text>
  32. </view>
  33. </view>
  34. <view class="dis a-c j-c f-c mt-5" v-if="current==1">
  35. <image :src="DownloadImg" mode="widthFix" lazy-load style="width: 110px;"></image>
  36. <text class="mt-1" style="color: rgba(51, 51, 51, 0.8);">微信扫描二维码</text>
  37. <text style="color: rgba(51, 51, 51, 0.8);">即可下载App</text>
  38. <!-- <view class="invitation dis j-c a-c">
  39. <image src="../../../static/image/addStaff/f4.png" mode=""></image>
  40. <text @click="invitation">邀请函</text>
  41. </view> -->
  42. </view>
  43. </view>
  44. <view class="promotion " v-if="sources==2">
  45. <view style="width: 100%;border-bottom: 1px solid #f2f2f2;">
  46. <u-tabs :list="list1" :is-scroll="false" :current="current1" @change="change1"></u-tabs>
  47. </view>
  48. <view class="dis a-c j-c f-c mt-5" v-if="current1==0">
  49. <image :src="orderissuerImg" mode="widthFix" lazy-load style="width: 110px;"></image>
  50. <text class="mt-1" style="color: rgba(51, 51, 51, 0.8);">面对面推荐</text>
  51. <text style="color: rgba(51, 51, 51, 0.8);">更安全更方便的加入方式</text>
  52. </view>
  53. <view class="dis a-c j-c f-c mt-5" v-if="current1==1">
  54. <image :src="DownloadImg" mode="widthFix" lazy-load style="width: 110px;"></image>
  55. <text class="mt-1" style="color: rgba(51, 51, 51, 0.8);">微信扫描二维码</text>
  56. <text style="color: rgba(51, 51, 51, 0.8);">即可下载App</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import myListItem from "@/components/modules/my/my-list-item.vue";
  64. import {
  65. mapState
  66. } from "vuex"
  67. import QR from "@/common/wxqrcode.js"
  68. export default {
  69. components: {
  70. myListItem
  71. },
  72. data() {
  73. return {
  74. recommendImg: "",
  75. DownloadImg: "",
  76. orderissuerImg: '',
  77. list: [{
  78. name: '面对面推荐'
  79. }, {
  80. name: '扫码下载'
  81. }],
  82. current: 0,
  83. list1: [{
  84. name: '出单员扫码注册'
  85. }, {
  86. name: '扫码下载'
  87. }, ],
  88. current1: 0,
  89. headerStyle: {
  90. backgroundColor: '',
  91. backgroundImage: '',
  92. backgroundSize: '',
  93. backgroundPosition: '',
  94. boxShadow: ''
  95. // 其他样式属性...
  96. },
  97. }
  98. },
  99. onLoad() {
  100. this.recommendCode();
  101. this.codeDownload();
  102. this.orderissuer();
  103. },
  104. computed: {
  105. ...mapState(['userInfo', 'sources']),
  106. },
  107. methods: {
  108. //页面返回按钮
  109. back() {
  110. uni.navigateBack({
  111. delta: 1, // 返回的页面数,如果是1表示返回上一页
  112. success: function() {}
  113. });
  114. },
  115. invitation() {
  116. this.navigate({
  117. url: '/pages/tools/poster/poster',
  118. }, "navigateTo", true)
  119. },
  120. recommendCode() {
  121. let id = this.userInfo.sysUser.id;
  122. this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/register/register?id=" + id, {
  123. size: parseInt(200) //二维码大小
  124. })
  125. },
  126. async codeDownload() {
  127. let id = this.userInfo.sysUser.id;
  128. let pageRequest = {
  129. pageNum: 1,
  130. pageSize: 50,
  131. columnFilters: {
  132. apptype: {
  133. name: "apptype",
  134. value: "apk",
  135. }
  136. }
  137. };
  138. let getquote = await this.$http.post('/sysVersion/findPage', pageRequest);
  139. let url = getquote.data.content[0].path;
  140. this.DownloadImg = QR.createQrCodeImg(url, {
  141. size: parseInt(200) //二维码大小
  142. })
  143. },
  144. orderissuer() {
  145. let id = this.userInfo.sysUser.id;
  146. this.orderissuerImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/register/orderissuer?id=" + id, {
  147. size: parseInt(200) //二维码大小
  148. })
  149. },
  150. change(index) {
  151. this.current = index;
  152. },
  153. change1(index) {
  154. this.current1 = index;
  155. },
  156. getStaffList(staffType) {
  157. // 0未认证 1已认证 2全部
  158. this.navigate({
  159. url: '/pages/tools/addStaff/authentication' + staffType,
  160. }, "navigateTo", true);
  161. }
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. page {
  167. background-color: #F8FAFE;
  168. }
  169. .promotion {
  170. width: 100%;
  171. height: auto;
  172. background: #FFFFFF;
  173. box-shadow: 0px 4px 10px 0px #DAE3F4;
  174. border-radius: 6px;
  175. padding: 0 16px 16px;
  176. .invitation {
  177. width: 160px;
  178. height: 24px;
  179. background: rgba(255, 224, 178, 0.5);
  180. box-shadow: 2px 0px 1px 0px rgba(255, 255, 255, 0.6);
  181. border-radius: 12px;
  182. border: 1px solid #FFDCA7;
  183. color: #FB892B;
  184. margin-top: 10px;
  185. image {
  186. width: 16px;
  187. height: 16px;
  188. margin-right: 5px;
  189. }
  190. }
  191. }
  192. .Personnel {
  193. height: auto;
  194. width: 100%;
  195. background: #fff;
  196. background-image: url("/static/image/my/banner.png");
  197. background-size: 100% 100%;
  198. padding: 110px 24px 10px;
  199. .addMe {
  200. width: 70px;
  201. height: 70px;
  202. image {
  203. width: 100%;
  204. height: 100%;
  205. }
  206. }
  207. }
  208. .headers {
  209. position: fixed;
  210. top: 0;
  211. left: 0;
  212. height: auto;
  213. width: 100%;
  214. z-index: 999999;
  215. padding: 16px;
  216. padding-top: 50px;
  217. text {
  218. font-size: 18px;
  219. font-weight: bold;
  220. color: #000;
  221. }
  222. }
  223. .addStaffManage {
  224. height: 220upx;
  225. margin: 0 40upx;
  226. }
  227. .addStaffManage>view>view.icon {
  228. width: 110upx;
  229. height: 110upx;
  230. color: #FFFFFF;
  231. border-radius: 100%;
  232. margin-bottom: 10upx;
  233. font-size: 60upx;
  234. }
  235. .addStaffManage>view:nth-of-type(1)>view.icon {
  236. background-color: #78CBFF;
  237. }
  238. .addStaffManage>view:nth-of-type(2)>view.icon {
  239. background-color: #78FF7E;
  240. }
  241. .addStaffManage>view:nth-of-type(3)>view.icon {
  242. background-color: #FF9D4A;
  243. }
  244. </style>