Commit c6dc33a2 authored by 肖健's avatar 肖健

省市区改为接口

parent f0f897fb
...@@ -57,13 +57,6 @@ ...@@ -57,13 +57,6 @@
{ {
"path": "pages/login/wv-common/wv-common", "path": "pages/login/wv-common/wv-common",
"style": {} "style": {}
},
{
"path": "pages/mrAct/index",
"style": {
"navigationBarTitleText": "京东挪车码领取",
"enablePullDownRefresh": false
}
} }
], ],
"subPackages": [ "subPackages": [
...@@ -87,6 +80,13 @@ ...@@ -87,6 +80,13 @@
"style": { "style": {
"navigationBarTitleText": "领取优惠券" "navigationBarTitleText": "领取优惠券"
} }
},
{
"path": "pages/mrAct/index",
"style": {
"navigationBarTitleText": "京东挪车码领取",
"enablePullDownRefresh": false
}
} }
] ]
}, },
......
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
</u-form-item> </u-form-item>
</u--form> </u--form>
<view style="margin-top: 38rpx;display: flex; justify-content: center;"> <view style="margin-top: 38rpx;display: flex; justify-content: center;">
<view v-if="!disabledSubmit" style="background: url('../../static/act/submit_btn.png') no-repeat; background-size: 100% 100%; width: 481rpx; height: 120rpx;" <view v-if="!disabledSubmit" style="background: url('../../../static/act/submit_btn.png') no-repeat; background-size: 100% 100%; width: 481rpx; height: 120rpx;"
@click="submitAct"> @click="submitAct">
<view style="display: flex;justify-content: center;align-items: center;height: 120rpx; width: 481rpx;position: relative; top:-6rpx;"> <view style="display: flex;justify-content: center;align-items: center;height: 120rpx; width: 481rpx;position: relative; top:-6rpx;">
<text style="font-size: 38rpx;color:#8E3B09;font-weight: bold;line-height: 42rpx;">立即领取</text> <text style="font-size: 38rpx;color:#8E3B09;font-weight: bold;line-height: 42rpx;">立即领取</text>
<image src="@/static/act/arrow-right.png" style="width:18rpx;height:28rpx; margin-left: 20rpx;"></image> <image src="@/static/act/arrow-right.png" style="width:18rpx;height:28rpx; margin-left: 20rpx;"></image>
</view> </view>
</view> </view>
<view v-if="disabledSubmit" style="background: url('../../static/act/submit_btn.dis.png') no-repeat; background-size: 100% 100%; width: 481rpx; height: 120rpx;" <view v-if="disabledSubmit" style="background: url('../../../static/act/submit_btn.dis.png') no-repeat; background-size: 100% 100%; width: 481rpx; height: 120rpx;"
@click="submitAct"> @click="submitAct">
<view style="display: flex;justify-content: center;align-items: center;height: 120rpx; width: 481rpx;position: relative; top:-6rpx;"> <view style="display: flex;justify-content: center;align-items: center;height: 120rpx; width: 481rpx;position: relative; top:-6rpx;">
<text style="font-size: 38rpx;color:#8E3B09; opacity: 0.3; font-weight: bold;line-height: 42rpx;">立即领取</text> <text style="font-size: 38rpx;color:#8E3B09; opacity: 0.3; font-weight: bold;line-height: 42rpx;">立即领取</text>
...@@ -150,15 +150,15 @@ ...@@ -150,15 +150,15 @@
</u-popup> </u-popup>
<!-- 领取成功 --> <!-- 领取成功 -->
<u-popup :show="receiveSuccessShow" mode="center" bgColor="transparent" @close="receiveSuccessShow = false"> <u-popup :show="receiveSuccessShow" mode="center" bgColor="transparent" @close="receiveSuccessShow = false">
<view style="width: 522rpx; height: 396rpx;background: url('../../static/act/receive-success.png') no-repeat; background-size: 100% 100%;"> <view style="width: 522rpx; height: 396rpx;background: url('../../../static/act/receive-success.png') no-repeat; background-size: 100% 100%;">
<view style="margin: 18rpx auto 13rpx auto ;width: 72rpx; height: 72rpx;background: url('../../static/act/ok.png') no-repeat; background-size: 100% 100%;"></view> <view style="margin: 18rpx auto 13rpx auto ;width: 72rpx; height: 72rpx;background: url('../../../static/act/ok.png') no-repeat; background-size: 100% 100%;"></view>
<view style="text-align: center;"> <view style="text-align: center;">
<text style="color:#E62929;font-size: 36rpx;line-height: 36rpx;font-weight: bold;">领取成功</text> <text style="color:#E62929;font-size: 36rpx;line-height: 36rpx;font-weight: bold;">领取成功</text>
</view> </view>
<view style="margin: 12rpx auto 0 auto;width:380rpx;text-align: center;"> <view style="margin: 12rpx auto 0 auto;width:380rpx;text-align: center;">
<text style="font-weight: 400;color: #620F0F;font-size: 24rpx;">您已经免费领取京东汽车挪车牌,正在为您派送中,请耐心等待。</text> <text style="font-weight: 400;color: #620F0F;font-size: 24rpx;">您已经免费领取京东汽车挪车牌,正在为您派送中,请耐心等待。</text>
</view> </view>
<view @click="goToIndex" style="margin: 12rpx auto 0 auto;width: 398rpx; height: 108rpx;background: url('../../static/act/back-index.png') no-repeat; background-size: 100% 100%;"> <view @click="goToIndex" style="margin: 12rpx auto 0 auto;width: 398rpx; height: 108rpx;background: url('../../../static/act/back-index.png') no-repeat; background-size: 100% 100%;">
<view style="display: flex;justify-content: center;align-items: center;height: 108rpx;position: relative; top:-6rpx"> <view style="display: flex;justify-content: center;align-items: center;height: 108rpx;position: relative; top:-6rpx">
<text style="font-size: 32rpx;color:#8E3B09;text-shadow: 0px 4px 8px rgba(146,66,25,0.27); font-weight: bold;line-height: 36rpx;">返回首页</text> <text style="font-size: 32rpx;color:#8E3B09;text-shadow: 0px 4px 8px rgba(146,66,25,0.27); font-weight: bold;line-height: 36rpx;">返回首页</text>
</view> </view>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</u-popup> </u-popup>
<!-- 已经领取 --> <!-- 已经领取 -->
<u-popup :show="receivedFailShow" mode="center" bgColor="transparent" @close="receivedFailShow = false"> <u-popup :show="receivedFailShow" mode="center" bgColor="transparent" @close="receivedFailShow = false">
<view style="width: 522rpx; height: 396rpx;background: url('../../static/act/receive-success.png') no-repeat; background-size: 100% 100%;position: relative;"> <view style="width: 522rpx; height: 396rpx;background: url('../../../static/act/receive-success.png') no-repeat; background-size: 100% 100%;position: relative;">
<view style="text-align: center;margin-top: 30rpx;"> <view style="text-align: center;margin-top: 30rpx;">
<text style="color:#620F0F;font-size: 36rpx;line-height: 36rpx;font-weight: 500;">温馨提示</text> <text style="color:#620F0F;font-size: 36rpx;line-height: 36rpx;font-weight: 500;">温馨提示</text>
</view> </view>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<text style="font-weight: 400;color: #620F0F;font-size: 24rpx;">{{ alreadyMsg}}</text> <text style="font-weight: 400;color: #620F0F;font-size: 24rpx;">{{ alreadyMsg}}</text>
</view> </view>
<view style="position: absolute; bottom: 52rpx; width: 100%;"> <view style="position: absolute; bottom: 52rpx; width: 100%;">
<view @click="closeReceivedFail" style="margin:0 auto;width: 398rpx; height: 108rpx;background: url('../../static/act/back-index.png') no-repeat; background-size: 100% 100%;"> <view @click="closeReceivedFail" style="margin:0 auto;width: 398rpx; height: 108rpx;background: url('../../../static/act/back-index.png') no-repeat; background-size: 100% 100%;">
<view style="display: flex;justify-content: center;align-items: center;height: 108rpx;position: relative; top:-6rpx"> <view style="display: flex;justify-content: center;align-items: center;height: 108rpx;position: relative; top:-6rpx">
<text style="font-size: 32rpx;color:#8E3B09;text-shadow: 0px 4px 8px rgba(146,66,25,0.27); font-weight: bold;line-height: 36rpx;">知道了</text> <text style="font-size: 32rpx;color:#8E3B09;text-shadow: 0px 4px 8px rgba(146,66,25,0.27); font-weight: bold;line-height: 36rpx;">知道了</text>
</view> </view>
...@@ -468,7 +468,7 @@ export default { ...@@ -468,7 +468,7 @@ export default {
let token = uni.getStorageSync('userToken') let token = uni.getStorageSync('userToken')
if(!token) { if(!token) {
uni.setStorageSync('routerLogin', '/pages/mrAct/index') uni.setStorageSync('routerLogin', '/pagesA/pages/mrAct/index')
//跳转到登录页 //跳转到登录页
let returnPage = '/pages/main'; let returnPage = '/pages/main';
let pageType = "reLaunch" let pageType = "reLaunch"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</view> </view>
</template> </template>
<script> <script>
import area from "../../province-city-county.json" // import area from "../../province-city-county.json"
export default { export default {
props: { props: {
show: { show: {
...@@ -88,19 +88,28 @@ ...@@ -88,19 +88,28 @@
} }
}, },
formatData() { formatData() {
this.province = area.map(t => { let areaArr = []
this.$http.request({
url:'http://jdnc-oss.uzosp.com/2023/01/11/6348409c2d314217be066020c9556c51.json',
method:'get',
data:{ },
load:false,
isFactory:false,
}).then(res => {
areaArr = res.data
this.province = areaArr.map(t => {
return { return {
name: t.name, name: t.name,
areaId: t.areaId areaId: t.areaId
} }
}) })
this.city = area.map(t => t.children.map(v => { this.city = areaArr.map(t => t.children.map(v => {
return { return {
name: v.name, name: v.name,
areaId: v.areaId areaId: v.areaId
} }
})) }))
this.area = area.map(t => t.children.map(v => v.children.map(i => { this.area = areaArr.map(t => t.children.map(v => v.children.map(i => {
return { return {
name: i.name, name: i.name,
areaId: i.areaId areaId: i.areaId
...@@ -126,6 +135,7 @@ ...@@ -126,6 +135,7 @@
let aIdx = this.area[pIdx][cIdx].findIndex(v => v.name == this.addressData.area); let aIdx = this.area[pIdx][cIdx].findIndex(v => v.name == this.addressData.area);
this.indexs = [pIdx, cIdx, aIdx]; this.indexs = [pIdx, cIdx, aIdx];
} }
})
}, },
confirm(e) { confirm(e) {
this.$emit("confirm", e) this.$emit("confirm", e)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment