index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  1. <template>
  2. <view class="content">
  3. <view class="head">
  4. <view class="head_image">
  5. <!-- #ifdef MP-WEIXIN -->
  6. <button open-type="chooseAvatar" v-if="token" @chooseavatar="onChooseAvatar">
  7. <image
  8. style="width: 90rpx; height: 90rpx; border-radius: 50%"
  9. :src="avatar ? avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'"
  10. ></image>
  11. </button>
  12. <image
  13. v-if="!token"
  14. @click="bindlogin"
  15. style="width: 90rpx; height: 90rpx; border-radius: 50%"
  16. src="https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png"
  17. ></image>
  18. <!-- #endif -->
  19. <!-- #ifndef MP-WEIXIN -->
  20. <image
  21. @click="avatar ? goLogin() : ''"
  22. style="width: 90rpx; height: 90rpx; border-radius: 50%"
  23. :src="avatar ? avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'"
  24. ></image>
  25. <!-- #endif -->
  26. <view class="lovip" v-if="isVip">
  27. <image src="../../static/images/my/vip.png" style="width: 88rpx; height: 32rpx; top: -30rpx"></image>
  28. </view>
  29. </view>
  30. <view class="head_name">
  31. <!-- -->
  32. <view class="name" v-if="token" @click="goShop('/pages/my/updateNickName')">{{ userName }}</view>
  33. <view class="name" v-if="!token" @click="bindlogin">登录</view>
  34. </view>
  35. </view>
  36. <view class="margin-lr padding-lr-sm padding-tb radius flex justify-between" v-if="XCXIsSelect == '是'">
  37. <view class="text-center text-black" @click="goShop('/my/coupon/index')">
  38. <view class="text-lg text-bold">{{ msgData.countCoupon }}</view>
  39. <view>外卖优惠券</view>
  40. </view>
  41. <!-- @click="goShop('/my/wallet/index')" -->
  42. <view class="text-center text-black">
  43. <view class="text-lg text-bold">{{ msgData.userMoney }}</view>
  44. <view>我的余额</view>
  45. </view>
  46. <view class="text-center text-black" @click="goShop('/my/task/index')">
  47. <view class="text-lg text-bold">{{ msgData.userIntegral }}</view>
  48. <view>我的积分</view>
  49. </view>
  50. </view>
  51. <view class="margin-bottom padding-lr" style="position: relative" v-if="XCXIsSelect == '是'">
  52. <image src="../../static/images/my/bg.png" style="width: 100%; height: 110rpx" mode=""></image>
  53. <view class="flex justify-between margin-lr padding-tb-sm radius" style="position: absolute; top: 0; width: 640rpx">
  54. <image src="../../static/images/my/huiyuan.png" style="width: 70rpx; height: 70rpx"></image>
  55. <view class="flex-sub margin-left text-lg text-bold" style="line-height: 74rpx; color: #604320">超级会员享特权</view>
  56. <view v-if="!isVip" class="btn-bg" style="color: #604320" @click="goNav({ url: '/my/vip/index' })">去开通</view>
  57. <view v-if="isVip" class="btn-bg" style="color: #604320" @click="goNav({ url: '/my/vip/index' })">已开通</view>
  58. </view>
  59. </view>
  60. <view class="center flex justify-between bg-white margin-top padding-lr padding-tb-lg radius">
  61. <view class="flex justify-between flex-sub padding-right" style="border-right: 2rpx solid #cccccc" @click="goShop('/my/task/index')">
  62. <view class="">
  63. <view class="text-black text-xl text-bold">每日任务</view>
  64. <view class="text-sm margin-top-xs">每日签到领积分</view>
  65. </view>
  66. <image src="../../static/images/my/renwu.png" mode="" style="width: 88rpx; height: 88rpx"></image>
  67. </view>
  68. <view class="flex justify-between flex-sub padding-left" @click="goShop('/my/integral/index')">
  69. <view class="">
  70. <view class="text-black text-xl text-bold">积分商城</view>
  71. <view class="text-sm margin-top-xs flex align-center">积分兑换优惠券</view>
  72. </view>
  73. <image src="../../static/images/my/jifen.png" mode="" style="width: 88rpx; height: 88rpx"></image>
  74. </view>
  75. </view>
  76. <view class="margin padding-lr-sm padding-tb bg-white radius">
  77. <view class="flex justify-between align-center">
  78. <view class="text-lg text-bold text-black">推荐工具</view>
  79. </view>
  80. <view class="flex flex-wrap">
  81. <!-- #ifdef MP-WEIXIN -->
  82. <view class="text-center margin-tb-sm" style="width: 25%" v-if="XCXIsSelect == '是'">
  83. <button class="btn" open-type="share">
  84. <image src="../../static/images/my/4.png" style="width: 50rpx; height: 48rpx" mode=""></image>
  85. <view>分享好友</view>
  86. </button>
  87. </view>
  88. <view class="text-center margin-tb-sm" style="width: 25%" @click="goApplet(shopAppId)" v-if="shopStatus == 1 && XCXIsSelect == '是'">
  89. <image src="../../static/images/my/1.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  90. <view class="text-sm">商家入驻</view>
  91. </view>
  92. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/apply/index' })" v-if="shopStatus != 1 && XCXIsSelect == '是'">
  93. <image src="../../static/images/my/1.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  94. <view class="text-sm">商家入驻</view>
  95. </view>
  96. <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goApplet(qishouAppId)"
  97. v-if="XCXIsSelect=='是'">
  98. <image src="../../static/images/my/11.png" style="width: 55rpx;height: 55rpx;" mode="scaleToFill">
  99. </image>
  100. <view class="text-sm">骑手入驻</view>
  101. </view> -->
  102. <!-- #endif -->
  103. <!-- #ifndef MP-WEIXIN -->
  104. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/apply/index' })" v-if="shopStatus != 1">
  105. <image src="../../static/images/my/1.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  106. <view class="text-sm">商家入驻</view>
  107. </view>
  108. <!-- #ifdef APP -->
  109. <view class="text-center margin-tb-sm" style="width: 25%" @click="shopRuzhu" v-else>
  110. <image src="../../static/images/my/1.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  111. <view class="text-sm">商家入驻</view>
  112. </view>
  113. <!-- #endif -->
  114. <!-- #endif -->
  115. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/tousu/index' })" v-if="XCXIsSelect == '是'">
  116. <image src="../../static/images/order/tousu.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  117. <view class="text-sm">我的投诉</view>
  118. </view>
  119. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/myPingJia/myPingJia' })" v-if="XCXIsSelect == '是'">
  120. <image src="../../static/images/order/pingjia.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  121. <view class="text-sm">我的评价</view>
  122. </view>
  123. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/helpList/index' })">
  124. <image src="../../static/images/my/12.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  125. <view class="text-sm">帮助中心</view>
  126. </view>
  127. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/msg/index' })" v-if="XCXIsSelect == '是'">
  128. <image src="../../static/images/my/3.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  129. <view class="text-sm">消息中心</view>
  130. </view>
  131. <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav({url:'/running/index/index'})"
  132. v-if="XCXIsSelect=='是'">
  133. <image src="../../static/images/my/5.png" style="width: 55rpx;height: 55rpx;" mode="scaleToFill">
  134. </image>
  135. <view class="text-sm">同城跑腿</view>
  136. </view> -->
  137. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/setting/chat' })" v-if="XCXIsSelect == '是'">
  138. <image src="../../static/images/my/6.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  139. <view class="text-sm">联系客服</view>
  140. </view>
  141. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/address/index' })">
  142. <image src="../../static/images/my/7.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  143. <view class="text-sm">地址管理</view>
  144. </view>
  145. <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav({url:'/my/hongbao/hongbao'})"
  146. v-if="XCXIsSelect=='是'">
  147. <image src="../../static/images/my/9.png" style="width: 55rpx;height: 55rpx;" mode="scaleToFill">
  148. </image>
  149. <view class="text-sm">跑腿红包</view>
  150. </view> -->
  151. <view class="text-center margin-tb-sm" style="width: 25%; position: relative" @click="goNav({ url: '/my/chat/index' })" v-if="XCXIsSelect == '是'">
  152. <image src="../../static/images/order/kefu.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  153. <view class="text-sm">聊天室</view>
  154. <view
  155. v-if="messageCount > 0"
  156. style="
  157. height: 32rpx;
  158. width: 32rpx;
  159. border-radius: 100rpx;
  160. background-color: red;
  161. color: #fff;
  162. text-align: center;
  163. position: absolute;
  164. top: -10rpx;
  165. right: 24rpx;
  166. "
  167. >
  168. {{ messageCount }}
  169. </view>
  170. </view>
  171. <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/setting/index' })">
  172. <image src="../../static/images/my/8.png" style="width: 55rpx; height: 55rpx" mode="scaleToFill"></image>
  173. <view class="text-sm">系统设置</view>
  174. </view>
  175. <!-- <view class="text-center margin-tb-sm" style="width: 25%" @click="goNav({ url: '/my/taocan/list' })">
  176. <image
  177. src="https://mxys.chuanghai-tech.com/wmfile/20250812/6431457fbda24074af9bcd5c229eaa7e.png"
  178. style="width: 55rpx; height: 55rpx"
  179. mode="scaleToFill"
  180. ></image>
  181. <view class="text-sm">我的套餐</view>
  182. </view> -->
  183. </view>
  184. </view>
  185. <!-- 联系客服悬浮按钮区域 -->
  186. <view class="serviceBtn" @click="goChat"></view>
  187. <!-- 用于图片压缩的canvas画布 -->
  188. <canvas
  189. :style="{
  190. width: cw + 'px',
  191. height: cw + 'px',
  192. position: 'absolute',
  193. zIndex: -1,
  194. left: '-10000rpx',
  195. top: '-10000rpx'
  196. }"
  197. canvas-id="zipCanvas"
  198. ></canvas>
  199. <!--画布结束-->
  200. </view>
  201. </template>
  202. <script>
  203. import configdata from '@/common/config.js'
  204. import getLessLimitSizeImage from '@/utils/imageCompress.js'
  205. export default {
  206. data() {
  207. return {
  208. messageCount: 0,
  209. avatar: '',
  210. userName: '',
  211. checkCertification: -1,
  212. arr: [],
  213. showModal: true,
  214. msgData: {
  215. userIntegral: 0,
  216. countCoupon: 0,
  217. userMoney: 0
  218. },
  219. tuiguang: '',
  220. tuiguangImg: '',
  221. token: '',
  222. XCXIsSelect: '否',
  223. shopStatus: '',
  224. isVip: false,
  225. messageCount: 0,
  226. time: '',
  227. qishouAppId: '', //骑手APPID
  228. shopAppId: '', //商户appid
  229. //画板边长默认是屏幕宽度,正方形画布
  230. cw: uni.getSystemInfoSync().windowWidth
  231. }
  232. },
  233. onLoad() {
  234. let that = this
  235. that.token = that.$queue.getData('token')
  236. that.$Request.get('/app/common/type/248').then((res) => {
  237. //跑腿师傅端微信小程序APPID 248
  238. if (res.code == 0) {
  239. that.qishouAppId = res.data.value
  240. }
  241. })
  242. that.$Request.get('/app/common/type/305').then((res) => {
  243. //商户端微信小程序APPID 305
  244. if (res.code == 0) {
  245. that.shopAppId = res.data.value
  246. }
  247. })
  248. that.XCXIsSelect = that.$queue.getData('XCXIsSelect') ? that.$queue.getData('XCXIsSelect') : '是'
  249. that.time = setInterval(function () {
  250. that.messageCount = uni.getStorageSync('messageCount')
  251. if (that.messageCount) {
  252. that.messageCount = that.messageCount
  253. } else {
  254. that.messageCount = 0
  255. }
  256. }, 3000)
  257. that.getZiZhi()
  258. console.log('that.XCXIsSelect___:' + that.XCXIsSelect)
  259. },
  260. onHide() {
  261. clearInterval(this.time)
  262. },
  263. onShow() {
  264. let that = this
  265. // this.avatar = this.$queue.getData('avatar') || '';
  266. // this.userName = this.$queue.getData('userName') || '';
  267. that.token = that.$queue.getData('token')
  268. if (that.token) {
  269. that.getUserInfo()
  270. that.getMsgData()
  271. that.messageCount = uni.getStorageSync('messageCount')
  272. if (that.messageCount) {
  273. that.messageCount = that.messageCount
  274. } else {
  275. that.messageCount = 0
  276. }
  277. } else {
  278. that.token = ''
  279. that.isVip = false
  280. that.userName = ''
  281. that.avatar = ''
  282. that.msgData.userIntegral = 0
  283. that.msgData.countCoupon = 0
  284. that.msgData.userMoney = 0
  285. }
  286. },
  287. onShareAppMessage(res) {
  288. //发送给朋友
  289. return {
  290. title: this.tuiguang,
  291. path: '/pages/index/index',
  292. imageUrl: this.tuiguangImg
  293. }
  294. },
  295. onShareTimeline(res) {
  296. //分享到朋友圈
  297. return {
  298. title: this.tuiguang,
  299. path: '/pages/index/index',
  300. imageUrl: this.tuiguangImg
  301. }
  302. },
  303. methods: {
  304. goChat() {
  305. if (this.token) {
  306. uni.navigateTo({
  307. url: '/my/setting/chat'
  308. })
  309. } else {
  310. this.bindlogin()
  311. }
  312. },
  313. //微信填写能力获取头像
  314. onChooseAvatar(e) {
  315. console.log(e.detail.avatarUrl)
  316. let that = this
  317. let token = uni.getStorageSync('token')
  318. uni.showLoading({
  319. title: '上传中...',
  320. mask: true // 是否显示透明蒙层,防止触摸穿透
  321. })
  322. uni.uploadFile({
  323. // url: config.APIHOST1 + '/alioss/upload', //仅为示例,非真实的接口地址
  324. url: that.config('APIHOST1') + '/alioss/upload', //仅为示例,非真实的接口地址
  325. filePath: e.detail.avatarUrl,
  326. header: {
  327. token: token
  328. },
  329. name: 'file',
  330. success: (uploadFileRes) => {
  331. let url = JSON.parse(uploadFileRes.data).data
  332. let data = {
  333. avatar: url
  334. }
  335. that.$Request.postT('/app/user/updateUserImageUrl', data).then((res) => {
  336. console.log(res)
  337. uni.hideLoading()
  338. if (res.code === 0) {
  339. that.$queue.showToast('更新成功')
  340. that.getUserInfo()
  341. }
  342. })
  343. }
  344. })
  345. },
  346. // getName(){
  347. // wx.requestPayment({
  348. // timeStamp: '1723710543',
  349. // nonceStr: '7db6a8aec2a542c7a4852c856595fcd3',
  350. // package: 'prepay_id=wx15162903191561245ec1269166539c0000',
  351. // signType: 'RSA',
  352. // paySign: 'AyvptQMyOiP5cmbInu3fsg4ww3HYm+YYOCwkRyFM2DgFpe3DO4jAhyHpaFsZywnaK0rZVIFI1lgF3tV5fFxTSj1PMSzZpFEVPOHg5uCw6O21ESIJ9XuockX9iWyWcNv5gY5W8ARm73Kt/bZRjyXtE68Ryr1D5Fievo3gh7u71vt2FczvO4Nb0C2u7BY3UOWQ9BEHskuYPhpBkpeuoogorNRtBbg4DHiege1hhcf5On3of/xsGnBPMHNUgix8ljSX+A769XGedzxzQQ5z63Pi7svletdlUewyHdhyTLhXhVqHQLWG/ImdCw3PaXjsoefbdXxv8e3epx3Kux77nTta3w==',
  353. // success (res) {
  354. // console.log(res,'成功')
  355. // },
  356. // fail (res) {
  357. // console.log(res,'失败')
  358. // }
  359. // })
  360. // },
  361. goLogin() {
  362. let that = this
  363. var url = null
  364. let userId = this.$queue.getData('userId')
  365. if (!userId) {
  366. this.bindlogin()
  367. return
  368. }
  369. uni.showActionSheet({
  370. // itemList按钮的文字接受的是数组
  371. itemList: ['查看头像', '从相册选择图片'],
  372. success(e) {
  373. var index = e.tapIndex
  374. if (index === 0) {
  375. // 用户点击了预览当前图片
  376. // 可以自己实现当前头像链接的读取
  377. let url = that.avatar
  378. let arr = []
  379. arr.push(url)
  380. uni.previewImage({
  381. // 预览功能图片也必须是数组的
  382. urls: arr
  383. })
  384. } else if (index === 1) {
  385. uni.chooseImage({
  386. count: 1,
  387. sourceType: ['album'],
  388. success: (res) => {
  389. let token = uni.getStorageSync('token')
  390. for (let i = 0; i < res.tempFiles.length; i++) {
  391. //这里的id和页面中写的html代码的canvas的id要一致
  392. let canvasId = 'zipCanvas'
  393. //原图的路径
  394. let imagePath = res.tempFiles[i].path
  395. //大小限制
  396. let limitSize = 1024 * 2
  397. //初始绘画区域是画布自身的宽度也就是屏幕宽度
  398. let drawWidth = uni.getSystemInfoSync().windowWidth
  399. let that = this
  400. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  401. uni.showLoading({
  402. title: '上传中'
  403. })
  404. uni.uploadFile({
  405. url: that.config('APIHOST') + '/alioss/upload',
  406. filePath: resPath,
  407. header: {
  408. token: token
  409. },
  410. name: 'file',
  411. success: (uploadFileRes) => {
  412. url = JSON.parse(uploadFileRes.data).data
  413. let data = {
  414. avatar: url
  415. }
  416. that.$Request.postT('/app/user/updateUserImageUrl', data).then((res) => {
  417. uni.hideLoading()
  418. if (res.code === 0) {
  419. that.$queue.showToast('更新成功')
  420. that.getUserInfo()
  421. }
  422. })
  423. },
  424. fail: () => {
  425. uni.showToast({
  426. title: '上传失败',
  427. icon: 'error'
  428. })
  429. }
  430. })
  431. })
  432. }
  433. }
  434. })
  435. }
  436. }
  437. })
  438. },
  439. shopRuzhu() {
  440. uni.showToast({
  441. title: '请先下载同城外卖商户端APP',
  442. icon: 'none'
  443. })
  444. },
  445. getMsgData() {
  446. this.$Request.get('/app/userintegral/findUserMessage').then((res) => {
  447. if (res.code == 0) {
  448. this.msgData = res.data
  449. }
  450. })
  451. },
  452. // 分享文案和图片
  453. getZiZhi() {
  454. this.$Request.getT('/app/common/type/239').then((res) => {
  455. if (res.code === 0) {
  456. this.tuiguang = res.data.value
  457. }
  458. })
  459. this.$Request.getT('/app/common/type/238').then((res) => {
  460. if (res.code === 0) {
  461. this.tuiguangImg = res.data.value
  462. }
  463. })
  464. },
  465. goSwt(e) {
  466. uni.setStorageSync('current', e)
  467. setTimeout(function () {
  468. uni.switchTab({
  469. url: '/pages/order/index'
  470. })
  471. }, 10)
  472. },
  473. goApplet(e) {
  474. uni.navigateToMiniProgram({
  475. appId: e,
  476. path: 'pages/index/index',
  477. success(res) {
  478. // 打开成功
  479. }
  480. })
  481. },
  482. goNav(e) {
  483. if (this.token) {
  484. if (e.name == '注册骑手') {
  485. uni.navigateToMiniProgram({
  486. appId: 'wxa59b58efa950ba1f',
  487. path: '/pages/login/login',
  488. extraData: {
  489. data1: 'test'
  490. },
  491. success(res) {
  492. // 打开成功
  493. console.log('打开成功')
  494. }
  495. })
  496. } else if (e.name == '分享好友') {
  497. uni.share({
  498. provider: 'weixin',
  499. scene: 'WXSceneSession',
  500. type: 1,
  501. summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
  502. success: function (res) {
  503. console.log('success:' + JSON.stringify(res))
  504. },
  505. fail: function (err) {
  506. console.log('fail:' + JSON.stringify(err))
  507. }
  508. })
  509. } else {
  510. uni.navigateTo({
  511. url: e.url
  512. })
  513. }
  514. } else if (e.url == '/my/helpList/index') {
  515. uni.navigateTo({
  516. url: e.url
  517. })
  518. } else {
  519. this.bindlogin()
  520. }
  521. },
  522. goShop(url) {
  523. if (this.token) {
  524. uni.navigateTo({
  525. url
  526. })
  527. } else {
  528. this.bindlogin()
  529. }
  530. },
  531. getUserInfo() {
  532. this.$Request.getT('/app/user/selectUserMessage').then((res) => {
  533. console.log(res)
  534. if (res.code == 0) {
  535. if (parseInt(res.data.checkCertification)) {
  536. this.checkCertification = parseInt(res.data.checkCertification)
  537. } else {
  538. this.checkCertification = -1
  539. }
  540. this.isVip = res.data.isVip
  541. this.shopStatus = res.data.shopStatus
  542. this.$queue.setData('avatar', res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png')
  543. this.$queue.setData('userId', res.data.userId)
  544. this.$queue.setData('phone', res.data.phone)
  545. this.$queue.setData('status', res.data.status)
  546. this.$queue.setData('userName', res.data.userName ? res.data.userName : res.data.nickName)
  547. this.avatar = res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
  548. this.userName = res.data.userName ? res.data.userName : res.data.nickName
  549. }
  550. })
  551. },
  552. bindlogin() {
  553. if (!this.token) {
  554. uni.navigateTo({
  555. url: '/pages/public/login'
  556. })
  557. }
  558. },
  559. bindTo(name) {
  560. console.log(name)
  561. if (this.token) {
  562. if (name == '我的红包') {
  563. uni.navigateTo({
  564. url: '/pages/my/hongbao/hongbao'
  565. })
  566. } else if (name == '注册骑手') {
  567. uni.navigateToMiniProgram({
  568. appId: 'wx5ed22ce813e47796',
  569. path: '/pages/index/index',
  570. extraData: {
  571. data1: 'test'
  572. },
  573. success(res) {
  574. // 打开成功
  575. console.log('打开成功')
  576. }
  577. })
  578. } else if (name == '意见反馈') {
  579. uni.navigateTo({
  580. url: '/pageA/feedback/feedback'
  581. })
  582. } else if (name == '联系客服') {
  583. uni.navigateTo({
  584. url: '/pageA/kefu/kefu'
  585. })
  586. } else if (name == '系统设置') {
  587. uni.navigateTo({
  588. url: '/pages/my/set/set'
  589. })
  590. } else if (name == '地址管理') {
  591. uni.navigateTo({
  592. url: '/pageA/address/address'
  593. })
  594. }
  595. } else {
  596. this.bindlogin()
  597. }
  598. },
  599. bindapprove() {
  600. if (this.token) {
  601. uni.navigateTo({
  602. url: '/pages/my/approve/approve'
  603. })
  604. } else {
  605. this.bindlogin()
  606. }
  607. },
  608. binduser() {
  609. if (this.token) {
  610. // uni.navigateTo({
  611. // url: '/pages/my/userphone/userphone'
  612. // })
  613. } else {
  614. this.bindlogin()
  615. }
  616. },
  617. config: function (name) {
  618. var info = null
  619. if (name) {
  620. var name2 = name.split('.') //字符分割
  621. if (name2.length > 1) {
  622. info = configdata[name2[0]][name2[1]] || null
  623. } else {
  624. info = configdata[name] || null
  625. }
  626. if (info == null) {
  627. let web_config = cache.get('web_config')
  628. if (web_config) {
  629. if (name2.length > 1) {
  630. info = web_config[name2[0]][name2[1]] || null
  631. } else {
  632. info = web_config[name] || null
  633. }
  634. }
  635. }
  636. }
  637. return info
  638. }
  639. }
  640. }
  641. </script>
  642. <style>
  643. button::after {
  644. border: none;
  645. background-color: none;
  646. }
  647. button {
  648. position: relative;
  649. display: block;
  650. margin-left: auto;
  651. margin-right: auto;
  652. padding-left: 0px;
  653. padding-right: 0px;
  654. box-sizing: border-box;
  655. text-decoration: none;
  656. line-height: 1.35;
  657. overflow: hidden;
  658. color: #666666;
  659. /* background-color: #fff; */
  660. background-color: rgba(255, 255, 255, 0) !important;
  661. width: 100%;
  662. height: 100%;
  663. }
  664. .btn-bg {
  665. width: 64px;
  666. height: 28px;
  667. background: linear-gradient(90deg, #cda26e 0%, #dcb78a 100%);
  668. border-radius: 28px;
  669. text-align: center;
  670. line-height: 28px;
  671. margin-top: 10upx;
  672. color: '#604320';
  673. }
  674. body {
  675. background: #f5f5f5;
  676. }
  677. /* #ifndef MP-WEIXIN */
  678. page {
  679. background: #f2eded;
  680. }
  681. /* #endif */
  682. .content {
  683. width: 100%;
  684. }
  685. .btn {
  686. font-size: 24upx;
  687. /* width: 95%; */
  688. text-align: center;
  689. background: #ffffff;
  690. margin-top: 6rpx;
  691. }
  692. .head {
  693. /* width: 100%; */
  694. /* height: 200rpx; */
  695. display: flex;
  696. align-items: center;
  697. padding: 30rpx;
  698. border-radius: 16rpx;
  699. background-image: linear-gradient(#fefbda, #f7f7f7);
  700. }
  701. .head_image {
  702. }
  703. .head_image > image {
  704. width: 90rpx;
  705. height: 90rpx;
  706. border-radius: 50%;
  707. }
  708. .head_name {
  709. margin-left: 10rpx;
  710. }
  711. .name {
  712. font-size: 38rpx;
  713. font-weight: bold;
  714. }
  715. .approve {
  716. position: absolute;
  717. top: 100rpx;
  718. font-size: 24rpx;
  719. color: #999999;
  720. }
  721. /* 列表 */
  722. .use_list {
  723. width: 100%;
  724. background: #ffffff;
  725. margin-top: 20rpx;
  726. }
  727. .list_box {
  728. width: 90%;
  729. margin: 0 auto;
  730. display: flex;
  731. height: 110rpx;
  732. }
  733. .box_left {
  734. flex: 1;
  735. display: flex;
  736. justify-content: left;
  737. align-items: center;
  738. }
  739. .box_right {
  740. flex: 1;
  741. display: flex;
  742. justify-content: flex-end;
  743. align-items: center;
  744. color: #808080;
  745. }
  746. .use_name {
  747. margin-left: 30rpx;
  748. font-size: 32rpx;
  749. }
  750. .use_image image {
  751. width: 50rpx;
  752. height: 50rpx;
  753. }
  754. .center {
  755. width: 94%;
  756. /* line-height: 1.5; */
  757. background-color: #ffffff;
  758. border-radius: 18rpx;
  759. margin: 0 auto 0;
  760. display: flex;
  761. justify-content: space-between;
  762. }
  763. .header_text2 {
  764. font-size: 24rpx;
  765. font-weight: 500;
  766. color: #999999;
  767. margin-top: 10rpx;
  768. }
  769. .header_text4 {
  770. font-size: 32rpx;
  771. font-weight: bold;
  772. color: #333333;
  773. }
  774. .serviceBtn {
  775. position: fixed;
  776. right: 52rpx;
  777. bottom: 50rpx;
  778. display: flex;
  779. flex-direction: column;
  780. align-items: center;
  781. justify-content: center;
  782. width: 100rpx;
  783. height: 120rpx;
  784. color: #fff;
  785. font-size: 20rpx;
  786. background-image: url(@/static/images/my/kefu.png);
  787. background-repeat: no-repeat;
  788. background-size: contain;
  789. }
  790. </style>