DaMowang 2 жил өмнө
parent
commit
24880ae88b

+ 543 - 528
src/pages/my/index.vue

@@ -1,207 +1,198 @@
 <template>
-  <view class="container">
-    <view class="content" :style="isShiMing ? '' : 'padding-top:30rpx;'">
-      <!-- 用户信息 -->
-      <view class="uerInfo mar_t16 flex_r">
-        <view class="user_img">
-          <image @click="upheadimg" class="image" :src="userinfo.head_pic"></image>
-          <view class="coupon_info flex_r flex_ac" @tap="goToAutonym" v-if="isShiMing">
-            完成实名认证,享受更多权益
-            <image src="/static/my/f_close.png" mode="widthFix" class="close_icon" @tap.stop="closeAuto">
-            </image>
-          </view>
-        </view>
-        <block v-if="userinfo.nickname">
-          <view class="user_con flex_c">
-            <view class="user_name flex_r flex_ae ellipsis">
-              <view @click="goto('/pages/my/userinfo')">{{
-                userinfo.nickname
-                }}</view>
-              <text v-if="isAuthentication">({{ userinfo.is_authentication == 0 ? "未实名" : "已实名" }})</text>
+    <view class="container">
+        <view class="content" :style="isShiMing ? '' : 'padding-top:30rpx;'">
+            <!-- 用户信息 -->
+            <view class="uerInfo mar_t16 flex_r">
+                <view class="user_img">
+                    <image @click="upheadimg" class="image" :src="userinfo.head_pic"></image>
+                    <view class="coupon_info flex_r flex_ac" @tap="goToAutonym" v-if="isShiMing">
+                        完成实名认证,享受更多权益
+                        <image src="/static/my/f_close.png" mode="widthFix" class="close_icon" @tap.stop="closeAuto" />
+                    </view>
+                </view>
+                <block v-if="userinfo.nickname">
+                    <view class="user_con flex_c">
+                        <view class="user_name flex_r flex_ae ellipsis">
+                            <view @click="goto('/pages/my/userinfo')">{{ userinfo.nickname }}</view>
+                            <text v-if="isAuthentication">({{ userinfo.is_authentication == 0 ? "未实名" : "已实名" }})</text>
+                        </view>
+                        <view class="flex_r flex_ac">
+                            <view class="user_level clearfix">
+                                <img class="level_img" src="/static/my/huangguan.png">
+                                <span class="level_text">{{ userinfo.level_name }}</span>
+                            </view>
+                        </view>
+                        <view class="user_account flex_r flex_ac mar_t10">
+                            <view class="account">账号:{{ userinfo.mobile }}</view>
+                            <view class="copy_account flex_r flex_ac flex_jc" @tap="copyText(userinfo.mobile)">复制</view>
+                        </view>
+                    </view>
+                    <view class="user_option flex_r flex_ac flex_je">
+                        <!-- <image class="code_img" src="/static/my/f_img_code.png" @tap="getImgPage"></image> -->
+                        <navigator class="flex_c flex_ac" @tap="getImgPage" hover-class="none">
+                            <image class="fun_img" src="/static/my/f_img_code.png"></image>
+                            <view class="fun_text">分享海报</view>
+                        </navigator>
+                    </view>
+                </block>
+                <block v-else>
+                    <view class="user_con flex_c flex_jb" @click="login">
+                        <view class="user_name flex_r flex_ae ellipsis">点此处登录</view>
+                    </view>
+                </block>
             </view>
-            <view class="flex_r flex_ac">
-              <view class="user_level clearfix">
-                <img class="level_img" src="/static/my/huangguan.png">
-                <span class="level_text">{{ userinfo.level_name }}</span>
-              </view>
+            <!-- 用户信息-end -->
+            <!-- 节点 -->
+            <view class="regional" v-if="userinfo.regionalNode">
+                <img src="@/static/my/regional.png" alt="" srcset="" class="ico">
+                <span class="txtinfo">区域节点:{{ userinfo.regionalNode.regional_name }}</span>
             </view>
-            <view class="user_account flex_r flex_ac mar_t10">
-              <view class="account">账号:{{ userinfo.mobile }}</view>
-              <view class="copy_account flex_r flex_ac flex_jc" @tap="copyText(userinfo.mobile)">复制</view>
+            <!-- 账户信息 -->
+            <view class="acc_info flex_r flex_jse">
+                <div class="i_num">
+                    <p>茶宝</p>
+                    <p class="dinB">{{userinfo.cha_bao}}</p>
+                </div>
+                <div class="i_num">
+                    <p>TeaC</p>
+                    <p class="dinB">{{userinfo.teac}}</p>
+                </div>
             </view>
