index.vue 22 KB

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