康巴易测肤/伤疤uniapp小程序类
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 月之前
3 週之前
1 月之前
3 週之前
3 週之前
3 週之前
1 月之前
3 週之前
3 週之前
3 週之前
1 月之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
3 週之前
1 月之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="content" :style="{
  3. backgroundImage: 'url(' + src + ')',
  4. backgroundSize: 'cover',
  5. backgroundPosition: 'top'
  6. }">
  7. <view class="main">
  8. <view class="action-box">
  9. <view class="btn-box">
  10. <u-button @click="onSubmit()" :color="bgthemeColor" type="info" size="large" shape="circle">
  11. <text :style="{color: themeColor, fontSize: '32rpx', fontWeight: 'bold'}">拍照测评</text>
  12. </u-button>
  13. </view>
  14. </view>
  15. <view class="agree-box">
  16. <u-checkbox-group v-model="checked" @change="onChange">
  17. <u-checkbox size="20" inactiveColor="#333" activeColor="#fff" iconSize="25" iconColor="#333" name="1">
  18. </u-checkbox>
  19. </u-checkbox-group>
  20. <view class="agree-text">
  21. <text class="blue" @click="onUserAgreement">用户服务协议</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. checked: [],
  32. title: '',
  33. }
  34. },
  35. computed: {
  36. src() {
  37. return this.$urls.loginBanner
  38. },
  39. bgthemeColor() {
  40. return this.checked ? '#000': '#000'
  41. },
  42. themeColor() {
  43. return this.$themeColor
  44. },
  45. },
  46. onShow() {
  47. },
  48. onLoad() {
  49. this.checked = [this.$store.state.user.agreementState];
  50. console.log("todo",this.$store.state.user);
  51. },
  52. methods: {
  53. onUserAgreement() {
  54. if (uni.canIUse('openPrivacyContract')) {
  55. // 打开隐私协议页面
  56. uni.openPrivacyContract({
  57. success: (res) => {
  58. console.log('打开隐私协议成功', res);
  59. },
  60. fail: (err) => {
  61. console.error('打开隐私协议失败', err);
  62. }
  63. });
  64. } else {
  65. uni.showToast({
  66. title: "当前微信版本不支持隐私协议功能",
  67. icon: 'none'
  68. });
  69. console.error('当前微信版本不支持隐私协议功能');
  70. }
  71. },
  72. onAgreeChange() { },
  73. openPrivacyPolicy() { },
  74. onSubmit() {
  75. if(!this.checked[0]) {
  76. return uni.showToast({
  77. title: "请勾选用户服务协议",
  78. icon: 'none'
  79. });
  80. }
  81. if (!this.$store.state.user.userInfo) {
  82. return uni.showModal({
  83. title: '提示',
  84. content: '您未创建用户,是否前往创建用户?',
  85. success(res) {
  86. if (res.confirm) {
  87. uni.reLaunch({
  88. url: '/pages/user/info',
  89. })
  90. }
  91. }
  92. });
  93. }
  94. uni.navigateTo({
  95. url: '/pages/skin-assessment/photograph',
  96. })
  97. },
  98. onChange(n) {
  99. if(n.length > 0) {
  100. this.checked = n[0];
  101. this.$store.commit('setAgreementState', n[0]);
  102. this.$store.commit('saveAll');
  103. } else {
  104. this.$store.commit('setAgreementState', '');
  105. this.$store.commit('saveAll');
  106. }
  107. },
  108. getphonenumber(e) {
  109. console.log("快速登录", e);
  110. if (!e.detail.errno) {
  111. console.log(e.detail.code) // 动态令牌
  112. } else {
  113. this.$u.toast('快速登录失败:' + e.detail.errMsg)
  114. }
  115. },
  116. }
  117. }
  118. </script>
  119. <style lang="scss">
  120. .content {
  121. position: relative;
  122. height: 100vh;
  123. width: 100vw;
  124. overflow: hidden;
  125. display: flex;
  126. flex-direction: column;
  127. align-items: center;
  128. justify-content: center;
  129. background-size: contain;
  130. background-repeat: no-repeat;
  131. z-index: 99;
  132. .main {
  133. position: fixed;
  134. bottom: 0;
  135. width: 100vw;
  136. padding: 30rpx 0;
  137. padding-bottom: 30rpx;
  138. border-top-left-radius: 30rpx;
  139. border-top-right-radius: 30rpx;
  140. z-index: 999;
  141. .action-box {
  142. padding: 0 30rpx;
  143. .btn-box {
  144. margin-top: 20rpx;
  145. display: flex;
  146. justify-content: center;
  147. align-items: center;
  148. text {
  149. font-size: 36rpx;
  150. }
  151. .black {
  152. color: $uni-text-color;
  153. }
  154. .gray {
  155. color: $uni-text-color-grey;
  156. }
  157. }
  158. }
  159. .agree-box {
  160. padding: 40rpx 30rpx;
  161. display: flex;
  162. justify-content: center;
  163. align-items: center;
  164. .agree-text {
  165. margin-left: 10rpx;
  166. .blue {
  167. color: $uni-text-color;
  168. text-decoration: underline;
  169. }
  170. }
  171. }
  172. }
  173. }
  174. .logo {
  175. height: 200rpx;
  176. width: 200rpx;
  177. margin-top: 200rpx;
  178. margin-left: auto;
  179. margin-right: auto;
  180. margin-bottom: 50rpx;
  181. }
  182. .text-area {
  183. display: flex;
  184. justify-content: center;
  185. }
  186. .title {
  187. font-size: 36rpx;
  188. color: #8f8f94;
  189. }
  190. </style>