index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  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. that.$Request.postJson('/app/user/updateUserImageUrl?avatar=' + url).then((res) => {
  333. uni.hideLoading()
  334. if (res.code === 0) {
  335. that.$queue.showToast('更新成功')
  336. that.getUserInfo()
  337. }
  338. })
  339. }
  340. })
  341. },
  342. // getName(){
  343. // wx.requestPayment({
  344. // timeStamp: '1723710543',
  345. // nonceStr: '7db6a8aec2a542c7a4852c856595fcd3',
  346. // package: 'prepay_id=wx15162903191561245ec1269166539c0000',
  347. // signType: 'RSA',
  348. // paySign: 'AyvptQMyOiP5cmbInu3fsg4ww3HYm+YYOCwkRyFM2DgFpe3DO4jAhyHpaFsZywnaK0rZVIFI1lgF3tV5fFxTSj1PMSzZpFEVPOHg5uCw6O21ESIJ9XuockX9iWyWcNv5gY5W8ARm73Kt/bZRjyXtE68Ryr1D5Fievo3gh7u71vt2FczvO4Nb0C2u7BY3UOWQ9BEHskuYPhpBkpeuoogorNRtBbg4DHiege1hhcf5On3of/xsGnBPMHNUgix8ljSX+A769XGedzxzQQ5z63Pi7svletdlUewyHdhyTLhXhVqHQLWG/ImdCw3PaXjsoefbdXxv8e3epx3Kux77nTta3w==',
  349. // success (res) {
  350. // console.log(res,'成功')
  351. // },
  352. // fail (res) {
  353. // console.log(res,'失败')
  354. // }
  355. // })
  356. // },
  357. goLogin() {
  358. let that = this
  359. var url = null
  360. let userId = this.$queue.getData('userId')
  361. if (!userId) {
  362. this.bindlogin()
  363. return
  364. }
  365. uni.showActionSheet({
  366. // itemList按钮的文字接受的是数组
  367. itemList: ['查看头像', '从相册选择图片'],
  368. success(e) {
  369. var index = e.tapIndex
  370. if (index === 0) {
  371. // 用户点击了预览当前图片
  372. // 可以自己实现当前头像链接的读取
  373. let url = that.avatar
  374. let arr = []
  375. arr.push(url)
  376. uni.previewImage({
  377. // 预览功能图片也必须是数组的
  378. urls: arr
  379. })
  380. } else if (index === 1) {
  381. uni.chooseImage({
  382. count: 1,
  383. sourceType: ['album'],
  384. success: (res) => {
  385. let token = uni.getStorageSync('token')
  386. for (let i = 0; i < res.tempFiles.length; i++) {
  387. //这里的id和页面中写的html代码的canvas的id要一致
  388. let canvasId = 'zipCanvas'
  389. //原图的路径
  390. let imagePath = res.tempFiles[i].path
  391. //大小限制
  392. let limitSize = 1024 * 2
  393. //初始绘画区域是画布自身的宽度也就是屏幕宽度
  394. let drawWidth = uni.getSystemInfoSync().windowWidth
  395. let that = this
  396. getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
  397. uni.showLoading({
  398. title: '上传中'
  399. })
  400. uni.uploadFile({
  401. url: that.config('APIHOST') + '/alioss/upload',
  402. filePath: resPath,
  403. header: {
  404. token: token
  405. },
  406. name: 'file',
  407. success: (uploadFileRes) => {
  408. url = JSON.parse(uploadFileRes.data).data
  409. that.$Request.postJson('/app/user/updateUserImageUrl?avatar=' + url).then((res) => {
  410. uni.hideLoading()
  411. if (res.code === 0) {
  412. that.$queue.showToast('更新成功')
  413. that.getUserInfo()
  414. }
  415. })
  416. },
  417. fail: () => {
  418. uni.showToast({
  419. title: '上传失败',
  420. icon: 'error'
  421. })
  422. }
  423. })
  424. })
  425. }
  426. }
  427. })
  428. }
  429. }
  430. })
  431. },
  432. shopRuzhu() {
  433. uni.showToast({
  434. title: '请先下载同城外卖商户端APP',
  435. icon: 'none'
  436. })
  437. },
  438. getMsgData() {
  439. this.$Request.get('/app/userintegral/findUserMessage').then((res) => {
  440. if (res.code == 0) {
  441. this.msgData = res.data
  442. }
  443. })
  444. },
  445. // 分享文案和图片
  446. getZiZhi() {
  447. this.$Request.getT('/app/common/type/239').then((res) => {
  448. if (res.code === 0) {
  449. this.tuiguang = res.data.value
  450. }
  451. })
  452. this.$Request.getT('/app/common/type/238').then((res) => {
  453. if (res.code === 0) {
  454. this.tuiguangImg = res.data.value
  455. }
  456. })
  457. },
  458. goSwt(e) {
  459. uni.setStorageSync('current', e)
  460. setTimeout(function () {
  461. uni.switchTab({
  462. url: '/pages/order/index'
  463. })
  464. }, 10)
  465. },
  466. goApplet(e) {
  467. uni.navigateToMiniProgram({
  468. appId: e,
  469. path: 'pages/index/index',
  470. success(res) {
  471. // 打开成功
  472. }
  473. })
  474. },
  475. goNav(e) {
  476. if (this.token) {
  477. if (e.name == '注册骑手') {
  478. uni.navigateToMiniProgram({
  479. appId: 'wxa59b58efa950ba1f',
  480. path: '/pages/login/login',
  481. extraData: {
  482. data1: 'test'
  483. },
  484. success(res) {
  485. // 打开成功
  486. console.log('打开成功')
  487. }
  488. })
  489. } else if (e.name == '分享好友') {
  490. uni.share({
  491. provider: 'weixin',
  492. scene: 'WXSceneSession',
  493. type: 1,
  494. summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
  495. success: function (res) {
  496. console.log('success:' + JSON.stringify(res))
  497. },
  498. fail: function (err) {
  499. console.log('fail:' + JSON.stringify(err))
  500. }
  501. })
  502. } else {
  503. uni.navigateTo({
  504. url: e.url
  505. })
  506. }
  507. } else if (e.url == '/my/helpList/index') {
  508. uni.navigateTo({
  509. url: e.url
  510. })
  511. } else {
  512. this.bindlogin()
  513. }
  514. },
  515. goShop(url) {
  516. if (this.token) {
  517. uni.navigateTo({
  518. url
  519. })
  520. } else {
  521. this.bindlogin()
  522. }
  523. },
  524. getUserInfo() {
  525. this.$Request.getT('/app/user/selectUserMessage').then((res) => {
  526. console.log(res)
  527. if (res.code == 0) {
  528. if (parseInt(res.data.checkCertification)) {
  529. this.checkCertification = parseInt(res.data.checkCertification)
  530. } else {
  531. this.checkCertification = -1
  532. }
  533. this.isVip = res.data.isVip
  534. this.shopStatus = res.data.shopStatus
  535. this.$queue.setData('avatar', res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png')
  536. this.$queue.setData('userId', res.data.userId)
  537. this.$queue.setData('phone', res.data.phone)
  538. this.$queue.setData('status', res.data.status)
  539. this.$queue.setData('userName', res.data.userName ? res.data.userName : res.data.nickName)
  540. this.avatar = res.data.avatar ? res.data.avatar : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
  541. this.userName = res.data.userName ? res.data.userName : res.data.nickName
  542. }
  543. })
  544. },
  545. bindlogin() {
  546. if (!this.token) {
  547. uni.navigateTo({
  548. url: '/pages/public/login'
  549. })
  550. }
  551. },
  552. bindTo(name) {
  553. console.log(name)
  554. if (this.token) {
  555. if (name == '我的红包') {
  556. uni.navigateTo({
  557. url: '/pages/my/hongbao/hongbao'
  558. })
  559. } else if (name == '注册骑手') {
  560. uni.navigateToMiniProgram({
  561. appId: 'wx5ed22ce813e47796',
  562. path: '/pages/index/index',
  563. extraData: {
  564. data1: 'test'
  565. },
  566. success(res) {
  567. // 打开成功
  568. console.log('打开成功')
  569. }
  570. })
  571. } else if (name == '意见反馈') {
  572. uni.navigateTo({
  573. url: '/pageA/feedback/feedback'
  574. })
  575. } else if (name == '联系客服') {
  576. uni.navigateTo({
  577. url: '/pageA/kefu/kefu'
  578. })
  579. } else if (name == '系统设置') {
  580. uni.navigateTo({
  581. url: '/pages/my/set/set'
  582. })
  583. } else if (name == '地址管理') {
  584. uni.navigateTo({
  585. url: '/pageA/address/address'
  586. })
  587. }
  588. } else {
  589. this.bindlogin()
  590. }
  591. },
  592. bindapprove() {
  593. if (this.token) {
  594. uni.navigateTo({
  595. url: '/pages/my/approve/approve'
  596. })
  597. } else {
  598. this.bindlogin()
  599. }
  600. },
  601. binduser() {
  602. if (this.token) {
  603. // uni.navigateTo({
  604. // url: '/pages/my/userphone/userphone'
  605. // })
  606. } else {
  607. this.bindlogin()
  608. }
  609. },
  610. config: function (name) {
  611. var info = null
  612. if (name) {
  613. var name2 = name.split('.') //字符分割
  614. if (name2.length > 1) {
  615. info = configdata[name2[0]][name2[1]] || null
  616. } else {
  617. info = configdata[name] || null
  618. }
  619. if (info == null) {
  620. let web_config = cache.get('web_config')
  621. if (web_config) {
  622. if (name2.length > 1) {
  623. info = web_config[name2[0]][name2[1]] || null
  624. } else {
  625. info = web_config[name] || null
  626. }
  627. }
  628. }
  629. }
  630. return info
  631. }
  632. }
  633. }
  634. </script>
  635. <style>
  636. button::after {
  637. border: none;
  638. background-color: none;
  639. }
  640. button {
  641. position: relative;
  642. display: block;
  643. margin-left: auto;
  644. margin-right: auto;
  645. padding-left: 0px;
  646. padding-right: 0px;
  647. box-sizing: border-box;
  648. text-decoration: none;
  649. line-height: 1.35;
  650. overflow: hidden;
  651. color: #666666;
  652. /* background-color: #fff; */
  653. background-color: rgba(255, 255, 255, 0) !important;
  654. width: 100%;
  655. height: 100%;
  656. }
  657. .btn-bg {
  658. width: 64px;
  659. height: 28px;
  660. background: linear-gradient(90deg, #cda26e 0%, #dcb78a 100%);
  661. border-radius: 28px;
  662. text-align: center;
  663. line-height: 28px;
  664. margin-top: 10upx;
  665. color: '#604320';
  666. }
  667. body {
  668. background: #f5f5f5;
  669. }
  670. /* #ifndef MP-WEIXIN */
  671. page {
  672. background: #f2eded;
  673. }
  674. /* #endif */
  675. .content {
  676. width: 100%;
  677. }
  678. .btn {
  679. font-size: 24upx;
  680. /* width: 95%; */
  681. text-align: center;
  682. background: #ffffff;
  683. margin-top: 6rpx;
  684. }
  685. .head {
  686. /* width: 100%; */
  687. /* height: 200rpx; */
  688. display: flex;
  689. align-items: center;
  690. padding: 30rpx;
  691. border-radius: 16rpx;
  692. background-image: linear-gradient(#fefbda, #f7f7f7);
  693. }
  694. .head_image {
  695. }
  696. .head_image > image {
  697. width: 90rpx;
  698. height: 90rpx;
  699. border-radius: 50%;
  700. }
  701. .head_name {
  702. margin-left: 10rpx;
  703. }
  704. .name {
  705. font-size: 38rpx;
  706. font-weight: bold;
  707. }
  708. .approve {
  709. position: absolute;
  710. top: 100rpx;
  711. font-size: 24rpx;
  712. color: #999999;
  713. }
  714. /* 列表 */
  715. .use_list {
  716. width: 100%;
  717. background: #ffffff;
  718. margin-top: 20rpx;
  719. }
  720. .list_box {
  721. width: 90%;
  722. margin: 0 auto;
  723. display: flex;
  724. height: 110rpx;
  725. }
  726. .box_left {
  727. flex: 1;
  728. display: flex;
  729. justify-content: left;
  730. align-items: center;
  731. }
  732. .box_right {
  733. flex: 1;
  734. display: flex;
  735. justify-content: flex-end;
  736. align-items: center;
  737. color: #808080;
  738. }
  739. .use_name {
  740. margin-left: 30rpx;
  741. font-size: 32rpx;
  742. }
  743. .use_image image {
  744. width: 50rpx;
  745. height: 50rpx;
  746. }
  747. .center {
  748. width: 94%;
  749. /* line-height: 1.5; */
  750. background-color: #ffffff;
  751. border-radius: 18rpx;
  752. margin: 0 auto 0;
  753. display: flex;
  754. justify-content: space-between;
  755. }
  756. .header_text2 {
  757. font-size: 24rpx;
  758. font-weight: 500;
  759. color: #999999;
  760. margin-top: 10rpx;
  761. }
  762. .header_text4 {
  763. font-size: 32rpx;
  764. font-weight: bold;
  765. color: #333333;
  766. }
  767. .serviceBtn {
  768. position: fixed;
  769. right: 52rpx;
  770. bottom: 50rpx;
  771. display: flex;
  772. flex-direction: column;
  773. align-items: center;
  774. justify-content: center;
  775. width: 100rpx;
  776. height: 120rpx;
  777. color: #fff;
  778. font-size: 20rpx;
  779. background-image: url(@/static/images/my/kefu.png);
  780. background-repeat: no-repeat;
  781. background-size: contain;
  782. }
  783. </style>