Commit 2f350050 authored by zhoucong's avatar zhoucong

vlog上线测试

parent c86001dc
...@@ -194,15 +194,6 @@ ...@@ -194,15 +194,6 @@
"backgroundColor":"#192033" "backgroundColor":"#192033"
} }
} }
,{
"path" : "pages/vlog/photoAlbum/photoAlbum",
"style" : {
"navigationBarTitleText": "我的照片集",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
}
,{ ,{
"path" : "pages/vlog/share/share", "path" : "pages/vlog/share/share",
"style" : { "style" : {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!-- start:请在该区域编写自己的渲染逻辑 --> <!-- start:请在该区域编写自己的渲染逻辑 -->
<view class="info"> <view class="info">
<view class="info__item"> <view class="info__item">
<image class="image" :src="imgUrl+item.data.images" mode="widthFix"></image> <image class="image" :src="$imgUrl+item.data.images" mode="widthFix"></image>
</view> </view>
<view class="info__item_btn" @click.stop="replace(item)"> <view class="info__item_btn" @click.stop="replace(item)">
更换 更换
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
<!-- end:请在该区域编写自己的渲染逻辑 --> <!-- end:请在该区域编写自己的渲染逻辑 -->
</view> </view>
</view> </view>
<!-- 更换图片弹窗 -->
<u-popup v-model="show" mode="bottom" height="50%"> <u-popup v-model="show" mode="bottom" height="50%">
<view style="display: flex;flex-wrap: wrap;width: 100%;"> <view style="display: flex;flex-wrap: wrap;width: 100%;">
<view style="width: 25%;padding: 10rpx;" :style="{ height: itemWrapHeight + 'px' }" v-for="(item,index) in alternateImages" :key="index"> <view style="width: 25%;padding: 10rpx;" v-for="(item,index) in alternateImages" :key="index">
<image :src="imgUrl+item.images" style="width: 100%;height: 100%;"@click="changeImglist(item.images)"></image> <image :src="'http://picture.pangdly.com/'+item.images" style="width: 100%;height: 100%;"@click="changeImglist(item.images)" mode="widthFix" ></image>
</view> </view>
</view> </view>
</u-popup> </u-popup>
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
overOnePage: false, // 整个区域是否超过一个屏幕 overOnePage: false, // 整个区域是否超过一个屏幕
itemTransition: false, // item 变换是否需要过渡动画, 首次渲染不需要 itemTransition: false, // item 变换是否需要过渡动画, 首次渲染不需要
platform: "", //使用平台 platform: "", //使用平台
$imgUrl:""//图片前缀
} }
}, },
watch: { watch: {
...@@ -72,6 +74,7 @@ ...@@ -72,6 +74,7 @@
}, },
}, },
onReady() { onReady() {
this.$imgUrl=this.imgUrl//因main.js挂载的全局变量页面中显示undifined,特此重新赋值
this.init() this.init()
}, },
methods: { methods: {
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
phone: "", //联系电话 phone: "", //联系电话
address: "" //地址 address: "" //地址
}, //地址信息 }, //地址信息
addressShow: true, addressShow: true,//地址栏弹窗
Freight: {}, //手续费信息 Freight: {}, //手续费信息
} }
}, },
...@@ -136,16 +136,20 @@ ...@@ -136,16 +136,20 @@
}) })
}, },
changeAddress() { //跳转修改地址页面 changeAddress() { //跳转修改地址页面
this.$u.route("pages/vlog/shippingAddress/shippingAddress", this.address) this.$u.route("pages/vlog/shippingAddress/shippingAddress",this.address)
}, },
getAddress() { //获取收货地址 getAddress() { //获取收货地址
this.$request('wechatUser/contact/findContactList', { this.$request('wechatUser/contact/findContactList', {
openid: uni.getStorageSync("openid") openid: uni.getStorageSync("openid")
}).then(res => { }).then(res => {
if (res.code == "00") { if (res.code == "00") {
this.address = res.data[0] if(res.data.length==0){
this.addressShow = false this.$u.route("pages/vlog/shippingAddress/shippingAddress")
this.getFreight() }else{
this.address = res.data[0]
this.addressShow = false
this.getFreight()
}
} else { } else {
uni.showModal({ uni.showModal({
showCancel: false, showCancel: false,
...@@ -157,7 +161,8 @@ ...@@ -157,7 +161,8 @@
}, },
getFreight() { //获取运费 getFreight() { //获取运费
this.$request('scenic/user/product/getProductPostage', { this.$request('scenic/user/product/getProductPostage', {
id: this.productVo.id id: this.productVo.id,
userAddress:this.address.address
}).then(res => { }).then(res => {
if (res.code == "00") { if (res.code == "00") {
this.Freight = res.data this.Freight = res.data
......
<template>
<view class="content">
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad(){//代替 vue 里面的 created
},
onReady() {//代替 vue 里面的 mounted
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.content{padding: 0 20rpx;box-sizing: border-box;margin: 0 auto;}
</style>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<u-icon name="bell-fill" color="#6C8EF3"></u-icon><text style="margin-left: 20rpx;">提醒:长按拖拽排序</text> <u-icon name="bell-fill" color="#6C8EF3"></u-icon><text style="margin-left: 20rpx;">提醒:长按拖拽排序</text>
</view> </view>
<view class="top"> <view class="top">
<dragImg :alternateImages="alternateImages" :listData="imgList" @change="changeImgList" :columns="3"></dragImg> <dragImg :alternateImages="alternateImages" :listData="imgList" @change="changeImgList" :columns="columns"></dragImg>
</view> </view>
<view class="bottom" @click="next"> <view class="bottom" @click="next">
下一步 下一步
...@@ -20,13 +20,16 @@ ...@@ -20,13 +20,16 @@
}, },
data() { data() {
return { return {
columns:3,//每行显示几张图片
alternateImages:[],//备选图片 alternateImages:[],//备选图片
imgList: [],//已选择图片 imgList: [],//已选择图片
sortImglist:[]//排序后图片 sortImglist:[]//排序后图片
} }
}, },
onLoad() { //代替 vue 里面的 created onLoad() { //代替 vue 里面的 created
var allImgList=uni.getStorageSync('imgList') var allImgList=uni.getStorageSync('imgList')
//深拷贝方式防止改变源数据
var allImgList1=JSON.parse(JSON.stringify(allImgList)) var allImgList1=JSON.parse(JSON.stringify(allImgList))
allImgList.forEach(item=>{//备选图片 allImgList.forEach(item=>{//备选图片
var obj={ var obj={
......
...@@ -27,12 +27,16 @@ ...@@ -27,12 +27,16 @@
</view> </view>
</view> </view>
</block> </block>
<view class="" v-show="aa">
成功
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
aa:false,
list:[],//商品列表 list:[],//商品列表
} }
}, },
...@@ -45,11 +49,12 @@ export default { ...@@ -45,11 +49,12 @@ export default {
getList(){//获取商品列表 getList(){//获取商品列表
this.$request("scenic/user/product/findProductList", { this.$request("scenic/user/product/findProductList", {
openid: uni.getStorageSync("openid"), openid: uni.getStorageSync("openid"),
productType:4, productType:9,
type:4 type:4
}).then(res => { }).then(res => {
if (res.code === "00") { if (res.code == "00") {
this.list=res.data.list this.list=res.data.list
this.aa=true
}else{ }else{
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
export default { export default {
data() { data() {
return { return {
isAdd:"",//判断是否为新增
address: { address: {
name: "", //姓名 name: "", //姓名
phone: "", //联系电话 phone: "", //联系电话
...@@ -31,40 +32,81 @@ ...@@ -31,40 +32,81 @@
}, },
onLoad(opction) { //代替 vue 里面的 created onLoad(opction) { //代替 vue 里面的 created
this.address = opction this.address = opction
if(JSON.stringify(opction) === '{}'){
this.isAdd=true
}else{
this.isAdd=false
}
console.log(this.isAdd);
}, },
onReady() { //代替 vue 里面的 mounted onReady() { //代替 vue 里面的 mounted
}, },
methods: { methods: {
baocun() { //保存收货地址 baocun() { //保存收货地址
if (this.$u.test.mobile(this.address.phone)) { //手机号验证 if(this.isAdd){
let data = { if (this.$u.test.mobile(this.address.phone)) { //手机号验证
id: this.address.id, let data = {
name: this.address.name, name: this.address.name,
phone: this.address.phone, phone: this.address.phone,
address: this.address.address, address: this.address.address,
openid: uni.getStorageSync('openid') openid: uni.getStorageSync('openid'),
credentialNumber:"500226199407035525",
credentialType:1,
category:0
}
this.$request('wechatUser/contact/saveContact', data).then(res => {
if (res.code == '00') { //保存成功后跳转
this.$u.route("pages/vlog/orderPay/orderPay")
uni.showToast({
title: '保存成功',
duration: 1000
});
}else{
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: "请正确输入手机号!",
});
} }
this.$request('wechatUser/contact/updateContact', data).then(res => { }else{
if (res.code == '00') { //保存成功后跳转 if (this.$u.test.mobile(this.address.phone)) { //手机号验证
this.$u.route("pages/vlog/orderPay/orderPay") let data = {
uni.showToast({ id: this.address.id,
title: '保存成功', name: this.address.name,
duration: 1000 phone: this.address.phone,
}); address: this.address.address,
}else{ openid: uni.getStorageSync('openid')
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
} }
}) this.$request('wechatUser/contact/updateContact', data).then(res => {
} else { if (res.code == '00') { //保存成功后跳转
uni.showModal({ this.$u.route("pages/vlog/orderPay/orderPay")
showCancel: false, uni.showToast({
title: '提示', title: '保存成功',
content: "请正确输入手机号!", duration: 1000
}); });
}else{
uni.showModal({
showCancel: false,
title: '提示',
content: res.message,
});
}
})
} else {
uni.showModal({
showCancel: false,
title: '提示',
content: "请正确输入手机号!",
});
}
} }
}, },
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<view class="img"> <view class="img">
<block v-for="(item,index) in imgList" :key="index"> <block v-for="(item,index) in imgList" :key="index">
<view class="imgItem" @click="changeImg(item,index)"> <view class="imgItem" @click="changeImg(item,index)">
<image :src="imgUrl+item.url"></image> <image :src="$imgUrl+item.url"></image>
<image v-if="item.check===1" src="../../../static/img/vlog/icon/check.png" class="icon"></image> <image v-if="item.check===1" src="../../../static/img/vlog/icon/check.png" class="icon"></image>
</view> </view>
</block> </block>
...@@ -35,9 +35,12 @@ ...@@ -35,9 +35,12 @@
maxImg: "", //相册规格张数 maxImg: "", //相册规格张数
imgList: [], //上传的图片列表 imgList: [], //上传的图片列表
checkList: [], //选中的图片下标 checkList: [], //选中的图片下标
$imgUrl:""
} }
}, },
onLoad(opction) { //代替 vue 里面的 created onLoad(opction) { //代替 vue 里面的 created
this.$imgUrl=this.imgUrl//因main.js挂载的全局变量页面中显示undifined,特此重新赋值
this.maxImg = opction.yeshu //获取相册规格 this.maxImg = opction.yeshu //获取相册规格
this.imgList = uni.getStorageSync("imgList") this.imgList = uni.getStorageSync("imgList")
...@@ -58,7 +61,7 @@ ...@@ -58,7 +61,7 @@
if (process.env.NODE_ENV === 'development') { //开发环境 if (process.env.NODE_ENV === 'development') { //开发环境
url = "http://192.168.0.213:7888/" url = "http://192.168.0.213:7888/"
} else { } else {
url = "http://picture.pangdly.com/" url = "http://manager.pangdly.com/"
} }
uni.uploadFile({ // s上传图片 uni.uploadFile({ // s上传图片
url: url + 'upload/file/newUpload', url: url + 'upload/file/newUpload',
......
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