privacy.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view>
  3. <u-navbar back-text="隐私设置" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <view class="top">
  6. <view>
  7. <img src="@/pages/packages/as-components/privacy.png">
  8. </view>
  9. <view>
  10. <view>我们时刻保护</view>
  11. <view>你的隐私安全</view>
  12. </view>
  13. </view>
  14. <u-select v-model="updateintention" :list="intentionList" @confirm="updateintentionBtn" ></u-select>
  15. <!-- 其他服务 -->
  16. <view class="card ">
  17. <view class="span_view">
  18. <view>求职状态
  19. </view>
  20. <view class="span_view_select">
  21. 勿扰<u-switch size="40" @change="change1" v-model="intention"></u-switch>求职
  22. </view>
  23. </view>
  24. <u-line color="#E6E6E6"></u-line>
  25. <view class="span_view">
  26. <view>简历状态</view>
  27. <view class="span_view_select">
  28. 隐藏<u-switch size="40" @change="change2" v-model="jobStatus"></u-switch>公开
  29. </view>
  30. </view>
  31. <u-line color="#E6E6E6"></u-line>
  32. <view class="span_view">
  33. <view>真实姓名保护
  34. <view class="span_view777">开启后,对外显示名称将展示“X女士/先生”</view>
  35. </view>
  36. <view class="span_view_select">
  37. 关闭<u-switch size="40" @change="change3" v-model="isAnonymous"></u-switch>开启
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import * as API from '@/apis/pagejs/packages.js'
  45. import * as API_weixin from '@/apis/weixin.js'
  46. export default {
  47. components: {
  48. },
  49. data() {
  50. return {
  51. src: '',
  52. show: false,
  53. value: 'false',
  54. userInfo: {},
  55. showPhone: false,
  56. confirmText: '拨打电话',
  57. content: "",
  58. checked:false,
  59. num1: 0,
  60. num2: 0,
  61. num3: 0,//0 未创建 ,1 审批中, 2 成功
  62. isReady:false,
  63. updateintention:false,
  64. intention: '',
  65. jobStatus:false,
  66. isAnonymous:false,
  67. intentionList:[
  68. {
  69. value: '1',
  70. label: '求职中'
  71. },
  72. {
  73. value: '2',
  74. label: '隐藏简历'
  75. },
  76. {
  77. value: '3',
  78. label: '已入职/勿扰'
  79. },
  80. ],
  81. }
  82. },
  83. onLoad() {
  84. },
  85. onShow(){
  86. this.userInfo = this.carhelp.getPersonInfo()
  87. this.intention=this.userInfo .intention==1
  88. this.isAnonymous=this.userInfo.isAnonymous
  89. this.jobStatus=this.userInfo.jobStatus==null?true:this.userInfo.jobStatus=="1"
  90. },
  91. methods: {
  92. change1(index){
  93. this.intention=index;
  94. this.updateApi()
  95. },
  96. change2(index){
  97. this.jobStatus=index;
  98. this.updateApi()
  99. },
  100. change3(index){
  101. this.isAnonymous=index;
  102. this.updateApi()
  103. },
  104. updateApi(){
  105. uni.showLoading({
  106. title: "加载中",
  107. mask: true,
  108. })
  109. API.updatePerson({
  110. intention: this.intention?"1":"2",
  111. isAnonymous:this.isAnonymous,
  112. jobStatus:this.jobStatus?"1":"0"
  113. }).then((res) => {
  114. uni.hideLoading();
  115. this.userInfo.intention=this.intention?"1":"2";
  116. this.userInfo.isAnonymous=this.isAnonymous;
  117. this.userInfo.jobStatus=this.jobStatus?"1":"0";
  118. this.carhelp.setPersonInfo(this.userInfo)
  119. }).catch(error => {
  120. this.showPhone = false;
  121. uni.hideLoading();
  122. })
  123. },
  124. updateintentionBtn(e){
  125. console.log(e);
  126. this.intention=e[0].value
  127. this.updateApi()
  128. },
  129. }
  130. }
  131. </script>
  132. <style>
  133. page {
  134. background: #F0F0F2;
  135. padding-bottom: 150px;
  136. }
  137. </style>
  138. <style lang="scss" scoped>
  139. .showImg {
  140. width: 38rpx;
  141. height: 38rpx;
  142. }
  143. .top {
  144. background-color: #2795FD ;
  145. display: flex;
  146. align-items: center;
  147. padding: 40rpx 32rpx 88rpx;
  148. font-size: 48rpx;
  149. justify-content: center;
  150. color:#fff;
  151. img{
  152. width: 168rpx;
  153. height: 168rpx;
  154. }
  155. }
  156. .card {
  157. position: relative;
  158. top: -40px;
  159. background-color: #fff;
  160. border-radius: 12px;
  161. margin: 32rpx;
  162. padding:8rpx 32rpx;
  163. .title {
  164. color: rgba(16, 16, 16, 1);
  165. font-size: 32rpx;
  166. margin-bottom: 20rpx;
  167. }
  168. .span_view{
  169. display: flex;
  170. justify-content: space-between;
  171. padding:32rpx 0;
  172. font-size: 38rpx;
  173. color: rgba(51, 51, 51, 1);
  174. .span_view777{
  175. color:#777777;
  176. font-size: 24rpx;
  177. }
  178. .span_view_select{
  179. display: flex;
  180. font-size: 24rpx;
  181. align-items: center;
  182. min-width: 220rpx;
  183. justify-content: flex-end;
  184. }
  185. }
  186. }
  187. .greencircle:after {
  188. content: '';
  189. margin: 3px;
  190. display: table;
  191. width: 6px;
  192. height: 6px;
  193. border-radius: 50%;
  194. }
  195. .greencircle2:after {
  196. background: #54b86c;
  197. }
  198. .greencircle1:after {
  199. background: #dc4441;
  200. }
  201. </style>