Prechádzať zdrojové kódy

卡密商品省略提货步骤

Lsx 1 rok pred
rodič
commit
3085373549

+ 0 - 1
src/packageOperate/lottery/index.vue

@@ -138,7 +138,6 @@
 				})
 			},
 			toGroup(){
-			    console.log(111)
 				uni.navigateTo({
 				  url: "/packageOperate/lottery/details"
 				})

+ 0 - 1
src/packageOperate/lottery/my.vue

@@ -155,7 +155,6 @@
 				})
 			},
 			toGroup(){
-			    console.log(111)
 				uni.navigateTo({
 				  url: "/packageOperate/lottery/details"
 				})

+ 1 - 1
src/packageOther/about/index.vue

@@ -22,7 +22,7 @@
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
 				<!-- #ifndef MP-ALIPAY -->
-				<view class="edition">v 1.2.1</view>
+				<view class="edition">v 1.2.2</view>
 				<!-- #endif -->
 				<!-- #ifdef MP-ALIPAY -->
 				<view class="edition">v 2.2.6</view>

+ 55 - 3
src/packagePrize/choice/index.vue

@@ -84,7 +84,9 @@
 					<view class="choice-info-content-btn flex">
 						<view class="choice-info-content-btn-content flex" @click="toPrize(actionInfo.prizeType)">
 							<view class="choice-info-content-btn-content-txt"
-								v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
+								v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin' && goodsType == 2">去订单查看卡密</view>
+								<view class="choice-info-content-btn-content-txt"
+									v-else-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
 							<view class="choice-info-content-btn-content-txt" v-else>去商城兑换商品</view>
 						</view>
 					</view>
@@ -132,6 +134,7 @@
 		},
 		data() {
 			return {
+				goodsType: 0,
 				ticketId: '',
 				prizeList: [],
 				total: 0,
@@ -274,6 +277,9 @@
 							}).then(res => {
 								if (res.code == 0) {
 									this.comfirmShow = true
+									if(item.prizeType && item.prizeType.value == "goods"){
+										this.getSubmitOrder(item)//提货
+									}
 								}
 							})
 							return
@@ -315,6 +321,9 @@
 								}).then(res => {
 									if (res.code == 0) {
 										_this.comfirmShow = true
+										if(item.prizeType && item.prizeType.value == "goods"){
+											_this.getSubmitOrder(item)//提货
+										}
 									}
 								})
 							}
@@ -328,6 +337,9 @@
 					}).then(res => {
 						if (res.code == 0) {
 							_this.comfirmShow = true
+							if(item.prizeType && item.prizeType.value == "goods"){
+								_this.getSubmitOrder(item)//提货
+							}
 						}
 					})
 				}
@@ -351,9 +363,49 @@
 					})
 				}
 			},
-
+			
+			//卡密商品直接提货
+			getSubmitOrder(data){
+				//首先判断是卡密商品
+					let status = false
+					let ids = []
+					let settleInfo = {}
+					//先获取实物列表
+					$http.post('/api/v1/mp/user/mine/prize/list?pageNum=1&pageSize=10',{}).then(res=>{
+						if(res.code == 0){
+							for (var i = 0; i < res.rows.length; i++) {
+								if(res.rows[i].goodsId == data.refId && res.rows[i].goodsType == 2) {
+									this.goodsType = res.rows[i].goodsType
+									status = true
+									ids.push(res.rows[i].storageId)
+									break
+								}
+							}
+							if(status){
+								//获取到订单详情
+								$http.post('/api/v1/mp/user/deliver/order/settle', {ids: ids} ).then(res => {
+									if (res.code == 0) {
+										//直接提货
+										$http.post('/api/v1/mp/user/deliver/order/submit', {
+											memo:'',
+											goodsType: 2
+										}).then(res => {
+											if (res.code == 0) {}
+										})
+									}
+								})
+							}
+						}
+					})
+			},
+			
 			toPrize(data) {
-				if (data.value == 'goods') {
+				if(data.value == 'goods' && this.goodsType == 2){
+					//跳转订单
+					uni.redirectTo({
+						url: `/packageGoods/order/index`
+					})
+				}else if (data.value == 'goods') {
 					uni.redirectTo({
 						url: '/packagePrize/prize/index'
 					})

+ 3 - 3
src/pages/login/index.vue

@@ -37,8 +37,8 @@
         <!-- #endif -->
         <!-- #ifdef MP-WEIXIN -->
         <view class="login-btn">
-          <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
-          <button @click="getPhoneNumber" v-else>微信登录</button>
+          <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">手机号快捷登录</button>
+          <button @click="getPhoneNumber" v-else>手机号快捷登录</button>
         </view>
         <view class="flex login-code" @click="toCode">手机号登录/注册</view>
         <!-- #endif -->
@@ -54,7 +54,7 @@
             <u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#8E51F7" @change="changeChecked"></u-checkbox>
           </u-checkbox-group>
         </view>
-        <view class="txt">登录表示同意</view>
+        <view class="txt">请阅读并勾选</view>
         <navigator hover-class="none" class="txt-about" url="/packageOther/about/protect">《用户使用协议》</navigator>
         <navigator hover-class="none" class="txt-about" url="/packageOther/about/conceal">、《隐私保护声明》</navigator>
       </view>