-          </view>
-          <view class="user_option flex_r flex_ac flex_je">
-            <!-- <image class="code_img" src="/static/my/f_img_code.png" @tap="getImgPage"></image> -->
-            <navigator class="flex_c flex_ac" @tap="getImgPage" hover-class="none">
-              <image class="fun_img" src="/static/my/f_img_code.png"></image>
-              <view class="fun_text">分享海报</view>
-            </navigator>
-          </view>
-        </block>
-        <block v-else>
-          <view class="user_con flex_c flex_jb" @click="login">
-            <view class="user_name flex_r flex_ae ellipsis">点此处登录</view>
-          </view>
-        </block>
-      </view>
-      <!-- 用户信息-end -->
-
-      <!-- 节点 -->
-      <view class="regional" v-if="userinfo.regionalNode">
-        <img src="@/static/my/regional.png" alt="" srcset="" class="ico">
-        <span class="txtinfo">区域节点:{{ userinfo.regionalNode.regional_name }}</span>
-      </view>
-
-      <!-- 账户信息 -->
-      <view class="acc_info flex_r flex_jse">
-        <div class="i_num">
-          <p>茶宝</p>
-          <p class="dinB">{{userinfo.cha_bao}}</p>
-        </div>
-        <div class="i_num">
-          <p>TeaC</p>
-          <p class="dinB">{{userinfo.teac}}</p>
-        </div>
-      </view>
-      <!-- 账户信息-end -->
-    </view>
-    <!-- 功能列表 -->
-    <view class="fun_container">
-      <view class="fun mar_t30">
-        <view class="fun_title">本地生活</view>
-        <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
-          <navigator v-if="local_uinfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/group" hover-class="none">
-            <image class="fun_img" src="/static/my/l_group.png"></image>
-            <view class="fun_text">我的用户</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/orderlist" hover-class="none">
-            <image class="fun_img" src="/static/my/order_history.png"></image>
-            <view class="fun_text">历史订单</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @click="activation" hover-class="none">
-            <image class="fun_img" src="/static/my/upgrade.png"></image>
-            <view class="fun_text">激活升级</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/incomeExpenses" hover-class="none">
-            <image class="fun_img" src="/static/my/detail.png"></image>
-            <view class="fun_text">收支明细</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @click="getToCash('local')" hover-class="none">
-            <image class="fun_img" src="/static/my/deposit.png"></image>
-            <view class="fun_text">提现</view>
-          </navigator>
-        </view>
-      </view>
-      <view class="fun mar_t30">
-        <view class="fun_title">数智云店</view>
-        <view class="fun_con mar_t50 flex_r flex_ac">
-          <navigator class="fun_list flex_c flex_ac" url="/pages/account/wealth" hover-class="none">
-            <image class="fun_img" src="/static/my/wealth.png"></image>
-            <view class="fun_text">财富</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/account/consignment" hover-class="none">
-            <image class="fun_img" src="/static/my/consign.png"></image>
-            <view class="fun_text">寄卖</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @tap="getToTeaList" hover-class="none">
-            <image class="fun_img" src="/static/my/shequ.png"></image>
-            <view class="fun_text">社区</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/account/giveAsPresent" hover-class="none">
-            <image class="fun_img" src="/static/my/give.png"></image>
-            <view class="fun_text">赠送</view>
-          </navigator>
-        </view>
-        <view class="fun_con mar_t50 flex_r flex_ac">
-          <navigator class="fun_list flex_c flex_ac" url="/pages/account/conversion" hover-class="none">
-            <image class="fun_img" src="/static/my/10.png"></image>
-            <view class="fun_text">转化</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @tap="getToCash" hover-class="none">
-            <image class="fun_img" src="/static/my/13.png"></image>
-            <view class="fun_text">提现</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/accountDetails/running" hover-class="none">
-            <image class="fun_img" src="/static/my/fund.png"></image>
-            <view class="fun_text">流水明细</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/accountDetails/withdraw" hover-class="none">
-            <image class="fun_img" src="/static/my/withdraw.png"></image>
-            <view class="fun_text">提现明细</view>
-          </navigator>
-        </view>
-        <view class="fun_tit mar_t50">云店订单</view>
-        <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
-          <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=1" hover-class="none">
-            <image class="fun_img" src="/static/my/payment.png"></image>
-            <view class="fun_text">待付款</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=5" hover-class="none">
-            <image class="fun_img" src="/static/my/pickInStore.png"></image>
-            <view class="fun_text">待自提</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=2" hover-class="none">
-            <image class="fun_img" src="/static/my/deliver.png"></image>
-            <view class="fun_text">待发货</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=3" hover-class="none">
-            <image class="fun_img" src="/static/my/take.png"></image>
-            <view class="fun_text">待收货</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=4" hover-class="none">
-            <image class="fun_img" src="/static/my/refund.png"></image>
-            <view class="fun_text">已完成</view>
-          </navigator>
-        </view>
-      </view>
-      <view class="fun mar_t30">
-        <view class="fun_title">其他</view>
-        <view class="fun_con mar_t50 flex_r flex_ac">
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/address/list" hover-class="none">
-            <image class="fun_img" src="/static/my/dizhi.png"></image>
-            <view class="fun_text">地址管理</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/assistant" hover-class="none">
-            <image class="fun_img" src="/static/my/assistant.png"></image>
-            <view class="fun_text">开票助手</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" url="/pagesB/invoice/invoiceList" hover-class="none">
-            <image class="fun_img" src="/static/my/assistantHistory.png"></image>
-            <view class="fun_text">开票历史</view>
-          </navigator>
+            <!-- 账户信息-end -->
         </view>
