Commit 51608ae5f305bfa13d230c4e3001c569a04ebb1c
1 parent
0ba7fdcc
新增app内填写地址
Showing
1 changed file
with
5 additions
and
132 deletions
src/components/appAddressToast/appAddressToast.vue
| ... | ... | @@ -73,8 +73,6 @@ export default { |
| 73 | 73 | this.luckDrawGift(content.id); |
| 74 | 74 | // 获取首选地址接口 |
| 75 | 75 | this.myFirstAddress(); |
| 76 | - // 存取抽奖记录选中的列表数据 | |
| 77 | - // this.$set(this, "drawRecordItemInfo", content.drawRecordItemInfo); | |
| 78 | 76 | }, |
| 79 | 77 | // 我的首选地址 |
| 80 | 78 | /** |
| ... | ... | @@ -122,96 +120,6 @@ export default { |
| 122 | 120 | } |
| 123 | 121 | }, |
| 124 | 122 | /** |
| 125 | - * 选中的地址 | |
| 126 | - * * @param {string} uid [用户id] | |
| 127 | - */ | |
| 128 | - getaddressInfo (addressId) { | |
| 129 | - // 加载中提示 | |
| 130 | - // Indicator.open('加载中...'); | |
| 131 | - | |
| 132 | - // 请求接口 | |
| 133 | - this.http( | |
| 134 | - "/Api/" + this.getApiVersion().index + "/addressInfo", | |
| 135 | - { | |
| 136 | - id: addressId | |
| 137 | - }, | |
| 138 | - this.getaddressInfoCallback, | |
| 139 | - { | |
| 140 | - method: "POST" | |
| 141 | - } | |
| 142 | - ); | |
| 143 | - }, | |
| 144 | - | |
| 145 | - /** | |
| 146 | - * 选中的地址 | |
| 147 | - * @param {object} res [服务器返回数据] | |
| 148 | - * @param {object} ext [扩展参数] | |
| 149 | - */ | |
| 150 | - getaddressInfoCallback (res, ext) { | |
| 151 | - // 加载完成 | |
| 152 | - // Indicator.close(); | |
| 153 | - | |
| 154 | - // 返回处理 | |
| 155 | - if (res.code == 200) { | |
| 156 | - // 解构数据 | |
| 157 | - let { data: datas } = res; | |
| 158 | - this.addressInfo = datas; | |
| 159 | - /* 获取选中的地址失败 开始 */ | |
| 160 | - } else if (res.code == 400) { | |
| 161 | - // 获取选中的地址失败 | |
| 162 | - Toast(res.message); | |
| 163 | - } else { | |
| 164 | - // 获取选中的地址失败 | |
| 165 | - Toast("获取选中的地址失败"); | |
| 166 | - } | |
| 167 | - }, | |
| 168 | - /** | |
| 169 | - * 选中的商品信息 | |
| 170 | - * * @param {string} uid [用户id] | |
| 171 | - */ | |
| 172 | - luckDrawGift (id) { | |
| 173 | - // 加载中提示 | |
| 174 | - // Indicator.open('加载中...'); | |
| 175 | - | |
| 176 | - // 请求接口 | |
| 177 | - this.http( | |
| 178 | - "/Api/" + this.getApiVersion().LuckDraw + "/luckDrawGift", | |
| 179 | - { | |
| 180 | - uid: this.getStore("uid"), | |
| 181 | - id: id | |
| 182 | - }, | |
| 183 | - this.luckDrawGiftCallback, | |
| 184 | - { | |
| 185 | - method: "POST" | |
| 186 | - } | |
| 187 | - ); | |
| 188 | - }, | |
| 189 | - | |
| 190 | - /** | |
| 191 | - * 选中的兑换商品信息 | |
| 192 | - * @param {object} res [服务器返回数据] | |
| 193 | - * @param {object} ext [扩展参数] | |
| 194 | - */ | |
| 195 | - luckDrawGiftCallback (res, ext) { | |
| 196 | - // 加载完成 | |
| 197 | - // Indicator.close(); | |
| 198 | - | |
| 199 | - // 返回处理 | |
| 200 | - if (res.code == 200) { | |
| 201 | - // 解构数据 | |
| 202 | - let { data: datas } = res; | |
| 203 | - this.itemInfo = datas; | |
| 204 | - // console.log(this.itemInfo) | |
| 205 | - /* 获取选中的地址失败 开始 */ | |
| 206 | - } else if (res.code == 400) { | |
| 207 | - // 获取选中的兑换商品信息失败 | |
| 208 | - Toast(res.message); | |
| 209 | - } else { | |
| 210 | - // 获取选中的兑换商品信息失败 | |
| 211 | - Toast("获取选中的兑换商品信息失败"); | |
| 212 | - } | |
| 213 | - }, | |
| 214 | - /** | |
| 215 | 123 | * 取消 |
| 216 | 124 | */ |
| 217 | 125 | cancel () { |
| ... | ... | @@ -233,47 +141,12 @@ export default { |
| 233 | 141 | // 隐藏弹框 |
| 234 | 142 | this.$parent.pointsToast_control = false; |
| 235 | 143 | }, |
| 236 | - // 更改地址 | |
| 144 | + // 更改地址跳转原生 | |
| 237 | 145 | changeAddress () { |
| 238 | - // 安卓手机两次更改地址goodsId没拿到从 | |
| 239 | - if (this.isAndroid.value) { | |
| 240 | - // 处理商品ID问题 | |
| 241 | - if (!this.goodsId) { | |
| 242 | - let ext = "&" + window.localStorage.getItem("ext") | |
| 243 | - this.goodsId = this.getParameterByName( | |
| 244 | - "goodsId", | |
| 245 | - ext | |
| 246 | - ); | |
| 247 | - } | |
| 248 | - // 处理商品ID问题 | |
| 249 | - if (!this.orderId) { | |
| 250 | - let ext = "&" + window.localStorage.getItem("ext") | |
| 251 | - this.orderId = this.getParameterByName( | |
| 252 | - "orderId", | |
| 253 | - ext | |
| 254 | - ); | |
| 255 | - } | |
| 256 | - // 处理填写地址弹框显示记录 | |
| 257 | - // let storageExt = "&pointsToast_control=true" | |
| 258 | - // window.localStorage.setItem("ext", storageExt) | |
| 259 | - } | |
| 260 | - // 测试环境 | |
| 261 | - window.location.href = | |
| 262 | - this.getApiVersion().addAddresss + | |
| 263 | - "html/mall/1/#/pages/users/addressList/addressList" + | |
| 264 | - "?uid=" + | |
| 265 | - this.getStore("uid") + | |
| 266 | - "&ext=" + | |
| 267 | - encodeURIComponent( | |
| 268 | - "goodsId=" + | |
| 269 | - this.goodsId + | |
| 270 | - "&orderId=" + | |
| 271 | - this.orderId + | |
| 272 | - "&pointsToast_control=" + | |
| 273 | - this.$parent.pointsToast_control | |
| 274 | - ) + | |
| 275 | - "&from=redirect&redirect=" + | |
| 276 | - encodeURIComponent(window.location.href.split("?")[0]); | |
| 146 | + // 进入赛场传值给原生toId | |
| 147 | + var result = prompt( | |
| 148 | + "jiaShen://enterExamination?toId=" + item.toId | |
| 149 | + ); | |
| 277 | 150 | }, |
| 278 | 151 | // 提交中奖的商品信息 |
| 279 | 152 | /** | ... | ... |