环卫车小程序前端代码
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.

214 lines
6.0 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="u-page">
  3. <view class="se-pt-50 se-pb-40 se-px-40 se-bgc-green se-c-white se-pos">
  4. <view class="se-flex">
  5. <image :src="user.cerImage" class="se-br-p-50 se-w-100 se-h-100 se-bgc-f5" mode=""></image>
  6. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  7. <view class="se-flex">
  8. <text class="se-fw-6 se-fs-30">{{user.name}}</text>
  9. <!-- <view class="se-flex se-flex-ai-c se-ml-20">
  10. <image class="se-a-25 se-mr-10" src="@/static/image/pencil.png" mode=""></image>
  11. <text class="se-fs-22">修改资料</text>
  12. </view> -->
  13. </view>
  14. <view class="se-fs-24 se-display-ib">
  15. <text>手机号:</text>
  16. <text class="se-ml-20">{{user.phone}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="se-m-30 se-mt-30 se-pl-30 se-pr-20 se-br-20 se-bgc-white">
  22. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onReservation()">
  23. <view class="se-flex se-flex-ai-c">
  24. <image class="se-a-30" src="@/static/image/482011.png" mode=""></image>
  25. <text class="se-ml-20 se-fs-24 se-fw-5">预约信息</text>
  26. </view>
  27. <view class="se-flex se-flex-ai-c">
  28. <u-icon name="arrow-right"></u-icon>
  29. </view>
  30. </view>
  31. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onRelease">
  32. <view class="se-flex se-flex-ai-c">
  33. <image class="se-a-30" src="@/static/image/482014.png" mode=""></image>
  34. <text class="se-ml-20 se-fs-24 se-fw-5">我的发布</text>
  35. </view>
  36. <view class="se-flex se-flex-ai-c">
  37. <u-icon name="arrow-right"></u-icon>
  38. </view>
  39. </view>
  40. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onApply()">
  41. <view class="se-flex se-flex-ai-c">
  42. <image class="se-a-30" src="@/static/image/482013.png" mode=""></image>
  43. <text class="se-ml-20 se-fs-24 se-fw-5">我的寻车申请</text>
  44. </view>
  45. <view class="se-flex se-flex-ai-c">
  46. <u-icon name="arrow-right"></u-icon>
  47. </view>
  48. </view>
  49. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onInvite">
  50. <view class="se-flex se-flex-ai-c">
  51. <image class="se-a-30" src="@/static/image/482012.png" mode=""></image>
  52. <text class="se-ml-20 se-fs-24 se-fw-5">我的邀请</text>
  53. </view>
  54. <view class="se-flex se-flex-ai-c">
  55. <u-icon name="arrow-right"></u-icon>
  56. </view>
  57. </view>
  58. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onRecommend">
  59. <view class="se-flex se-flex-ai-c">
  60. <image class="se-a-30" src="@/static/image/482012.png" mode=""></image>
  61. <text class="se-ml-20 se-fs-24 se-fw-5">我的推荐</text>
  62. </view>
  63. <view class="se-flex se-flex-ai-c">
  64. <u-icon name="arrow-right"></u-icon>
  65. </view>
  66. </view>
  67. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onCustomerService">
  68. <view class="se-flex se-flex-ai-c">
  69. <image class="se-a-30" src="@/static/image/470868.png" mode=""></image>
  70. <text class="se-ml-20 se-fs-24 se-fw-5">在线客服</text>
  71. </view>
  72. <view class="se-flex se-flex-ai-c">
  73. <u-icon name="arrow-right"></u-icon>
  74. </view>
  75. </view>
  76. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onVersion">
  77. <view class="se-flex se-flex-ai-c">
  78. <image class="se-a-30" src="@/static/image/470868.png" mode=""></image>
  79. <text class="se-ml-20 se-fs-24 se-fw-5">关于我们</text>
  80. </view>
  81. <view class="se-flex se-flex-ai-c">
  82. <u-icon name="arrow-right"></u-icon>
  83. </view>
  84. </view>
  85. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb" @click="onLogOut">
  86. <view class="se-flex se-flex-ai-c">
  87. <text class="se-fs-24 se-fw-5">退出登录</text>
  88. </view>
  89. <view class="se-flex se-flex-ai-c">
  90. <u-icon name="arrow-right"></u-icon>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. import { getInfo,queryPhone } from "@/common/api.js"
  98. export default {
  99. data() {
  100. return {
  101. user:{},
  102. phone:"",
  103. }
  104. },
  105. onLoad() {
  106. this.onUserInfo()
  107. this.onQueryPhone()
  108. },
  109. methods: {
  110. onUserInfo(){
  111. let that = this
  112. getInfo({id:uni.getStorageSync('userInfo').id}).then(response=>{
  113. console.info('resultresult',response)
  114. that.user = response.result
  115. }).catch(err=>{
  116. })
  117. },
  118. onQueryPhone(){
  119. queryPhone({}).then(response=>{
  120. this.phone = response.result.paramValue
  121. }).catch(error=>{
  122. })
  123. },
  124. onInvite(){
  125. uni.navigateTo({
  126. url:"/pages_subpack/invite/index"
  127. })
  128. },
  129. onRecommend(){
  130. uni.navigateTo({
  131. url:"/pages_subpack/recommend/index"
  132. })
  133. },
  134. onRelease(){
  135. uni.navigateTo({
  136. url:"/pages_subpack/release/index"
  137. })
  138. },
  139. onApply(){
  140. uni.navigateTo({
  141. url:"/pages_subpack/apply/list"
  142. })
  143. },
  144. onSystem(){
  145. uni.navigateTo({
  146. url:"/pages_subpack/system/index"
  147. })
  148. },
  149. onReservation(){
  150. uni.navigateTo({
  151. url:"/pages/reservation/index"
  152. })
  153. },
  154. onVersion(){
  155. uni.navigateTo({
  156. url:"/pages_subpack/version/index"
  157. })
  158. },
  159. onLogOut(){
  160. uni.showModal({
  161. title:"温馨提示",
  162. content:"确定退出当前登录",
  163. cancelText:"取消",
  164. confirmText:"确定",
  165. success:(res)=> {
  166. console.info(res)
  167. if(res.confirm==true){
  168. uni.removeStorageSync("userInfo")
  169. uni.removeStorageSync("token")
  170. uni.removeStorageSync("sessionKey")
  171. uni.navigateTo({
  172. url:"/pages/auth/index"
  173. })
  174. }
  175. }
  176. })
  177. },
  178. onCustomerService(){
  179. let that = this
  180. // let obj = that.$utils.getkeyContent('phone')
  181. if (uni.canIUse('makePhoneCall')) {
  182. uni.makePhoneCall({
  183. phoneNumber: String(that.phone),
  184. success: function () {
  185. console.log('拨打电话成功');
  186. },
  187. fail: function () {
  188. console.log('拨打电话失败');
  189. }
  190. });
  191. } else {
  192. console.log('你的设备不支持拨打电话功能');
  193. }
  194. }
  195. }
  196. }
  197. </script>
  198. <style>
  199. page {
  200. background-color: #f5f5f5 !important;
  201. }
  202. .se-grid {
  203. display: grid;
  204. grid-template-columns: 1fr 1fr 1fr 1fr;
  205. gap: 10rpx;
  206. padding-bottom: 4rpx;
  207. }
  208. </style>