index.vue 23 KB

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