-      </view>
-      <view class="fun mar_t30">
-        <view class="fun_title">我的服务</view>
-        <view class="fun_con mar_t50 flex_r flex_ac">
-          <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'关于我们',type:7})" hover-class="none">
-            <image class="fun_img" src="/static/my/about.png"></image>
-            <view class="fun_text">关于我们</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'用户须知',type:8})" hover-class="none">
-            <image class="fun_img" src="/static/my/feedback.png"></image>
-            <view class="fun_text">用户须知</view>
-          </navigator>
-          <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'新手教程',type:1})" hover-class="none">
-            <image class="fun_img" src="/static/my/green.png"></image>
-            <view class="fun_text">新手教程</view>
-          </navigator>
-          <view class="fun_list flex_c flex_ac">
-            <button open-type="contact" style="background: #fff; border: 0; line-height: 1; padding: 0">
-              <image class="fun_img" src="/static/my/service.png"></image>
-              <view class="fun_text">在线客服</view>
-            </button>
-          </view>
+        <!-- 功能列表 -->
+        <view class="fun_container">
+            <view class="fun mar_t30">
+                <view class="fun_title">本地生活</view>
+                <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
+                    <navigator v-if="local_uinfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/group" hover-class="none">
+                        <image class="fun_img" src="/static/my/l_group.png"></image>
+                        <view class="fun_text">我的用户</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/orderlist" hover-class="none">
+                        <image class="fun_img" src="/static/my/order_history.png"></image>
+                        <view class="fun_text">历史订单</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @click="activation" hover-class="none">
+                        <image class="fun_img" src="/static/my/upgrade.png"></image>
+                        <view class="fun_text">激活升级</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/incomeExpenses" hover-class="none">
+                        <image class="fun_img" src="/static/my/detail.png"></image>
+                        <view class="fun_text">收支明细</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @click="getToCash('local')" hover-class="none">
+                        <image class="fun_img" src="/static/my/deposit.png"></image>
+                        <view class="fun_text">提现</view>
+                    </navigator>
+                </view>
+            </view>
+            <view class="fun mar_t30">
+                <view class="fun_title">数智云店</view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/wealth" hover-class="none">
+                        <image class="fun_img" src="/static/my/wealth.png"></image>
+                        <view class="fun_text">财富</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/consignment" hover-class="none">
+                        <image class="fun_img" src="/static/my/consign.png"></image>
+                        <view class="fun_text">寄卖</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @tap="getToTeaList" hover-class="none">
+                        <image class="fun_img" src="/static/my/shequ.png"></image>
+                        <view class="fun_text">社区</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/giveAsPresent" hover-class="none">
+                        <image class="fun_img" src="/static/my/give.png"></image>
+                        <view class="fun_text">赠送</view>
+                    </navigator>
+                </view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/account/conversion" hover-class="none">
+                        <image class="fun_img" src="/static/my/10.png"></image>
+                        <view class="fun_text">转化</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @tap="getToCash" hover-class="none">
+                        <image class="fun_img" src="/static/my/13.png"></image>
+                        <view class="fun_text">提现</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/accountDetails/running" hover-class="none">
+                        <image class="fun_img" src="/static/my/fund.png"></image>
+                        <view class="fun_text">流水明细</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/accountDetails/withdraw" hover-class="none">
+                        <image class="fun_img" src="/static/my/withdraw.png"></image>
+                        <view class="fun_text">提现明细</view>
+                    </navigator>
+                </view>
+                <view class="fun_tit mar_t50">云店订单</view>
+                <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=1" hover-class="none">
+                        <image class="fun_img" src="/static/my/payment.png"></image>
+                        <view class="fun_text">待付款</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=5" hover-class="none">
+                        <image class="fun_img" src="/static/my/pickInStore.png"></image>
+                        <view class="fun_text">待自提</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=2" hover-class="none">
+                        <image class="fun_img" src="/static/my/deliver.png"></image>
+                        <view class="fun_text">待发货</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=3" hover-class="none">
+                        <image class="fun_img" src="/static/my/take.png"></image>
+                        <view class="fun_text">待收货</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pages/szw-order-list/index?status=4" hover-class="none">
+                        <image class="fun_img" src="/static/my/refund.png"></image>
+                        <view class="fun_text">已完成</view>
+                    </navigator>
+                </view>
+            </view>
+            <view class="fun mar_t30">
+                <view class="fun_title">我的服务</view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/address/list" hover-class="none">
+                        <image class="fun_img" src="/static/my/dizhi.png"></image>
+                        <view class="fun_text">地址管理</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/assistant" hover-class="none">
+                        <image class="fun_img" src="/static/my/assistant.png"></image>
+                        <view class="fun_text">开票助手</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/invoice/invoiceList" hover-class="none">
+                        <image class="fun_img" src="/static/my/assistantHistory.png"></image>
+                        <view class="fun_text">开票历史</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'新手教程',type:1})" hover-class="none">
+                        <image class="fun_img" src="/static/my/green.png"></image>
+                        <view class="fun_text">新手教程</view>
+                    </navigator>
+                </view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'关于我们',type:7})" hover-class="none">
+                        <image class="fun_img" src="/static/my/about.png"></image>
+                        <view class="fun_text">关于我们</view>
+                    </navigator>
+                    <navigator class="fun_list flex_c flex_ac" @click="goto('/pages/agreement/index',{tit:'用户须知',type:8})" hover-class="none">
+                        <image class="fun_img" src="/static/my/feedback.png"></image>
+                        <view class="fun_text">用户须知</view>
+                    </navigator>
+                    <view class="fun_list flex_c flex_ac">
+                        <button open-type="contact" style="background: #fff; border: 0; line-height: 1; padding: 0">
+                            <image class="fun_img" src="/static/my/service.png"></image>
+                            <view class="fun_text">在线客服</view>
+                        </button>
+                    </view>
+                </view>
+            </view>
         </view>
-      </view>
+        <view class="fz_w_text">让数字经济赋能美好生活!</view>
+        <!-- 授权 -->
+        <authorize-module v-if="showAuth" :shopInfo="shopInfo" @authGetTelSuccess="onauthGetTelSuccess" />
+        <!-- 激活升级 -->
+        <activation ref="activation" tit="激活" />
     </view>
-    <view class="fz_w_text">让数字经济赋能美好生活!</view>
-    
-    <!-- 授权 -->
-    <authorize-module v-if="showAuth" :shopInfo="shopInfo" @authGetTelSuccess="onauthGetTelSuccess" />
-    <!-- 激活升级 -->
-    <activation ref="activation" tit="激活" />
-  </view>
 </template>
 <script>
 let app = getApp();
