zhaoxiaoqiang
2021-11-07 c0457bf3334ca6d7b2db01fa1d6739b48ed3535c
升档加门店管理新增按钮
4 files modified
17 ■■■■■ changed files
src/views/main/product.vue 2 ●●● patch | view | raw | blame | history
src/views/mine/stores/stores.vue 9 ●●●● patch | view | raw | blame | history
src/views/user/loginByWx.vue 2 ●●● patch | view | raw | blame | history
webpack.common.js 4 ●●●● patch | view | raw | blame | history
src/views/main/product.vue
@@ -96,7 +96,7 @@
      alert("openId:" + openId);
      alert("codeId:" + codeId);
      if (codeId == undefined) {
        var strUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + "wx594ab33e0466eccf" + "&redirect_uri=" + "https%3a%2f%2fsie.jycash.cn%2fsib_wx_scorer%2f%23%2f" + "&response_type=code&scope=snsapi_userinfo" + "#wechat_redirect";
        var strUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + "wx594ab33e0466eccf" + "&redirect_uri=" + "https%3a%2f%2fsie.jycash.cn%2fsib_wx_scores%2f%23%2f" + "&response_type=code&scope=snsapi_userinfo" + "#wechat_redirect";
        window.location.href = strUrl;
      } else if (openId == undefined) {
        this.$api.getWeChatUserInfo({ code: codeId }).then(
src/views/mine/stores/stores.vue
@@ -5,7 +5,7 @@
-->
<template>
  <div class="stores-box h-100-g">
    <v-navbar title="门店管理" fixed></v-navbar>
    <v-navbar title="门店管理1" fixed></v-navbar>
    <van-search class="search" placeholder="请输入门店名称/负责人姓名/负责人手机号/渠道编码" v-model="value" shape='round' @search="onSearch" />
    <div class="item-box">
      <van-list v-model="loading" :finished="finished" immediate-check='false' offset="50" finished-text="没有更多了" @load="onLoad">
@@ -24,7 +24,7 @@
      </van-list>
    </div>
    <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)">
    <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)" v-if='isShowAdd'>
      <div class="inner">
        <van-icon name="plus" />
        <span class="text">新增</span>
@@ -46,14 +46,19 @@
      finished: false,
      storeId: '',
      merId: '',
      merIdType:''//区分当前是商户进入当前页面或者门店进入当前页面
    }
  },
  computed: {
    ...mapState(['userinfo']),
    ...mapGetters(["orgType"]),
    isShowAdd(){
      return (this.orgType==1&&this.merIdType)||this.orgType==3;
    }
  },
  created() {
    this.merId = this.$route.query.merId ? this.$route.query.merId : this.userinfo.orgId;
    this.merIdType = this.$route.query.merId;
    this.init();
  },
  methods: {
src/views/user/loginByWx.vue
@@ -67,7 +67,7 @@
      if ((!this.openId && !this.urlCode) || (typeof this.openId == "undefined" && !this.urlCode)) {
        let url = location.host;
        // url = "t.finlean.com";
        var str = encodeURIComponent(`https://${url}/sib_wx_scorer/#/loginByWx`);
        var str = encodeURIComponent(`https://${url}/sib_wx_scores/#/loginByWx`);
        var fn = new GoWeChat("wx594ab33e0466eccf", str);
        fn.gocontract();
      } else {
webpack.common.js
@@ -14,7 +14,7 @@
const vuxLoader = require("vux-loader");
let env = process.env.NODE_ENV;
//打包地址
let srcUrl = "/sib_wx_scorer/";
let srcUrl = "/sib_wx_scores/";
module.exports = {
  entry: {
    index: "./src/index.js",
@@ -22,7 +22,7 @@
  output: {
    filename: "js/[name].js",
    path: path.resolve(__dirname, "dist"),
    publicPath: env ? "/sib_wx_scorer/" : "/", //根据线上项目路径更改 /projectpath
    publicPath: env ? "/sib_wx_scores/" : "/", //根据线上项目路径更改 /projectpath
  },
  /**防止将某些 import 的包(package)打包到 bundle 中,而是在运行时(runtime)再去从外部获取这些扩展依赖,
   * 简而言之:就是使用cdn~不打包这些变量引用的文件,生成环境时需要在index.html中手动引入cdn