绿满眶商城微信小程序-uniapp
zxl
2025-08-04 6c7fecf52405e132e3573b43a7206f99026a1fd8
pages/mine/help/tips.vue
@@ -1,12 +1,15 @@
<template>
  <div class="wrapper">
    <u-parse :show-with-animation="true" :lazy-load="true" :selectable="true" :html="res.content" v-if="res"></u-parse>
   <button class="submit" @click="agreed()">同意协议</button>
  </div>
</template>
<script>
import '@/components/uview-components/uview-ui';
import { getArticleDetailByType } from "@/api/article";
export default {
  data() {
    return {
      res: "",
@@ -41,9 +44,14 @@
      title: this.way[option.type].title,
    });
    this.init(option);
  },
  methods: {
     agreed(){
        uni.setStorageSync('agreed', true); // 存储同意状态
      uni.navigateBack(); // 返回原页面
     },
    init(option) {
      getArticleDetailByType(this.way[option.type].type).then((res) => {
        if (res.data.success) {
@@ -56,6 +64,11 @@
};
</script>
<style lang="scss" scoped>
   .submit {
     color: #fff;
     margin-top: 120rpx;
     background: rgba($light-color, 0.8);
   }
.wrapper {
  padding: 16rpx;
}