shish 1 год назад
Родитель
Сommit
90d047bc47

+ 4 - 5
hdApp/src/pages.json

@@ -230,8 +230,7 @@
 				{ "path": "admin","style": {"navigationBarTitleText": "个人资料"}},
 				{ "path": "sel-member", "style": { "navigationBarTitleText": "客户列表" } },
 				{ "path": "achieve", "style": { "navigationBarTitleText": "员工业绩" } },
-				{ "path": "miniAutoLogin", "style": { "navigationBarTitleText": "绑定账号" } },
-				{ "path": "dimission", "style": { "navigationBarTitleText": "申请离职" } }
+				{ "path": "miniAutoLogin", "style": { "navigationBarTitleText": "绑定账号" } }
 			]
 		},
 		{
@@ -452,9 +451,9 @@
 				{ "path": "wechatPay", "style": { "navigationBarTitleText": "待支付"} },
 				{ "path": "aliPay", "style": { "navigationBarTitleText": "待支付"} },
 				{ "path": "cosNext", "style": { "navigationBarTitleText": "下一步", "enablePullDownRefresh": true } },
-				{ "path": "gatherPay", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
-				{ "path": "gatherAliPay", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
-				{ "path": "gatherResult", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false } },
+				{ "path": "gatherPay", "style": { "navigationBarTitleText": "付款", "enablePullDownRefresh": false } },
+				{ "path": "gatherAliPay", "style": { "navigationBarTitleText": "付款", "enablePullDownRefresh": false } },
+				{ "path": "gatherResult", "style": { "navigationBarTitleText": "结果", "enablePullDownRefresh": false } },
 				{ "path": "purDetails", "style": { "navigationBarTitleText": "采购详情", "enablePullDownRefresh": true } },
 				{ "path": "info", "style": { "navigationBarTitleText": "订单详情", "enablePullDownRefresh": true } },
 				{ "path": "xj", "style": { "navigationBarTitleText": "请选择颜色"} },

+ 6 - 6
hdApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {

+ 8 - 0
mallApp/src/api/recharge/index.js

@@ -1,5 +1,13 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const wxPayRecharge = data => {
+    return https.post('/recharge/wx-pay-recharge', data)
+}
+
+export const getDetail = data => {
+    return https.get('/recharge/get-detail', data)
+}
+
 export const rechargeFn = data => {
     return https.post('/recharge/recharge', data)
 }

+ 2 - 2
mallApp/src/ext.json

@@ -4,9 +4,9 @@
   "directCommit": false,
   "ext": {
     "account": 0,
-    "apiHost": "https://api.shop.theflorist.cn",
+    "apiHost": "http://api.shop.theflorist.cn",
     "socketApiHost": "api.shop.theflorist.cn",
-    "imgHost": "https://img.theflorist.cn",
+    "imgHost": "http://img.theflorist.cn",
     "name":"中花卉"
   }
 }

+ 3 - 1
mallApp/src/pages.json

@@ -23,7 +23,9 @@
         {
             "root": "pages/settle",
             "pages": [
-                { "path": "debt", "style": { "navigationBarTitleText": "欠款订单" } }
+                { "path": "debt", "style": { "navigationBarTitleText": "欠款订单" } },
+                { "path": "pay", "style": { "navigationBarTitleText": "付款" } },
+                { "path": "result", "style": { "navigationBarTitleText": "付款结果" } }
             ]
         },
         {

+ 2 - 2
mallApp/src/pages/home/recent.vue

@@ -108,10 +108,10 @@ export default {
   },
   methods: {
     settleAccount (item) {
-      this.pageTo({ url: '/pages/settle/debt?id='+item.id})
+      this.pageTo({ url: '/pages/settle/debt?id='+item.id+'&account='+item.shopId})
     },
     recharge (item) {
-      this.pageTo({ url: '/pages/member/recharge?id='+item.id})
+      this.pageTo({ url: '/pages/member/recharge?id='+item.id+'&account='+item.shopId})
     },
     toBottom(){
       if (!this.list.finished) {

+ 3 - 2
mallApp/src/pages/member/recharge.vue

@@ -126,9 +126,10 @@ export default {
 			let that = this
 			let id = 0
 			let salt = ''
-			if(this.option.id && this.option.salt){
+			if(this.option.id){
+			//if(this.option.id && this.option.salt){
 				id = this.option.id?this.option.id:0
-				salt = this.option.salt?this.option.salt:''
+				//salt = this.option.salt?this.option.salt:''
 			}else{
 				if(this.option.q){
 					let currentUrl = decodeURIComponent(this.option.q)

+ 1 - 1
mallApp/src/pages/settle/components/debtItem.vue

@@ -6,7 +6,7 @@
     </view>
     <view class="details-main">
       <view class="item-header">
-        <text class="name">采购单 {{info.orderSn}} </text>
+        <text class="name">单 {{info.orderSn}} </text>
       </view>
       <view class="item-row">
         <view class="mark">{{ info.addTime.substr(5,11) }}</view>

+ 2 - 2
mallApp/src/pages/settle/debt.vue

@@ -182,7 +182,7 @@ export default {
 				uni.showToast({title: '订单太多,点右上角选月份再结',duration: 2000,icon:"none"})
 				return false
 			}
-      that.$util.confirmModal({content:'确认提交?'},() => {
+      that.$util.confirmModal({content:'确认订单选好了?'},() => {
         that.selectList.forEach(item => {
           arr.push(item.id)
         })
@@ -195,7 +195,7 @@ export default {
                 that.pageTo({ url: '/admin/clear/list', type: 2})
               })              
             }else{
-              that.pageTo({ url: '/pagesPurchase/gatherPay?id='+res.data.id, type: 2 })
+              that.pageTo({ url: '/pages/settle/pay?id='+res.data.id, type: 2 })
             } 
           }
         })

+ 197 - 0
mallApp/src/pages/settle/pay.vue

@@ -0,0 +1,197 @@
+<template>
+  <view class="app-content awaitPayYe awaitPayYe">
+    <view class="callback-wrap">
+      <view class="bg_01"></view>
+      <view class="callback-blo">
+        <block>
+          <view class="icon">
+            <i class="iconfont icondaizhifu"></i>
+          </view>
+        </block>
+        <view class="wait">待付款</view>
+        <block>
+          <view class="price">
+            <span>¥</span>
+            <span class="app-size-36 app-bold">{{ rechargeAmount }}</span>
+          </view>
+          <view class="order-num app-color-3 order-show">订单号: {{ orderSn}}</view>
+        </block>
+        <block>
+          <view class="call-one-btn">
+            <button class="button-com green pay-wx" @click="wxPayFn(1)" style="height:100upx;line-height:50upx;">微信支付</button>
+          </view>
+        </block>
+      </view>
+    </view>
+  </view>
+</template>
+<script>
+import wexinPay from "@/utils/pay/wxPay";
+import { mapGetters } from "vuex";
+import { postWxCode } from '@/api/mini'
+import { getDetail,wxPayRecharge } from '@/api/recharge'
+export default {
+  name: "pay",
+  data () {
+    return {
+      id:0,
+      orderSn:'',
+      rechargeAmount:0,
+      hasRequestApi:false
+    };
+  },
+  onLoad() {
+  },
+  computed: {
+    ...mapGetters(["getLoginInfo", 'getDictionariesInfo']),
+  },
+  onShow(){
+  },
+  methods: {
+    init(){
+      getDetail({id:this.option.id}).then(res=>{
+        if(res.code == 1){
+          this.id = res.data.id
+          this.orderSn = res.data.orderSn
+          this.rechargeAmount = res.data.amount?parseFloat(res.data.amount):0
+        }
+      })
+    },
+    wxPayFn(){
+			let platformType = uni.getSystemInfoSync().platform
+			if(platformType == 'windows'){
+        this.$msg('请使用手机小程序付款')
+        return false
+      }
+      let that = this
+      //解决重复提交问题
+      if(this.hasRequestApi == true){
+        this.$msg('正在请求,请5秒后重试')
+        return false
+      }
+      that.hasRequestApi = true
+      setTimeout(() => {
+        that.hasRequestApi = false
+      },7000)
+      // #ifdef APP-PLUS
+      this.$msg('请用小程序打开,再支付')
+      return false
+      // #endif
+      that.confirmWxPayFn()
+    },
+    confirmWxPayFn () {
+      let that = this
+      uni.showLoading({mask:true})
+      uni.login({
+        provider: 'weixin',
+        success: res => {
+          postWxCode({ code: res.code }).then(subRes => {
+            uni.hideLoading()
+            if(subRes.data.miniOpenId){
+              let miniOpenId = subRes.data.miniOpenId
+              uni.setStorageSync('miniOpenId',miniOpenId)
+              that.weixinPay(miniOpenId)
+            }
+          })
+        }
+      })
+    },
+    weixinPay(miniOpenId){
+      let that = this
+      wxPayRecharge({ id: this.id,miniOpenId:miniOpenId }).then(res => {
+        that.orderSn = res.data.orderSn
+        wexinPay(res.data, this.getSuccess, this.getError)
+      })
+    },
+    getSuccess () {
+      let that = this
+      that.pageTo({ url: '/pages/settle/result?id='+that.id,type:2})
+    },
+    getError () {
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  .ali-btn{
+    background-color:#3385ff;
+    border:1upx solid #3385ff;
+    color:white;
+  }
+  .callback-wrap {
+    padding-top: 50upx;
+    // background-image: url("../../src/static/images/callback/bg.png");
+    background-repeat: no-repeat;
+    background-size: 100% auto;
+    position: relative;
+    .bg_01 {
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100vw;
+      height: 290upx;
+      background: #07be0b;
+      border-radius: 0upx 0upx 83upx 83upx;
+      z-index: 1;
+    }
+    .callback-blo {
+      position: absolute;
+      z-index: 9;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 90%;
+      margin: 0 auto;
+      padding: 70upx 0;
+      background-color: #fff;
+      box-shadow: 2upx 2upx 16upx 0upx rgba(181, 181, 181, 0.29);
+      border-radius: 10upx;
+      text-align: center;
+      // 使用icon
+      .icon {
+        .iconfont {
+          font-size: 120upx;
+        }
+      }
+      // 一个按钮
+      .call-one-btn {
+        .button-com {
+          width: 70%;
+          padding-top: 22upx;
+          padding-bottom: 22upx;
+          font-size: 32upx;
+          margin-top: 40upx;
+        }
+      }
+    }
+    .order-show{
+      margin-top:20upx;
+    }
+  }
+}
+// 待支付 - 公共
+.awaitPayWx,
+.awaitPayYe {
+  .status-text {
+    margin-top: 22upx;
+    margin-bottom: 52upx;
+    color: #ffa92e;
+  }
+  .surplus {
+    margin-top: 22upx;
+    margin-bottom: 38upx;
+  }
+  .icon {
+    .iconfont {
+      color: #ffa92e;
+    }
+  }
+}
+// 待确认样式
+.wait {
+  color: #ffa92e;
+  font-size: 40upx;
+  font-weight: 700;
+  margin: 20upx 0;
+}
+</style>

+ 97 - 0
mallApp/src/pages/settle/result.vue

@@ -0,0 +1,97 @@
+<template>
+  <view class="app-content">
+    <view class="billing_box_bg">
+      <view class="top-view"> </view>
+      <view class="result-view">
+        <view :class="['iconfont', 'iconchenggong']"></view>
+        <view class="result-title">支付成功</view>
+        <button class="admin-button-com big" @click="getDetail()">订单详情</button>
+        <button class="admin-button-com big" @click="goBack()" style="margin-top:30upx;">返回</button>
+        <view style="margin-top:50upx;font-size:36upx;text-decoration:underline;" @click="goClearRemind()">如何查看我还有多少待结账</view>
+      </view>
+
+      <!-- #ifdef MP-WEIXIN -->
+      <!-- <view style="width:690upx;height:25upx;background-color: #f5f5f5;"></view>
+      <ad-custom unit-id="adunit-b3f48f1b6c1a39ff"></ad-custom> -->
+      <!-- #endif -->
+
+    </view>
+  </view>
+</template>
+<script>
+export default {
+  name: "AppResult",
+	data() {
+		return {
+			id:0
+		}
+	},
+  methods: {
+    getDetail(){
+      this.pageTo({ url: "/admin/clear/info?id="+this.id,type:2})
+    },
+    goBack () {
+      uni.navigateBack()
+    },
+    goClearRemind() {
+        this.$msg('开发中')
+        return false
+        this.pageTo({ url: "/admin/order/clearRemind"})
+    },
+    init(){
+      this.id = this.option.id ? this.option.id : 0
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.billing_box_bg {
+  position: relative;
+  padding: 60upx 30upx;
+  display: flex;
+  flex-direction: column;
+  background-color: #f5f5f5;
+  .top-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 299upx;
+    background: #3385ff;
+    border-radius: 0upx 0upx 83upx 83upx;
+  }
+  .result-view {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 70upx;
+    width: 100%;
+    background: #ffffff;
+    border-radius: 20upx;
+    z-index: 1;
+    .iconchenggong {
+      font-size: 150upx;
+      color: $mainColor1;
+    }
+    .result-title {
+      margin: 40upx 0 60upx;
+      font-size: 32upx;
+    }
+    .close_btn {
+      line-height: 88upx;
+      text-align: center;
+      width: 550upx;
+      height: 88upx;
+      border: 1px solid #dddddd;
+      border-radius: 8upx;
+      font-size: 32upx;
+      color: #666;
+    }
+  }
+  .admin-button-com {
+    margin-bottom: 20upx;
+    width: 100%;
+  }
+}
+</style>

+ 6 - 6
mallApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot');
-  src: url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot?#iefix') format('embedded-opentype'),
-  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.woff') format('woff'),
-  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.ttf') format('truetype'),
-  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.svg#iconfont') format('svg');
+  src: url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot');
+  src: url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot?#iefix') format('embedded-opentype'),
+  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.woff') format('woff'),
+  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.ttf') format('truetype'),
+  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.svg#iconfont') format('svg');
 }
 
 .iconfont {