hmp 4 лет назад
Родитель
Сommit
f73dc8597c

+ 1 - 1
assets/http/service.js

@@ -1,6 +1,6 @@
 import Request from 'luch-request'
 
-let baseURL = 'http://192.168.1.168:2366/'
+let baseURL = 'http://192.168.1.48:2366/'
 // let baseURL = 'http://192.168.1.244:1888/api/'
 // let baseURL = 'https://ldt.guosen-fumao.cn/api/'
 

+ 16 - 24
pages/member-center/add.vue

@@ -15,24 +15,20 @@
 		<view class="card margin-top-30">
 			<view class="margin-bottom-20">
 				<text class="title">积分价值</text>
-				<text class="sub_title">(例:1000积分=10元)</text>
+				<text class="sub_title">(例:1 元= 10 积分)</text>
 			</view>
 			<view class="flex">
-				<view class="center" style="width: 45%;">
+				<view class="center" style="width: 25%;">
+					<text class="text-bold  text-base" style="font-size: 40rpx;">1</text>
+					<text style="margin: 0 20rpx;">元</text>
+					<text style="margin: 0 20rpx;">=</text>
+				</view>
+				<view class="center" style="width: 45%;margin-left: 20rpx;">
 					<u-input height="50" :border="true" :clearable="false" v-model="form.point" placeholder="请输入积分数"/>
 					<view class="cu-tag bg-color radius">
 						积分
 					</view>
 				</view>
-				<view class="center" style="margin: 0 20rpx;">
-					<text>=</text>
-				</view>
-				<view class="center" style="width: 45%;">
-					<u-input height="50" :border="true" :clearable="false" v-model="form.pointValue" placeholder="请输入积分价值" />
-					<view class="cu-tag bg-color radius">
-						元
-					</view>
-				</view>
 			</view>
 		</view>
 		
@@ -41,7 +37,7 @@
 				<text class="title">积分规则</text>
 			</view>
 			<view class="flex">
-				<view class="center">
+				<view class="center" style="width: 25%;">
 					<text>消费1元赠送</text>
 				</view>
 				<view class="center" style="width: 45%;margin-left: 20rpx;">
@@ -71,7 +67,6 @@
 			return {
 				form:{
 					point:'',
-					pointValue:'',
 					consumeOnePoint:''
 				}
 			}
@@ -82,25 +77,22 @@
 					this.$u.toast('请输入积分数')
 					return
 				}
-				if (this.$isEmpty(this.form.pointValue)) {
-					this.$u.toast('请输入积分值')
-					return
-				}
 				if (this.$isEmpty(this.form.consumeOnePoint)) {
 					this.$u.toast('请输入积分规则')
 					return
 				}
-				
-				let id=this.vuex_shopId
-				this.$api.shop.submit({
+				let id=this.vuex_mallId
+				this.$api.mall.submit({
 					id,
-					sendPointUnit: this.form.consumeOnePoint,
-					pointRate: 0.01,
-					isOpenMember: 1
+					sendPointUnnit: this.form.consumeOnePoint,
+					pointRate: this.$digital.keepTwoDecimalFull(1/this.form.point),
+					useMember: 1
 				}).then(res=>{
 					if (res.success) {
 						this.$dialog.showModal('创建成功',false).then(res=>{
-							this.$jump('/pages/member/member')
+							uni.redirectTo({
+								url:"/pages/member-center/member-center"
+							})
 						})
 					}else{
 						this.$u.toast(res.msg)

+ 8 - 2
pages/member-center/member-center.vue

@@ -1,10 +1,11 @@
 <template>
 	<view>
+		<u-navbar :custom-back="back" title="会员中心"></u-navbar>
 		<view class="empty-page" v-if="!isOpenMember">
 			<image src="../../static/icon/vip.png" mode=""></image>
 			<text>没有会员中心信息</text>
 
-			<view @click="$jump('/pages/member/add')" class="cu-btn btn-bg-color round" style="width: 48%;height: 80rpx;position: fixed;bottom: 20%;">
+			<view @click="$jump('/pages/member-center/add')" class="cu-btn btn-bg-color round" style="width: 48%;height: 80rpx;position: fixed;bottom: 20%;">
 				<u-icon name="plus-circle" size="40"></u-icon>
 				<text class="margin-left-10 text-lg">创建会员中心</text>
 			</view>
@@ -12,7 +13,7 @@
 
 		<block v-else>
 			<view class="top-menu">
-				<view class="leftFixed">1积分等于{{detail.pointUnitValue}}元</view>
+				<view class="leftFixed"> 1 积分等于 {{detail.pointUnitValue}} 元</view>
 				<view class="u-flex u-row-between">
 					<view class="item">
 						<text>{{detail.memberNum}}</text>
@@ -140,6 +141,11 @@
 			this.fetchMemberInfo()
 		},
 		methods: {
+			back(){
+				uni.reLaunch({
+					url:"/pages/index/index"
+				})
+			},
 			update(){
 				let params = {
 					id: this.vuex_mallId,

+ 1 - 1
pages/shopAudit/detail/comps/audit-info.vue

@@ -54,7 +54,7 @@
 		},
 		methods: {
 			async historyFlowList() {
-			 	let processInstanceId=(await this.$api.audit.detail({shopId:this.shopId})).data.processInstanceId
+			 	let processInstanceId=(await this.$api.audit.detail({entityId:this.shopId})).data.processInstanceId
 				this.$api.flow.historyFlowList({processInstanceId}).then(res => {
 					this.list = res.data
 				})

+ 1 - 1
pages/shopAudit/detail/comps/shop-info.vue

@@ -144,7 +144,7 @@
 				this.fetchAudit()
 			},
 			fetchAudit(){
-				this.$api.audit.detail({shopId:this.shopId}).then(res=>{
+				this.$api.audit.detail({entityId:this.shopId}).then(res=>{
 					this.audit=res.data
 					//待平台审核,获取任务id
 					if (this.audit.auditStatus=='WAITING_MALL') {