页面制作

main
syt 6 days ago
parent d4f9c0cf97
commit c6c04ec5d4
  1. 60
      pages/dongtai/add.vue
  2. 1
      pages/pipei/yuyin/index.vue
  3. 25
      pages/users/chat/index.vue
  4. 82
      pages/users/edit/index.vue
  5. 4
      pages/users/feedback/add.vue
  6. 4
      unpackage/dist/build/app-plus/app-service.js
  7. 6
      unpackage/dist/build/app-plus/app-view.js
  8. 86
      unpackage/dist/dev/app-plus/app-service.js
  9. 76
      unpackage/dist/dev/app-plus/app-view.js

@ -11,7 +11,7 @@
<image class="pic" :src="a"></image> <image class="pic" :src="a"></image>
<image class="del" @click="toDel(index)" src="@/static/fabu-cha.png"></image> <image class="del" @click="toDel(index)" src="@/static/fabu-cha.png"></image>
</view> </view>
<view class="upload" @click="toNext()"> <view class="upload" @click="chooseAvatar()">
<image class="pic" src="@/static/fabu-tianjia.png"></image> <image class="pic" src="@/static/fabu-tianjia.png"></image>
<view class="txt">上传</view> <view class="txt">上传</view>
</view> </view>
@ -21,13 +21,20 @@
<view class="add-fd"> <view class="add-fd">
<view class="btn" @click="toReg()">发布</view> <view class="btn" @click="toReg()">发布</view>
</view> </view>
<u-popup v-model="show1" mode="top" :mask-close-able='false' :zIndex="5">
<view class="permissions_box">
当您使用APP时为了提供图片上传的功能我们需要申请相机/存储权限
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
import permision from "@/js_sdk/wa-permission/permission.js"
export default { export default {
data() { data() {
return { return {
show1: false,
content: "", content: "",
imgurl: [] imgurl: []
}; };
@ -94,6 +101,57 @@
toDel(index) { toDel(index) {
this.imgurl.splice(index,1) this.imgurl.splice(index,1)
}, },
recorderAuthModal: function () {
const that = this;
uni.showModal({
title: '温馨提示',
content: '为了提供图片上传的功能,我们需要申请相机/存储权限,请您确认授权,否则无法使用该功能~',
cancelText: '关闭',
confirmText: '去授权',
success(res) {
that.show1=false
if (res.confirm) {
permision.gotoAppPermissionSetting()
}
}
})
},
chooseAvatar() {
const that = this;
// APP
if(uni.getSystemInfoSync().platform == 'android') {
plus.android.checkPermission(
'android.permission.WRITE_EXTERNAL_STORAGE',
granted => {
if (granted.checkResult==-1){
that.show1=true
}else{
that.show1=false
// show1"-JS"uniuni.navigateTo
that.toNext();
}
},
error => {
console.error('Error checking permission:', error.message);
}
);
that.requestAndroidPermission('android.permission.WRITE_EXTERNAL_STORAGE')
return ;
}
that.toNext();
},
async requestAndroidPermission(permisionID) {
const that = this;
var result = await permision.requestAndroidPermission(permisionID);
console.log("requestAndroidPermission",result)
if(result != 1){
that.recorderAuthModal();
}else{
that.show1=false
// uView"-JS"uniuni.navigateTo
that.toNext();
}
},
toNext(){ toNext(){
this.$u.route({ this.$u.route({
// "" // ""

@ -168,6 +168,7 @@
lon: uni.getStorageSync("jingweiInfo").longitude, lon: uni.getStorageSync("jingweiInfo").longitude,
city: uni.getStorageSync("jingweiInfo").new_city?uni.getStorageSync("jingweiInfo").new_city:uni.getStorageSync("jingweiInfo").city, city: uni.getStorageSync("jingweiInfo").new_city?uni.getStorageSync("jingweiInfo").new_city:uni.getStorageSync("jingweiInfo").city,
}) })
console.log(code, data, msg)
if(code == 200){ if(code == 200){
this.isSucess = 2; this.isSucess = 2;
this.info = data this.info = data

@ -847,16 +847,20 @@
} }
that.giftGiving(); that.giftGiving();
} }
uni.sendSocketMessage({data:JSON.stringify({ if(that.userInfo.isOnline==1){
"userId": uni.getStorageSync("userInfo").id, uni.sendSocketMessage({data:JSON.stringify({
sellerId:that.id, "userId": uni.getStorageSync("userInfo").id,
type, sellerId:that.id,
num: (that.count+1), type,
message: (type == 3?that.content: that.img), num: (that.count+1),
svgaSrc: svgaSrc?svgaSrc:'', message: (type == 3?that.content: that.img),
"topic":"message" svgaSrc: svgaSrc?svgaSrc:'',
})}) "topic":"message"
})})
}else{
that.page = 1;
that.getChatList();
}
that.socialConsumption(type); that.socialConsumption(type);
that.isOpen = false; that.isOpen = false;
@ -922,7 +926,6 @@
if(data.operrole == 0){ if(data.operrole == 0){
this.getConfigData(); this.getConfigData();
} }
}else{ }else{
uni.showToast({ uni.showToast({
title: msg, title: msg,

@ -9,7 +9,7 @@
</view> </view>
<view class="edit-user"> <view class="edit-user">
<view class="user"> <view class="user">
<view class="pic" @click="toNext(userInfo.faceImage?1:3)"> <view class="pic" @click="chooseAvatar(1,userInfo.faceImage?1:3)">
<image class="avatar" v-if="userInfo.faceImage" :src="userInfo.faceImage"></image> <image class="avatar" v-if="userInfo.faceImage" :src="userInfo.faceImage"></image>
<image class="avatar" v-else :src="userInfo.img"></image> <image class="avatar" v-else :src="userInfo.img"></image>
<image class="xiangji" src="@/static/xiangji.png"></image> <image class="xiangji" src="@/static/xiangji.png"></image>
@ -134,7 +134,7 @@
<image class="del" @click.stop="toDel(i)" src="@/static/icon-del.png"></image> <image class="del" @click.stop="toDel(i)" src="@/static/icon-del.png"></image>
<image class="pic" :src="a"></image> <image class="pic" :src="a"></image>
</view> </view>
<view class="upload" @click="uploadImg(2)"> <view class="upload" @click="chooseAvatar(2,2)">
<image src="@/static/jia.png"></image> <image src="@/static/jia.png"></image>
</view> </view>
</view> </view>
@ -148,17 +148,25 @@
<view class="btn" @click="toClick()">确认</view> <view class="btn" @click="toClick()">确认</view>
</view> </view>
</u-popup> </u-popup>
<u-popup v-model="show3" mode="top" :mask-close-able='false' :zIndex="5">
<view class="permissions_box" :style="{'padding-top': (statusBarHeight+64)+'px'}">
当您使用APP时为了提供图片上传的功能我们需要申请相机/存储权限
</view>
</u-popup>
<u-picker mode="region" v-model="show1" :defaultRegion="defaultRegion" @cancel="cancel" @confirm="confirm" ></u-picker> <u-picker mode="region" v-model="show1" :defaultRegion="defaultRegion" @cancel="cancel" @confirm="confirm" ></u-picker>
</view> </view>
</template> </template>
<script> <script>
const systemInfoSync = uni.getSystemInfoSync()
import permision from "@/js_sdk/wa-permission/permission.js"
export default { export default {
data() { data() {
return { return {
show1: false, show1: false,
tabIndex: 1, tabIndex: 1,
show: false, show: false,
show3: false,
background: { background: {
"background": "#ffffff" "background": "#ffffff"
}, },
@ -180,7 +188,10 @@
pickerIndex6: 0, pickerIndex6: 0,
cityType: 1, cityType: 1,
defaultRegion: [], defaultRegion: [],
uploadType: 1 uploadType: 1,
chooseType: 1,
chooseIndex: 1,
statusBarHeight: 0
}; };
}, },
computed: { computed: {
@ -270,8 +281,73 @@
} }
}) })
that.statusBarHeight = systemInfoSync.statusBarHeight;
}, },
methods: { methods: {
recorderAuthModal: function () {
const that = this;
uni.showModal({
title: '温馨提示',
content: '为了提供图片上传的功能,我们需要申请相机/存储权限,请您确认授权,否则无法使用该功能~',
cancelText: '关闭',
confirmText: '去授权',
success(res) {
that.show3=false
if (res.confirm) {
permision.gotoAppPermissionSetting()
}
}
})
},
chooseAvatar(type,index) {
const that = this;
that.chooseType = type;
that.chooseIndex = index;
// APP
if(uni.getSystemInfoSync().platform == 'android') {
plus.android.checkPermission(
'android.permission.WRITE_EXTERNAL_STORAGE',
granted => {
if (granted.checkResult==-1){
that.show3=true
}else{
that.show3=false
// uView"-JS"uniuni.navigateTo
if(that.chooseType==1){
that.toNext(that.chooseIndex)
}else{
that.uploadImg(that.chooseIndex);
}
}
},
error => {
console.error('Error checking permission:', error.message);
}
);
that.requestAndroidPermission('android.permission.WRITE_EXTERNAL_STORAGE')
return ;
}
if(that.chooseType==1){
that.toNext(that.chooseIndex)
}else{
that.uploadImg(that.chooseIndex);
}
},
async requestAndroidPermission(permisionID) {
const that = this;
var result = await permision.requestAndroidPermission(permisionID);
if(result != 1){
that.recorderAuthModal();
}else{
that.show3=false
// uView"-JS"uniuni.navigateTo
if(that.chooseType==1){
that.toNext(that.chooseIndex)
}else{
that.uploadImg(that.chooseIndex);
}
}
},
// //
uploadImg() { uploadImg() {
const that = this const that = this

@ -104,10 +104,12 @@
granted => { granted => {
if (granted.checkResult==-1){ if (granted.checkResult==-1){
that.show1=true that.show1=true
console.log(111)
}else{ }else{
console.log(22)
that.show1=false that.show1=false
// uView"-JS"uniuni.navigateTo // uView"-JS"uniuni.navigateTo
that.uploadImg(); // that.uploadImg();
} }
}, },
error => { error => {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -21876,6 +21876,28 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components var components
try {
components = {
uPopup: __webpack_require__(/*! @/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue */ 65)
.default,
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function () { var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
@ -22007,6 +22029,29 @@ var render = function () {
], ],
1 1
), ),
_c(
"u-popup",
{
attrs: { _i: 15 },
model: {
value: _vm._$g(15, "v-model"),
callback: function () {},
expression: "show1",
},
},
[
_c(
"uni-view",
{ staticClass: _vm._$g(16, "sc"), attrs: { _i: 16 } },
[
_vm._v(
"当您使用APP时,为了提供图片上传的功能,我们需要申请相机/存储权限。"
),
]
),
],
1
),
], ],
1 1
) )
@ -41207,8 +41252,35 @@ var render = function () {
], ],
1 1
), ),
_c(
"u-popup",
{
attrs: { _i: 115 },
model: {
value: _vm._$g(115, "v-model"),
callback: function () {},
expression: "show3",
},
},
[
_c(
"uni-view",
{
staticClass: _vm._$g(116, "sc"),
style: _vm._$g(116, "s"),
attrs: { _i: 116 },
},
[
_vm._v(
"当您使用APP时,为了提供图片上传的功能,我们需要申请相机/存储权限。"
),
]
),
],
1
),
_c("u-picker", { _c("u-picker", {
attrs: { _i: 115 }, attrs: { _i: 117 },
on: { on: {
cancel: function ($event) { cancel: function ($event) {
return _vm.$handleViewEvent($event) return _vm.$handleViewEvent($event)
@ -41218,7 +41290,7 @@ var render = function () {
}, },
}, },
model: { model: {
value: _vm._$g(115, "v-model"), value: _vm._$g(117, "v-model"),
callback: function () {}, callback: function () {},
expression: "show1", expression: "show1",
}, },

Loading…
Cancel
Save