| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <view>
- <!--mine/help/help.wxml-->
- <view class="tit">常见问题</view>
- <view class="list">
- <block v-for="(item, index) in pageList" :key="index">
- <navigator :url="'/mine/page/page?id=' + item.id + '&title=' + item.title" hover-class="none" class="li">{{item.title}}<image src="/static/pages/images/more.png" class="rico"></image></navigator>
- </block>
- </view>
- <!-- <button class="zixun" open-type="contact">咨询客服</button> -->
- <view class="ddflex zixun-btn">
- <view class="fflex gfqw" v-if="config.WECOM_CODE" @click="isShowCodePop = true">添加官方企微</view>
- <view class="fflex">
- <contact-button class-name="zixun" button-text="咨询客服"></contact-button>
- </view>
- </view>
-
-
- <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="()=>{}">
- </view>
- <view :class="'code-pop ' +(config.greyTheme==1?'grayTheme':'')" v-if="isShowCodePop">
- <view class="code-content">
- <image :src="config.WECOM_CODE"
- show-menu-by-longpress="true"></image>
- <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
- </view>
- <view class="code-btn" @click="isShowCodePop = false">
- 取消
- </view>
- </view>
- </view>
- </template>
- <script>
- // mine/help/help.js
- const app = getApp();
- const req = require("../../utils/request.js");
- export default {
- data() {
- return {
- form: {
- page: 1,
- limit: 15
- },
- pageList: [],
- isLoad: true,
- config:{},
- isShowCodePop:false
- };
- },
- components: {},
- props: {},
- onLoad: async function(options) {
- this.getData();
- // console.log(options);
- if (options.scene) {
- this.scene = options.scene;
- }
- this.getAbout()
- // await this.loadCodeParams();
- },
- onReachBottom() {
- this.form.page++;
- this.getData();
- },
- methods: {
- loadCodeParams() {
- let _ts = this;
- return new Promise((resolve, reject) => {
- if (!_ts.scene) {
- resolve();
- return false;
- }
- req.getRequest('/api/code/params', {
- scene: _ts.scene
- }, data => {
- req.setStorage('pidCode', data.userId);
- resolve();
- });
- });
- },
- getAbout() {
- var _this = this;
-
- req.getRequest('/api/other/config', {}, function(res) {
- _this.config = res;
- });
- },
-
- getData() {
- // req.getRequest('/api/help/center', {}, data => {
- // if (data) {
- // this.setData({
- // pageList: data
- // });
- // }
- // });
- if (!this.isLoad) return false;
- this.isLoad = false;
- let form = this.form;
- form.code = 'help';
- req.getRequest('/api/content/list',form,res => {
- if (res && res.length >= 10) this.isLoad = true;
- if (this.form.page > 1) res = this.pageList.concat(res);
- this.pageList = res;
- });
- }
- }
- };
- </script>
- <style>
- @import "./help.css";
- </style>
|