| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- // pages/my/my.js
- const app = getApp()
- import http from "../../utils/http"
- import util from "../../utils/util"
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- moreList:[
- {img:'../../static/index/my/my-5.png',title:'加入商家',url:'/service/merchant/merchant'},
- {img:'../../static/index/my/my-7.png',title:'提现绑定',url:'/service/account/account'},
- {img:'../../static/index/my/my-8.png',title:'平台公告',url:'/service/notice/notice'},
- {img:'../../static/index/my/my-9.png',title:'我的评价',url:'/service/comments/comments'},
- {img:'../../static/index/my/my-10.png',title:'培训中心',url: '/service/exercise/exercise'},
- {img:'../../static/index/my/my-11.png',title:'联系客服'},
- {img:'../../static/index/my/my-12.png',title:'意见反馈',url:'/service/feedback/feedback'},
- ],
- info: '',
- config: ''
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- },
- onLoadConfig(option){
- this.setData({
- config: app.globalData.config
- })
- },
- toserve(){
- util.authSkip('/service/serveList/serveList')
- },
- // 跳转信用
- tocredit(){
- util.authSkip('/service/credit/credit')
- },
- // 跳转余额
- toBalance(e){
- util.authSkip('/service/balance/balance?type='+e.currentTarget.dataset.type)
- },
- // 跳转保证金
- toEarnestMoney(){
- util.authSkip('/service/earnestMoney/earnestMoney')
- },
- toSet(){
- util.authSkip('/service/set/set')
- },
- toLogin(){
- util.skip('/service/login/login')
- },
- toServel(e){
- util.authSkip(e.currentTarget.dataset.url)
- },
- getInfo(){
- if(!wx.getStorageSync('token')) return
- http.post('skill/skillindex','',!this.data.info).then(res => {
- this.data.moreList[3].url = '/service/comments/comments?type=skill&id='+res.data.skill.id
- this.setData({
- info: res.data,
- moreList: this.data.moreList
- })
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- this.getInfo()
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|