Browse Source

提现账号和下载花掌柜

shish 3 years ago
parent
commit
bc5ef253d7
3 changed files with 37 additions and 38 deletions
  1. 22 2
      ghsApp/src/admin/home/me.vue
  2. 1 1
      ghsApp/src/pages.json
  3. 14 35
      ghsApp/src/pagesStore/me/cashSet.vue

+ 22 - 2
ghsApp/src/admin/home/me.vue

@@ -115,6 +115,11 @@
             </tui-list-cell>
             </tui-list-cell>
 
 
             <!-- #ifdef APP-PLUS -->
             <!-- #ifdef APP-PLUS -->
+
+            <tui-list-cell @click="getHzg()" class="line-cell" :hover="false" :arrow="true">
+              <view class="tui-title">下载花掌柜</view>
+            </tui-list-cell>
+
             <tui-list-cell @click="closeApp()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
             <tui-list-cell @click="closeApp()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
               <view class="tui-title">关闭APP</view>
               <view class="tui-title">关闭APP</view>
             </tui-list-cell>
             </tui-list-cell>
@@ -126,14 +131,14 @@
 
 
           </view>
           </view>
         </view>
         </view>
-        
+
         <view class="bottom-agreement">
         <view class="bottom-agreement">
           <text @click.stop="goToService">服务协议</text>
           <text @click.stop="goToService">服务协议</text>
           <text class="right" @click.stop="goToPrivacy">隐私政策</text>
           <text class="right" @click.stop="goToPrivacy">隐私政策</text>
           <text class="right" @click.stop="closeAccount()">注销账号</text>
           <text class="right" @click.stop="closeAccount()">注销账号</text>
         </view>
         </view>
         <view class="bottom-version">version {{version}}</view>
         <view class="bottom-version">version {{version}}</view>
-        
+
       </view>
       </view>
     </template>
     </template>
     <ShopSelect ref="shopSelectComponent" class="bar" :isShowTit="false" top="0upx" @selectShopFn="selectShopFn" />
     <ShopSelect ref="shopSelectComponent" class="bar" :isShowTit="false" top="0upx" @selectShopFn="selectShopFn" />
@@ -221,6 +226,21 @@ export default {
     // #endif
     // #endif
   },
   },
   methods: {
   methods: {
+    getHzg(){
+      // #ifdef APP-PLUS
+      let that = this
+      let type = uni.getSystemInfoSync().platform
+      switch(type){
+        case 'android':
+          plus.runtime.openURL('http://www.wixhb.com/main/app')
+          break;
+        case 'ios':
+          that.$msg('请到应用市场下载')
+          break;
+        default:
+      }
+      // #endif
+    },
     closeAccount(){
     closeAccount(){
       this.$util.pageTo({ url: '/admin/home/close' })
       this.$util.pageTo({ url: '/admin/home/close' })
     },
     },

+ 1 - 1
ghsApp/src/pages.json

@@ -107,7 +107,7 @@
 				{"path": "me/expend","style": {"navigationBarTitleText": "支出记录"}},
 				{"path": "me/expend","style": {"navigationBarTitleText": "支出记录"}},
 				{"path": "me/recharge","style": {"navigationBarTitleText": "充值"}},
 				{"path": "me/recharge","style": {"navigationBarTitleText": "充值"}},
 				{"path": "me/rechargeList","style": {"navigationBarTitleText": "充值记录"}},
 				{"path": "me/rechargeList","style": {"navigationBarTitleText": "充值记录"}},
-				{"path": "me/cashSet","style": {"navigationBarTitleText": "提现账号"}},
+				{"path": "me/cashSet","style": {"navigationBarTitleText": "提现账号设置"}},
 				{"path": "me/expressSet","style": {"navigationBarTitleText": "快递设置"}},
 				{"path": "me/expressSet","style": {"navigationBarTitleText": "快递设置"}},
 				{"path": "me/rechargeSuccess","style": {"navigationBarTitleText": "充值成功"}}
 				{"path": "me/rechargeSuccess","style": {"navigationBarTitleText": "充值成功"}}
 			]
 			]