@@ -211,441 +202,465 @@ import authorizeModule from "@/components/authorize-module/index";
 import activation from "@/components/activation/activation.vue"
 import { post } from "@/request/api.js";
 export default {
-  components: {
-    authorizeModule,
-    activation
-  },
-  data() {
-    return {
-      showAuth: false,
-      shopInfo: {}, // 商铺信息
-      userInfoAccount: {}, // 账户数据
-      customerServiceWeiXin: "", // 客服微信
-      isShiMing: true, //未实名提示弹窗
-      agentName: "", // 缘起
-      user_id: undefined,
-      userinfo: {}, // 获取用户信息
-
-      unid: "",
-
-      // isGetUserInfo:false,
-      invited: "",
-
-      allChaYou: "",
-
-      isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
-      local_uinfo: {}, //本地生活信息
-    };
-  },
-  onLoad(options) {
-    //推荐人ID
-    if (options.invite) {
-      app.globalData.agentId = options.invite;
-      this.invited = options.invite;
-    }
-    this.closeAuto(); //关闭实名功能
-    this.getchayou(); //获取茶友
-    this.getLU(); //本地生活信息
-  },
-  onShow() {
-    let token = uni.getStorageSync("token");
-    this.userinfo = uni.getStorageSync("userinfo");
-
-    if (!token) this.login()
-    else this.getuserInfo()
-  },
-  methods: {
-    login() {
-      let that = this;
-      // #ifdef  MP-WEIXIN
-      wx.login({
-        success(res) {
-          if (res.code) {
-            post("v1/appletLogin", {
-              code: res.code,
-              invite: that.invited,
-            }).then((res) => {
-              if (res.code === 0) {
-                if (res.data.token) {
-                  uni.setStorageSync("token", res.data.token);
-                  that.getuserInfo();
-                } else {
-                  that.unid = res.data.unid;
-                  that.shopInfo = app.globalData.shopInfo;
-                  that.showAuth = true; //调取授权弹窗
-                }
-              }
-            });
-          }
-        },
-      });
-      // #endif
-
-      // #ifdef  H5 || APP-PLUS
-      this.goto("/pages/my/login");
-      // #endif
-    },
-    // 获取手机号
-    onauthGetTelSuccess(da) {
-      this.showAuth = false;
-      post("v1/getMobile", {
-        unid: this.unid,
-        ...da.detail,
-      }).then((res) => {
-        if (res.code === 0) {
-          uni.setStorageSync("token", res.data.token);
-          this.getuserInfo();
-        }
-      });
-    },
-    // 获取userinfo
-    async getuserInfo() {
-      let res = await uni.userfun();
-      if(res.user_id){
-        if (this.isAuthentication) this.isShiMing = res.is_authentication == 0;
-        else this.isShiMing = false;
-        this.userinfo = res;
-      }else this.login();
-    },
-    //授权并登录
-    onAuthSuccess() {
-      var that = this;
-      uni.showLoading({
-        mask: true,
-      });
-      appEv.setData((res) => {
-        uni.hideLoading();
-        that.showAuth = false;
-      });
-    },
-    // 跳转到实名页面
-    goToAutonym() {
-      this.goto("/pages/autonym-submit/index")
-    },
-    // 关闭实名信息 提示
-    closeAuto() {
-      this.isShiMing = false;
-    },
-    // 未开放提示信息
-    SetHint() {
-      this.goto('/pages/agreement/index',{tit:'用户身份及权益',type:24})
+    components: {
+        authorizeModule,
+        activation
     },
-    // 跳转到分享页面
-    getImgPage() {
-      if (this.isAuthentication) {
-        if (this.userinfo.is_authentication == 1) {
-          this.goto("/pages/invi-img/index")
-        } else {
-          appEv.errTips("您还未实名");
-          this.goToAutonym();
-        }
-      } else {
-        this.goto("/pages/invi-img/index")
-      }
+    data() {
+        return {
+            showAuth: false,
+            shopInfo: {}, // 商铺信息
+            userInfoAccount: {}, // 账户数据
+            customerServiceWeiXin: "", // 客服微信
+            isShiMing: true, //未实名提示弹窗
+            agentName: "", // 缘起
+            user_id: undefined,
+            userinfo: {}, // 获取用户信息
+
+            unid: "",
+
+            // isGetUserInfo:false,
+            invited: "",
+
+            allChaYou: "",
+
+            isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
+            local_uinfo: {}, //本地生活信息
+        };
     },
-    // 跳转到提现页面
-    getToCash(type) {
-      if (this.isAuthentication) {
-        if (this.userinfo.is_authentication == 1) {
-          this.goto("/pages/cash/index",{type})
-        } else {
-          appEv.errTips("您还未实名");
-          this.goToAutonym();
+    onLoad(options) {
+        //推荐人ID
+        if (options.invite) {
+            app.globalData.agentId = options.invite;
+            this.invited = options.invite;
         }
-      } else {
-        this.goto("/pages/cash/index",{type})
-      }
-    },
-    // 复制账号
-    copyText(e) {
-      uniCopy({
-        content: e,
-        success: (res) => {},
-        error: (e) => {},
-      });
-    },
-    // 跳转到用户设置页面
-    getToSetting: function() {
-      uni.navigateTo({
-        url: "/pages/setting/index",
-      });
-    },
-    // 跳转到我的茶友页面
-    getToTeaList: function() {
-      uni.navigateTo({
-        url: "/pages/my-tea-list/index",
-      });
-    },
-    // 跳转到拼豆页面
-    getToBean: function() {
-      uni.navigateTo({
-        url: "/pages/bean-info/index",
-      });
-    },
-    // 跳转到拼团金页面
-    getToAccMoney: function() {
-      uni.navigateTo({
-        url: "/pages/my-acc-money/my-acc-money",
-      });
+        this.closeAuto(); //关闭实名功能
+        this.getchayou(); //获取茶友
+        this.getLU(); //本地生活信息
     },
-    // 点击头像
-    upheadimg() {
-      let that = this;
-      uni.previewImage({
-        urls: [that.userinfo.head_pic],
-        current: 0,
-      });
+    onShow() {
+        let token = uni.getStorageSync("token");
+        this.userinfo = uni.getStorageSync("userinfo");
+
+        if (!token) this.login()
+        else this.getuserInfo()
     },
-    // 获取茶友
-    getchayou() {
-      post("v1/my/chayou").then((res) => {
-        if (res.code === 0) {
-          this.allChaYou = res.data.data.below + res.data.data.lower_level;
+    methods: {
+        login() {
+            let that = this;
+            // #ifdef  MP-WEIXIN
+            wx.login({
+                success(res) {
+                    if (res.code) {
+                        post("v1/appletLogin", {
+                            code: res.code,
+                            invite: that.invited,
+                        }).then((res) => {
+                            if (res.code === 0) {
+                                if (res.data.token) {
+                                    uni.setStorageSync("token", res.data.token);
+                                    that.getuserInfo();
+                                } else {
+                                    that.unid = res.data.unid;
+                                    that.shopInfo = app.globalData.shopInfo;
+                                    that.showAuth = true; //调取授权弹窗
+                                }
+                            }
+                        });
+                    }
+                },
+            });
+            // #endif
+
+            // #ifdef  H5 || APP-PLUS
+            this.goto("/pages/my/login");
+            // #endif
+        },
+        // 获取手机号
+        onauthGetTelSuccess(da) {
+            this.showAuth = false;
+            post("v1/getMobile", {
+                unid: this.unid,
+                ...da.detail,
+            }).then((res) => {
+                if (res.code === 0) {
+                    uni.setStorageSync("token", res.data.token);
+                    this.getuserInfo();
+                }
+            });
+        },
+        // 获取userinfo
+        async getuserInfo() {
+            let res = await uni.userfun();
+            if (res.user_id) {
+                if (this.isAuthentication) this.isShiMing = res.is_authentication == 0;
+                else this.isShiMing = false;
+                this.userinfo = res;
+            } else this.login();
+        },
+        //授权并登录
+        onAuthSuccess() {
+            var that = this;
+            uni.showLoading({
+                mask: true,
+            });
+            appEv.setData((res) => {
+                uni.hideLoading();
+                that.showAuth = false;
+            });
+        },
+        // 跳转到实名页面
+        goToAutonym() {
+            this.goto("/pages/autonym-submit/index")
+        },
+        // 关闭实名信息 提示
+        closeAuto() {
+            this.isShiMing = false;
+        },
+        // 未开放提示信息
+        SetHint() {
+            this.goto('/pages/agreement/index', { tit: '用户身份及权益', type: 24 })
+        },
+        // 跳转到分享页面
+        getImgPage() {
+            if (this.isAuthentication) {
+                if (this.userinfo.is_authentication == 1) {
+                    this.goto("/pages/invi-img/index")
+                } else {
+                    appEv.errTips("您还未实名");
+                    this.goToAutonym();
+                }
+            } else {
+                this.goto("/pages/invi-img/index")
+            }
+        },
+        // 跳转到提现页面
+        getToCash(type) {
+            if (this.isAuthentication) {
+                if (this.userinfo.is_authentication == 1) {
+                    this.goto("/pages/cash/index", { type })
+                } else {
+                    appEv.errTips("您还未实名");
+                    this.goToAutonym();
+                }
+            } else {
+                this.goto("/pages/cash/index", { type })
+            }
+        },
+        // 复制账号
+        copyText(e) {
+            uniCopy({
+                content: e,
+                success: (res) => {},
+                error: (e) => {},
+            });
+        },
+        // 跳转到用户设置页面
+        getToSetting: function() {
+            uni.navigateTo({
+                url: "/pages/setting/index",
+            });
+        },
+        // 跳转到我的茶友页面
+        getToTeaList: function() {
+            uni.navigateTo({
+                url: "/pages/my-tea-list/index",
+            });
+        },
+        // 跳转到拼豆页面
+        getToBean: function() {
+            uni.navigateTo({
+                url: "/pages/bean-info/index",
+            });
+        },
+        // 跳转到拼团金页面
+        getToAccMoney: function() {
+            uni.navigateTo({
+                url: "/pages/my-acc-money/my-acc-money",
+            });
+        },
+        // 点击头像
+        upheadimg() {
+            let that = this;
+            uni.previewImage({
+                urls: [that.userinfo.head_pic],
+                current: 0,
+            });
+        },
+        // 获取茶友
+        getchayou() {
+            post("v1/my/chayou").then((res) => {
+                if (res.code === 0) {
+                    this.allChaYou = res.data.data.below + res.data.data.lower_level;
+                }
+            });
+        },
+        async getLU() {
+            this.local_uinfo = await uni.Luserfun()
+        },
+        activation() {
+            this.$refs.activation.open()
         }
-      });
-    },
-    async getLU() {
-      this.local_uinfo = await uni.Luserfun()
     },
-    activation(){
-        this.$refs.activation.open()
-    }
-  },
 };
 </script>
 <style lang="scss">
 // 页面配置
 page {
-  background: #f5f5f5;
+    background: #f5f5f5;
 }
 
 .container {
-  box-sizing: border-box;
+    box-sizing: border-box;
 }
 
 .content {
-  padding: 66rpx 30rpx 0;
-  box-sizing: border-box;
-  width: 100%;
-  overflow: hidden;
-  background-image: linear-gradient(to bottom, #fff, #f5f5f5);
+    padding: 66rpx 30rpx 0;
+    box-sizing: border-box;
+    width: 100%;
+    overflow: hidden;
+    background-image: linear-gradient(to bottom, #fff, #f5f5f5);
 }
 
 // 页面配置-end
 
 // 用户信息
 .close_icon {
-  margin-left: 24rpx;
-  width: 26rpx;
+    margin-left: 24rpx;
+    width: 26rpx;
 }
 
 .coupon_info {
-  position: absolute;
-  top: -70rpx;
-  left: 0;
-  border-radius: 12rpx;
-  background-color: rgba(0, 0, 0, 0.8);
-  color: #fff;
-  font-size: 28rpx;
-  font-weight: 500;
-  padding: 10rpx 24rpx;
-  transition: all 0.6s ease;
-  width: 420rpx;
+    position: absolute;
+    top: -70rpx;
+    left: 0;
+    border-radius: 12rpx;
+    background-color: rgba(0, 0, 0, 0.8);
+    color: #fff;
+    font-size: 28rpx;
+    font-weight: 500;
+    padding: 10rpx 24rpx;
+    transition: all 0.6s ease;
+    width: 420rpx;
 }
 
 .uerInfo {
-  width: 100%;
+    width: 100%;
 }
 
 .code_img:nth-child(1) {
-  margin-left: 20rpx;
+    margin-left: 20rpx;
 }
 
 .code_img {
-  width: 42rpx;
-  height: 44rpx;
-  margin-left: 36rpx;
+    width: 42rpx;
+    height: 44rpx;
+    margin-left: 36rpx;
 }
 
 .account {
-  font-size: 26rpx;
-  color: #121212;
-  margin-right: 20rpx;
+    font-size: 26rpx;
+    color: #121212;
+    margin-right: 20rpx;
 }
 
 .user_img .image {
-  width: 100%;
-  height: 100%;
-  border-radius: 50%;
+    width: 100%;
+    height: 100%;
+    border-radius: 50%;
 }
 
 .user_con {
-  width: calc(100% - 136rpx - 140rpx - 20rpx);
-  overflow: hidden;
+    width: calc(100% - 136rpx - 140rpx - 20rpx);
+    overflow: hidden;
 }
 
 .user_img {
-  width: 136rpx;
-  height: 136rpx;
-  margin-right: 20rpx;
-  border-radius: 50%;
-  position: relative;
+    width: 136rpx;
+    height: 136rpx;
+    margin-right: 20rpx;
+    border-radius: 50%;
+    position: relative;
 }
 
 .user_name text {
-  font-size: 26rpx;
-  font-family: "SourceHanSansSC-Medium";
-  color: #121212;
-  font-weight: 500;
+    font-size: 26rpx;
+    font-family: "SourceHanSansSC-Medium";
+    color: #121212;
+    font-weight: 500;
 }
 
 .copy_account {
-  width: 60rpx;
-  height: 32rpx;
-  background: #f1d3a8;
-  font-size: 22rpx;
-  color: #6b2909;
-  border-radius: 6rpx;
+    width: 60rpx;
+    height: 32rpx;
+    background: #f1d3a8;
+    font-size: 22rpx;
+    color: #6b2909;
+    border-radius: 6rpx;
 }
 
 .user_name {
-  width: 100%;
-  overflow: hidden;
-  font-size: 44rpx;
-  color: #121212;
-  font-family: "SourceHanSansSC-Medium";
-  font-weight: 500;
-  line-height: 1;
+    width: 100%;
+    overflow: hidden;
+    font-size: 44rpx;
+    color: #121212;
+    font-family: "SourceHanSansSC-Medium";
+    font-weight: 500;
+    line-height: 1;
 }
 
 .user_option {
-  width: 140rpx;
-  text-align: right;
-  .fun_text{
-    font-size: 20rpx;
-  }
+    width: 140rpx;
+    text-align: right;
+
+    .fun_text {
+        font-size: 20rpx;
+    }
 }
 
 // 用户信息-end
 
+.regional {
+    padding: 0 10rpx;
+    margin-top: 16rpx;
+
+    .ico {
+        width: 32rpx;
+        height: 32rpx;
+        margin-right: 12rpx;
+    }
+
+    .txtinfo {
+        color: #000;
+        font-size: 25rpx;
+    }
+
+    .ico,
+    .txtinfo {
+        vertical-align: middle;
+    }
+}
+
 // 账户信息
 .acc_info {
-  width: 100%;
-  overflow: hidden;
-  background: url("~@/static/my/myBack.png") no-repeat;
-  background-size: 100% 100%;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  box-sizing: border-box;
-  margin-top: 38rpx;
-  .i_num{
-    width: 110rpx;
-    text-align: center;
-    font-size: 30rpx;
-    p{
-      color: #fff;
-    }
-    .dinB{
-      margin-top: 10rpx;
-      font-size: 36rpx;
+    width: 100%;
+    overflow: hidden;
+    background: url("~@/static/my/myBack.png") no-repeat;
+    background-size: 100% 100%;
+    border-radius: 16rpx;
+    padding: 30rpx;
+    box-sizing: border-box;
+    margin-top: 38rpx;
+
+    .i_num {
+        text-align: center;
+        font-size: 30rpx;
+
+        p {
+            color: #fff;
+        }
+
+        .dinB {
+            margin-top: 10rpx;
+            font-size: 36rpx;
+        }
     }
-  }
 }
 
 // 账户信息-end
 
 // 功能列表
 .more {
-  font-size: 24rpx;
-  color: #999999;
+    font-size: 24rpx;
+    color: #999999;
 }
 
 .fun_con {
-  width: 100%;
-  overflow: hidden;
+    width: 100%;
+    overflow: hidden;
 }
 
 .fun_text {
-  font-size: 24rpx;
-  color: #333333;
+    font-size: 24rpx;
+    color: #333333;
 }
 
-.fun_list{
-  width: 25%;
+.fun_list {
+    width: 25%;
 }
 
 .fun_list button::after {
-  border: 0 !important;
+    border: 0 !important;
 }
 
 .more_img {
-  width: 12rpx;
-  height: 20rpx;
-  margin-left: 11rpx;
+    width: 12rpx;
+    height: 20rpx;
+    margin-left: 11rpx;
 }
 
 .fun_img {
-  width: 50rpx;
-  height: 50rpx;
-  margin-bottom: 10rpx;
+    width: 50rpx;
+    height: 50rpx;
+    margin-bottom: 10rpx;
 }
 
 .fun_container {
-  width: 100%;
-  overflow: hidden;
-  padding: 0 30rpx;
-  box-sizing: border-box;
+    width: 100%;
+    overflow: hidden;
+    padding: 0 30rpx;
+    box-sizing: border-box;
 }
 
 .fun_title {
-  padding: 0 30rpx;
-  font-size: 32rpx;
-  color: #333;
-  font-weight: bold;
+    padding: 0 30rpx;
+    font-size: 32rpx;
+    color: #333;
+    font-weight: bold;
 }
 
-.fun_tit{
-  font-size: 28rpx;
-  color: #666;
-  font-weight: bold;
-  padding-left: 36rpx;
+.fun_tit {
+    font-size: 28rpx;
+    color: #666;
+    font-weight: bold;
+    padding-left: 36rpx;
 }
 
 .fun {
-  width: 100%;
-  overflow: hidden;
-  border-radius: 16rpx;
-  background: #fff;
-  padding: 30rpx 0;
-  box-sizing: border-box;
+    width: 100%;
+    overflow: hidden;
+    border-radius: 16rpx;
+    background: #fff;
+    padding: 30rpx 0;
+    box-sizing: border-box;
 }
 
 .user_level {
-  margin-top: 10rpx;
-  background: linear-gradient(to right, #ffeabd, #ffc479);
-  padding: 6rpx 20rpx;
-  border-radius: 6rpx;
-  overflow: hidden;
-  
-  .level_img {
-    width: 38rpx;
-    height: 30rpx;
-    z-index: 30;
-  }
-
-  .level_text {
-    color: #6b2909;
-    font-size: 28rpx;
-    margin-left: 12rpx;
-    display: inline-block;
-    height: 30rpx;
-    line-height: 30rpx;
-  }
-
-  .level_img,
-  .level_text {
-    float: left;
-  }
+    margin-top: 10rpx;
+    background: linear-gradient(to right, #ffeabd, #ffc479);
+    padding: 6rpx 20rpx;
+    border-radius: 6rpx;
+    overflow: hidden;
+
+    .level_img {
+        width: 38rpx;
+        height: 30rpx;
+        z-index: 30;
+    }
+
+    .level_text {
+        color: #6b2909;
+        font-size: 28rpx;
+        margin-left: 12rpx;
+        display: inline-block;
+        height: 30rpx;
+        line-height: 30rpx;
+    }
+
+    .level_img,
+    .level_text {
+        float: left;
+    }
 }
 
 // 功能列表-end

+ 7 - 2
src/pagesB/directCharge/orderDetail.vue

@@ -7,8 +7,8 @@
         <div class="card qupiao" v-if="detail.order_no">
             <uqrcode ref="uqcode" v-if="[0,2].includes(detail.card_type)" :code="detail.unique_code" class="code-img" :size="150" />
             <tki-barcode v-if="[1,2].includes(detail.card_type)" :val="detail.unique_code" />
-            <p v-if="detail.card_no">卡号:{{ detail.card_no }}</p>
-            <p v-if="detail.card_pwd">卡密:{{ detail.card_pwd }}</p>
+            <p @click="copyText(detail.card_no)" v-if="detail.card_no">卡号:{{ detail.card_no }}</p>
+            <p @click="copyText(detail.card_pwd)" v-if="detail.card_pwd">卡密:{{ detail.card_pwd }}</p>
             <p @click="copyText(detail.link_url)" v-if="detail.link_url">卡券链接:{{detail.link_url}}</p>
         </div>
         <div class="info card">
@@ -16,6 +16,7 @@
             <p>订单编号:{{ order.trade_no }}</p>
             <p>下单时间:{{ order.create_time }}</p>
         </div>
+        <div class="msg" v-html="order.product_detail"></div>
         <div class="footbtn" v-if="order.status == 0" @click="pay">立即支付</div>
     </div>
 </template>
@@ -148,4 +149,8 @@ export default {
     text-align: center;
     line-height: 80rpx;
 }
+.msg {
+    font-size: 26rpx;
+    margin-top: 50rpx;
+}
 </style>

+ 47 - 11
src/pagesB/orderingfood/activationcode.vue

@@ -19,9 +19,17 @@
         <div class="bntbar">
             <div class="btn" @click="activationCode">立即生成</div>
         </div>
-        <div class="codebox" v-if="code">
-            <div class="msg">激活码已生成:</div>
-            <div class="code" @click="copyText(code)">{{ code }}</div>
+        <div class="codebox">
+            <div class="msg">待使用:</div>
+            <div class="codes">
+                <div class="code_it" v-for="(i,s) in codes" :key="s">
+                    <div class="l_tit">{{ i.name }}</div>
+                    <div class="l_li">
+                        <div class="code" v-for="(a,b) in i.codes" :key="b" @click="copyText(a)">{{ a }}</div>
+                    </div>
+                </div>
+            </div>
+            <!-- <div class="code" @click="copyText(code)">{{ code }}</div> -->
             <div class="smsg">(*点击激活码可复制)</div>
         </div>
     </div>
@@ -39,6 +47,7 @@ export default {
             local_uinfo: {},
             Purview: {},
             code: undefined,
+            codes: {},
 
             tabs: [
                 { n: "VIP", i: 1, k: "vip_num" },
@@ -59,13 +68,17 @@ export default {
                     this.Purview = res.data
                 }
             })
+            post("local/waitActivation").then(res => {
+                if (res.code == 0) {
+                    this.codes = res.data
+                }
+            })
         },
         activationCode() {
             post("local/activationCode",{
                 level_id: this.level_id
             }).then(res => {
                 if (res.code == 0) {
-                    this.code = res.data.code;
                     this.getPurview();
                 }
             })
@@ -93,6 +106,9 @@ export default {
 page {
     background-color: #fff;
 }
+.activationcode{
+    padding-bottom: 60rpx;
+}
 .user_info{
     padding: 38rpx 32rpx;
     border-bottom: 1px solid #e5e5e5;
@@ -159,25 +175,45 @@ page {
 }
 .codebox{
     padding: 0 32rpx;
-    text-align: center;
     margin-top: 50rpx;
     .msg{
-        text-align: left;
         margin-bottom: 30rpx;
-        font-size: 36rpx;
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #666;
+    }
+    .codes{
+        background-color: rgba($color: #000, $alpha: 0.08);
+        border-radius: 10rpx;
+        padding: 26rpx 30rpx;
+    }
+    .l_tit{
         color: #666;
+        font-size: 30rpx;
+    }
+    .l_li{
+        margin: 10rpx -20rpx 30rpx;
+    }
+    .code_it{
+        &:last-child{
+            .l_li{
+                margin-bottom: 0;
+            }
+        }
     }
     .code{
         display: inline-block;
-        background-color: rgba($color: #000, $alpha: 0.08);
         color: #000;
-        padding: 10rpx 50rpx;
+        width: calc((100% - 120rpx) / 3);
+        background-color: #fff;
         border-radius: 10rpx;
+        margin: 8rpx 20rpx;
+        text-align: center;
+        padding: 10rpx 0;
     }
     .smsg{
-        font-size: 22rpx;
+        font-size: 23rpx;
         margin-top: 10rpx;
-        // text-align: left;
     }
 }
 </style>

+ 6 - 6
src/pagesB/orderingfood/orderlist.vue

@@ -5,7 +5,7 @@
                 <span class="name_tit ellipsis">{{ i.restaurant_name }}</span>
                 <span class="status">{{ typeto(i.status) }}</span>
             </div>
-            <div class="p2 flex_r flex_jb" v-if="i.type==0">
+            <div class="p2 flex_r flex_jb" v-if="i.type == 0">
                 <div class="goods ellipsis">
                     <div class="imgs" v-for="(a,b) in i.orderGoods" :key="b">
                         <img :src="a.product_img" alt="" class="g_img">
@@ -14,18 +14,18 @@
                 </div>
                 <div class="g_amount"><span class="amount dinB">{{ i.pay_amount }}</span></div>
             </div>
-            <div class="p2 flex_r flex_jb " v-else-if="i.type==1">
+            <div class="p2 flex_r flex_jb" v-else-if="i.type == 1">
                 <div class="Movie flex_r flex_jb" v-for="(a,b) in i.orderGoods" :key="b">
                     <div class="info flex_c flex_jb">
                         <p class="pt">{{ a.product_name }}</p>
                         <p class="p">{{ a.number }}张</p>
                         <p class="p">原价 ¥{{ i.order_amount }}</p>
-                        <p class="p">{{ seatInfos(i.product_detail) }}</p>
+                        <p class="p">{{ seatInfos(i.product_detail,i.type) }}</p>
                     </div>
                     <image class="poster" mode="aspectFill" :src="a.product_img" />
                 </div>
             </div>
-            <div class="p2 flex_r flex_jb" v-else-if="i.type==2 || i.type==3">
+            <div class="p2 flex_r flex_jb" v-else-if="i.type == 2 || i.type == 3">
                 <div class="goods good2 ellipsis">
                     <div class="p" v-for="(a,b) in i.orderGoods" :key="b">{{ a.product_name }}</div>
                 </div>
@@ -73,8 +73,8 @@ export default {
             else if (i.type == 0) this.goto('/pagesB/orderingfood/detail', { trade_no: i.trade_no, brand_id: i.brand_id })
             else if (i.type == 3) this.goto('/pagesB/directCharge/orderDetail', { trade_no: i.trade_no })
         },
-        seatInfos(va){
-            if(va){
+        seatInfos(va,type){
+            if(va&&type==1){
                 let arr = JSON.parse(va)
                 return arr.map(item => item.seatName).join(",")
             }

BIN
src/static/my/assistant.png


BIN
src/static/my/assistantHistory.png