shish 11 ay önce
ebeveyn
işleme
eab8f460db

+ 117 - 0
hdApp/src/admin/cg/code.vue

@@ -0,0 +1,117 @@
+<template>
+  <view class="app-content">
+    <view class="img_box" style="margin-top:30upx;">
+      <image :src="gatherUrl" mode="heightFix" class="img_url"></image>
+    </view>
+    <view class="confirm-btn">
+      <button class="admin-button-com big blue" style="width:60vw;" @click="downloadImg(gatherUrl)">下载收款码</button>
+    </view>
+
+    <view style="text-align: center;font-size:32upx;">
+      收款码是否算收入:<switch style="transform:scale(0.7,0.7)" :checked="gatherRepeat == 0 ? true : false" @change="gatherRepeatChangeFn" />{{ gatherRepeat==0?'是':'否' }}
+    </view>
+
+  </view>
+</template>
+<script>
+import { miniGatheringCode } from '@/api/shop'
+import { getInfo,modifyGatherRepeat } from '@/api/shop/ext'
+export default {
+  data() {
+    return {
+      gatherUrl:'',
+      gatherRepeat:0
+    }
+  },
+  methods: {
+    init() {
+      this.getImg()
+      getInfo().then(res=>{
+        if(res.code == 1){
+          this.gatherRepeat = res.data.ext.gatherRepeat
+        }
+      })
+    },
+    gatherRepeatChangeFn(e){
+      this.gatherRepeat = e.detail.value ? 0 : 1
+      modifyGatherRepeat({gatherRepeat:this.gatherRepeat}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+        }
+      })
+    },
+    downloadImg(url){
+				// #ifdef APP-PLUS
+				let platformType = uni.getSystemInfoSync().platform
+				if(platformType == 'android'){
+					let store = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
+					if(store != 'authorized'){
+						this.$util.confirmModal({content:'将申请您的存储权限,用于保存小程序码'},() => {
+							this.downloadImg2(url)
+      			})
+					}else{
+						this.downloadImg2(url)
+					}
+				}else{
+					this.downloadImg2(url)
+				}
+				// #endif
+				// #ifdef MP-WEIXIN
+				this.downloadImg2(url)
+				// #endif
+		},
+    downloadImg2(url){
+      uni.downloadFile({
+        url: url,
+        success: (res) => {
+          if (res.statusCode === 200) {
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                uni.showToast({title:'下载成功!'})
+              }
+            });
+          }
+        }
+      });
+    },
+    getImg() {
+      miniGatheringCode().then(res => {
+        this.gatherUrl = res.data.imgUrl
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height:900upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height:900upx;
+    width: auto;
+    margin: 20upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 30upx 30upx 20upx;
+  text-align:center;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60upx);
+  margin: 30upx 30upx 20upx;
+  text-align:center;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 1 - 0
hdApp/src/admin/home/apply.vue

@@ -87,6 +87,7 @@ export default {
             { name: "开关商城", img: `${this.$constant.hostUrl}/image/ghs/home/shop2.png`, url: "/pagesPurchase/open",pf:1},
             { name: "失信人员", img: `${this.$constant.hostUrl}/image/ghs/home/shop2.png`, url: "/admin/ll/list",pf:1},
             { name: "充值规则", img: `${this.$constant.hostUrl}/image/ghs/home/shop2.png`, url: "/admin/recharge/discount",pf:1},
+            { name: "收款码", img: `${this.$constant.hostUrl}/image/ghs/home/shop2.png`, url: "/admin/cg/code",pf:1},
           ]
         },
         {

+ 9 - 0
hdApp/src/admin/home/components/order-item.vue

@@ -5,6 +5,7 @@
 				<view class="image">
 					<image :src="info.cover" mode="aspectFit"></image>
 				</view>
+				<image class="scan-icon" :src="`${constant.imgUrl}/gathering/scan.jpg`" mode="aspectFit"></image>
 				<view class="list-msg">
 					<view><text>客户:</text><text>{{info.customName||''}}</text></view>
 					<view style="margin-top:3upx;"><text>配送:</text>
@@ -60,6 +61,7 @@ export default {
 	@include disFlex(center, space-between);
 	padding: 20upx 0;
 	.list-left {
+		position: relative;
 		@include disFlex(flex-start, space-between);
 		.image {
 			position: relative;
@@ -72,6 +74,13 @@ export default {
 				left:565upx;
 			}
 		}
+		.scan-icon{
+			position: absolute;
+			width:130upx;
+			height:130upx;
+			top:80upx;
+			left:390upx;
+		}
 		.list-msg {
 			color:#999999;
 			font-size: 28upx;

+ 1 - 0
hdApp/src/admin/home/order.vue

@@ -41,6 +41,7 @@
         </view>
 
             <view class="list-button">
+              <view class="admin-button-com middle" v-if="item.status == 2" @click.stop="sendOrderFn(item)">扣库存</view>
                 <view class="admin-button-com middle" v-if="item.status == 2" @click.stop="sendOrderFn(item)">发货</view>
                 <view class="admin-button-com default" v-else>发货</view>
                 <view class="admin-button-com middle" v-if="item.payStatus == 1" @click.stop="printOrder(item)">打印</view>

+ 8 - 0
hdApp/src/api/shop/ext.js

@@ -6,4 +6,12 @@ export const getGhsXj = data => {
 
 export const updateMtAlone = data => {
 	return https.get('/shop-ext/update-mt-alone', data)
+}
+
+export const getInfo = data => {
+	return https.get('/shop-ext/info', data)
+}
+
+export const modifyGatherRepeat = data => {
+	return https.get('/shop-ext/modify-gather-repeat', data)
 }

+ 4 - 0
hdApp/src/api/shop/index.js

@@ -113,4 +113,8 @@ export const kjCustom = data => {
 
 export const kjCustomSet = data => {
 	return https.get('/shop/kj-custom-set', data)
+}
+
+export const miniGatheringCode = data => {
+	return https.get('/shop/mini-gathering-code', data)
 }

+ 1 - 0
hdApp/src/pages.json

@@ -112,6 +112,7 @@
 			"root": "admin/cg",
 			"pages": [
 				{ "path": "mall", "style": { "navigationBarTitleText": "商城" } },
+				{ "path": "code", "style": { "navigationBarTitleText": "收款码" } },
 				{ "path": "member", "style": { "navigationBarTitleText": "注册会员码" } },
 				{ "path": "alipay", "style": { "navigationBarTitleText": "付款" } }
 			]

+ 3 - 4
mallApp/src/pages/pay/index.vue

@@ -150,8 +150,8 @@
 					})
 					// 设置分享
 					let shareParams = {
-						title: `点我付款`, // 分享标题
-						desc: '享随机优惠,最高20元', // 分享内容
+						title: `点我付款`,
+						desc: '支持微信和支付宝',
 						imgUrl: '',
 						pagePath: `/pages/pay/index?account=${res.shop.id}&store=0&fromType=3`
 					}
@@ -172,8 +172,7 @@
 					needSend: this.tabIndex == 0 ? '0' : '1',
 					prePrice: this.amount,
 					payWay: this.form.payWay,
-					payPassword:this.modalForm.payPassword,
-					repeat:1
+					payPassword:this.modalForm.payPassword
 				}
 				if (this.tabIndex == 1) {
 					let deliveryForm = this.$refs.appDelivery.form ? this.$refs.appDelivery.form : {}