+ 14 - 35
ghsApp/src/pagesStore/me/cashSet.vue

@@ -32,28 +32,18 @@
 
 
           <tui-list-cell class="line-cell" :hover="false">
           <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title required">开户行</div>
             <div class="tui-title required">开户行</div>
-            <input
-              v-model="form.cashBank"
-              placeholder-class="phcolor"
-              class="tui-input"
-              name="cashBank"
-              placeholder="如:建设银行厦门瑞景支行"
-              maxlength="50"
-              type="text"
-            />
+            <input v-model="form.cashBank" placeholder-class="phcolor" class="tui-input" name="cashBank" placeholder="如:建设银行厦门瑞景支行" maxlength="50" type="text" />
           </tui-list-cell>
           </tui-list-cell>
 
 
         </div>
         </div>
 
 
-        <!-- 提交 -->
+        <view style="color:red;font-weight:bold;margin:20upx 0 10upx 25upx;font-size:27upx;">注意:提现账号若要修改,请先告知管理员,否则修改无效</view>
+
         <div class="confirm-btn">
         <div class="confirm-btn">
-          <button class="admin-button-com big blue" formType="submit">
-            提交
-          </button>
+          <button class="admin-button-com big blue" formType="submit"> 提交 </button>
         </div>
         </div>
       </form>
       </form>
     </div>
     </div>
-    <!-- <kd-entrance></kd-entrance> -->
   </div>
   </div>
 </template>
 </template>
 
 
@@ -62,7 +52,7 @@ import TuiListCell from "@/components/plugin/list-cell";
 import AppAvatarModule from "@/components/module/app-avatar";
 import AppAvatarModule from "@/components/module/app-avatar";
 const form = require("@/utils/formValidation.js");
 const form = require("@/utils/formValidation.js");
 import { cashUpdate } from "@/api/cash";
 import { cashUpdate } from "@/api/cash";
-import { currentShop } from "@/api/shop";
+import { getMainInfo } from "@/api/main";
 export default {
 export default {
   name: "cashSet",
   name: "cashSet",
   components: {
   components: {
@@ -83,24 +73,16 @@ export default {
       memberData: {},
       memberData: {},
     };
     };
   },
   },
-  onLoad() {
-    //this.init()
-  },
-  onShow() {
-    uni.setNavigationBarTitle({
-      title: `提现账号设置`,
-    });
-  },
   methods: {
   methods: {
-    async init() {
-      try {
-        const { data } = await currentShop();
-        this.form.cashAccount = data.cashAccount;
-        this.form.cashName = data.cashName;
-        this.form.cashBank = data.cashBank;
-        this.$forceUpdate();
-      } finally {
-      }
+    init() {
+        getMainInfo().then(res=>{
+          if(res.code == 1){
+            this.form.cashAccount = res.data.info.cashAccount ? res.data.info.cashAccount : ''
+            this.form.cashName = res.data.info.cashName ? res.data.info.cashName : ''
+            this.form.cashBank = res.data.info.cashBank ? res.data.info.cashBank : ''
+            this.$forceUpdate();
+          }
+        })
     },
     },
     confirmFn() {
     confirmFn() {
       cashUpdate(this.form).then((res) => {
       cashUpdate(this.form).then((res) => {
@@ -111,7 +93,6 @@ export default {
       });
       });
     },
     },
     formSubmit(e) {
     formSubmit(e) {
-      // 表单验证
       let rules = [
       let rules = [
         {
         {
           name: "cashName",
           name: "cashName",
@@ -129,10 +110,8 @@ export default {
           msg: ["请输入开户行"],
           msg: ["请输入开户行"],
         },
         },
       ];
       ];
-      // 进行表单检查
       let formData = e.detail.value;
       let formData = e.detail.value;
       let checkRes = form.validation(formData, rules);
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
       if (!checkRes) {
       if (!checkRes) {
         this.confirmFn();
         this.confirmFn();
       } else {
       } else {