doum
4 天以前 7a4b8764b68e0dbaeb90e292a8a4bd47cb379e68
small-program/pages/rich-text/rich-text.vue
@@ -13,30 +13,42 @@
         }
      },
      onLoad(options) {
         this.type = options.type || 'about'
         this.type = Number(options.type || '0')
         this.getPlatformAboutUs()
      },
      methods: {
         async getPlatformAboutUs() {
            const res = await this.$u.api.getPlatformAboutUs({ type: this.type })
            if (res.code === 200) {
               if (this.type === 'about') {
                  this.content = res.data.aboutUs || ''
               } else if (this.type === 'protocol') {
                  this.content = res.data.userAgreement || ''
               } else if (this.type === 'privacy') {
                  this.content = res.data.privacyAgreement || ''
               } else if (this.type === 'contact') {
                  this.content = res.data.aboutUs || ''
               } else if (this.type === 'serverIntroduce') {
                if (this.type === 0) {
                  this.content = res.data.userServiceAgreement || ''
               } else if (this.type ===  1) {
                  this.content = res.data.userPrivacyPolicy || ''
               } else if (this.type === 2) {
                  this.content = res.data.storeCooperationAgreement || ''
               } else if (this.type ===3) {
                  this.content = res.data.storePrivacyPolicy || ''
               } else if (this.type === 4) {
                  this.content = res.data.serverIntroduce || ''
               }  else if (this.type === 5) {
                  this.content = res.data.aboutUs || ''
               }  else if (this.type === 6) {
                  this.content = res.data.storeRiskCommitment || ''
               } else if (this.type === 7) {
                  this.content = res.data.storeLuggageStorageNotice || ''
               } else if (this.type === 8) {
                  this.content = res.data.storeCooperationAgreement || ''
               }
               const titleMap = {
                  'about': '关于我们',
                  'protocol': '用户协议',
                  'privacy': '隐私政策',
                  'contact': '用户协议',
                  'serverIntroduce': '规范须知'
                  0: '用户服务协议',
                  1: '用户隐私政策',
                  2: '门店合作协议',
                  3: '门店隐私政策',
                  4: '规范须知',
                  5: '关于我们',
                  6: '风险承诺',
                  7: '行李寄存须知',
                  8: '代理点合作协议'
               }
               uni.setNavigationBarTitle({
                  title: titleMap[this.type] || '详情'